/* ARQUIVO: css/style.css - VERSÃO FINAL INTEGRADA (MASTER) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

/* Atualize a regra geral para usar a fonte nova nos títulos */
h1, h2, h3, .card-title, .brand-area, .sub-t-title, .pt-title {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}


/* TEMA CLARO (ALINHADO COM A LANDING PAGE) */
/* ==========================================================================
   TEMA CLARO PROFISSIONAL (Estilo "Clean Enterprise")
   ========================================================================== */

:root[data-theme="light"] {
    /* --- Paleta de Fundos (Hierarquia de Cinzas) --- */
    --bg-body: #f1f5f9;       /* Slate 100 - Fundo da página (confortável) */
    --bg-sidebar: #ffffff;    /* Branco Puro - Navegação */
    --bg-card: #ffffff;       /* Branco Puro - Conteúdo */
    --bg-input: #f8fafc;      /* Slate 50 - Inputs levemente diferenciados */
    
    /* --- Bordas e Divisórias --- */
    --border: #cbd5e1;        /* Slate 300 - Mais definição que no dark mode */
    
    /* --- Tipografia (Alto Contraste) --- */
    --text-main: #0f172a;     /* Slate 900 - Preto azulado (Leitura nítida) */
    --text-muted: #64748b;    /* Slate 500 - Cinza médio */
    
    /* --- Cores da Marca (Azul Royal Vibrante) --- */
    --primary: #2563eb;       /* Brand 600 - Ação principal */
    --primary-glow: rgba(37, 99, 235, 0.1); /* Brilho sutil */
    
    /* --- Cores Semânticas (Escurecidas para fundo branco) --- */
    --accent: #d97706;        /* Amber 700 - Avisos */
    --critical: #dc2626;      /* Red 600 - Erros */
    --success: #16a34a;       /* Green 600 - Sucesso */
    --fab-color: #2563eb;     
}

/* ==========================================================================
   AJUSTES FINOS DE COMPONENTES NO MODO CLARO
   (Correções para elementos que foram desenhados para o escuro)
   ========================================================================== */

/* 1. Sombras e Profundidade (Cards flutuantes em vez de bordas neon) */
[data-theme="light"] .card,
[data-theme="light"] .plan-t-card,
[data-theme="light"] .sub-card-tactical,
[data-theme="light"] .hist-item-card,
[data-theme="light"] .admin-col,
[data-theme="light"] .today-task-card {
    border-color: transparent; /* Remove borda cinza padrão */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 2px 4px -1px rgba(0, 0, 0, 0.03),
                0 0 0 1px rgba(0,0,0,0.05); /* Borda ultra-fina via shadow */
}

/* 2. Sidebar e Header (Visual Limpo) */
[data-theme="light"] aside#sidebar,
[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.9);
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .nav-link:hover {
    background: #f1f5f9;
    color: var(--primary);
}

[data-theme="light"] .nav-link.active {
    background: #eff6ff; /* Fundo azul bem clarinho */
    color: #1e40af;       /* Texto azul escuro */
    border-left-color: var(--primary);
}

/* 3. Inputs e Formulários (Mais definição) */
[data-theme="light"] .auth-input,
[data-theme="light"] .search-input,
[data-theme="light"] select {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .auth-input::placeholder {
    color: #94a3b8;
}

/* 4. Correção de Textos "Hardcoded" White */
/* Alguns elementos do seu CSS original forçam "color: white". Isso reverte: */
[data-theme="light"] .card-title,
[data-theme="light"] .sub-title,
[data-theme="light"] .sub-t-title,
[data-theme="light"] .pt-title,
[data-theme="light"] .h-subject,
[data-theme="light"] .stat-value,
[data-theme="light"] .diag-value,
[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3 {
    color: var(--text-main) !important;
}

/* 5. Ajuste no "Meu Edital" (Cards Táticos) */
[data-theme="light"] .sub-t-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}
[data-theme="light"] .sub-t-body {
    background: #f8fafc; /* Lista interna levemente cinza */
}
[data-theme="light"] .sub-t-footer {
    background: #ffffff;
}
[data-theme="light"] .topic-row-compact:hover {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* 6. Ajuste nos Badges e Tags (Fundo colorido suave) */
[data-theme="light"] .tag,
[data-theme="light"] .sub-t-badge,
[data-theme="light"] .h-time-badge,
[data-theme="light"] .tt-time-badge {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-main);
    font-weight: 700;
}

/* 7. Ajuste no Dashboard (Agenda do Dia) */
[data-theme="light"] .today-task-card {
    background: #ffffff;
}
[data-theme="light"] .today-task-card:hover {
    background: #f8fafc;
}

/* 8. Ajuste nos Ícones de Botões */
[data-theme="light"] .icon-btn,
[data-theme="light"] .btn-h-icon,
[data-theme="light"] .btn-action-icon {
    color: #64748b;
    border-color: #e2e8f0;
}
[data-theme="light"] .icon-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

/* 9. Modal de Foco (Overlay) */
/* Mantemos escuro mesmo no light mode para focar, mas com transparência branca */
[data-theme="light"] .focus-overlay-glass {
    background: rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .timer-display-modern {
    color: var(--text-main);
    text-shadow: none;
}
[data-theme="light"] .timer-label {
    color: var(--text-muted);
}
/* ===== OVERRIDES: tema claro - sidebar profissional ===== */

/* Sidebar: fundo branco, texto escuro, marca só com cor primária */
[data-theme="light"] aside#sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    width: 240px; /* um pouco mais compacto */
    box-shadow: none;
}

[data-theme="light"] .brand-area {
    color: var(--text-main);   /* logo textual em escuro, mais sério */
    background: transparent;
    height: 64px;
    padding: 0 20px;
    font-size: 1.05rem;
    letter-spacing: 0;
}

/* ícone da marca com cor primária — discreto */
[data-theme="light"] .brand-icon { color: var(--primary); margin-right: 8px; }

/* Links: tom profissional, sem gradiente chamativo */
[data-theme="light"] .nav-link {
    color: var(--text-main);
    background: transparent;
    border-left: 3px solid transparent;
    padding: 10px 14px;
    border-radius: 8px;
}

/* Hover: leve realce */
[data-theme="light"] .nav-link:hover {
    background: #f8fafc;
    color: var(--primary);
    transform: none;
}

/* Estado ativo: banda sutil, sem brilho */
[data-theme="light"] .nav-link.active {
    background: #eff6ff;
    color: var(--primary);
    border-left-color: var(--primary);
    box-shadow: none;
}

/* Footer do sidebar — perfil mais sóbrio */
[data-theme="light"] .sidebar-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 16px;
}

/* Avatar: sem sombra pesada */
[data-theme="light"] .avatar-mini {
    background: #f1f5f9;
    color: var(--text-main);
    box-shadow: none;
    border: 1px solid #e6eef8;
}

/* Remove efeitos “pulsantes” e glows desnecessários na UI do modo claro */
[data-theme="light"] .status-dot,
[data-theme="light"] .pt-status-dot,
[data-theme="light"] .node-status-perfect,
[data-theme="light"] .pulse-ring {
    box-shadow: none !important;
    animation: none !important;
}

/* Garante que os textos que estavam hardcoded em branco fiquem escuros no light theme */
[data-theme="light"] .card-title,
[data-theme="light"] .sub-title,
[data-theme="light"] .pt-title,
[data-theme="light"] .stat-value,
[data-theme="light"] .diag-value,
[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3 {
    color: var(--text-main) !important;
}

/* Inputs e selects claros e legíveis */
[data-theme="light"] .auth-input,
[data-theme="light"] select.auth-input {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid #dbe7f8;
}

/* Botões de ação na sidebar: discretos */
.fab-main, .fab-mini { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }


/* ======================================================
   FIX: DISCIPLINAS E NOMES FICANDO BRANCOS NO TEMA CLARO
   ====================================================== */

[data-theme="light"] .h-subject,
[data-theme="light"] .slot-subject,
[data-theme="light"] .p-title,
[data-theme="light"] .sub-t-title,
[data-theme="light"] .ms-sub,
[data-theme="light"] .discipline-name,
[data-theme="light"] .tt-subject {
    color: #1e293b !important; /* Slate 800 — livre, legível e profissional */
}

[data-theme="light"] .h-topic,
[data-theme="light"] .tr-text,
[data-theme="light"] .tt-status,
[data-theme="light"] .slot-time,
[data-theme="light"] .mini-day-header {
    color: #475569 !important; /* Slate 600 — secundário */
}




/* FIM DO MODO CLARO */


/* --- 1. VARIÁVEIS E RESET --- */
:root[data-theme="dark"] {
    --bg-body: #0b101a; 
    --bg-sidebar: #0f1623; 
    --bg-card: #151b2b; 
    --bg-input: #1c2538;
    --border: #2d3748; 
    --text-main: #ffffff; 
    --text-muted: #94a3b8;
    --primary: #4f46e5; 
    --primary-glow: rgba(79, 70, 229, 0.3);
    --accent: #f59e0b; 
    --critical: #ef4444; 
    --success: #10b981; 
    --fab-color: #6366f1;     
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); height: 100vh; overflow: hidden; display: flex; font-size: 14px; }

/* Scrollbar Customizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- 2. SIDEBAR (MENU LATERAL - ESTILO "MODERN PILL") --- */

