:root {
    --primary-burgundy: #4B7B9A; /* Azul claro sereno / azul suave */
    --primary-blue: #4B7B9A;
    --light-blue: #8FB9D4;
    --bg-nude: #F6F2EC; /* Bege nude / bege elegante */
    --bg-beige: #F6F2EC;
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --accent-gold: #7BA4B5;
    --card-shadow: 0 10px 30px rgba(75, 123, 154, 0.12);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fonte-texto, 'Manrope'), sans-serif;
    background-color: var(--bg-nude);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* Tipografia de Títulos */
h1,
h2,
h3,
.serif-font {
    font-family: var(--fonte-titulo, 'Fraunces'), serif;
}

/* --- Sidebar (Menu Lateral) --- */
.sidebar {
    width: 260px;
    background-color: var(--primary-burgundy);
    color: var(--text-light);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
}

.brand {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 1px;
    font-style: italic;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* --- Conteúdo Principal --- */
.main-content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.greeting h1 {
    font-size: 2.2rem;
    color: var(--primary-burgundy);
    margin-bottom: 0.5rem;
}

.greeting p {
    color: #666;
    font-size: 0.95rem;
}

.profile-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    /* Cor de fundo caso a imagem demore a carregar */

    background-size: cover;
    /* Garante que a foto preencha todo o círculo */
    background-position: center;
    /* Centraliza o rosto na foto */
    border: 2px solid var(--primary-burgundy);
    /* Mantém a bordinha elegante na cor vinho */
}

/* --- Grid de Cartões --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--text-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(108, 59, 70, 0.15);
    border-bottom-color: var(--primary-burgundy);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-nude);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-burgundy);
    margin-bottom: 1.5rem;
    transition: all var(--transition-speed);
}

.card:hover .card-icon {
    background-color: var(--primary-burgundy);
    color: var(--text-light);
}

.card-title {
    font-family: var(--fonte-titulo, 'Fraunces'), serif;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
}

.card-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    color: var(--accent-gold);
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-speed);
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Notificação (Toast) --- */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--text-dark);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast-container.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--bg-nude);
    font-size: 1.2rem;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(58, 58, 69, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--text-light);
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--primary-burgundy);
}

.modal-header h2 {
    color: var(--primary-burgundy);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* --- Responsividade --- */
@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        margin-bottom: 0;
        font-size: 1.5rem;
    }

    .nav-menu {
        flex-direction: row;
        display: none;
        /* Em um app real, aqui teria um botão hambúrguer */
    }

    .main-content {
        padding: 1.5rem;
        padding-bottom: 85px !important;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* --- Barra de Navegação Fixa Mobile (Celular) --- */
.mobile-nav-bar {
    display: none;
}

@media (max-width: 900px) {
    .mobile-nav-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: var(--primary-blue);
        box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-item {
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 0.75rem;
        transition: color 0.2s;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: #FFFFFF;
        font-weight: 600;
    }
}
/* Logo da clínica (tela Configurações) */
.brand-logo {
    display: block;
    max-width: 100%;
    max-height: 80px;
    margin: 0 auto 0.6rem;
    object-fit: contain;
}
