/* Paleta de Cores e Variáveis */
:root {
    --primary-blue: #0056b3; /* Azul Médico */
    --primary-hover: #004494;
    --secondary-green: #20c997; /* Verde Limpo/Saúde */
    --secondary-hover: #1ba87e;
    --danger-red: #dc3545; /* Vidas/Óbito */
    --bg-light: #f4f7f6; /* Fundo Assepsia */
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
}

/* Topbar */
.topbar {
    background-color: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--primary-blue);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lives {
    font-weight: 600;
    color: var(--danger-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lives span { color: var(--text-main); font-size: 0.9rem; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

/* Botões */
button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-primary { background-color: var(--primary-blue); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary { background-color: var(--secondary-green); color: white; }
.btn-secondary:hover { background-color: var(--secondary-hover); }

.btn-logout { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-logout:hover { background-color: var(--bg-light); }

/* Layout Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.welcome-section {
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-section h1 { color: var(--primary-blue); margin-bottom: 0.5rem; }
.welcome-section p { color: var(--text-muted); font-size: 1.1rem; }

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* --- AJUSTE DOS CARDS DO DASHBOARD (MAIS ALTOS E IMPONENTES) --- */

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; /* Aumentei um pouco o espaço entre eles */
    margin-top: 3rem;
}

/* --- AJUSTE DOS CARDS DO DASHBOARD (MAIS ALTOS E IMPONENTES COM IMAGENS) --- */

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.module-card {
    min-height: 580px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    padding: 3.5rem 2rem; 
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* BLINDAGEM PARA AS IMAGENS DE FUNDO */
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
}

/* Garante que o texto fique em cima da imagem */
.module-card * {
    position: relative;
    z-index: 10; 
}

/* ::BEFORE universal (carrega e exibe a imagem de fundo) */
.module-card::before {
    content: ""; 
    position: absolute; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; 
    background-position: center; 
    z-index: 2; 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* ::AFTER universal (carrega o overlay para garantir leitura) */
.module-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3; 
    transition: background 0.3s ease;
}

/* Cores de Overlay: Tema Claro (Fica esbranquiçado) */
body:not(.dark-theme) .module-card::after {
    background: rgba(162, 161, 161, 0.299) !important; 
}

/* Cores de Overlay: Tema Escuro (Fica escurecido com o azul padrão do tema) */
body.dark-theme .module-card::after {
    background: rgba(15, 23, 42, 0.436) !important; /* Cor dark sutil */
}

/* Esconde o emoji antigo */
.card-icon {
    display: none !important; 
}

.module-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    /* Sombra sutil no título para garantir leitura mesmo se a imagem for clara */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.41); 
}

body.dark-theme .module-card h2 {
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.module-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    flex-grow: 1; 
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Efeito de hover impactante para cards grandes */
.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.178);
}

/* Animação de Hover para a imagem (pequeno zoom) */
.module-card:hover::before {
    transform: scale(1.08); 
}

/* Escurece levemente o overlay no hover para destacar o texto */
body:not(.dark-theme) .module-card:hover::after { background: rgba(255, 255, 255, 0.248) !important; }
body.dark-theme .module-card:hover::after { background: rgba(15, 23, 42, 0.701) !important; }


/* Ajuste para o botão dentro do card ocupar a largura total */
.module-card .btn-primary, 
.module-card .btn-secondary {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* --- VÍNCULO DAS IMAGENS AOS CARDS --- */
/* Adicione no final do arquivo ou junto com o bloco acima */
.card-plantao::before {
    background-image: url('assets/images/plantao.png');
}
.card-acervo::before {
    background-image: url('assets/images/acervo.png');
}
.card-flashcard::before {
    background-image: url('assets/images/flashcard.png');
}

/* Radar Local */
.ranking-section {
    max-width: 600px;
    margin: 0 auto;
}

.ranking-card h3 { color: var(--primary-blue); margin-bottom: 0.2rem; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.radar-list { list-style: none; }
.radar-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}
.radar-list li:last-child { border-bottom: none; }
.radar-list li:nth-child(2) { background-color: #e6f7ff; border-radius: 6px; border: 1px solid var(--primary-blue); } /* Destaque do usuário */
.pos { font-weight: 700; color: var(--text-muted); width: 30px; }
.score { color: var(--secondary-green); font-weight: 700; }

/* --- TELA DO PLANTÃO (JOGO) --- */
.game-body {
    background-color: var(--bg-light);
}

.game-header {
    justify-content: space-between;
}

.lives-container {
    font-size: 1.5rem;
    display: flex;
    gap: 0.2rem;
}

.game-container {
    max-width: 800px; /* Mais estreito para facilitar a leitura */
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.prontuario-card {
    border-left: 5px solid var(--primary-blue);
}

.prontuario-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.badge {
    background-color: #e6f7ff;
    color: var(--primary-blue);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

#story-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.question {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Opções de Resposta */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-option {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 1.2rem;
    text-align: left;
    font-size: 1rem;
    color: var(--text-main);
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-option:hover {
    border-color: var(--primary-blue);
    background-color: #f8fafc;
}

.btn-option.correct {
    border-color: var(--secondary-green);
    background-color: #e8fbf5;
}

.btn-option.wrong {
    border-color: var(--danger-red);
    background-color: #fdf2f2;
}

/* Feedback Box */
.feedback-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.feedback-box.hidden {
    display: none;
}

.feedback-box.success {
    background-color: #e8fbf5;
    border-left: 4px solid var(--secondary-green);
}

.feedback-box.error {
    background-color: #fdf2f2;
    border-left: 4px solid var(--danger-red);
}

.feedback-box h4 { margin-bottom: 0.5rem; }
.feedback-box p { margin-bottom: 1rem; line-height: 1.5; }

/* --- TELA DE CASOS (PRONTUÁRIOS) --- */
.filters-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.case-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.badge-system {
    background-color: #e2e8f0;
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-difficulty {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.diff-facil { background-color: var(--secondary-green); }
.diff-medio { background-color: #f59e0b; } /* Amarelo/Laranja */
.diff-dificil { background-color: var(--danger-red); }

.case-card h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.case-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.case-card button {
    width: 100%;
}

/* --- TELA DE SISTEMAS DO ACERVO --- */
.systems-grid {
    display: grid;
    /* Cria colunas responsivas que se adaptam ao tamanho da tela */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

/* --- ESTILIZAÇÃO DOS CARDS DE SISTEMAS --- */
.system-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transição mais suave */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* O NOVO EFEITO HOVER (Resolve o bug do texto sumindo) */
.system-card:hover {
    transform: translateY(-5px); /* Sobe um pouquinho */
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15); /* Sombra azul brilhante em vez de mudar o fundo */
    border-color: var(--primary-blue); /* Borda fica azul */
}

.sys-icon {
    font-size: 3.5rem;
    /* Adiciona um fundo sutil arredondado atrás do emoji */
    background-color: #e6f7ff;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

/* O texto do sistema fica azul ao passar o mouse, garantindo leitura no claro e no escuro */
.system-card:hover h3 {
    color: var(--primary-blue);
}

/* --- TELA DE CONTEÚDO DO SISTEMA --- */
.acervo-body {
    background-color: var(--bg-light);
}

.sistema-titulo {
    color: var(--primary-blue);
    font-size: 1.2rem;
    text-transform: capitalize;
}

/* Master Toggle (Chaveador Principal) */
.master-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.master-toggle {
    background-color: #e2e8f0;
    border-radius: 30px;
    display: inline-flex;
    padding: 0.3rem;
    width: 100%;
    max-width: 500px; /* Evita que estique muito no PC */
}

.toggle-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    border-radius: 25px;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background-color: var(--card-bg);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* Abas Secundárias (Tabs) */
.tabs-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    /* Truque de mestre para Mobile: Scroll horizontal invisível */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.tabs-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tab-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 8px 8px 0 0; /* Arredonda só em cima */
    white-space: nowrap; /* Impede que o texto quebre no celular */
    border-bottom: none;
    font-weight: 500;
}

.tab-btn.active {
    background-color: var(--card-bg);
    color: var(--primary-blue);
    font-weight: 700;
    border-color: var(--primary-blue);
    border-bottom: 2px solid var(--card-bg); /* Junta com o card de baixo */
    margin-bottom: -1px;
    z-index: 1;
    position: relative;
}

.tab-content {
    border-top-left-radius: 0; /* Conecta visualmente com a aba ativa */
    min-height: 300px;
    line-height: 1.6;
}

/* Seletor de Doenças Mobile-Friendly */
.disease-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.disease-selector select {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background-color: var(--card-bg);
    outline: none;
    color: var(--text-main);
}

.disease-selector select:focus {
    border-color: var(--primary-blue);
}

/* Utilitários */
.hidden { display: none !important; }

/* Ajustes finos para telas muito pequenas (Celulares) */
@media (max-width: 480px) {
    .sistema-titulo { font-size: 1rem; }
    .topbar { padding: 1rem; flex-direction: column; gap: 1rem; text-align: center; }
    .btn-logout { width: 100%; }

    /* Novo: Transforma as abas horizontais em botões empilhados */
    .tabs-container {
        flex-direction: column;
        overflow-x: visible; /* Remove o scroll horizontal */
        gap: 0.5rem;
    }

    .tab-btn {
        width: 100%;
        border-radius: 8px; /* Arredonda todos os cantos no mobile */
        border-bottom: 1px solid var(--border-color); /* Restaura a borda inferior */
    }

    .tab-btn.active {
        margin-bottom: 0; /* Remove o truque de colar no card */
        border: 2px solid var(--primary-blue); /* Destaca o botão inteiro */
    }

    .tab-content {
        border-top-left-radius: 8px; /* Restaura o arredondamento do card de baixo */
        margin-top: 0.5rem;
    }
}

/* --- TELA DE PERFIL E ASSINATURA --- */
:root {
    --premium-gold: #f59e0b; /* Cor para destacar o plano PRO */
    --premium-hover: #d97706;
}

.perfil-body {
    background-color: var(--bg-light);
}

.perfil-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* A direita (pagamento) fica maior no PC */
    gap: 2rem;
    align-items: start;
}

/* Card do Usuário */
.user-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-container {
    position: relative;
    margin-bottom: 1rem;
}

.avatar {
    font-size: 4rem;
    background-color: #e2e8f0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
}

.badge-plano {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.plano-free { background-color: var(--text-muted); }
.plano-pro { background-color: var(--premium-gold); }

.email-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.stats-container {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    width: 100%;
}
.btn-outline:hover { border-color: var(--primary-blue); color: var(--primary-blue); }

/* Card Premium (Paywall) */
.premium-card {
    border-top: 5px solid var(--premium-gold);
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.plantao-counter {
    text-align: right;
}

.plantao-counter .utilizados {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.plantao-counter .total { font-size: 1.2rem; color: var(--text-muted); }
.plantao-counter p { font-size: 0.8rem; color: var(--text-muted); }

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-blue);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.premium-pitch p {
    color: var(--danger-red);
    background-color: #fdf2f2;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.upgrade-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 2rem;
    border-radius: 12px;
    color: white;
    text-align: center;
}

.pro-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.pro-title span {
    color: var(--premium-gold);
    font-weight: 800;
}

.pro-benefits {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pro-benefits li { font-size: 0.95rem; color: #e2e8f0; }

.btn-premium {
    background-color: var(--premium-gold);
    color: #1e293b;
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-premium:hover {
    background-color: var(--premium-hover);
    transform: translateY(-2px);
}

/* Responsivo para o Perfil */
@media (max-width: 768px) {
    .perfil-grid {
        grid-template-columns: 1fr; /* Empilha as colunas no mobile */
    }
    
    .premium-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .plantao-counter { text-align: left; }
}

/* --- NAVEGAÇÃO E BOTÕES PADRONIZADOS --- */
.btn-nav {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav:hover {
    background-color: var(--primary-blue);
    color: white;
}

.btn-logout-nav {
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.btn-logout-nav:hover {
    background-color: #fdf2f2;
    color: var(--danger-red);
}

/* Hambúrguer oculto no Desktop */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;

    /* A MÁGICA PARA MATAR O QUADRADO AZUL AQUI: */
    outline: none; /* Mata o quadrado azul de foco no PC/Android */
    -webkit-tap-highlight-color: transparent;
}

/* --- RESPONSIVIDADE DO MENU (CELULAR) --- */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block; 
        z-index: 105; /* Garante que o botão fique sempre por cima de tudo */
        position: relative;
    }

    .user-profile {
        display: none; 
        position: absolute;
        top: 130px; /* <--- AQUI ESTÁ A CORREÇÃO: Descemos o menu para não cobrir o botão */
        right: 1rem;
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Sombra mais forte para destacar */
        border: 1px solid var(--border-color);
        gap: 0.8rem;
        z-index: 100; /* Fica abaixo do botão hambúrguer (105) */
        width: 220px;
        
        /* Opcional: Animação suave ao abrir o menu */
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Classe ativada pelo JavaScript */
    .user-profile.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .btn-nav {
        width: 100%;
        text-align: center;
    }
}

/* --- LANDING PAGE --- */
.landing-body {
    background-color: #ffffff;
}

.landing-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.landing-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Hero Section */
.hero-section {
    padding: 6rem 1rem;
    background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    background-color: #e6f7ff;
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 8px;
}

/* Features Section */
.features-section {
    padding: 5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-header h2 {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.features-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: 5rem 1rem;
    background-color: var(--bg-light);
    text-align: center;
}

.pricing-section h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.pricing-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--border-color);
    text-align: left;
    position: relative;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    margin-bottom: 2.5rem;
}

.plan-features li {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.plan-features .disabled {
    color: #cbd5e1;
}

.pro-card {
    border: 2px solid var(--premium-gold);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
    transform: scale(1.05);
}

.pro-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--premium-gold);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer */
.landing-footer {
    padding: 3rem 1rem;
    text-align: center;
    background-color: var(--text-main);
    color: #fff;
}

.landing-footer .logo {
    color: #fff;
    margin-bottom: 1rem;
}

.landing-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsividade da Landing Page */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.2rem; }
    .pro-card { transform: scale(1); } /* Remove o zoom no mobile para não quebrar a tela */
    .pricing-grid { flex-direction: column; }
}
@media (max-width: 480px) {
    .landing-nav { display: none; } /* Esconde os botões do header no mobile para ficar mais limpo */
}

/* --- TELA DE AUTENTICAÇÃO --- */
.auth-body {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e6f7ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    display: flex;
    max-width: 900px;
    width: 100%;
    background-color: transparent;
    gap: 3rem;
    align-items: center;
}

.auth-branding {
    flex: 1;
}

.logo-large {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.auth-branding h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-branding p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-form-container {
    flex: 1;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    background-color: var(--card-bg);
}

/* Tabs Login/Cadastro */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; /* Sobrepõe a borda do container */
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Botão do Google */
.btn-google {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.btn-google:hover {
    background-color: #f8fafc;
    box-shadow: var(--shadow-md);
}

/* Divisor Visual (O famoso "Ou") */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Formulário Padrão */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-blue);
}

.auth-form .btn-primary {
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.auth-terms {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.5;
}

.auth-terms a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* Responsividade Auth */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        gap: 2rem;
    }
    .auth-branding {
        text-align: center;
    }
    .auth-form-container {
        padding: 2rem 1.5rem;
    }
}

/* --- TELA DE CASOS (ESTILO CLÁSSICO + SCROLL HORIZONTAL) --- */
.difficulty-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.3rem;
}

.count-badge {
    background-color: #e2e8f0;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- CARROSSEL, SETAS E BARRA DE ROLAGEM --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Setas Flutuantes */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-blue);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.scroll-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.left-btn { left: -22px; }
.right-btn { right: -22px; }

/* O Container do Scroll */
.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem; /* Mais espaço para a barra de rolagem não colar no card */
    cursor: grab;
    width: 100%;
}

.horizontal-scroll:active {
    cursor: grabbing;
}

/* Barra de rolagem horizontal elegante para o PC */
.horizontal-scroll::-webkit-scrollbar {
    height: 8px; /* Altura da barra horizontal */
}
.horizontal-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* No mobile, as setas somem (porque lá o touch impera) e a barra fica menor */
@media (max-width: 768px) {
    .scroll-btn { display: none; }
    .horizontal-scroll::-webkit-scrollbar { height: 4px; }
    .horizontal-scroll { padding-bottom: 1rem; }
}

/* O Card igualzinho ao seu Print */
.case-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
    /* Tamanho fixo para o card não ser esmagado no carrossel */
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0; 
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Quando o caso está concluído */
.case-card.concluido {
    opacity: 0.6;
    border-top-color: var(--secondary-green);
}
.case-card.concluido:hover { transform: none; }

.case-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.badge-system {
    background-color: #e2e8f0;
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-difficulty {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.diff-facil { background-color: var(--secondary-green); }
.diff-medio { background-color: #f59e0b; }
.diff-dificil { background-color: var(--danger-red); }

.case-card h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.patient-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* --- ÁREA DO RESUMO (LIMITADA COM SCROLL E LER MENOS) --- */
.resumo-container {
    height: 150px; /* Aumentado para preencher o vazio e dar respiro */
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.resumo-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    max-height: 125px; /* O texto ganha muito mais espaço antes do scroll */
    width: 100%;
    overflow: hidden;
}

/* Classe ativada via JS quando clica em Ler Mais */
.resumo-text.expanded {
    overflow-y: auto;
    padding-right: 5px;
}

.resumo-text.expanded::-webkit-scrollbar { width: 4px; }
.resumo-text.expanded::-webkit-scrollbar-track { background: #f8fafc; border-radius: 4px; }
.resumo-text.expanded::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.btn-ler-mais {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-top: auto; /* TRUQUE: Empurra o botão pro fundo do container */
    padding-top: 0.5rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.btn-ler-mais:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- DRAG TO SCROLL (CURSOR DE ARRASTAR) --- */
.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    cursor: grab; /* Ícone de mãozinha aberta */
}

.horizontal-scroll:active {
    cursor: grabbing; /* Ícone de mãozinha fechada ao clicar */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.btn-ler-mais:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Botões do Card */
.btn-retomar {
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}
.btn-retomar:hover { background-color: #bae6fd; }

.btn-concluido {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* --- TELA ACERVO: LISTA DE PATOLOGIAS E BUSCA --- */

/* Barra de Pesquisa */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

#input-busca {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.2s;
}

#input-busca:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* O Quadro de Doenças */
.doencas-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden; /* Mantém os cantos arredondados do quadro inteiro */
}

/* A Linha individual da doença */
.doenca-row {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s, padding-left 0.2s;
}

/* Tira a linha debaixo da última doença para não ficar dupla com a borda do quadro */
.doenca-row:last-child {
    border-bottom: none;
}

.doenca-row:hover {
    background-color: #f8fafc;
    color: var(--primary-blue);
    padding-left: 1.8rem; /* Pequeno avanço elegante para a direita no hover */
}

.doenca-row::after {
    content: '➔';
    color: var(--primary-blue);
    opacity: 0;
    transition: opacity 0.2s;
}

.doenca-row:hover::after {
    opacity: 1;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.items-per-page select {
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    outline: none;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-page {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-blue);
    color: white;
}

.btn-page:disabled {
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Estilos de Retorno (Voltar à lista) */
.btn-voltar-lista {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
}

.btn-voltar-lista:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.titulo-doenca {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* --- TELA DE FLASHCARDS (3D FLIP) --- */
.flashcards-body {
    background-color: #eef2f5;
}

/* O "Palco" 3D */
.scene {
    width: 100%;
    max-width: 600px;
    height: 400px;
    perspective: 1000px; /* Profundidade do 3D */
    margin-bottom: 2rem;
}

/* A Carta em si */
.card-flip {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

/* Classe ativada no JS para girar 180 graus */
.card-flip.is-flipped {
    transform: rotateY(180deg);
}

/* As faces da carta (Frente e Verso compartilham isso) */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    /* Removidos os flex e paddings que quebravam o scroll! O HTML agora tem as regras certas injetadas nele. */
    border: 1px solid var(--border-color);
}

/* Frente */
.card-face--front {
    border-top: 6px solid var(--danger-red);
}

/* Verso (Já começa virado de costas no eixo Y) */
.card-face--back {
    transform: rotateY(180deg);
    border-top: 6px solid var(--secondary-green);
    background-color: #f8fafc; /* Ligeiramente diferente para destacar que é o verso */
}

/* Tipografia dos Cards */
.card-tag {
    position: absolute;
    top: 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}
.tag-erro { background: #fdf2f2; color: var(--danger-red); }
.tag-acerto { background: #e8fbf5; color: var(--secondary-green); }

.contexto-clinico {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.pergunta-clinica {
    color: var(--primary-blue);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.instrucao-clique {
    position: absolute;
    bottom: 1.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
}

.resposta-correta {
    color: var(--secondary-green);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.justificativa-texto {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Botões de Avaliação (Spaced Repetition) */
.evaluation-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.btn-eval {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: white;
    transition: transform 0.2s, filter 0.2s;
}

.btn-eval:hover { transform: translateY(-3px); filter: brightness(1.1); }

.eval-hard { background-color: var(--danger-red); }
.eval-good { background-color: #f59e0b; }
.eval-easy { background-color: var(--secondary-green); }

.end-review-container {
    text-align: center;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    max-width: 500px;
}

/* --- TEMA ESCURO (DARK MODE) --- */
body.dark-theme {
    /* Redefinição das Variáveis Globais */
    --bg-light: #0f172a;        /* Fundo principal escuro (Slate 900) */
    --card-bg: #1e293b;         /* Fundo dos cards (Slate 800) */
    --text-main: #f8fafc;       /* Texto branco gelo */
    --text-muted: #94a3b8;      /* Texto cinza claro */
    --border-color: #334155;    /* Bordas escuras */
    --primary-blue: #38bdf8;    /* Azul mais claro e vibrante para dar contraste no escuro */
    
    background-color: var(--bg-light);
    color: var(--text-main);
    background-image: none;     /* Remove marca d'água no modo escuro para não poluir */
}

/* Ajustes específicos do Modo Escuro */
body.dark-theme .topbar {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.dark-theme .card, 
body.dark-theme .module-card, 
body.dark-theme .ranking-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

body.dark-theme .btn-nav {
    color: var(--text-main);
    border-color: var(--border-color);
}

body.dark-theme .btn-nav:hover {
    background-color: var(--border-color);
}

body.dark-theme .btn-logout-nav {
    color: #f87171; /* Vermelho claro */
    border-color: #f87171;
}

body.dark-theme .btn-logout-nav:hover {
    background-color: rgba(248, 113, 113, 0.1);
}

body.dark-theme .radar-list li {
    border-bottom-color: var(--border-color);
}

body.dark-theme .logo-icon {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4)); /* Efeito neon sutil no ícone */
}

/* Correção das pílulas e filtros no Modo Escuro */
body.dark-theme .badge-system,
body.dark-theme .count-badge {
    background-color: #334155; /* Fundo cinza escuro/azulado */
    color: var(--text-main);   /* Texto claro */
}

/* Aproveitando para garantir que os botões de filtro também fiquem bonitos no escuro */
body.dark-theme .filter-btn {
    background-color: var(--card-bg);
    color: var(--text-muted);
    border-color: var(--border-color);
}

body.dark-theme .filter-btn:hover,
body.dark-theme .filter-btn.active {
    background-color: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
}

/* Cores das Dificuldades (cobrindo com e sem acento do JS) */
.diff-facil, .diff-fácil { background-color: #10b981; } /* Verde */
.diff-medio, .diff-médio { background-color: #f59e0b; } /* Laranja */
.diff-dificil, .diff-difícil { background-color: #ef4444; } /* Vermelho */

/* --- Correção do Flashcard no Tema Escuro --- */
body.dark-theme .card-face--back {
    background-color: #0f172a; /* Deixa o verso bem escuro, combinando com o fundo da tela */
}

/* Ajusta as etiquetas (tags) para não ficarem com fundo claro no escuro */
body.dark-theme .tag-erro {
    background-color: rgba(239, 68, 68, 0.15); /* Fundo vermelho translúcido e elegante */
    color: #f87171; /* Vermelho mais claro para leitura */
}

body.dark-theme .tag-acerto {
    background-color: rgba(16, 185, 129, 0.15); /* Fundo verde translúcido */
    color: #34d399; /* Verde mais claro para leitura */
}

/* Escurece a instrução de "Tap para virar" */
body.dark-theme .instrucao-clique {
    color: var(--border-color);
}

/* Opcional: Escurece a tela de fim de revisão */
body.dark-theme .end-review-container {
    background-color: var(--card-bg);
}

/* --- CONTROLE DA LOGO DINÂMICA (TEMA CLARO E ESCURO) --- */

/* 1. Por padrão (Tema Claro), a logo branca fica ESCONDIDA */
.logo-escura {
    display: none;
}

/* 2. Por padrão (Tema Claro), a logo escura fica VISÍVEL */
.logo-clara {
    display: block;
}

/* 3. Quando o MODO ESCURO é ativado na página: INVERTEMOS AS LOGOS */
body.dark-theme .logo-clara {
    display: none;
}

body.dark-theme .logo-escura {
    display: block;
}

/* --- LER MAIS NO ACERVO (TEXTOS GIGANTES) --- */
.texto-expansivel-container {
    position: relative;
    margin-top: 1rem;
}

.texto-expansivel {
    max-height: 200px; /* Mostra apenas o equivalente a uns 2 parágrafos iniciais */
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
    line-height: 1.6;
}

/* Quando o JS adiciona essa classe, a caixa cresce para caber tudo */
.texto-expansivel.aberto {
    max-height: 8000px; 
}

/* O efeito esfumaçado (fade) no final do texto cortado */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(transparent, var(--card-bg));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fade-overlay.oculto {
    opacity: 0; /* Some quando o texto está expandido */
}

.btn-expandir {
    display: block;
    width: 100%;
    background: none;
    border: 1px dashed var(--border-color);
    color: var(--primary-blue);
    padding: 12px;
    margin-top: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-expandir:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary-blue);
}

/* --- Correção do Fundo Branco no Radar Local (Ranking) --- */
body.dark-theme .radar-list li {
    background-color: transparent !important; /* Mata qualquer fundo branco perdido */
    color: var(--text-main);
}

/* Dá um destaque elegante e escuro para a sua posição (2ª linha do mock) */
body.dark-theme .radar-list li:nth-child(2) {
    background-color: rgba(56, 189, 248, 0.15) !important; /* Fundo azul translúcido neon */
    border: 1px solid rgba(56, 189, 248, 0.3); /* Bordinha sutil */
}

/* --- CORREÇÃO DEFINITIVA DAS OPÇÕES DO JOGO (PLANTÃO) --- */

/* 1. Deixa todos os botões injetados com fundo escuro e letra branca */
body.dark-theme #options-container button,
body.dark-theme #options-container div {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
}

/* 2. Efeito ao passar o mouse */
body.dark-theme #options-container button:hover:not(:disabled),
body.dark-theme #options-container div:hover {
    background-color: #334155 !important;
}

/* 3. A MÁGICA: Quando você clica e o botão é desabilitado ou ganha classe */
/* Isso impede o fundo de ficar branco. Ele fica escuro, mas a borda e o texto ficam azuis pra mostrar que foi selecionado */
body.dark-theme #options-container button:disabled,
body.dark-theme #options-container .selected,
body.dark-theme #options-container .selecionada,
body.dark-theme #options-container .active {
    background-color: #0f172a !important; /* Fundo bem escuro */
    color: var(--primary-blue) !important; /* Texto azul neon */
    border-color: var(--primary-blue) !important; /* Borda azul neon */
    opacity: 0.9 !important;
}

/* 4. Garante que a caixa de Feedback (Avançar) também fique bonita no escuro */
body.dark-theme .feedback-box {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main);
}

body.dark-theme #feedback-title {
    color: var(--primary-blue);
}

/* --- ESTILIZAÇÃO DOS ELEMENTOS EXTRAS DO CARD --- */

.module-card {
    min-height: 580px; /* Sua nova altura preferida */
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-top { flex-grow: 1; }

/* Grid de Stats (Card 1) */
.card-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(48, 48, 48, 0.715);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
}
.stat-item { text-align: center; }
.stat-value { display: block; font-weight: 700; color: var(--primary-blue); font-size: 1.2rem; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

.mini-tag-list { display: flex; gap: 5px; justify-content: center; }
.mini-tag { background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; color: #475569; font-weight: 600; }

/* Quick Links (Card 2) */
.quick-links {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}
.quick-links li {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.quick-links li:last-child { border-bottom: none; color: var(--primary-blue); font-weight: 700; }

/* Review Box (Card 3) */
.review-box { margin-top: 2rem; }
.review-info { font-size: 0.95rem; margin-bottom: 10px; color: var(--text-main); }
.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.progress-fill { height: 100%; background: var(--secondary-green); border-radius: 10px; }
.streak-text { font-size: 0.85rem; color: #f59e0b; font-weight: 700; }

/* Ajuste Dark Mode para esses novos itens */
body.dark-theme .mini-tag { background: #334155; color: #cbd5e1; }
body.dark-theme .progress-bar-container { background: #334155; }
body.dark-theme .card-stats { background: rgba(56, 189, 248, 0.1); }

/* --- ESTILO DO CENTRO DE TREINAMENTO (QUESTÕES) --- */
.treinamento-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-resumo {
    background: var(--card-bg);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.view-toggle { display: flex; background: var(--bg-light); border-radius: 6px; padding: 4px; border: 1px solid var(--border-color); }
.toggle-view { background: transparent; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; color: var(--text-muted); font-weight: 600; transition: all 0.2s; }
.toggle-view.active { background: var(--card-bg); color: var(--primary-blue); box-shadow: var(--shadow-sm); }

/* Card da Questão */
.questao-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.questao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.questao-enunciado { font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.5rem; color: var(--text-main); }

.opcao-btn {
    display: block; width: 100%; text-align: left; padding: 12px 15px; margin-bottom: 10px;
    background: transparent; border: 1px solid var(--border-color); border-radius: 6px;
    cursor: pointer; font-size: 0.95rem; color: var(--text-main); transition: all 0.2s;
}

.opcao-btn:hover:not(:disabled) { background: rgba(56, 189, 248, 0.05); border-color: var(--primary-blue); }

/* Estados de Resposta (Claro e Escuro) */
.opcao-btn.correta { background-color: rgba(16, 185, 129, 0.15) !important; border-color: #10b981 !important; color: #10b981 !important; font-weight: bold; }
.opcao-btn.errada { background-color: rgba(239, 68, 68, 0.15) !important; border-color: #ef4444 !important; color: #ef4444 !important; font-weight: bold; }
.opcao-btn:disabled { cursor: not-allowed; opacity: 0.7; }

.justificativa-box {
    margin-top: 15px; padding: 15px; border-radius: 6px; font-size: 0.9rem; line-height: 1.5; display: none;
}
.justificativa-box.show { display: block; }
.justificativa-box.sucesso { background-color: rgba(16, 185, 129, 0.1); border-left: 4px solid #10b981; color: var(--text-main); }
.justificativa-box.falha { background-color: rgba(239, 68, 68, 0.1); border-left: 4px solid #ef4444; color: var(--text-main); }

.btn-report { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.85rem; }
.btn-report:hover { color: #ef4444; text-decoration: underline; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { width: 90%; max-width: 400px; padding: 20px; }
body.dark-theme .modal-content { background: var(--card-bg); border: 1px solid var(--border-color); }
body.dark-theme .view-toggle { background: #0f172a; }
body.dark-theme .toggle-view.active { background: #1e293b; color: #38bdf8; }

/* --- IMAGENS DOS SISTEMAS --- */
.sys-image {
    width: 100%;
    height: 180px; /* Mantém todas as imagens com a mesma altura */
    object-fit: cover; /* Garante que a imagem preencha o espaço sem amassar */
    border-radius: 8px; /* Cantos arredondados na imagem */
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Sombra elegante */
    transition: transform 0.3s ease;
}

/* --- IMAGENS DOS SISTEMAS --- */
.sys-image {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Aumenta a imagem sutilmente no hover */
.system-card:hover .sys-image {
    transform: scale(1.05); 
}

/* --- AVATAR DE LETRA E MODAL DE EDIÇÃO --- */

/* Transforma o círculo do avatar num fundo premium para a letra */
.avatar {
    background: linear-gradient(135deg, var(--primary-blue), #8b5cf6);
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

/* O fundo escuro borrado que fica atrás do pop-up */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* A caixinha do pop-up */
.modal-content {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
}

/* Esconde o pop-up */
.hidden {
    display: none !important;
}

/* --- SHIMMER LOADING (ESQUELETO) --- */
.shimmer-container { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.shimmer-card { 
    background: var(--card-bg); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    padding: 20px; 
    overflow: hidden; 
    position: relative; 
}
.shimmer-line { height: 16px; background: #334155; border-radius: 4px; margin-bottom: 12px; width: 100%; }
.shimmer-line.title { height: 24px; width: 40%; margin-bottom: 20px; }
.shimmer-line.short { width: 70%; }
.shimmer-box { height: 60px; background: #334155; border-radius: 6px; margin-top: 20px; }

/* Animação do brilho passando */
.shimmer-card::before {
    content: ''; 
    position: absolute; 
    top: 0; left: -150%; 
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { left: 150%; } }

/* --- ANIMAÇÃO DA RESPOSTA CORRETA NO JOGO --- */
@keyframes pulse-green {
    0% { transform: scale(1); background-color: var(--card-bg); border-color: var(--border-color); color: var(--text-main); }
    50% { transform: scale(1.02); background-color: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #10b981; }
    100% { transform: scale(1); background-color: rgba(16, 185, 129, 0.1); border-color: #10b981; color: #10b981; }
}

.pulse-animation {
    animation: pulse-green 1.5s infinite;
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
}

/* --- CORREÇÃO DO CABEÇALHO PARA CELULAR --- */
@media (max-width: 600px) {
    .game-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }
    .game-header-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- GARANTIA ABSOLUTA DE CORES (VENCE O :disabled DO MODO ESCURO) --- */

/* Acerto (Verde) */
#options-container button.correta,
body.dark-theme #options-container button.correta {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 2px solid #10b981 !important;
    color: #10b981 !important;
    opacity: 1 !important;
}

/* Erro (Vermelho) */
#options-container button.errada,
body.dark-theme #options-container button.errada {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 2px solid #ef4444 !important;
    color: #ef4444 !important;
    opacity: 1 !important;
}

/* Animação da resposta correta no jogo */
@keyframes pulse-green {
    0% { transform: scale(1); background-color: transparent; border-color: var(--border-color); color: var(--text-main); }
    50% { transform: scale(1.02); background-color: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #10b981; }
    100% { transform: scale(1); background-color: rgba(16, 185, 129, 0.1); border-color: #10b981; color: #10b981; }
}

#options-container button.pulse-animation,
body.dark-theme #options-container button.pulse-animation {
    animation: pulse-green 1.5s infinite !important;
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 2px solid #10b981 !important;
    color: #10b981 !important;
    opacity: 1 !important;
}

/* --- FUNDO CINEMÁTICO DO DASHBOARD (GLASSMORPHISM) --- */
.dashboard-body {
    /* Tema Claro: Fundo branco/gelo com 90% a 92% de opacidade sobre a imagem */
    background-image: linear-gradient(rgba(255, 255, 255, 0.292), rgba(255, 255, 255, 0.341)), url('assets/images/fundo_hospital.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax elegante ao rolar a tela */
}

/* Ajuste automático para o Tema Escuro */
body.dark-theme.dashboard-body {
    /* Tema Escuro: Slate 900 com 90% a 92% de opacidade sobre a imagem */
    background-image: linear-gradient(rgba(43, 57, 91, 0.9), rgba(15, 23, 42, 0.559)), url('assets/images/fundo_hospital.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
}

/* Transição suave do fundo inteiro ao trocar de tema */
body.dashboard-body {
    transition: background-image 0.4s ease;
}


/* --- CONTROLE DE COR DOS TEXTOS DOS CARDS DO DASHBOARD --- */

/* Pega os parágrafos, os rótulos de status, os links e os textos de revisão */
.module-card p, 
.module-card .stat-label,
.module-card .review-info,
.module-card .quick-links li {
    /* Troque #ffffff (Branco) por #000000 (Preto) para testar o que fica melhor */
    color: #e2e2e2 !important; 
    
    /* Deixa a letra um pouco mais "gordinha" para dar leitura */
    font-weight: 600; 
    
    /* ESSENCIAL: Cria uma bordinha/sombra escura atrás da letra que destaca ela em qualquer fundo */
    text-shadow: 0 1px 4px rgb(0, 0, 0) !important; 
}

/* Se quiser testar mudar a cor dos Títulos (Plantão Médico, etc) que estão azuis: */
.module-card h2 {
    /* color: #ffffff; */ /* Descomente essa linha se quiser testar os títulos em branco também */
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Sombra mais forte para o título */
}

/* Ajuste específico para a frase da Ofensiva (que está laranja/amarela) */
.module-card .streak-text {
    text-shadow: 0 1px 3px rgb(0, 0, 0);
}

/* --- GRID DE SISTEMAS: 2 COLUNAS NO CELULAR E FORMATO VERTICAL (9:16) --- */
@media (max-width: 600px) {
    .systems-grid {
        /* Força sempre 2 colunas no celular, dividindo o espaço igualmente */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem; /* Espaço um pouco menor para caber perfeitamente na tela */
        padding-bottom: 2rem;
    }

    .system-card {
        /* A Mágica: Força a proporção exata de 9 de largura por 16 de altura */
        aspect-ratio: 9 / 16;
        padding: 0.6rem; /* Reduz o padding interno para sobrar mais espaço pra imagem */
        justify-content: flex-start; /* Alinha a imagem lá no topo */
    }

    .sys-image {
        /* A imagem vai ocupar 75% da altura total do card vertical */
        height: 75%;
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: 6px; 
    }

    .system-card h3 {
        /* Ajuste fino da fonte para as palavras grandes (ex: "Cardiovascular") não vazarem */
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-grow: 1; /* O texto centraliza perfeitamente no espaço que sobrar embaixo */
    }
}

/* --- CORREÇÃO DEFINITIVA: OPÇÕES DA RECUPERAÇÃO DE CRM --- */

/* 1. Garante o fundo padrão no modo escuro (SEM !important para não travar o botão) */
body.dark-theme #recuperacao-opcoes .btn-option {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* 2. Conserta o Hover (mouse em cima) no modo escuro */
body.dark-theme #recuperacao-opcoes .btn-option:hover:not(:disabled) {
    background-color: #334155 !important; 
    color: #ffffff !important; 
    border-color: var(--primary-blue) !important; 
}

/* 3. A MÁGICA: Garante que o VERDE do acerto fure a blindagem do modo escuro */
body.dark-theme #recuperacao-opcoes .btn-option.correta,
#recuperacao-opcoes .btn-option.correta {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 2px solid #10b981 !important;
    color: #10b981 !important;
}

/* 4. A MÁGICA: Garante que o VERMELHO do erro fure a blindagem do modo escuro */
body.dark-theme #recuperacao-opcoes .btn-option.errada,
#recuperacao-opcoes .btn-option.errada {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 2px solid #ef4444 !important;
    color: #ef4444 !important;
}

/* --- TOAST NOTIFICATIONS (Substitutos do Alert Nativo) --- */
.toast-custom {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px); /* Começa escondido pra cima */
    background-color: var(--card-bg);
    color: var(--text-main);
    padding: 1.2rem 2rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 9999;
    font-weight: 600;
    text-align: center;
    width: 90%;
    max-width: 450px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    line-height: 1.5;
}

/* Classe que o JS vai adicionar para fazer a notificação descer */
.toast-custom.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Cores da base para dar o tom da mensagem */
.toast-sucesso { border-bottom: 4px solid var(--secondary-green); }
.toast-erro { border-bottom: 4px solid var(--danger-red); }
.toast-aviso { border-bottom: 4px solid #f59e0b; }

/* --- MODAL DE CONFIRMAÇÃO CUSTOMIZADO --- */
        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(4px);
            display: flex; justify-content: center; align-items: center;
            z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
        }
        .modal-overlay.active { opacity: 1; pointer-events: auto; }
        
        .modal-box {
            background: #1e293b; border: 1px solid #334155; border-radius: 12px;
            padding: 30px; max-width: 500px; width: 90%; 
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
            transform: translateY(-20px); transition: transform 0.2s ease;
        }
        .modal-overlay.active .modal-box { transform: translateY(0); }
        
        .modal-title { color: #f59e0b; font-size: 1.3rem; font-weight: 700; margin-top: 0; display: flex; align-items: center; gap: 10px; }
        .modal-body { color: #cbd5e1; font-size: 1rem; line-height: 1.6; margin: 20px 0; white-space: pre-wrap; }
        
        .modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
        .btn-cancel { background: #334155; color: white; border: none; padding: 12px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s;}
        .btn-cancel:hover { background: #475569; }
        .btn-confirm-danger { background: #ef4444; color: white; border: none; padding: 12px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s;}
        .btn-confirm-danger:hover { background: #dc2626; }

  
/* --- CORREÇÃO DE CONTRASTE DO SELECT NO MODO ESCURO --- */
body.dark-theme select,
body.dark-theme select option {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
}

/* --- MÁGICA DOS ÍCONES DE TEMA SVG (SOL E LUA) --- */
#theme-toggle {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

/* Tema Claro: Mostra Lua, Esconde Sol */
.sun-icon { display: none; }
.moon-icon { display: block; }

/* Tema Escuro: Esconde Lua, Mostra Sol (e deixa douradinho) */
body.dark-theme .moon-icon { display: none; }
body.dark-theme .sun-icon { display: block; }
body.dark-theme #theme-toggle { color: #f59e0b; }