aside#sidebar {
    width: 260px; /* Um pouco mais largo para respirar */
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 50;
}

/* Marca / Logo */
.brand-area {
    height: 80px; /* Mais alto */
    display: flex;
    align-items: center;
    padding: 0 28px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary); /* Cor da marca no logo */
}

/* Área de Navegação */
.nav-menu {
    flex: 1;
    padding: 10px 15px; /* Padding lateral para os botões não encostarem */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px; /* Espaço entre os itens */
}

.nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 20px 0 10px 15px;
    font-weight: 800;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* O Link (Botão) */
.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px; /* Arredondado (Pílula) */
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent; /* Para evitar pulo no hover */
}

/* Hover Suave */
.nav-link:hover {
    background: var(--bg-body); /* Cinza bem claro */
    color: var(--text-main);
    transform: translateX(3px);
}

/* Item Ativo (O destaque bonito) */
.nav-link.active {
    background: var(--primary); /* Fundo Azul */
    color: #ffffff !important; /* Texto Branco */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); /* Sombra suave da cor da marca */
    font-weight: 700;
}

/* Ajuste de ícones dentro do link ativo para ficarem brancos */
.nav-link.active i {
    color: #ffffff;
}

/* Footer do Menu */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-input); /* Leve contraste no fundo */
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: 0.2s;
}
.user-profile-mini:hover { background: var(--bg-card); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.avatar-mini {
    width: 36px; height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.user-info-mini div:first-child { font-weight: 700; font-size: 0.9rem; color: var(--text-main); }
.user-info-mini div:last-child { font-size: 0.75rem; color: var(--text-muted); }

/* --- 3. HEADER E LAYOUT PRINCIPAL --- */
.wrapper { flex: 1; display: flex; flex-direction: column; height: 100%; position: relative; }

header { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--border); background: var(--bg-body); }
.header-left { display: flex; flex-direction: column; }
.header-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.exam-select { background: var(--bg-input); border: 1px solid var(--border); color: white; padding: 6px 12px; border-radius: 6px; outline: none; font-size: 0.9rem; font-weight: 600; min-width: 250px; }

.header-right { display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

.days-badge { background: rgba(239, 68, 68, 0.15); color: var(--critical); border: 1px solid rgba(239, 68, 68, 0.3); padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; display: flex; gap: 6px; align-items: center; }
.life-total-badge { background: rgba(79, 70, 229, 0.15); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.3); padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; display: flex; gap: 6px; align-items: center; margin-right: 10px;}

/* Botão de Data Faltante (Pulsante) */
.date-btn-missing { background: rgba(245, 158, 11, 0.15); color: var(--accent); border: 1px solid rgba(245, 158, 11, 0.3); padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; display: flex; gap: 6px; align-items: center; cursor: pointer; animation: pulse-border 2s infinite; }
@keyframes pulse-border { 0% { border-color: rgba(245, 158, 11, 0.3); } 50% { border-color: rgba(245, 158, 11, 0.8); } 100% { border-color: rgba(245, 158, 11, 0.3); } }

/* Área Principal */
main { flex: 1; overflow-y: auto; padding: 24px; }
.dashboard-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; max-width: 1600px; margin: 0 auto; }
.left-column { display: flex; flex-direction: column; gap: 20px; }
.right-column { display: flex; flex-direction: column; }

/* --- 4. CARDS E COMPONENTES --- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.card-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

/* Ritmo (Consistência) */
.ritmo-card { min-height: 160px; justify-content: center; position: relative; overflow: hidden; }
.rhythm-container { display: flex; flex-direction: column; gap: 15px; width: 100%; height: 100%; justify-content: center; }
.rhythm-legend { display: flex; gap: 15px; font-size: 0.7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.rhythm-track { display: flex; justify-content: space-between; align-items: center; width: 100%; position: relative; }
.rhythm-track::before { content: ''; position: absolute; top: 50%; left: 10px; right: 10px; height: 2px; background: var(--border); z-index: 0; transform: translateY(-15px); }
.day-node { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; cursor: pointer; transition: transform 0.2s; }
.day-node:hover { transform: translateY(-3px); }
.node-indicator { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #fff; font-weight: 700; box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: all 0.3s ease; }
.node-status-perfect { background: var(--success); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.node-status-missed { background: var(--critical); opacity: 0.8; }
.node-status-void { background: var(--border); color: var(--text-muted); }
.node-date { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-top: 4px; }
.node-time { font-size: 0.6rem; font-family: 'JetBrains Mono'; position: absolute; top: -20px; background: var(--bg-input); padding: 2px 4px; border-radius: 4px; opacity: 0; transition: 0.2s; pointer-events: none; white-space: nowrap; }
.day-node:hover .node-time { opacity: 1; top: -25px; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; height: 110px; position: relative; }
.stat-icon { font-size: 0.8rem; color: var(--text-muted); margin-right: 6px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: #fff; margin: 5px 0; font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.alert-box { border-color: rgba(239, 68, 68, 0.4); }
.alert-text { color: var(--critical); }

/* Metas (Barras) */
.goal-progress { margin-top: auto; }
.goal-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.goal-bar-fill { height: 100%; background: var(--primary); width: 0%; transition: 1s; }
.goal-meta-text { font-size: 0.7rem; color: var(--text-muted); display:flex; justify-content: space-between; }

/* Gráficos e Zona de Perigo */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-container { height: 380px; }
.danger-list { flex: 1; overflow-y: auto; padding-right: 5px; }
.danger-item { background: rgba(239, 68, 68, 0.05); border-left: 3px solid var(--critical); padding: 10px 15px; margin-bottom: 10px; border-radius: 0 6px 6px 0; display: flex; justify-content: space-between; align-items: center; }
.danger-name { font-weight: 600; color: var(--text-main); font-size: 0.9rem; }
.danger-val { color: var(--critical); font-weight: 700; font-family: 'JetBrains Mono'; }

/* --- 5. TABELA DE DASHBOARD --- */
.table-card { overflow-x: auto; }
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0 4px; margin-top: 10px; }
.table-modern th { text-align: left; padding: 12px 15px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; border-bottom: 1px solid var(--border); opacity: 0.8; }
.table-modern td { padding: 14px 15px; font-size: 0.85rem; color: var(--text-main); background: var(--bg-input); border: none; vertical-align: middle; }
.table-modern tr { transition: transform 0.2s; }
.table-modern tr:hover td { background: rgba(255,255,255,0.03); }
.table-modern td:first-child { border-radius: 6px 0 0 6px; font-weight: 600; color: #fff; }
.table-modern td:last-child { border-radius: 0 6px 6px 0; }

/* Estilo Células */
.cell-mono { font-family: 'JetBrains Mono'; font-weight: 600; }
.cell-stat { font-family: 'JetBrains Mono'; font-weight: 700; }
.text-green { color: var(--success); }
.text-red { color: var(--critical); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mini-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 2px; }
.action-btn-table { background: transparent; border: 1px solid var(--border); color: var(--text-muted); width: 28px; height: 28px; border-radius: 4px; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.action-btn-table:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* --- 6. TIMELINE --- */
.timeline-card { height: 100%; min-height: 500px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.timeline-list { margin-top: 20px; border-left: 2px solid var(--border); padding-left: 20px; margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item::before { content: ''; position: absolute; left: -25px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: 2px solid var(--bg-body); }
.timeline-item.active::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.t-time { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono'; margin-bottom: 4px; opacity: 0.8; }
.t-title { font-size: 0.95rem; font-weight: 600; color: white; line-height: 1.2; }
.t-topic-line { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; display: block; font-style: italic; }
.t-meta-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.t-duration { font-family: 'JetBrains Mono'; color: var(--accent); font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; gap: 6px; }
.t-type-badge { font-size: 0.65rem; padding: 2px 8px; border-radius: 4px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); text-transform: uppercase; font-weight: 600; }

/* --- 7. SYLLABUS / MEU EDITAL (ESTILOS CRUD) --- */
/* --- MEU EDITAL (TACTICAL SYLLABUS) --- */

.syllabus-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 50px;
}

/* O Card da Disciplina (Fechado) */
.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subject-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.subject-card.open {
    border-color: var(--border);
    background: var(--bg-card);
}

/* Cabeçalho do Card (Onde clica) */
.subject-header {
    padding: 20px 25px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02), transparent);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.subject-card.open .subject-header {
    background: rgba(0,0,0,0.2);
    border-bottom-color: var(--border);
}

/* Lado Esquerdo (Ícone + Nome) */
.sub-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sub-icon-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sub-info { display: flex; flex-direction: column; }
.sub-title { font-size: 1.05rem; font-weight: 700; color: white; margin-bottom: 2px; }
.sub-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 10px; }

/* Lado Direito (Progresso + Ações) */
.sub-stats {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Barra de Progresso Tática */
.prog-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 140px;
}

.prog-val { font-family: 'JetBrains Mono'; font-weight: 700; color: white; font-size: 0.9rem; margin-bottom: 4px; }

.prog-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 0 10px currentColor; /* Glow baseado na cor da barra */
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Seta de Expandir */
.sub-toggle-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: transform 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.subject-card.open .sub-toggle-icon { transform: rotate(180deg); background: var(--primary); color: white; }

/* Botões de Ação (Editar/Excluir) - Só aparecem no hover */
.sub-actions-hover {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: 0.2s;
    transform: translateX(10px);
}
.subject-header:hover .sub-actions-hover { opacity: 1; transform: translateX(0); }

/* --- LISTA DE TÓPICOS --- */
.topic-list-container {
    display: none;
    background: var(--bg-body); /* Fundo um pouco mais escuro que o card */
    animation: slideDown 0.3s ease-out;
}
.subject-card.open .topic-list-container { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 25px;
    border-bottom: 1px solid var(--border);
    transition: 0.2s;
}
.topic-row:hover { background: rgba(255,255,255,0.02); }
.topic-row:last-child { border-bottom: none; }

/* Checkbox Customizado (Militar) */
.t-check-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    flex: 1;
}

.t-checkbox {
    appearance: none;
    width: 22px; 
    height: 22px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    background: transparent;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.t-checkbox:checked {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.t-checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #064e3b;
}

.t-name {
    font-size: 0.95rem;
    color: var(--text-main);
    transition: 0.2s;
    font-weight: 500;
}
.t-checkbox:checked + .t-name {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Badges de Acerto/Erro no Tópico */
.t-stats { display: flex; gap: 8px; align-items: center; }
.t-badge {
    font-family: 'JetBrains Mono';
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}
.tb-green { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.tb-red { background: rgba(239, 68, 68, 0.1); color: var(--critical); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Botão Adicionar Tópico (Fundo da lista) */
.btn-new-topic-row {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.01);
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px dashed var(--border);
}
.btn-new-topic-row:hover { background: rgba(79, 70, 229, 0.1); color: var(--primary); }

/* Ações do Tópico (Lápis/Lixo) */
.t-actions { display: flex; gap: 5px; opacity: 0; transition: 0.2s; }
.topic-row:hover .t-actions { opacity: 1; }
.btn-t-act { width: 28px; height: 28px; border-radius: 4px; background: transparent; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-t-act:hover { background: white; color: black; }
.btn-t-act.del:hover { background: var(--critical); color: white; border-color: var(--critical); }

/* --- 8. MODAIS & FORMS (ESTILO ELITE - FACELIFT) --- */
/* Remove setas padrão dos inputs numéricos */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* Selects Modernos */
.auth-input, select.auth-input { width: 100%; padding: 14px 16px; margin-bottom: 15px; border-radius: 12px; border: 1px solid var(--border); background-color: var(--bg-input); color: white; font-size: 0.95rem; font-weight: 500; outline: none; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
select.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 16, 26, 0.95); backdrop-filter: blur(5px); z-index: 9999; display: none; align-items: center; justify-content: center; }

/* Segmented Control */
.segmented-control { display: flex; background: var(--bg-input); padding: 6px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; gap: 5px; }
.segment-option { flex: 1; text-align: center; padding: 10px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; }
.segment-option:hover { color: white; background: rgba(255,255,255,0.05); }
.segment-option.active { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4); border-color: rgba(255,255,255,0.1); }

/* Time Group Modern (Relógio) */
.time-group-modern { display: flex; justify-content: center; align-items: center; gap: 15px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 16px; padding: 25px 10px; margin-bottom: 25px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.2); }
.time-input-wrapper { display: flex; flex-direction: column; align-items: center; width: 80px; }
.time-digit { background: transparent; border: none; color: white; font-family: 'JetBrains Mono', monospace; font-size: 3rem; font-weight: 700; width: 100%; text-align: center; padding: 0; line-height: 1; outline: none; }
.time-digit::placeholder { color: rgba(255,255,255,0.1); }
.time-digit:focus { color: var(--primary); }
.time-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); margin-top: 8px; letter-spacing: 1px; }
.time-separator { font-size: 2.5rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; opacity: 0.5; margin-top: -20px; }

/* Performance Grid */
.performance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.perf-input-group { position: relative; }
.perf-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; z-index: 2; }
.perf-input { width: 100%; background: var(--bg-input); border-radius: 12px; padding: 16px 16px 16px 50px; font-size: 1.1rem; font-weight: 700; color: white; outline: none; transition: 0.2s; text-align: left; }
.perf-green { border: 2px solid rgba(16, 185, 129, 0.2); }
.perf-green:focus { border-color: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }
.perf-red { border: 2px solid rgba(239, 68, 68, 0.2); }
.perf-red:focus { border-color: var(--critical); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1); }

