/* ==========================================================================
   ESTUDA.IA - FOLHA DE ESTILOS MESTRA (MASTER STYLESHEET)
   Versão: 13.1 (Fix Loading Screen Overlay)
   ========================================================================== */

/* ==========================================================================
   1. VARIÁVEIS GLOBAIS & RESET
   ========================================================================== */
:root {
    /* --- Paleta de Cores (Design System) --- */
    --primary: #4F46E5;       /* Indigo Principal (Ação) */
    --primary-hover: #4338ca; /* Estado Hover */
    --secondary: #EC4899;     /* Rosa (Detalhes/Destaques) */
    
    --bg: #F3F4F6;            /* Fundo da Aplicação (Cinza Suave) */
    --surface: #ffffff;       /* Fundo de Cards/Modais (Branco) */
    
    --text-main: #111827;     /* Texto Principal (Quase Preto) */
    --text-muted: #6B7280;    /* Texto Secundário (Cinza) */
    
    --border: #E5E7EB;        /* Cor de Bordas e Divisórias */
    
    /* --- Cores de Feedback (Semânticas) --- */
    --success: #10B981;       /* Sucesso/Acerto */
    --warning: #F59E0B;       /* Atenção/Médio */
    --danger: #EF4444;        /* Erro/Crítico */
    
    /* --- Tipografia e Sombras --- */
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset Básico */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-stack);
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Espaço extra para footer/mobile */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
   2. COMPONENTES GERAIS
   ========================================================================== */

/* Navbar com Efeito Glassmorphism */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    display: flex; align-items: center; gap: 8px;
}

/* Containers */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: block; /* Garante que é bloco por padrão */
}

.editor-layout {
    display: flex; flex-direction: column; align-items: center; padding: 20px;
}

/* Botões Padrão */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px;
    background: var(--primary); color: white;
    font-weight: 600; border: none; border-radius: 10px;
    transition: all 0.2s; font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:disabled { background: var(--text-muted); cursor: not-allowed; transform: none; opacity: 0.7; }

/* Botões Outline */
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: #EEF2FF; }

/* ==========================================================================
   3. PÁGINA DASHBOARD
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; margin-bottom: 40px;
}

.stat-card {
    background: var(--surface); padding: 24px;
    border-radius: 16px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}

.stat-val { font-size: 2.2rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 5px; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--surface); padding: 30px;
    border-radius: 20px; cursor: pointer;
    transition: all 0.2s; border: 1px solid var(--border);
    display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}

.tool-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }

.tool-icon { 
    font-size: 2.5rem; margin-bottom: 20px; 
    background: #EEF2FF; width: 64px; height: 64px; 
    display: flex; align-items: center; justify-content: center; border-radius: 12px; 
}
.tool-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.tool-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* ==========================================================================
   4. PÁGINA EDITOR (redacao.html)
   ========================================================================== */

