:root {
    --primary: #c67c00; /* Amarelo queimado / Cor do Leão */
    --primary-dark: #a06400;
    --bg: #fdfaf6;
    --sidebar: #ffffff;
    --card: #ffffff;
    --text: #2d261e;
    --text-dim: #7d7266;
    --danger: #d9534f;
    --success: #5cb85c;
    --border: #ede4d9;
    --shadow: 0 4px 6px -1px rgba(198, 124, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background-color: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-shadow: 1px 0 0 rgba(0,0,0,0.05);
    overflow-y: auto;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar-logo img {
    width: 140px;
}

/* Sidebar Menu */
.menu-category {
    margin-bottom: 5px;
}

.category-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    transition: 0.2s;
}

.category-toggle:hover {
    background: rgba(198, 124, 0, 0.05);
}

.category-toggle i {
    font-size: 0.7rem;
    transition: 0.3s;
}

.category-content {
    padding-left: 10px;
    margin-bottom: 10px;
}

.menu-item {
    padding: 12px 16px;
    margin-bottom: 2px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-item:hover {
    background-color: #fdf5e6;
    color: var(--primary);
}

.menu-item.active {
    background-color: #fff4e5;
    color: var(--primary);
}

/* Seções do Painel */
.section { 
    display: none; 
}
.section.active { 
    display: block; 
    animation: fadeIn 0.4s ease; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-card {
    background: var(--card);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

h1 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 25px; }


input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    background: #fff;
}

button {
    background: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover { background: var(--primary-dark); transform: translateY(-1px); }


/* Custom Agenda UI */
.day-config-card {
    background: #fdfdfd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
}
.day-config-card.enabled { border-left-color: var(--primary); }

.time-tag {
    background: #eee;
    color: #333;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chips de Especialidades Modernos */
.service-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #fdfdfd;
    border-radius: 10px;
}

.service-chip {
    background: #fff;
    color: #7f8c8d;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    user-select: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.service-chip i {
    font-size: 0.75rem;
    color: #bdc3c7;
}

.service-chip:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.service-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.service-chip.selected i {
    color: #fff;
}

.service-chip input {
    display: none; /* Esconde o checkbox real */
}

/* Chat UI */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 600px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-list { 
    border-right: 1px solid var(--border); 
    overflow-y: auto; 
    background: #fdfdfd;
}
.chat-window { 
    display: flex; 
    flex-direction: column; 
    height: 100%;
}
.messages-history { 
    flex: 1; 
    padding: 20px; 
    overflow-y: auto; 
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-input-area { 
    padding: 15px; 
    display: flex; 
    gap: 10px; 
    border-top: 1px solid var(--border); 
    background: #fff;
    align-items: center;
}
.chat-input-area input {
    margin-bottom: 0; /* Remove a margem padrão para alinhar com o botão */
}
.chat-input-area button {
    white-space: nowrap;
}

/* Planos e Preços - Design Premium */
.plans-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.plan-card {
    background: #fff;
    border-radius: 24px;
    padding: 50px 35px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.plan-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: 0 15px 45px rgba(230, 126, 34, 0.15);
    background: linear-gradient(to bottom, #ffffff, #fffdfa);
}

.plan-card.featured:hover {
    transform: scale(1.07) translateY(-5px);
}

.plan-tag-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    font-size: 0.75rem;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
    letter-spacing: 1px;
}

.plan-card h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 900;
    margin: 25px 0;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.plan-price span {
    font-size: 1.1rem;
    color: #999;
    font-weight: 400;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 35px 0;
    text-align: left;
    flex: 1;
}

.plan-features li {
    padding: 12px 0;
    font-size: 1rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f5f5f5;
}

.plan-features li:last-child { border-bottom: none; }
.plan-features li i { font-size: 1.1rem; }
.plan-features li i.fa-check { color: #27ae60; }
.plan-features li i.fa-times { color: #ccc; }
.plan-features li.disabled { color: #bbb; opacity: 0.7; }

.btn-plan {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.btn-plan.featured {
    background: var(--primary);
    color: white;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.2);
}

.btn-plan.featured:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.3);
}

.btn-plan.disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    border: none;
    transform: none !important;
    box-shadow: none !important;
}

.plan-card.active-plan {
    border: 3px solid var(--primary);
    box-shadow: 0 15px 45px rgba(230, 126, 34, 0.2);
}

/* Tabela Comparativa Moderna */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eee;
}

.comparison-table th {
    background: #fdfdfd;
    padding: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
    border-bottom: 2px solid #eee;
}

.comparison-table td {
    padding: 18px 20px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}

.comparison-table tr:hover td { background: #fafafa; }
.comparison-table td:not(:first-child) { text-align: center; font-weight: 600; }

.color-success { color: var(--success); }
.color-danger { color: var(--danger); }

/* RESPONSIVIDADE PAINEL */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        flex-direction: row;
        padding: 0;
        z-index: 1000;
        border-right: none;
        border-top: 1px solid var(--border);
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .sidebar-logo, #planBadge, .menu-item:last-child {
        display: none !important; /* Esconde logo, badge de plano e sair na barra inferior */
    }

    .sidebar nav {
        display: flex;
        width: 100%;
        justify-content: space-around;
        height: 100%;
    }

    .menu-item {
        margin-bottom: 0;
        flex-direction: column;
        gap: 4px;
        font-size: 0.6rem;
        padding: 10px 5px;
        flex: 1;
        border-radius: 0;
        justify-content: center;
        text-align: center;
    }

    .menu-item i {
        font-size: 1.1rem;
    }

    /* Mostra apenas os ícones principais na barra de baixo */
    .menu-item:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(7)):not(:nth-child(10)) {
        display: none;
    }

    .main-content {
        padding: 15px;
        padding-bottom: 80px; /* Espaço para a barra inferior */
    }

    .dashboard-card {
        padding: 15px;
    }

    .form-row {
        flex-direction: column !important;
        gap: 15px;
    }

    /* Grids de estatísticas */
    #quickStats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .plans-container {
        flex-direction: column;
        gap: 30px;
    }

    .plan-card.featured {
        transform: none;
    }

    /* Botão Flutuante para Sair (já que sumiu da barra) */
    .btn-logout-mobile {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        background: var(--danger);
        color: white;
        padding: 8px 12px;
        border-radius: 50%;
        z-index: 999;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
}

@media (min-width: 769px) {
    .btn-logout-mobile { display: none; }
}