/* Save Btn */
.btn-save-session { width: 100%; padding: 18px; background: var(--primary); color: white; font-size: 1rem; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3); }
.btn-save-session:hover { background: #4338ca; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4); }

/* Titulos Modais */
.modal-section-title { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; display: block; letter-spacing: 0.5px; }

/* CRONOMETRO & LOGIN */
.timer-display-modern { font-family: 'JetBrains Mono'; font-size: 4.5rem; font-weight: 700; color: white; text-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
.pulse-ring { width: 280px; height: 280px; border-radius: 50%; border: 4px solid var(--primary); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 30px var(--primary-glow); animation: pulse 2s infinite; transition: border-color 0.3s, box-shadow 0.3s; }
.pulse-ring.paused { border-color: var(--accent); box-shadow: none; animation: none; }
.break-display { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; color: var(--accent); margin-top: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(245, 158, 11, 0.1); padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(245, 158, 11, 0.3); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.5; } }
.timer-controls { display: flex; gap: 50px; margin-top: 40px; align-items: center; justify-content: center; }
.btn-control-box { width: 75px; height: 75px; border-radius: 50%; border: none; color: white; font-size: 1.8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.btn-control-box:hover { transform: translateY(-5px) scale(1.1); box-shadow: 0 15px 25px rgba(0,0,0,0.4); }
.btn-control-box:active { transform: scale(0.95); }

/* LOGIN */
.login-body { display: flex; align-items: center; justify-content: center; background: #050505; height: 100vh; width: 100vw; background-image: radial-gradient(#1e293b 1px, transparent 1px); background-size: 40px 40px; }
.login-wrapper { display: grid; grid-template-columns: 1fr 1fr; width: 1000px; height: 650px; background: var(--bg-card); border-radius: 24px; box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7); overflow: hidden; border: 1px solid var(--border); }
.login-brand-side { background: linear-gradient(150deg, #312e81 0%, #0f172a 100%); position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 60px; color: white; }
.login-brand-side::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.05; pointer-events: none; }
.brand-top { z-index: 2; font-weight: 700; display: flex; align-items: center; gap: 10px; font-size: 1.2rem; letter-spacing: 1px; }
.brand-icon-lg { color: var(--accent); font-size: 1.4rem; }
.brand-content { position: relative; z-index: 2; }
.brand-quote { font-size: 2.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 25px; font-family: 'Inter', sans-serif; background: -webkit-linear-gradient(0deg, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { font-size: 1.1rem; color: #cbd5e1; line-height: 1.6; max-width: 90%; }
.brand-footer { z-index: 2; font-size: 0.8rem; opacity: 0.5; }
.login-form-side { padding: 60px 80px; display: flex; flex-direction: column; justify-content: center; background: var(--bg-card); }
.login-header { margin-bottom: 40px; }
.login-title { font-size: 1.8rem; font-weight: 700; color: white; margin-bottom: 10px; }
.login-subtitle { color: var(--text-muted); font-size: 0.95rem; }
.input-group { position: relative; margin-bottom: 20px; }
.input-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.login-input { width: 100%; padding: 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: white; font-size: 1rem; transition: all 0.3s; outline: none; }
.login-input:focus { border-color: var(--primary); background: #1e293b; box-shadow: 0 0 0 4px var(--primary-glow); }
.btn-login { width: 100%; padding: 18px; border: none; border-radius: 10px; background: var(--primary); color: white; font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.3s; margin-top: 15px; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3); }
.btn-login:hover { background: #4338ca; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4); }
.login-footer { margin-top: 30px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.login-link { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; transition: 0.2s; }
.login-link:hover { color: #818cf8; }

@media (max-width: 1000px) {
    .login-wrapper { grid-template-columns: 1fr; width: 95%; height: auto; max-width: 500px; }
    .login-brand-side { display: none; }
    .login-form-side { padding: 40px 30px; }
}
@media (max-width: 1200px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* FAB FIXED (CORREÇÃO FINAL) */
.fab-container { position: fixed !important; bottom: 30px; right: 30px; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 15px; z-index: 9999; pointer-events: none; }
.fab-main, .fab-mini, .fab-options { pointer-events: all; }
.fab-main { width: 64px; height: 64px; border-radius: 50%; background: var(--fab-color); color: white; border: none; font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4); transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); z-index: 2; }
.fab-container:hover .fab-main { transform: rotate(45deg); background: var(--text-main); color: var(--bg-body); }
.fab-options { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; opacity: 0; transform: translateY(20px) scale(0.9); pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); }
.fab-container:hover .fab-options { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.fab-mini { width: 50px; height: 50px; border-radius: 50%; border: none; color: white; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3); position: relative; transition: transform 0.2s; }
.fab-mini:hover { transform: scale(1.1); }
.fab-label { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); background: var(--bg-card); color: var(--text-main); padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,0.2); pointer-events: none; }

/* --- WIZARD / ONBOARDING STYLES (Adicione ao final do arquivo) --- */

.wizard-content { 
    text-align: center; 
    width: 100%; 
    animation: fadeIn 0.4s ease-out; 
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.wizard-title { 
    font-size: 2rem; 
    font-weight: 800; 
    color: rgb(235, 228, 228); 
    margin-bottom: 10px; 
    letter-spacing: -0.5px; 
}

.wizard-subtitle { 
    color: var(--text-muted); 
    margin-bottom: 40px; 
    font-size: 1rem; 
    line-height: 1.5;
}

.wizard-options { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 30px; 
}

.wizard-card { 
    background: var(--bg-input); 
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 40px 20px; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 15px; 
    position: relative;
    overflow: hidden;
}

.wizard-card:hover { 
    border-color: var(--primary); 
    background: rgba(79, 70, 229, 0.1); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}

.wizard-icon { 
    font-size: 3rem; 
    color: var(--primary); 
    margin-bottom: 10px; 
    transition: transform 0.3s;
}

.wizard-card:hover .wizard-icon { 
    transform: scale(1.1) rotate(5deg); 
}

.wizard-label { 
    font-weight: 700; 
    color: white; 
    font-size: 1.1rem; 
}

.wizard-desc { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    line-height: 1.4; 
}

/* Upload de Arquivo (Logo) */
.file-upload-wrapper { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; 
    margin-top: 15px; 
    border: 2px dashed var(--border); 
    border-radius: 12px; 
    padding: 30px; 
    text-align: center; 
    cursor: pointer; 
    transition: 0.3s; 
    background: rgba(255,255,255,0.02); 
    color: var(--text-muted);
}

.file-upload-wrapper:hover { 
    border-color: var(--primary); 
    background: rgba(79, 70, 229, 0.05); 
    color: white;
}

.file-icon { 
    font-size: 2rem; 
    margin-bottom: 10px; 
}

.file-text { font-size: 0.9rem; font-weight: 600; }

/* Indicadores de Passo (Bolinhas) */
.steps-indicator { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    margin-bottom: 30px; 
}

.step-dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    background: var(--border); 
    transition: 0.3s; 
}

.step-dot.active { 
    background: var(--primary); 
    box-shadow: 0 0 10px var(--primary-glow); 
    transform: scale(1.2); 
}

/* Lista de Matérias (Step 2) */
.subject-list-area { 
    margin-top: 20px; 
    max-height: 250px; 
    overflow-y: auto; 
    background: var(--bg-body); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 5px; 
}

.wiz-subject-item { 
    padding: 12px 15px; 
    border-bottom: 1px solid var(--border); 
    text-align: left; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--bg-card);
    margin-bottom: 1px;
}

.wiz-subject-item:last-child { border-bottom: none; }

.wiz-sub-name { 
    font-weight: 600; 
    color: white; 
    font-size: 0.9rem; 
}

.wiz-sub-topics { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    display: block; 
    margin-top: 3px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 300px; 
}

.btn-remove-sub { 
    background: rgba(239, 68, 68, 0.1); 
    border: none; 
    color: var(--critical); 
    cursor: pointer; 
    width: 28px; 
    height: 28px; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: 0.2s; 
}

.btn-remove-sub:hover { 
    background: var(--critical); 
    color: white; 
}

/* --- WIZARD: ESTILOS INTERNOS DOS FORMULÁRIOS --- */

/* 1. Indicador de Passos (Bolinhas) */
.steps-indicator {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    transition: 0.3s;
}

.step-dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transform: scale(1.2);
}

/* 2. Área de Upload de Arquivo (Plano Manual) */
.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    color: white;
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-muted);
    transition: 0.2s;
}

.file-upload-wrapper:hover .file-icon {
    color: var(--primary);
    transform: translateY(-5px);
}

.file-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Preview da Imagem (se houver) */
#wizFilePreview img {
    max-height: 80px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 3. Área de Lista de Disciplinas (Passo 2 Manual) */
.subject-list-area {
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
}

/* Item da Lista de Disciplinas */
.wiz-subject-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: 0.2s;
}