.editor-box {
    width: 100%; max-width: 900px;
    background: var(--surface); padding: 30px;
    border-radius: 16px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.timer-badge {
    background: #EEF2FF; color: var(--primary);
    padding: 8px 16px; border-radius: 8px;
    font-family: monospace; font-weight: 700; font-size: 1.2rem;
}

textarea.main-input {
    width: 100%; height: 60vh; padding: 24px;
    border: 2px solid var(--border); border-radius: 12px;
    font-size: 1.15rem; line-height: 1.7; resize: none;
    font-family: 'Georgia', serif; outline: none; transition: border 0.2s; color: #374151;
}

textarea.main-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.counters { text-align: right; color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; margin-bottom: 20px; }

/* ==========================================================================
   5. PÁGINA RESULTADOS
   ========================================================================== */

.results-container {
    display: none; width: 100%; max-width: 900px;
    margin-top: 40px; padding-bottom: 60px;
    animation: slideUp 0.5s ease;
}

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

.score-hero {
    background: var(--surface); padding: 30px;
    border-radius: 16px; border: 1px solid var(--border);
    text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.score-hero .val { font-size: 5rem; font-weight: 900; line-height: 1; color: var(--primary); letter-spacing: -3px; }
.score-hero .label { color: var(--text-muted); font-weight: 600; margin-top: 10px; }

.chart-box {
    background: var(--surface); padding: 20px;
    border-radius: 16px; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}

.comp-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 24px; margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.comp-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 15px; font-size: 1.1rem; }

.progress-track { background: #F3F4F6; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; border-radius: 5px; transition: width 1s ease; }

.feedback-item {
    background: #FEF2F2; border-left: 4px solid var(--danger);
    padding: 16px; margin-top: 12px; border-radius: 0 8px 8px 0; font-size: 0.95rem;
}
.feedback-item strong { display: block; color: #991B1B; margin-bottom: 6px; font-weight: 700; }
.feedback-item small { 
    display: inline-block; color: #065F46; font-weight: 600; 
    margin-top: 8px; background: #D1FAE5; padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; 
}

/* ==========================================================================
   6. PÁGINA CRONOGRAMA V1 (Timeline & Gráfico)
   ========================================================================== */

.progress-header {
    background: var(--surface); padding: 24px; border-radius: 16px;
    border: 1px solid var(--border); margin-bottom: 30px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.progress-info h2 { font-size: 1.5rem; margin-bottom: 5px; }
.progress-info p { color: var(--text-muted); font-size: 0.9rem; }

.circle-chart { width: 80px; height: 80px; position: relative; }
.circle-bg { fill: none; stroke: #eee; stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; animation: progress 1s ease-out forwards; }
.percentage { fill: var(--text-main); font-family: sans-serif; font-weight: bold; font-size: 0.5em; text-anchor: middle; }

/* Cards dos Módulos */
.module-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; margin-bottom: 20px; overflow: hidden; transition: all 0.2s;
}
.module-header {
    padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #fff;
}
.module-header:hover { background: #F9FAFB; }
.module-title { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.module-badge {
    background: #EEF2FF; color: var(--primary); padding: 4px 10px; 
    border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}

/* Lista de Tarefas (Checkboxes) */
.task-list { padding: 0 20px 20px; display: block; border-top: 1px solid var(--border); }
.task-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f3f4f6; transition: 0.2s; }
.task-item:last-child { border-bottom: none; }

.custom-checkbox {
    appearance: none; width: 24px; height: 24px; border: 2px solid var(--border);
    border-radius: 6px; margin-right: 15px; cursor: pointer; position: relative; transition: all 0.2s;
}
.custom-checkbox:checked { background-color: var(--success); border-color: var(--success); }
.custom-checkbox:checked::after {
    content: '✓'; position: absolute; color: white; font-size: 16px; left: 5px; top: -1px; font-weight: bold;
}

.task-label { font-size: 1rem; color: var(--text-main); cursor: pointer; flex: 1; }
.task-item.completed .task-label { text-decoration: line-through; color: var(--text-muted); }

/* ==========================================================================
   7. PÁGINA SIMULADOS V1 (Quiz)
   ========================================================================== */

.quiz-container {
    max-width: 800px; margin: 0 auto; background: var(--surface); padding: 40px;
    border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); text-align: center;
}

.question-text {
    font-size: 1.3rem; font-weight: 700; color: var(--text-main);
    margin-bottom: 30px; line-height: 1.5;
}

.options-grid { display: grid; gap: 15px; }

.option-btn {
    width: 100%; padding: 18px; text-align: left; background: #fff; border: 2px solid var(--border);
    border-radius: 12px; font-size: 1rem; color: var(--text-main); cursor: pointer; transition: all 0.2s; position: relative;
}
.option-btn:hover:not(:disabled) { border-color: var(--primary); background: #EEF2FF; transform: translateX(5px); }
.option-btn:disabled { cursor: default; opacity: 0.9; }

.option-btn.correct { background: #D1FAE5; border-color: var(--success); color: #065F46; }
.option-btn.correct::after { content: '✅'; position: absolute; right: 20px; }

.option-btn.wrong { background: #FEE2E2; border-color: var(--danger); color: #991B1B; opacity: 0.7; }
.option-btn.wrong::after { content: '❌'; position: absolute; right: 20px; }

.quiz-score { font-size: 4rem; font-weight: 900; color: var(--primary); margin-bottom: 10px; }
.badge-subject {
    background: #EEF2FF; color: var(--primary); padding: 5px 12px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    display: inline-block; margin-bottom: 15px;
}

/* ==========================================================================
   8. COMPONENTES ESPECIAIS (Loading & Modais)
   ========================================================================== */

/* FIX DA TELA DE CARREGAMENTO: Agora cobre tudo com z-index alto */
.loading-screen, .loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95); z-index: 10000; backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
}

.loader {
    width: 60px; height: 60px; border: 6px solid #EEF2FF; border-top-color: var(--primary);
    border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px;
}

.loading-text { font-weight: 600; color: var(--text-main); font-size: 1.2rem; animation: pulse 1.5s infinite; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 100;
    align-items: center; justify-content: center;
}

.modal-content { background: var(--surface); padding: 30px; border-radius: 16px; width: 90%; max-width: 450px; animation: slideUp 0.3s ease; }

.modal-option {
    width: 100%; padding: 16px; margin: 8px 0; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); text-align: left; cursor: pointer; display: flex; align-items: center; gap: 15px; transition: 0.2s;
}
.modal-option:hover { border-color: var(--primary); background: #EEF2FF; }

/* ==========================================================================
   9. NOVO: SIMULADOS V2 (Menu de Matérias)
   ========================================================================== */

.subjects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}

.subject-card {
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 16px; padding: 25px; cursor: pointer;
    transition: all 0.2s; display: flex; flex-direction: column; align-items: center; text-align: center;
}

.subject-card:hover { transform: translateY(-5px); border-color: var(--primary); }

/* Cores específicas por matéria */
.subject-card[data-type="humanas"]:hover { border-color: #F59E0B; background: #FFFBEB; }
.subject-card[data-type="natureza"]:hover { border-color: #10B981; background: #ECFDF5; }
.subject-card[data-type="linguagens"]:hover { border-color: #EC4899; background: #FDF2F8; }
.subject-card[data-type="matematica"]:hover { border-color: #3B82F6; background: #EFF6FF; }

.subject-icon { font-size: 3rem; margin-bottom: 15px; }
.subject-title { font-weight: 800; font-size: 1.2rem; color: var(--text-main); margin-bottom: 5px; }
.subject-count { color: var(--text-muted); font-size: 0.9rem; }

/* ==========================================================================
   10. NOVO: CRONOGRAMA V2 (Missões, Streak, Aulas)
   ========================================================================== */

/* Streak Bar (Barra de Fogo) */
.streak-bar {
    background: linear-gradient(135deg, #FF9068 0%, #FF4B1F 100%);
    color: white; padding: 15px 20px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; box-shadow: 0 4px 15px rgba(255, 75, 31, 0.3);
}
.streak-count { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }

/* Mission Card (Card de Tarefa Diária) */
.mission-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: space-between;
    transition: 0.2s; position: relative; overflow: hidden;
}
.mission-card:hover { transform: translateY(-3px); border-color: var(--primary); }

.mission-left { display: flex; align-items: center; gap: 15px; }
.mission-icon { 
    width: 50px; height: 50px; background: #EEF2FF; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.mission-info h3 { font-size: 1.1rem; margin-bottom: 4px; color: var(--text-main); }
.mission-info p { font-size: 0.9rem; color: var(--text-muted); }
.xp-badge { 
    background: #F3F4F6; color: var(--text-muted); padding: 4px 8px; 
    border-radius: 6px; font-size: 0.75rem; font-weight: 700; display: inline-block; margin-top: 5px;
}

/* BOTÃO DA MISSÃO (AGORA COMO LINK) */
.btn-start {
    background: var(--primary); color: white; border: none;
    padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer;
    text-decoration: none; font-size: 0.9rem;
}
.btn-start:hover { background: var(--primary-hover); }

/* ESTILO DO LINK A.BTN-START (Novo) */
a.btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

a.btn-start:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.mission-done { opacity: 0.6; background: #F9FAFB; pointer-events: none; }
.mission-done .btn-start, 
.mission-done a.btn-start { background: var(--success); }

/* Aulas de Vídeo (Seção Expansível) */
.lesson-content {
    display: none; padding: 20px; background: #F8FAFC;
    border-top: 1px solid var(--border); animation: slideDown 0.3s ease;
}
.lesson-content.active { display: block; }

.video-responsive {
    position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0; overflow: hidden; border-radius: 12px; margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}
.video-responsive iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.lesson-summary h4 { margin-bottom: 10px; color: var(--primary); }
.lesson-summary p { font-size: 0.95rem; line-height: 1.6; color: var(--text-main); margin-bottom: 15px; }

.btn-expand {
    background: none; border: none; font-size: 1.2rem; color: var(--text-muted);
    cursor: pointer; transition: 0.2s; margin-left: 10px;
}
.btn-expand:hover { color: var(--primary); }

/* ==========================================================================
   11. NOVO: ONBOARDING (Seleção de Foco & Slider)
   ========================================================================== */

.focus-selection-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg); z-index: 200;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px;
}

.focus-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px; width: 100%; max-width: 800px; margin-top: 30px;
}

.focus-card {
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 16px; padding: 20px; cursor: pointer; text-align: center;
    transition: all 0.2s;
}

.focus-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-md); }
.focus-card.active { border-color: var(--primary); background: #EEF2FF; }

.focus-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.focus-title { font-weight: 700; color: var(--text-main); }

.current-focus-badge {
    background: rgba(255,255,255,0.2); color: white; padding: 5px 12px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; border: 1px solid rgba(255,255,255,0.5);
}

/* --- ADD: Config Modal Updates --- */
.track-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.track-option {
    border: 2px solid #e5e7eb; padding: 15px; border-radius: 12px;
    text-align: center; cursor: pointer; transition: 0.2s;
}
.track-option:hover { border-color: var(--primary); background: #f5f3ff; }
.track-option.selected { border-color: var(--primary); background: #e0e7ff; color: var(--primary-hover); font-weight: 700; }

.slider-container { margin: 20px 0; }
.slider-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--primary); cursor: pointer; }
.btn-save { background: var(--primary); color: white; width: 100%; padding: 12px; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 1rem; }
.modal-box { background: white; width: 90%; max-width: 500px; padding: 25px; border-radius: 20px; animation: slideUp 0.3s ease; }

/* ==========================================================================
   12. PERSONALIZAÇÃO AVANÇADA (Novo Cronograma)
   ========================================================================== */

/* Chips de Matéria (Botões de Seleção) */
.chips-container {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0;
}

.subject-chip {
    padding: 8px 16px; border-radius: 20px; border: 2px solid var(--border);
    background: var(--surface); color: var(--text-muted); cursor: pointer;
    font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
}

.subject-chip:hover { border-color: var(--primary); }

.subject-chip.selected {
    background: #EEF2FF; border-color: var(--primary); color: var(--primary);
}

/* Slider de Intensidade */
.intensity-selector {
    display: flex; justify-content: space-between; background: #F3F4F6;
    padding: 5px; border-radius: 12px; margin-bottom: 20px;
}

.intensity-btn {
    flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer;
    background: transparent; color: var(--text-muted); font-weight: 700;
    transition: 0.2s;
}

.intensity-btn.active {
    background: white; color: var(--primary); box-shadow: var(--shadow-sm);
}

/* Toggle Diário/Semanal */
.view-toggle {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.toggle-btn {
    font-size: 0.9rem; font-weight: 600; color: var(--text-muted); cursor: pointer; padding-bottom: 5px;
}
.toggle-btn.active {
    color: var(--primary); border-bottom: 2px solid var(--primary);
}

/* Card de Meta Semanal */
.weekly-card {
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: 12px; padding: 15px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 15px; opacity: 0.8;
}

/* ==========================================================================
   13. NOVO: TIMER DE ESTUDOS & AUDIO (Deck, Círculo, Sons)
   ========================================================================== */

/* Timer na Navbar */
.nav-right { display: flex; align-items: center; gap: 15px; }

.study-timer {
    background: #111827; color: #fff; padding: 6px 12px;
    border-radius: 8px; font-family: monospace; font-weight: 700;
    font-size: 1rem; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.study-timer::before { content: '⏱️'; font-size: 0.9rem; }

/* --- ADD: Advanced Timer Deck --- */
.timer-deck {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.timer-ring {
    width: 150px; height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--success) 0%, rgba(255,255,255,0.1) 0%);
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
    transition: background 1s linear;
}

.timer-inner {
    width: 130px; height: 130px;
    background: #1e1b4b;
    border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2;
}

.timer-display { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer-label { font-size: 0.75rem; color: #a5b4fc; text-transform: uppercase; letter-spacing: 1px; }

/* Link de Configuração dentro do Timer (Discreto) */
.timer-config-link {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 15px;
    border-bottom: 1px dashed rgba(255,255,255,0.3);
    padding-bottom: 2px;
    transition: 0.2s;
    display: inline-block;
    cursor: pointer;
}
.timer-config-link:hover {
    color: white;
    border-color: white;
}

.timer-controls { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.btn-timer {
    border: none; padding: 10px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: transform 0.1s;
}
.btn-play { background: var(--success); color: white; padding: 10px 30px; font-size: 1.1rem; }
.btn-stop { background: rgba(255,255,255,0.1); color: white; }
.btn-timer:active { transform: scale(0.95); }

/* --- ADD: Sound Bar (Modo Zen) --- */
.sound-bar {
    display: flex; justify-content: center; gap: 10px;
    margin-top: 20px; padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sound-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: #a5b4fc; padding: 5px 12px; border-radius: 12px;
    font-size: 0.8rem; cursor: pointer; transition: 0.2s;
}
.sound-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.sound-btn:hover { background: rgba(255,255,255,0.1); }


/* Card Personalizado (Destaque) */
.focus-card.custom-mode {
    border-style: dashed; background: #fff;
}
.focus-card.custom-mode:hover {
    background: #EEF2FF; border-style: solid;
}

/* Esconder/Mostrar Seções do Modal */
.modal-section { display: none; }
.modal-section.active { display: block; animation: slideUp 0.3s ease; }


/* ==========================================================================
   14. GAMIFICAÇÃO & UX MELHORADA (Cronograma V3)
   ========================================================================== */

/* Modal Actions */
.modal-actions {
    display: flex; gap: 10px; margin-top: 20px;
}
.btn-cancel {
    background: transparent; border: 1px solid var(--border); color: var(--text-muted);
    flex: 1; padding: 12px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.btn-cancel:hover { background: #F3F4F6; color: var(--text-main); }

/* Visão Semanal (Grid) */
.weekly-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px; margin-top: 15px;
}
.day-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 15px; text-align: center; opacity: 0.7;
}
.day-card.active {
    opacity: 1; border-color: var(--primary); background: #EEF2FF;
    box-shadow: var(--shadow-sm); transform: scale(1.05);
}
.day-name { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.day-load { font-size: 1.2rem; font-weight: 800; color: var(--text-main); margin-top: 5px; }

/* Level Bar (Gamificação) */
.level-container {
    background: #1F2937; padding: 15px 20px; border-radius: 12px; color: white;
    margin-bottom: 20px; display: flex; align-items: center; gap: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.level-badge {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem; border: 2px solid white;
}
.xp-bar-wrapper { flex: 1; }
.xp-info { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 5px; opacity: 0.9; }
.xp-track { background: rgba(255,255,255,0.2); height: 8px; border-radius: 4px; overflow: hidden; }
.xp-fill { background: #10B981; height: 100%; width: 0%; transition: width 0.5s ease; }

/* Animação de Confete (Simples) */
@keyframes pop { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.mission-done .btn-start { animation: pop 0.3s ease; }

/* ==========================================================================
   15. RETENTION EDITION (Heatmap & Stats)
   ========================================================================== */

/* Modal de Estatísticas (Overlay) */
.stats-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.95); z-index: 300;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px; color: white; animation: fadeIn 0.3s ease;
}

.stats-box {
    width: 100%; max-width: 800px; background: #1F2937;
    border-radius: 20px; padding: 30px; border: 1px solid #374151;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Grid de Números (Big Numbers) */
.big-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px;
}
.big-stat {
    text-align: center; background: #111827; padding: 20px;
    border-radius: 12px; border: 1px solid #374151;
}
.big-val { font-size: 2.5rem; font-weight: 800; color: #60A5FA; margin-bottom: 5px; }
.big-label { font-size: 0.9rem; color: #9CA3AF; text-transform: uppercase; font-weight: 600; }

/* Heatmap (Estilo GitHub) */
.heatmap-container {
    margin-top: 20px; overflow-x: auto; padding-bottom: 10px;
}
.heatmap-grid {
    display: grid; grid-template-rows: repeat(7, 12px); /* 7 dias da semana */
    grid-auto-flow: column; gap: 4px;
}
.day-square {
    width: 12px; height: 12px; border-radius: 3px; background: #374151;
}
/* Níveis de Intensidade */
.day-square[data-level="0"] { background: #374151; }
.day-square[data-level="1"] { background: #064E3B; } /* Pouco */
.day-square[data-level="2"] { background: #10B981; } /* Médio */
.day-square[data-level="3"] { background: #34D399; box-shadow: 0 0 5px #34D399; } /* Muito */

/* Missão Bônus (Destaque) */
.mission-card.bonus {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid #6366f1; color: white;
}
.mission-card.bonus:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3); }
.mission-card.bonus .mission-icon { background: rgba(255,255,255,0.1); }
.mission-card.bonus h3 { color: #fff; }
.mission-card.bonus p { color: #a5b4fc; }
.mission-card.bonus .xp-badge { background: #F59E0B; color: #000; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   16. ANIMAÇÕES & RESPONSIVIDADE
   ========================================================================== */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile (Celulares) - AQUI SÓ ENTRA O QUE FOR DIFERENTE NO MOBILE */
@media (max-width: 768px) {
    .container { margin: 20px auto; }
    
    textarea.main-input { height: 50vh; }
    
    .score-hero .val { font-size: 4rem; }
    
    .grid-results { grid-template-columns: 1fr; }
    
    .progress-header { flex-direction: column; text-align: center; gap: 20px; }
    
    /* Ajuste dos cards de missão no mobile */
    .mission-card { flex-direction: column; text-align: center; gap: 15px; }
    .mission-left { flex-direction: column; }
    .btn-start, a.btn-start { width: 100%; }

    /* Ajuste dos Big Numbers no Mobile */
    .big-stats-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   17. CORREÇÃO DE LAYOUT (FIXADO)
   ========================================================================== */

/* Isso garante que o container padrão volte ao normal nas outras páginas */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: block; /* Garante bloco único por padrão */
}

/* SÓ aplica o grid de 2 colunas se tiver a classe 'page-cronograma' */
@media (min-width: 1024px) {
    .container.page-cronograma {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 380px 1fr; /* Coluna do Timer (Esq) e Missões (Dir) */
        gap: 40px;
        align-items: start;
    }

    /* O Timer deck só vira "sticky" (fixo) nessa página específica */
    .container.page-cronograma .timer-deck {
        position: sticky;
        top: 100px;
        height: auto;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Aumenta o timer no desktop */
    .container.page-cronograma .timer-ring {
        width: 220px;
        height: 220px;
    }
    .container.page-cronograma .timer-inner {
        width: 200px;
        height: 200px;
    }
    .container.page-cronograma .timer-display {
        font-size: 3.5rem;
    }

    /* Grid de missões lado a lado no PC */
    .container.page-cronograma #missionsList {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Correção visual dos botões de áudio */
.sound-btn.playing {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 10px var(--success);
    animation: pulseAudio 1.5s infinite;
}

@keyframes pulseAudio {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Botão de Personalizar no Modal */
.custom-track-input {
    display: none;
    margin-top: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed var(--primary);
}



/* ==========================================================================
   18. GAMIFICAÇÃO & NOVOS RECURSOS (UPDATE FEEDBACK)
   ========================================================================== */

/* Barra de Gamificação (Topo) */
.gamification-bar {
    background: #1F2937;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.level-info { display: flex; align-items: center; gap: 15px; flex: 1; }
.level-badge {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.xp-container { flex: 1; max-width: 300px; }
.xp-text { font-size: 0.8rem; display: flex; justify-content: space-between; margin-bottom: 5px; opacity: 0.9; }
.xp-bg { background: rgba(255,255,255,0.1); height: 8px; border-radius: 10px; overflow: hidden; }
.xp-fill { background: #10B981; height: 100%; width: 0%; transition: width 0.5s ease; border-radius: 10px; }

.streak-info {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Heatmap (Histórico estilo GitHub) */
.heatmap-box {
    margin-top: 10px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.heatmap-day {
    width: 12px; height: 12px;
    border-radius: 3px;
    background: #e5e7eb; /* Dia vazio */
    flex-shrink: 0;
}
.heatmap-day.active-1 { background: #86efac; } /* Pouco */
.heatmap-day.active-2 { background: #22c55e; } /* Médio */
.heatmap-day.active-3 { background: #15803d; } /* Muito */

/* Animação XP Flutuante */
.floating-xp {
    position: absolute;
    color: #F59E0B;
    font-weight: 800;
    font-size: 1.2rem;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 1000;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(1.5); }
}

/* Ajuste Navbar */
.nav-left { display: flex; align-items: center; gap: 15px; }

/* CSS EXTRA PARA OS CHECKBOXES */
        .topics-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin: 20px 0;
            text-align: left;
        }
        .topic-checkbox {
            display: none; /* Esconde o checkbox padrão */
        }
        .topic-label {
            background: white;
            border: 2px solid var(--border);
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            color: var(--text-muted);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        /* Quando marcado */
        .topic-checkbox:checked + .topic-label {
            border-color: var(--primary);
            background: #EEF2FF; /* Corzinha azul claro */
            color: var(--primary);
        }
        .topic-checkbox:checked + .topic-label::after {
            content: '✅';
            font-size: 0.9rem;
        }

/* Botões de Quantidade */
.qty-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.qty-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.qty-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==========================================================================
   19. TELA DE LOGIN
   ========================================================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    padding: 20px;
}

.login-box {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid white;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* Animação suave nos inputs */
.login-box input {
    transition: all 0.3s ease;
}
.login-box input:focus {
    transform: translateY(-2px);
}


/* ==========================================================================
   20. NOVO HEADER (Navegação Completa)
   ========================================================================== */

/* Ajuste fino na Nav existente */
nav.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 70px; /* Altura fixa para consistência */
}

/* Links Centrais */
.nav-links {
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(243, 244, 246, 0.5); /* Fundo sutil */
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.5);
}

/* Link Ativo (Página Atual) */
.nav-link.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

/* Botão de Perfil Arredondado */
.avatar-circle {
    width: 35px;
    height: 35px;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.profile-btn:hover .avatar-circle {
    background: var(--primary);
    border-color: var(--primary);
    /* O emoji não muda de cor nativamente, mas o fundo sim */
    transform: scale(1.05);
}

/* Botão Pequeno para o Header */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* --- RESPONSIVIDADE DO HEADER --- */
@media (max-width: 768px) {
    nav.main-header {
        padding: 10px 15px;
        flex-wrap: wrap; /* Permite quebrar linha se precisar */
        height: auto;
    }

    /* Esconde o texto da logo em telas muito pequenas se precisar, ou ajusta tamanho */
    .logo { font-size: 1.2rem; }

    /* No celular, os links descem e ficam com scroll horizontal */
    .nav-links {
        order: 3; /* Joga para baixo da logo e do perfil */
        width: 100%;
        overflow-x: auto; /* Scroll horizontal */
        justify-content: flex-start;
        padding-bottom: 5px;
        margin-top: 5px;
        background: transparent;
        border: none;
    }

    .nav-link {
        white-space: nowrap; /* Não quebra texto */
        font-size: 0.85rem;
        background: var(--surface);
        border: 1px solid var(--border);
    }
    
    .nav-link.active {
        border-color: var(--primary);
    }
    
    /* Esconde barra de rolagem feia */
    .nav-links::-webkit-scrollbar { display: none; }
}



/* Ajustes para a Focus Toolbar no Header */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0 5px;
}
.icon-btn:hover { transform: scale(1.2); }

@media (max-width: 768px) {
    .nav-links { display: none; } /* Esconde links no mobile se ficar apertado */
    .focus-toolbar { border-right: none !important; }
}




/* --- Layout de Redação --- */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 350px; /* Editor grande, Sidebar fixa */
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    height: calc(100vh - 100px); /* Ocupa altura da tela menos header */
}

/* Área do Editor */
.editor-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-textarea {
    flex: 1;
    width: 100%;
    border: none;
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none; /* Tira o redimensionamento nativo */
    outline: none;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* Sidebar (Barra Lateral) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.guide-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.guide-header {
    padding: 15px;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.2s;
}

.guide-header:hover { background: #e5e7eb; }

.guide-content {
    padding: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: none; /* Escondido por padrão */
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

.guide-content.active { display: block; }

/* Responsividade Mobile */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr; /* Vira uma coluna só */
        height: auto;
    }
    .sidebar { order: 2; } /* Sidebar vai para baixo no mobile */
}



/* --- Toolkit do Escritor --- */
.toolbar-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toolbar-trigger:hover { transform: scale(1.1) rotate(15deg); }

/* Painel Lateral Sobreposto */
.toolkit-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Escondido */
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 20px;
    padding-top: 80px; /* Espaço para botão fechar */
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.toolkit-panel.open { right: 0; }

.toolkit-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Accordion do Toolkit */
.tool-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.tool-header {
    padding: 15px;
    background: #f9fafb;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-body {
    padding: 15px;
    display: none;
    font-size: 0.9rem;
    color: var(--text-main);
}

.tool-body.active { display: block; }

/* Chips de Cópia */
.copy-chip {
    display: inline-block;
    background: #eef2ff;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.copy-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.copy-chip:active { transform: scale(0.95); }


/* ==========================================================================
   21. MÓDULO REDAÇÃO PRO & TOOLKIT (ADICIONE NO FINAL DO ARQUIVO)
   ========================================================================== */

/* --- Toast Notifications (Avisos flutuantes) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000; /* Acima de tudo, inclusive modais */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Permite clicar através da área vazia */
}

.toast {
    background: var(--surface);
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    min-width: 280px;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: auto; /* O toast em si é clicável */
    border: 1px solid var(--border);
    color: var(--text-main);
}

.toast.error { border-left-color: var(--danger); color: #7f1d1d; background: #fef2f2; }
.toast.success { border-left-color: var(--success); color: #064e3b; background: #ecfdf5; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Novos Botões do Toolkit (Inserir Texto) --- */
.toolkit-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 15px 0 8px 0;
    font-weight: 800;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 5px;
}

.insert-btn {
    background: #fff;
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
    color: var(--text-main);
    font-family: var(--font-stack);
}

.insert-btn:hover {
    border-color: var(--primary);
    background: #EEF2FF;
    color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.insert-btn i {
    font-size: 1.1rem;
    color: var(--primary);
    opacity: 0.8;
}

/* --- Abas de Categoria (Conectivos) --- */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.tab-pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: 0.2s;
}

.tab-pill:hover { background: #E5E7EB; }

.tab-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
    border-color: var(--primary);
}

/* --- Card de Brainstorm (Roxo) --- */
.brainstorm-card {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Checklist Interativo (C5) --- */
#c5Checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: 0.3s;
    background: rgba(255,255,255,0.5);
}

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



/* --- CSS DO HEADER GLOBAL --- */
#app-header nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    padding: 12px 20px !important;
}

/* Animação suave no badge */
#headerPlanBadge {
    cursor: default;
    user-select: none;
}

#headerPlanBadge:hover {
    transform: scale(1.05);
}


/* Reserva o espaço do header para a tela não pular */
#app-header {
    min-height: 70px; /* Ajuste conforme a altura real do seu header */
    display: block;
    background: rgba(255, 255, 255, 0.8); /* Cor de fundo provisória */
}