.wiz-subject-item:last-child {
    margin-bottom: 0;
}

.wiz-subject-item:hover {
    background: rgba(255,255,255,0.05);
}

.wiz-sub-name {
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
    display: block;
}

.wiz-sub-topics {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

/* Botão de Remover Item */
.btn-remove-sub {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--critical);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-remove-sub:hover {
    background: var(--critical);
    color: white;
    transform: scale(1.1);
}

/* Ajuste nos Inputs dentro do Wizard para garantir largura total */
#wizStepManual1 input,
#wizStepManual2 input,
#wizStepCatalog select {
    width: 100%;
}

/* Área de input de tópicos (textarea) */
textarea.auth-input {
    resize: none;
    height: 80px;
    font-family: 'Inter', sans-serif;
}

/* --- WIZARD: BOTÕES DE NAVEGAÇÃO E METAS --- */

/* Grupo de Botões (Voltar / Próximo) */
.wizard-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
    width: 100%;
}

.auth-btn.btn-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: auto;
    padding: 12px 25px;
}

.auth-btn.btn-back:hover {
    border-color: var(--text-main);
    color: white;
}

.auth-btn.btn-next {
    background: var(--primary);
    color: white;
    width: auto;
    padding: 12px 30px;
    flex: 1; /* Ocupa o resto do espaço ou fica maior */
    max-width: 200px;
}

.auth-btn.btn-next:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.auth-btn.btn-finish {
    background: var(--success);
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.auth-btn.btn-finish:hover {
    background: #059669;
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}

/* Inputs da Tela de Metas */
.goals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
    margin-top: 10px;
}

.goals-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.goal-input-lg {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    border-color: var(--primary);
}

/* ARQUIVO: css/style.css (Adicione/Substitua ao final) */

/* ... (Mantenha os estilos anteriores do Wizard) ... */

/* CLASSE NOVA: Modal mais largo para o Wizard */
.auth-card.wizard-wide {
    max-width: 800px !important; /* Aumentado de 650px para 800px */
    transition: max-width 0.3s ease;
}

/* Área de Texto de Assuntos (Maior) */
textarea.auth-input {
    resize: vertical; /* Permite o usuário aumentar se quiser */
    min-height: 120px; /* Bem maior que antes */
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

/* Container de Ações da Lista (Editar/Excluir) */
.wiz-list-actions {
    display: flex;
    gap: 8px;
}

/* Botão Editar (Azul) */
.btn-edit-sub {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--primary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-edit-sub:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Ajuste na lista para acomodar os botões */
.wiz-subject-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Alinha no topo caso o texto seja longo */
    padding: 15px;
    gap: 15px;
}

/* --- ESTILO DOS CARDS DE PLANOS (OBJETIVOS) --- */
/* --- TELA OBJETIVOS (MISSION CONTROL GRID) --- */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Cards mais estreitos */
    gap: 20px;
    padding-bottom: 50px;
}

/* O Card Dossiê */
.plan-t-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px; /* Cantos mais retos = mais sério */
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
    position: relative;
    height: 100%;
    min-height: 200px;
}

.plan-t-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Estado ATIVO (Missão Atual) */
.plan-t-card.active {
    border: 1px solid var(--success);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Faixa de LED no topo para o ativo */
.plan-t-card.active::before {
    content: '';
    position: absolute;
    top: -1px; left: 10px; right: 10px;
    height: 2px;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

/* Cabeçalho: Logo + Status */
.pt-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pt-logo {
    width: 45px; height: 45px;
    border-radius: 8px;
    background: white;
    color: var(--bg-body);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.pt-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }

/* Indicador de Status (Bolinha pulsante) */
.pt-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.active .pt-status-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: blinkStatus 3s infinite;
}
@keyframes blinkStatus { 50% { opacity: 0.5; } }

/* Título e Cargo */
.pt-info { padding: 0 20px 15px 20px; }
.pt-title { font-size: 1.1rem; font-weight: 700; color: white; line-height: 1.2; margin-bottom: 4px; }
.pt-role { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Grid de Dados (Stats) */
.pt-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.1);
}

.pt-stat-box {
    padding: 12px 5px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.pt-stat-box:last-child { border-right: none; }

.pt-stat-val { font-family: 'JetBrains Mono'; font-weight: 700; color: white; font-size: 1rem; }
.pt-stat-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }

/* Rodapé (Botões) */
.pt-actions {
    padding: 15px;
    margin-top: auto; /* Empurra para o fundo */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-pt-select {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.btn-pt-select:hover { border-color: var(--primary); color: white; background: rgba(79, 70, 229, 0.1); }

.active .btn-pt-select {
    background: var(--success);
    border-color: var(--success);
    color: #064e3b;
    pointer-events: none; /* Desabilita clique se já tá ativo */
}

.btn-pt-del {
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 0.9rem; transition: 0.2s;
}
.btn-pt-del:hover { color: var(--critical); transform: scale(1.1); }

/* Card "Adicionar" (Estilo Blueprint) */
.plan-t-add {
    border: 1px dashed var(--border);
    background: transparent;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    min-height: 200px;
}
.plan-t-add:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    color: white;
}
.plan-add-plus { font-size: 2.5rem; margin-bottom: 10px; color: var(--text-muted); }
.plan-t-add:hover .plan-add-plus { color: var(--primary); }

/* FIM --ESTILO DOS CARDS DE PLANOS--- */

/* ARQUIVO: css/style.css (Adicionar ao final) */

/* --- TELA HISTÓRICO --- */
/* --- TELA HISTÓRICO (ELITE VERSION) --- */

/* Cards de Estatísticas (Topo) - Agora Escuros e Tecnológicos */
.hist-stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.hist-stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hist-stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.5;
}

.hist-stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hist-stat-card .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

/* --- TIMELINE DE MISSÃO (FEED) --- */
.history-feed-container {
    padding-left: 20px; /* Espaço para a linha vertical */
    margin-top: 30px;
}

/* O Grupo de Data (ex: 05 DEZ) */
.hist-group {
    position: relative;
    border-left: 2px solid var(--border);
    padding-left: 30px;
    padding-bottom: 20px;
    
    /* CORREÇÃO: Empurra os cards para baixo para não bater na data */
    padding-top: 20px; 
}

/* CORREÇÃO FINAL: Borda com degradê que não corta a data */
.hist-group:last-child {
    /* Define a largura, mas deixa a cor transparente para o gradiente entrar */
    border-left: 2px solid transparent; 
    
    /* Aplica o gradiente APENAS na linha da borda */
    border-image: linear-gradient(to bottom, var(--border) 80%, transparent 100%) 1;
    
    /* Remove a máscara antiga que estava cortando sua data */
    mask-image: none;
    -webkit-mask-image: none;
}

/* A Bolinha da Data na Linha */
.hist-date-marker {
    position: absolute;
    left: -21px; /* Centraliza na linha de 2px */
    top: 0;
    background: var(--bg-body);
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hist-date-marker.today {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

/* O Card do Item de Estudo */
.hist-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 25px;
    margin-bottom: 15px; /* Espaço entre cards */
    margin-top: 15px;    /* Espaço do cabeçalho */
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hist-item-card:hover {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Conector (Linha horizontal pequena ligando a timeline ao card) */
.hist-item-card::before {
    content: '';
    position: absolute;
    left: -32px; /* Alcança a linha mestra */
    top: 50%;
    width: 32px;
    height: 2px;
    background: var(--border);
    z-index: -1;
}

/* Bolinha colorida na ponta do conector (indica a matéria) */
.hist-dot-indicator {
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-card); /* Cria borda falsa */
}

/* Tipografia do Card */
.h-card-main {
    display: flex;
    flex-direction: column;
}

.h-subject {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.h-topic {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lado Direito (Tempo e Ações) */
.h-card-meta {
    display: flex;
    align-items: center;
    gap: 25px;
}

.h-time-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono';
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.h-type-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    opacity: 0.7;
}

.h-actions {
    display: flex;
    gap: 10px;
    opacity: 0; /* Esconde até passar o mouse */
    transition: 0.2s;
}

.hist-item-card:hover .h-actions { opacity: 1; }

.btn-h-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.btn-h-icon:hover { color: white; transform: scale(1.1); }
.btn-h-icon.del:hover { color: var(--critical); }

/* --- CICLO DE ESTUDOS (PLANEJAMENTO) --- */

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 Colunas Iguais */
    gap: 15px;
    align-items: start;
}

/* Coluna do Dia */
.day-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    transition: border-color 0.2s;
}

.day-column:hover {
    border-color: rgba(255,255,255,0.1);
}

/* Cabeçalho do Dia */
.day-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    background: rgba(255,255,255,0.02);
    border-radius: 12px 12px 0 0;
}

.day-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.day-total {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono';
}

/* Lista de Slots */
.day-slots {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Card de Estudo (Slot) */
.study-slot {
    background: var(--bg-input);
    border: 1px solid transparent;
    border-left: 3px solid var(--primary);
    padding: 12px;
    border-radius: 6px;
    position: relative;
    cursor: grab;
    transition: all 0.2s;
}

.study-slot:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.slot-subject {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
    line-height: 1.3;
}

.slot-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono';
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Botão Delete no Slot (Só aparece no hover) */
.slot-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--critical);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
    font-size: 0.8rem;
}

.study-slot:hover .slot-delete {
    opacity: 1;
}

/* Botão Adicionar (+) na coluna */
.btn-add-slot {
    margin: 10px;
    padding: 10px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-add-slot:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Responsividade: Em telas pequenas, vira lista vertical */
@media (max-width: 1100px) {
    .week-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}
@media (max-width: 600px) {
    .week-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MELHORIA DO MODAL DE EDIÇÃO (TEXTAREA) --- */

textarea.auth-input {
    min-height: 200px; /* Mais altura para ver vários tópicos */
    line-height: 1.6;  /* Espaçamento para facilitar leitura */
    resize: vertical;  /* Permite o usuário aumentar se quiser */
    font-family: 'Inter', sans-serif; /* Fonte limpa */
    white-space: pre-wrap; /* Importante para manter a formatação ao colar */
    border-radius: 12px;
    margin-bottom: 8px; /* Espaço menor pois teremos texto de ajuda */
}

/* Scrollbar interna do textarea para combinar com o tema */
textarea.auth-input::-webkit-scrollbar {
    width: 6px;
}
textarea.auth-input::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 3px;
}

/* Texto de ajuda "ex: um por linha" */
.input-helper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    background: rgba(255,255,255,0.02);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed var(--border);
}

.input-helper i {
    color: var(--accent); /* Ícone amarelo para chamar atenção sutil */
}

/* --- ESTILO MODO FOCO "ELITE" --- */

.focus-overlay-glass {
    background: rgba(5, 5, 5, 0.92); /* Fundo quase preto total */
    backdrop-filter: blur(15px); /* Efeito de vidro fosco */
    display: none; /* Controlado via JS */
    flex-direction: column;
    z-index: 10000;
}

/* Cabeçalho superior */
.focus-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.focus-status-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--critical);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--critical);
    animation: blinkRed 2s infinite;
}

@keyframes blinkRed { 50% { opacity: 0.4; } }

/* Botão Fechar (X) */
.btn-close-focus {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-close-focus:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

/* Centralização */
.focus-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Anel do Timer Melhorado */
.pulse-ring {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid rgba(79, 70, 229, 0.3); /* Borda base sutil */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    animation: pulse-shadow 2s infinite;
    background: radial-gradient(circle, rgba(79,70,229,0.05) 0%, transparent 70%);
}

.pulse-ring.paused {
    border-color: rgba(245, 158, 11, 0.3);
    animation: none;
    box-shadow: none;
    background: none;
}

@keyframes pulse-shadow {
    0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); border-color: rgba(79, 70, 229, 0.8); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(79, 70, 229, 0); border-color: rgba(79, 70, 229, 0.3); }
    100% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); border-color: rgba(79, 70, 229, 0.8); }
}

.timer-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.timer-display-modern {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: white;
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* Controles */
.timer-controls {
    display: flex;
    gap: 30px;
}

.btn-control-box {
    width: 80px;
    height: 80px;
    border-radius: 24px; /* Quadrado arredondado moderno */
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-start, .btn-resume { background: var(--success); color: #064e3b; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3); }
.btn-start:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4); }

.btn-pause { background: var(--accent); color: #78350f; box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3); }
.btn-pause:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4); }

.btn-stop { background: rgba(255,255,255,0.1); color: var(--text-main); border: 1px solid var(--border); }
.btn-stop:hover { background: var(--critical); color: white; border-color: var(--critical); transform: translateY(-5px); }

.focus-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 20px;
    font-style: italic;
}

/* --- TELA OBJETIVOS (ELITE MISSION CARDS) --- */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

/* O Card Base */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

/* Estado ATIVO (Missão Atual) */
.plan-card.active {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
    border: 1px solid var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.plan-card.active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

/* Cabeçalho do Card (Imagem + Título) */
.p-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.p-logo-box {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bg-body);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.p-logo-img { max-width: 80%; max-height: 80%; object-fit: contain; }

.p-info { flex: 1; }
.p-title { font-size: 1.1rem; font-weight: 800; color: white; line-height: 1.2; margin-bottom: 5px; }
.p-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }

.active .p-status { color: var(--success); }
.active .p-status::before { content:''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

/* Corpo com Estatísticas */
.p-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.p-stat-item {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}
.active .p-stat-item { border-color: rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); }

.p-stat-val { font-family: 'JetBrains Mono'; font-size: 1.2rem; font-weight: 700; color: white; }
.p-stat-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-top: 2px; }

/* Rodapé (Data e Ações) */
.p-footer {
    margin-top: auto;
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.p-date { font-size: 0.8rem; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 6px; }

.btn-p-trash {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    opacity: 0.6;
}
.btn-p-trash:hover { color: var(--critical); opacity: 1; transform: scale(1.1); }

/* Card "Novo Objetivo" (Dashed) */
.plan-card-add {
    border: 2px dashed var(--border);
    background: transparent;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 15px;
    min-height: 240px;
}
.plan-card-add:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    color: white;
}
.plan-add-icon { font-size: 3rem; color: var(--primary); opacity: 0.8; }

/* --- MINI GRID DO DASHBOARD --- */

.week-grid-mini {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    overflow-x: auto; /* Permite scroll em telas pequenas */
}

.mini-day-col {
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    transition: 0.2s;
}

.mini-day-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.mini-day-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-slot {
    background: var(--bg-card);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.ms-sub {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono';
    margin-top: 2px;
}

@media (max-width: 1000px) {
    .week-grid-mini {
        grid-template-columns: repeat(4, 1fr); /* Quebra em 2 linhas */
    }
}
@media (max-width: 600px) {
    .week-grid-mini {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* FIM DO Card "Novo Objetivo" (Dashed) */

/* --- MEU EDITAL (TACTICAL GRID LAYOUT) --- */

/* Container Principal em Grade */
.syllabus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Cria colunas inteligentes */
    gap: 20px;
    padding-bottom: 50px;
    align-items: start; /* Evita que cards estiquem para ficar da mesma altura */
}

/* O Card Tático */
.sub-card-tactical {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px; /* Bordas menos arredondadas = mais sério */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.sub-card-tactical:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Cabeçalho do Card */
.sub-t-header {
    padding: 15px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Área do Título */
.sub-t-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-t-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--bg-body);
    text-shadow: none;
}

.sub-t-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.sub-t-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono';
    margin-top: 2px;
}

/* Área de Stats (Direita) */
.sub-t-stats {
    text-align: right;
}

.sub-t-badge {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono';
    font-size: 0.75rem;
    color: white;
}

/* Barra de Progresso Fina (Integrada) */
.sub-t-prog-line {
    height: 2px;
    width: 100%;
    background: var(--bg-input);
    position: relative;
}
.sub-t-prog-fill {
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    transition: width 0.5s;
    box-shadow: 0 0 10px currentColor;
}

/* Lista de Tópicos (Scrollável) */
.sub-t-body {
    max-height: 300px; /* Altura máxima fixa para manter o grid organizado */
    overflow-y: auto;  /* Scroll interno */
    background: var(--bg-body);
    display: none; /* Começa fechado ou aberto, configurável */
}
/* Se quiser que comece aberto, mude para display: block */
.sub-card-tactical.open .sub-t-body { display: block; }

/* Item da Lista (Compacto) */
.topic-row-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: 0.1s;
}
.topic-row-compact:hover { background: rgba(255,255,255,0.03); }

.tr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    overflow: hidden;
}

.tr-check {
    appearance: none;
    width: 16px; height: 16px;
    border: 1px solid var(--text-muted);
    border-radius: 3px; /* Quadrado */
    background: transparent;
    flex-shrink: 0;
    display: grid;
    place-content: center;
    transition: 0.2s;
}
.tr-check:checked {
    background: var(--success);
    border-color: var(--success);
}
.tr-check:checked::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 10px; color: black;
}

.tr-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tr-check:checked + .tr-text { text-decoration: line-through; opacity: 0.5; }

/* Ações (Só no hover) */
.tr-actions { opacity: 0; transition: 0.2s; display: flex; gap: 5px; }
.topic-row-compact:hover .tr-actions { opacity: 1; }

.btn-icon-xs {
    width: 20px; height: 20px;
    font-size: 0.65rem;
    background: transparent; border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.btn-icon-xs:hover { color: white; }
.btn-icon-xs.del:hover { color: var(--critical); }

/* Rodapé do Card (Botão Adicionar) */
.sub-t-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.btn-add-compact {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-add-compact:hover { border-color: var(--primary); color: var(--primary); }

/* Botões de Cabeçalho (Editar/Excluir Matéria) */
.sub-head-actions {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; gap: 5px;
    opacity: 0; transition: 0.2s;
    background: var(--bg-card); /* Tapa o conteúdo pra ficar legível */
    padding: 2px;
    border-radius: 4px;
}
.sub-card-tactical:hover .sub-head-actions { opacity: 1; }

.btn-head-act {
    width: 24px; height: 24px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
}
.btn-head-act:hover { border-color: var(--primary); color: white; }
.btn-head-act.del:hover { border-color: var(--critical); background: var(--critical); }

/* FIM MEU EDITAL (TACTICAL GRID LAYOUT) --- */

/* --- TELA DIAGNÓSTICO (BIOHAZARD THEME) --- */

.diag-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr; /* 2 KPIs pequenos e 1 Mentor grande */
    gap: 20px;
    margin-bottom: 30px;
}

/* Card de KPI */
.diag-card-kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.diag-icon-box {
    width: 60px; height: 60px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}

.diag-kpi-info { display: flex; flex-direction: column; }
.diag-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; letter-spacing: 1px; margin-bottom: 5px; }
.diag-value { font-family: 'JetBrains Mono'; font-size: 1.5rem; font-weight: 700; color: white; }

/* Caixa do Mentor (Parecer) */
.diag-mentor-box {
    background: linear-gradient(145deg, var(--bg-input) 0%, var(--bg-card) 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.diag-mentor-box::before {
    content: ''; position: absolute; top:0; left:0; width:4px; height:100%; background: var(--primary);
}

.mentor-header {
    font-size: 0.8rem; font-weight: 800; color: var(--primary); 
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}

.mentor-text {
    font-size: 0.95rem; color: #e2e8f0; line-height: 1.5; font-style: italic;
}

/* Estilo da Matriz (Barras internas na tabela) */
.matrix-bar-bg {
    width: 100%; height: 6px; background: rgba(255,255,255,0.05);
    border-radius: 3px; margin-top: 5px; overflow: hidden;
}
.matrix-bar-fill { height: 100%; border-radius: 3px; }

/* Responsividade */
@media (max-width: 1000px) {
    .diag-hero-grid { grid-template-columns: 1fr; }
}

/* FIM TELA DIAGNÓSTICO (BIOHAZARD THEME) --- */

/* --- GUIA DA AUTÓPSIA (BRIEFING) --- */

.autopsy-briefing {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left; /* Alinhamento à esquerda para leitura */
}

.briefing-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.briefing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.briefing-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.briefing-tag {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Cores das Tags para associar aos inputs */
.tag-theory { color: #ef4444; }
.tag-memory { color: #f59e0b; }
.tag-attent { color: #6366f1; }
.tag-trick  { color: #10b981; }

.briefing-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: right;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
}
/* FIM GUIA DA AUTÓPSIA (BRIEFING) --- */

/* --- AGENDA DO DIA (COMPACT / SLIM) --- */

/* O Container vira um Grid de 2 colunas */
.today-focus-list {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Divide em 2 */
    gap: 10px;
    padding: 5px 0;
}

/* O Card agora é uma "Tira" fina */
.today-task-card {
    background: var(--bg-input);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 10px 15px; /* Padding reduzido drasticamente */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-left-width: 3px;
    height: 60px; /* Altura fixa e compacta */
    transition: transform 0.2s;
}

.today-task-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card);
    border-color: var(--primary);
}

.tt-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Evita que texto grande quebre o layout */
}

.tt-subject {
    font-size: 0.85rem; /* Fonte menor */
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.tt-status {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.tt-time-badge {
    font-family: 'JetBrains Mono';
    font-weight: 700;
    font-size: 0.75rem; /* Fonte menor */
    background: rgba(255,255,255,0.05);
    padding: 4px 8px; /* Padding menor */
    border-radius: 4px;
    color: var(--text-main);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 30px;
}

/* Responsividade: Volta pra 1 coluna em celular */
@media (max-width: 768px) {
    .today-focus-list { grid-template-columns: 1fr; }
}

/* FIM AGENDA DO DIA */

/* --- CORREÇÃO: RELÓGIO DE HORAS TOTAIS (HEADER) --- */

.life-total-badge {
    /* Muda o fundo para a cor da marca (Sólido) para o branco destacar */
    background: var(--primary) !important; 
    
    /* Força o texto e o ícone para Branco */
    color: #ffffff !important;
    
    /* Remove a borda colorida e adiciona uma sombra suave */
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    
    /* Garante que o ícone e o texto fiquem alinhados */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Garante que o número específico também seja branco */
#lifeTotalTime {
    color: #ffffff !important;
    font-weight: 800; /* Deixa o número mais gordinho */
    letter-spacing: 0.5px;
}

/* FIM CORREÇÃO: RELÓGIO DE HORAS TOTAIS (HEADER) --- */

/* --- TELA REVISÕES (TIMELINE PRO - BASEADA NA REFERÊNCIA) --- */

.rev-container {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* Tabs do Topo (Programadas, Atrasadas...) */
.rev-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
}

.rev-tab-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rev-tab-btn:hover { color: var(--text-main); }
.rev-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* O Grupo de Data (Ex: 07 DEZ) */
.rev-date-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 30px 0 15px 0;
    padding-left: 10px;
    color: var(--text-muted);
}

.rd-day { font-size: 1.8rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.rd-month { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; }
.rd-line { flex: 1; height: 1px; background: var(--border); margin-left: 10px; }

/* A Linha do Item (Badge + Card) */
.rev-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-start;
}

/* Coluna Esquerda: Badge de Intervalo (1 dia, 7 dias) */
.rev-interval-col {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 10px;
}

.rev-interval-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-input);
    white-space: nowrap;
}

/* Coluna Direita: O Card Branco */
.rev-card-modern {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.rev-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

/* Detalhe colorido na esquerda do card */
.rev-card-stripe {
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}

.rm-content { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.rm-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.rm-subject { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.rm-topic { font-size: 0.9rem; color: var(--text-muted); }

/* Badge Roxo "TEORIA" igual a referência */
.rm-type-badge {
    background: #8b5cf6; /* Roxo vibrante */
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.rm-meta {
    font-family: 'JetBrains Mono';
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

/* Ações (Botões Redondos) */
.rm-actions {
    display: flex;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px dashed var(--border);
    margin-left: 20px;
}

.btn-rm-action {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.btn-rm-action:hover { background: var(--bg-body); color: var(--primary); border-color: var(--primary); }
.btn-rm-check:hover { background: var(--success); color: white; border-color: var(--success); }
.btn-rm-play:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Ajuste Mobile */
@media (max-width: 768px) {
    .rev-row { flex-direction: column; gap: 5px; }
    .rev-interval-col { width: 100%; text-align: left; padding: 0; margin-bottom: 5px; }
    .rm-actions { border: none; margin: 0; padding: 0; margin-top: 15px; width: 100%; justify-content: flex-end; }
}

/* FIM TELA REVISÕES (TIMELINE PRO - BASEADA NA REFERÊNCIA) --- */

/* --- CORREÇÃO: TABELA NO MODO CLARO --- */
[data-theme="light"] .table-modern td:first-child {
    color: var(--text-main) !important; /* Força cor escura */
    font-weight: 700;
}

/* Opcional: Ajustar o fundo da linha ao passar o mouse para dar contraste */
[data-theme="light"] .table-modern tr:hover td {
    background: #f1f5f9 !important; /* Cinza bem suave */
}

/* FIM CORREÇÃO: TABELA NO MODO CLARO --- */

/* --- CORREÇÃO: CARDS DE OBJETIVOS NO TEMA CLARO (PROFISSIONAL) --- */

/* 1. O Card Base (Mais definição e sombra) */
[data-theme="light"] .plan-t-card {
    background: #ffffff;
    border: 1px solid #e2e8f0; /* Borda cinza sólida */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Sombra elegante */
}

/* 2. Card Ativo (Destaque Verde Suave) */
[data-theme="light"] .plan-t-card.active {
    border: 2px solid var(--success); /* Borda verde mais grossa */
    background: linear-gradient(to bottom, #f0fdf4, #ffffff); /* Gradiente verde muito sutil no topo */
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.15); /* Sombra verde difusa */
}

/* 3. Correção de Tipografia (Onde estava branco, agora é escuro) */
[data-theme="light"] .pt-title {
    color: #0f172a !important; /* Slate 900 (Quase preto) */
    font-weight: 800;
}

[data-theme="light"] .pt-role {
    color: #64748b !important; /* Slate 500 (Cinza médio) */
    font-weight: 600;
}

/* 4. Grid de Estatísticas (O bloco do meio) */
[data-theme="light"] .pt-stats-grid {
    background: #f8fafc; /* Fundo cinza gelo, limpo */
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .pt-stat-box {
    border-right: 1px solid #e2e8f0; /* Divisórias visíveis */
}

[data-theme="light"] .pt-stat-val {
    color: #334155 !important; /* Slate 700 (Cinza escuro forte) */
    font-weight: 800;
}

[data-theme="light"] .pt-stat-label {
    color: #94a3b8 !important; /* Slate 400 (Cinza claro para não poluir) */
}

/* 5. Rodapé e Botões */
[data-theme="light"] .p-footer,
[data-theme="light"] .pt-actions {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .btn-pt-select {
    border-color: #cbd5e1;
    color: #475569;
}
[data-theme="light"] .btn-pt-select:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

/* Botão "EM USO" (Verde Sólido) */
[data-theme="light"] .active .btn-pt-select {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff; /* Texto branco no botão verde */
}

/* 6. Card "Nova Missão" (Placeholder) */
[data-theme="light"] .plan-t-add {
    background: #f8fafc;
    border: 2px dashed #cbd5e1; /* Tracejado mais visível */
}
[data-theme="light"] .plan-t-add:hover {
    background: #eff6ff;
    border-color: var(--primary);
}
[data-theme="light"] .plan-add-plus {
    color: #94a3b8; /* Ícone cinza quando inativo */
}
[data-theme="light"] .plan-t-add:hover .plan-add-plus {
    color: var(--primary); /* Azul no hover */
}

/* FIM CORREÇÃO: CARDS DE OBJETIVOS NO TEMA CLARO (PROFISSIONAL) --- */

/* --- CORREÇÃO: TIMELINE NO MODO CLARO --- */

[data-theme="light"] .t-title {
    color: var(--text-main) !important; /* Muda de Branco para Preto Azulado */
    font-weight: 800;
}

/* Garante que o horário também fique legível se estiver muito claro */
[data-theme="light"] .t-time {
    color: var(--text-muted);
    font-weight: 600;
}

/* Ajusta a cor da linha do tópico (ex: "1 - Compreensão...") */
[data-theme="light"] .t-topic-line {
    color: #475569 !important; /* Cinza mais escuro para leitura fácil */
}
/* FIM CORREÇÃO: ATIVIDADES DE HOJE (MODO CLARO) --- 

/* --- CORREÇÃO: CRONOGRAMA NO MODO CLARO --- */

[data-theme="light"] .day-name {
    color: var(--text-main) !important; /* Muda de Branco para Preto Azulado */
    font-weight: 800;
}

[data-theme="light"] .day-total {
    color: var(--text-muted) !important; /* Garante cinza médio legível */
}

/* Opcional: Dar um fundo suave no cabeçalho do dia para destacar */
[data-theme="light"] .day-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* FIM CORREÇÃO: CRONOGRAMA NO MODO CLARO --- */

/* --- MELHORIA VISUAL DOS CARDS DE REVISÃO --- */

/* 1. Etiqueta Sólida da Matéria (O "Preenchimento" que você pediu) */
.rm-subject-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    color: #ffffff !important; /* Texto sempre branco para contraste */
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* Sombra leve para destacar */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Garante leitura mesmo em cores claras */
    margin-bottom: 6px;
}

/* 2. Ajuste no Card para destacar do fundo branco */
[data-theme="light"] .rev-card-modern {
    background: #f8fafc; /* Um cinza muito suave (Slate 50) */
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .rev-card-modern:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* --- OPCIONAL: SIDEBAR COM A COR DA MARCA (ESTILO NAVY) --- */

aside#sidebar {
    background: #1e1b4b !important; /* Azul Marinho Profundo */
    border-right: none !important;
}

/* Ajusta o texto para branco, pois o fundo agora é azul escuro */
.nav-link {
    color: #94a3b8 !important; /* Cinza azulado */
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.nav-link.active {
    background: var(--primary) !important; /* Azul vibrante no item ativo */
    color: #ffffff !important;
    border-left: none !important; /* Remove a borda lateral */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Ajuste do Brand (Logo) */
.brand-area {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Ajuste do Footer do Menu */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.05) !important;
}

.user-info-mini div:first-child { color: white !important; }

/* --- CORREÇÃO: HOVER DO PERFIL (TEXTO ESCURO) --- */

/* Quando passar o mouse no perfil... */
.user-profile-mini:hover .user-info-mini div {
    color: #0f172a !important; /* ...muda o nome e cargo para Preto Azulado */
}

/* Opcional: Se quiser que o subtítulo (cargo) fique um pouco mais claro */
.user-profile-mini:hover .user-info-mini div:last-child {
    color: #64748b !important; /* Cinza para hierarquia */
}
/* --- CORREÇÃO: TELA DE BOAS-VINDAS (WIZARD) NO MODO CLARO --- */

/* 1. Títulos e Rótulos (Muda de Branco para Escuro) */
[data-theme="light"] .wizard-title,
[data-theme="light"] .wizard-label,
[data-theme="light"] .wiz-sub-name {
    color: var(--text-main) !important; /* Preto Azulado */
}

/* 2. Descrições e Subtítulos (Muda de Cinza Claro para Cinza Médio) */
[data-theme="light"] .wizard-subtitle,
[data-theme="light"] .wizard-desc,
[data-theme="light"] .file-text,
[data-theme="light"] .wiz-sub-topics {
    color: var(--text-muted) !important;
}

/* 3. Cards de Opção (Borda e Sombra para destacar no fundo branco) */
[data-theme="light"] .wizard-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .wizard-card:hover {
    border-color: var(--primary);
    background: #eff6ff; /* Azul bem clarinho no hover */
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1);
}

/* 4. Ícones do Wizard */
[data-theme="light"] .wizard-icon,
[data-theme="light"] .file-icon {
    color: var(--primary); /* Garante que o ícone seja colorido, não branco */
}

/* 5. Área de Upload e Listas */
[data-theme="light"] .file-upload-wrapper,
[data-theme="light"] .subject-list-area {
    background: #f8fafc;
    border-color: #cbd5e1;
}

[data-theme="light"] .wiz-subject-item {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* --- CORREÇÃO: CARDS DE OBJETIVOS (MODO CLARO PROFISSIONAL) --- */

/* 1. Definição do Card */
[data-theme="light"] .plan-t-card {
    background: #ffffff;
    border: 1px solid #cbd5e1; /* Borda cinza sólida para definição */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 2. Card Ativo (Destaque Elegante) */
[data-theme="light"] .plan-t-card.active {
    border: 2px solid var(--success); /* Borda verde mais grossa */
    background: #f0fdf4; /* Fundo verde muito suave (Mint) */
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.15);
}

/* 3. Tipografia (Contraste Alto) */
[data-theme="light"] .pt-title {
    color: #0f172a !important; /* Preto Azulado Forte */
    font-weight: 800;
}

[data-theme="light"] .pt-role {
    color: #64748b !important; /* Cinza Médio */
    font-weight: 600;
}

/* 4. Grid de Estatísticas (O bloco cinza do meio) */
[data-theme="light"] .pt-stats-grid {
    background: #f8fafc; /* Cinza Gelo */
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .pt-stat-box {
    border-right: 1px solid #e2e8f0;
}

[data-theme="light"] .pt-stat-val {
    color: #334155 !important; /* Cinza Escuro */
    font-weight: 800;
}

[data-theme="light"] .pt-stat-label {
    color: #94a3b8 !important; /* Cinza Claro para não poluir */
}

/* 5. Rodapé e Botões */
[data-theme="light"] .p-footer,
[data-theme="light"] .pt-actions {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .btn-pt-select {
    border-color: #cbd5e1;
    color: #475569;
}
[data-theme="light"] .btn-pt-select:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

/* Botão "EM USO" */
[data-theme="light"] .active .btn-pt-select {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 6. Card "Nova Missão" (Placeholder) */
[data-theme="light"] .plan-t-add {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
}
[data-theme="light"] .plan-t-add:hover {
    background: #eff6ff;
    border-color: var(--primary);
}
[data-theme="light"] .plan-add-plus {
    color: #94a3b8;
}
[data-theme="light"] .plan-t-add:hover .plan-add-plus {
    color: var(--primary);
}
/* --- DESTAQUE MODAL LANÇAR HORAS --- */

/* --- CORREÇÃO: MODAL DE LANÇAR HORAS (MODO CLARO) --- */

/* 1. Borda e Definição do Modal (Container) */
[data-theme="light"] #manualLogModal .login-wrapper {
    /* Borda cinza sólida para definir o limite */
    border: 2px solid #1a1616 !important; 
    
    /* Sombra profunda para dar destaque "Pop-up" */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    
    /* Garante fundo branco puro */
    background-color: #ffffff !important;
}

/* 2. Correção do Relógio (Legibilidade) */
/* Container do relógio */
[data-theme="light"] .time-group-modern {
    background: #f8fafc !important; /* Fundo cinza bem clarinho */
    border: 1px solid #e2e8f0 !important; /* Borda sutil */
}

/* Os números digitados */
[data-theme="light"] .time-digit {
    color: #0f172a !important; /* Preto Azulado (Slate 900) */
    text-shadow: none !important;
}

/* Placeholder (00) quando vazio */
[data-theme="light"] .time-digit::placeholder {
    color: #cbd5e1 !important; /* Cinza claro */
}

/* Os dois pontos (:) */
[data-theme="light"] .time-separator {
    color: #94a3b8 !important;
}

/* Os textos "HORAS", "MIN", "SEG" */
[data-theme="light"] .time-label {
    color: #64748b !important; /* Cinza médio */
    font-weight: 800;
}

/* 3. Título do Modal */
[data-theme="light"] #manualLogTitle {
    color: #f8f8f8 !important;
}

/* 4. Rótulos dos campos (O que você estudou?, Tipo, etc) */
[data-theme="light"] #manualLogModal .input-label {
    color: #475569 !important;
}

/* --- CORREÇÃO: INPUTS DE PERFORMANCE (ACERTOS/ERROS) NO MODO CLARO --- */

[data-theme="light"] .perf-input {
    color: #0f172a !important; /* Texto Preto Azulado (Legível) */
    background: #ffffff !important;
}

/* Garante que o placeholder (texto de ajuda) também seja visível */
[data-theme="light"] .perf-input::placeholder {
    color: #94a3b8 !important; /* Cinza médio */
}

/* Opcional: Deixar o texto do acerto verde escuro e do erro vermelho escuro para destaque */
[data-theme="light"] .perf-green {
    color: #15803d !important; /* Verde Escuro */
}

[data-theme="light"] .perf-red {
    color: #b91c1c !important; /* Vermelho Escuro */
}

/* --- CORREÇÃO: CRONÔMETRO SEMPRE ESCURO (IMERSÃO TOTAL) --- */

/* Força o fundo escuro mesmo no tema claro */
[data-theme="light"] #focusOverlay.focus-overlay-glass {
    background: rgba(5, 5, 5, 0.95) !important; /* Quase preto total */
    backdrop-filter: blur(15px);
}

/* Força os textos para branco/cinza claro */
[data-theme="light"] #focusOverlay .timer-display-modern {
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5) !important; /* Devolve o brilho neon */
}

[data-theme="light"] #focusOverlay .timer-label,
[data-theme="light"] #focusOverlay .focus-hint {
    color: #94a3b8 !important; /* Cinza do tema escuro */
}

/* Ajusta o Badge do topo ("MODO DE GUERRA") */
[data-theme="light"] #focusOverlay .focus-status-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
}

/* Botão de Fechar (X) */
[data-theme="light"] #focusOverlay .btn-close-focus {
    color: #94a3b8 !important;
    border-color: transparent !important;
}
[data-theme="light"] #focusOverlay .btn-close-focus:hover {
    color: #ffffff !important;
    background: rgba(224, 35, 35, 0.521) !important;
}

/* Anel Pulsante (Garante que a borda fique visível) */
[data-theme="light"] #focusOverlay .pulse-ring {
    border-color: rgba(78, 70, 229, 0.404) !important;
    background: radial-gradient(circle, rgba(226, 226, 233, 0.05) 0%, transparent 70%) !important;
}
[data-theme="light"] #focusOverlay .btn-stop:hover {
    background: #ef4444 !important; /* Vermelho Crítico */
    border-color: #ef4444 !important;
    color: white !important;
}
[data-theme="light"] #focusOverlay .btn-stop {
     background: #ef4444 !important; /* Vermelho Crítico */
    border-color: #ef4444 !important;
    color: white !important;
    border: 2px solid rgba(255, 0, 0, 0.678) !important; /* Borda branca visível */
    
}

/* --- PADRONIZAÇÃO DE MODAIS MENORES (.auth-card) --- */

.auth-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    position: relative; /* Para posicionar o botão fechar */
}

/* Botão de Fechar Unificado */
.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--critical);
}

/* Ajustes Específicos para o Modo Claro */
[data-theme="light"] .auth-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important; /* Borda definida */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
}

/* --- BOTÃO FECHAR PADRÃO (MINIMALISTA) --- */

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted); /* Cinza discreto */
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efeito ao passar o mouse: Fica mais escuro e cresce um pouco */
.btn-close-modal:hover {
    color: var(--text-main); /* Preto no claro / Branco no escuro */
    transform: scale(1.2) rotate(90deg); /* Animação sutil */
    background: transparent;
}

/* Garante visibilidade no Modo Claro */
[data-theme="light"] .btn-close-modal {
    color: #94a3b8;
}
[data-theme="light"] .btn-close-modal:hover {
    color: #0f172a;
}

/* --- BOTÃO DE AÇÃO PRINCIPAL (PADRONIZADO) --- */

.btn-save-session {
    width: 100%;
    padding: 16px; /* Altura confortável */
    background: var(--primary);
    color: #ffffff !important; /* Texto sempre branco */
    font-size: 0.9rem;
    font-weight: 800; /* Mais peso na fonte */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espaço entre ícone e texto */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* Efeito Hover Geral */
.btn-save-session:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

/* AJUSTE ESPECÍFICO PARA MODO CLARO (Sombra Colorida) */
[data-theme="light"] .btn-save-session {
    background: var(--primary); /* Azul Royal */
    /* Sombra azul suave embaixo do botão */
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4); 
}

[data-theme="light"] .btn-save-session:hover {
    background: #1e40af; /* Azul um pouco mais escuro */
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
}
/* --- CORREÇÃO: TÍTULOS DOS MODAIS (MODO CLARO) --- */

/* Força títulos escuros em todos os tipos de modal */
[data-theme="light"] .auth-card h3,
[data-theme="light"] .auth-card h4,
[data-theme="light"] .login-form-side h3,
[data-theme="light"] #manualLogTitle,
[data-theme="light"] .modal-section-title {
    color: #0f172a !important; /* Slate 900 (Preto Azulado Profundo) */
    font-weight: 800; /* Garante peso para leitura rápida */
}

/* Garante que ícones soltos no cabeçalho também fiquem escuros ou na cor da marca */
[data-theme="light"] .auth-card i,
[data-theme="light"] .login-form-side i {
    /* Se o ícone não tiver cor definida, usa o texto escuro */
    /* color: var(--primary);  <-- Se preferir todos azuis, use este */
}

/* --- NOVO ESTILO BASE DA MARCA EDITAL EM DIA (Versão Clean) LOGOMARCA --- */

/* Contêiner da área do logo no sidebar (Mantenha este bloco) */
.brand-area {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main); 
}

/* O Ícone Visual (O Livro Azul)  */
.brand-logo-icon {
    /* Fundo do quadrado (Cor Primária, o seu Azul) */
    background: var(--primary); 
    color: white; /* Cor do ícone do livro */
    width: 36px; /* Aumentamos levemente o tamanho do quadrado */
    height: 36px;
    min-width: 36px;
    border-radius: 10px; /* Bordas arredondadas suaves */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
    margin-right: 8px;
    font-size: 1.2rem; /* Tamanho do ícone do livro */
}

/* O Texto EDITALEMDIA */
/* EDITAL (Dark) */
.brand-name-main {
    font-weight: 800;
    color: white;
}
/* EMDIA (Blue) */
.brand-name-sub {
    font-weight: 700;
    color: var(--primary); /* Primary Blue */
}