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

/* ==========================================================================
   RESET & VARIÁVEIS DE TEMA (CLARO/ESCURO)
   ========================================================================== */
:root {
    /* Tema Claro */
    --bg-primary: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;

    --border: #cbd5e1;
    --correct: #10b981;
    --correct-light: #ecfdf5;
    --incorrect: #ef4444;
    --incorrect-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(203, 213, 225, 0.7);
}

[data-theme="dark"] {
    /* Tema Escuro */
    --bg-primary: #090d16;
    --bg-sidebar: #05080e;
    --bg-card: #131926;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-sidebar: #64748b;
    --text-sidebar-active: #3b82f6;

    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: rgba(59, 130, 246, 0.12);

    --border: #1e293b;
    --correct: #10b981;
    --correct-light: rgba(16, 185, 129, 0.12);
    --incorrect: #ef4444;
    --incorrect-light: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(19, 25, 38, 0.85);
    --glass-border: rgba(30, 41, 59, 0.7);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* =========================================================
   LOGIN / CADASTRO
   ========================================================= */

#login-container {
    display: none;
    min-height: 100vh;
    background-color: #f8fafc;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   LAYOUT GRID (SPA COM SIDEBAR LATERAL)
   ========================================================================== */
.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar */
.app-sidebar {
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    padding: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
    transition: opacity 0.3s ease;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    box-sizing: border-box;
    overflow: hidden;
}

.sidebar-header {
    padding: 10px 16px 5px 16px;
    margin-bottom: 10px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
}

.app-logo>span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 850;
    color: #fff;
    letter-spacing: 0.5px;
}

.app-logo>span>span {
    font-weight: 400;
    color: #94a3b8;
}

.app-logo h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin: 0;
}

.app-logo h2 span {
    color: var(--accent);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow: hidden;
}

/* Custom thin scrollbar for sidebar menu */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}

.menu-item {
    background: none;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--text-sidebar);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.menu-item.active {
    background-color: var(--accent);
    color: #ffffff;
}

.menu-item .badge {
    margin-left: auto;
    background-color: #ef4444;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

#btn-nav-favoritas .badge {
    background-color: #f59e0b;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* Cronômetro na Sidebar */
.sidebar-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    color: #ffffff;
    font-family: monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

.timer-action-btn {
    background: none;
    border: none;
    color: var(--text-sidebar);
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
}

.timer-action-btn:hover {
    color: #ffffff;
}

.theme-switch-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.theme-switch-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Área de Conteúdo */
.app-content {
    padding: 0 40px 40px 40px;
    overflow-y: auto;
    height: 100vh;
}

.content-section {
    display: none;
    padding-top: 40px;
}

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

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
    }
}

.section-header {
    margin-bottom: 30px;
    transition: opacity 0.3s ease;
}

.section-header h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==========================================================================
   SEÇÃO 1: DASHBOARD (HOME)
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    transition: opacity 0.3s ease;
}

.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-icon {
    font-size: 2.2rem;
    background-color: var(--bg-primary);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-top: 4px;
}

.metric-card.success {
    border-left: 4px solid var(--correct);
}

.metric-card.success .metric-value {
    color: var(--correct);
}

.metric-card.danger {
    border-left: 4px solid var(--incorrect);
}

.metric-card.danger .metric-value {
    color: var(--incorrect);
}

.metric-card.accent {
    border-left: 4px solid var(--accent);
}

.metric-card.accent .metric-value {
    color: var(--accent);
}

/* Detalhes do Dashboard */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    transition: opacity 0.3s ease;
}

.details-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.details-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.discipline-progress-item {
    margin-bottom: 18px;
}

.discipline-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.discipline-progress-bar-bg {
    background-color: var(--bg-primary);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.discipline-progress-bar-fill {
    background-color: var(--accent);
    height: 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.6s ease;
}

.study-tips-list {
    list-style: none;
}

.study-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.study-tips-list li span {
    font-size: 1.2rem;
}

/* ==========================================================================
   PAINEL DE FILTROS E BUSCA POR TAGS-INPUT
   ========================================================================== */
.filters-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: opacity 0.3s ease;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: var(--accent);
}

.search-row {
    width: 100%;
}

/* Tags-Input Container */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 42px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background-color: var(--bg-primary);
    width: 100%;
    position: relative;
}

.tags-pill-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--accent);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 750;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.tag-pill .btn-remove-tag {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 900;
    padding: 0;
    line-height: 1;
}

.tag-pill .btn-remove-tag:hover {
    color: #ffffff;
}

/* Wrapper para input e ghost text */
.input-autocomplete-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-autocomplete-wrapper input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 6px 0 !important;
    outline: none !important;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    position: relative;
    z-index: 2;
}

#ghostSuggestion {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    pointer-events: none;
    font-size: 0.95rem;
    white-space: pre;
    font-family: var(--font-body);
    z-index: 1;
    line-height: normal;
    padding: 6px 0;
}

[data-theme="dark"] #ghostSuggestion {
    color: #475569;
}

/* Dropdown de Autocompletar Ocultado permanentemente conforme solicitado */
.autocomplete-tags-dropdown {
    display: none !important;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
    color: var(--text-secondary);
}

/* ==========================================================================
   CARDS DE QUESTÃO E SELEÇÃO DE ITENS
   ========================================================================== */
.questoes-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.questao-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: visible;
    /* Permitir que o balão flutue acima */
    transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.questao-card.em-correcao {
    border-color: var(--accent) !important;
    box-shadow: 0px 8px 30px rgba(37, 99, 235, 0.15) !important;
    z-index: 1010;
}

[data-theme="dark"] .questao-card.em-correcao {
    border-color: #ffffff !important;
    box-shadow: 0px 8px 30px rgba(255, 255, 255, 0.1) !important;
}

.questao-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.meta-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-transform: uppercase;
}

.meta-badge.banca {
    background-color: var(--accent-light);
    color: var(--accent);
    border-color: transparent;
}

.meta-badge.errada {
    background-color: var(--incorrect-light);
    color: var(--incorrect);
    border-color: transparent;
}

.meta-badge.dificuldade {
    background-color: var(--warning-light);
    color: var(--warning);
    border-color: transparent;
}

/* Inputs de Tags Customizadas */
.btn-add-tag-trigger {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--bg-primary);
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-add-tag-trigger:hover {
    background-color: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.input-add-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1.5px solid var(--accent);
    background-color: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    width: 90px;
}

/* Ações no topo do card (Favoritos) */
.card-header-actions {
    position: absolute;
    right: 30px;
    top: 30px;
    display: flex;
    gap: 10px;
}

.btn-favoritar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
    transition: transform 0.1s ease;
}

.btn-favoritar:active {
    transform: scale(0.85);
}

.questao-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.enunciado-texto {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--text-primary);
    white-space: pre-wrap;
    user-select: text;
}

/* Cores das marcações globais */
.highlight-yellow {
    background-color: #fef9c3 !important;
    border: 1px solid #ca8a04 !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #854d0e !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-green {
    background-color: #dcfce7 !important;
    border: 1px solid #16a34a !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #166534 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    display: inline-block !important;
}

.highlight-blue {
    background-color: #dbeafe !important;
    border: 1px solid #2563eb !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #1e40af !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-pink {
    background-color: #fce7f3 !important;
    border: 1px solid #db2777 !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #9d174d !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-orange {
    background-color: #ffedd5 !important;
    border: 1px solid #ea580c !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #9a3412 !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

/* Alternativas */
.alternativas-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.alternativa-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.alternativa-item:hover {
    border-color: var(--accent);
    background-color: var(--bg-card);
}

.alternativa-item.selecionada {
    border-color: var(--accent);
    background-color: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent);
}

.alternativa-item.correta {
    border-color: var(--correct) !important;
    background-color: var(--correct-light) !important;
    box-shadow: 0 0 0 1px var(--correct) !important;
}

.alternativa-item.incorreta {
    border-color: var(--incorrect) !important;
    background-color: var(--incorrect-light) !important;
    box-shadow: 0 0 0 1px var(--incorrect) !important;
}

/* X taxativo animação de linha de corte */
.alternativa-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 3px;
    background-color: #ef4444;
    transition: width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 5;
}

.alternativa-item.tachada::after {
    width: 100%;
}

.alternativa-item.tachada {
    opacity: 0.35;
    background-color: var(--bg-primary);
}

.alternativa-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    z-index: 2;
}

.alternativa-item.selecionada .alternativa-letter {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.alternativa-item.correta .alternativa-letter {
    background-color: var(--correct);
    color: white;
    border-color: var(--correct);
}

.alternativa-item.incorreta .alternativa-letter {
    background-color: var(--incorrect);
    color: white;
    border-color: var(--incorrect);
}

/* Estilos específicos para Certo/Errado (CESPE) - Removidos para manter estilo uniforme */


.alternativa-texto {
    flex-grow: 1;
    font-size: 0.95rem;
    padding-top: 2px;
    z-index: 2;
}

/* X taxativo botão */
.btn-eliminar {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    margin-left: 10px;
    align-self: center;
    z-index: 6;
}

.alternativa-item:hover .btn-eliminar,
.alternativa-item.tachada .btn-eliminar {
    opacity: 1;
}

.btn-eliminar:hover {
    color: var(--incorrect);
}

.alternativa-item.tachada .btn-eliminar {
    color: var(--accent);
}

/* Rodapé do Card */
.questao-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secundario {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secundario:hover {
    background-color: var(--bg-primary);
    border-color: var(--text-secondary);
}

.btn-danger {
    background-color: var(--incorrect);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* ==========================================================================
   SEÇÃO PÓS-RESOLUÇÃO (TABS)
   ========================================================================== */
.pos-resolucao-container {
    margin-top: 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-card);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pos-tabs {
    display: flex;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-btn {
    border: none;
    background: none;
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.02);
}

.tab-btn.ativo {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background-color: var(--bg-card);
}

.pos-content-panel {
    padding: 25px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.pos-content-panel.ativo {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Estilos de Conteúdo do Professor e Lei Seca */
.markdown-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    margin: 15px 0;
    color: var(--text-secondary);
    font-style: italic;
    background-color: var(--bg-primary);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
}

.markdown-body p {
    margin-bottom: 12px;
}

.markdown-body strong {
    font-weight: 600;
    color: var(--text-primary);
}

.markdown-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.markdown-body h3 {
    font-family: var(--font-heading);
    margin: 20px 0 10px 0;
    font-size: 1.15rem;
}

/* Fórum */
.forum-comentarios {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comentario-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.comentario-item:last-child {
    border: none;
    padding-bottom: 0;
}

.comentario-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.comentario-autor {
    font-weight: 600;
    color: var(--accent);
}

.comentario-texto {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.novo-comentario-box {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.novo-comentario-box textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: none;
    outline: none;
}

.novo-comentario-box textarea:focus {
    border-color: var(--accent);
}

.novo-comentario-box button {
    align-self: flex-end;
}

.mnemonico-box {
    background-color: var(--warning-light);
    border: 1.5px dashed var(--warning);
    border-radius: 12px;
    padding: 20px;
    color: var(--text-primary);
}

/* ==========================================================================
   MODO FOCO (FULLSCREEN MODAL)
   ========================================================================== */
.foco-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 999;
}

.foco-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 900px;
    height: 90vh;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    overflow: hidden;
    animation: modalAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.foco-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.foco-header {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.foco-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0;
}

.foco-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.foco-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.foco-tip-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-close-btn {
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.modal-close-btn:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Configurações */
.config-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    box-shadow: var(--shadow);
}

.config-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 12px;
}

.config-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ==========================================================================
   BARRA MÓVEL DE MARCAÇÃO FLUTUANTE (STICKY HIGHLIGHTER - ARRASTÁVEL)
   ========================================================================== */
.sticky-highlighter-bar {
    position: sticky !important;
    top: 95px !important;
    margin: 0 !important;
    transform: none;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 1050;
    width: 280px !important;
    box-sizing: border-box;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sticky-highlighter-bar.minimized {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: 20px !important;
    padding: 8px 10px 8px 10px !important;
    gap: 2px;
    width: 62px !important;
}

[data-theme="dark"] .sticky-highlighter-bar.minimized {
    border-color: #ffffff !important;
    box-shadow: 4px 4px 0px #ffffff !important;
}

/* Classe aplicada enquanto arrasta */
.sticky-highlighter-bar.dragging {
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .sticky-highlighter-bar.dragging {
    box-shadow: var(--shadow-lg);
}

.highlighter-drag-handle {
    width: 100%;
    text-align: center;
    cursor: move;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    padding-bottom: 4px;
    border-bottom: 1.5px solid var(--border);
    user-select: none;
}

.highlighter-title {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-primary);
    width: 100%;
    text-align: center;
}

.highlighter-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.1s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .highlighter-color {
    border-color: #ffffff;
}

.highlighter-color:hover {
    transform: scale(1.15);
}

.highlighter-color.active {
    border-width: 3px;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--accent);
}

.highlighter-color.btn-amarelo {
    background-color: #fef08a;
}

.highlighter-color.btn-verde {
    background-color: #bbf7d0;
}

.highlighter-color.btn-azul {
    background-color: #bfdbfe;
}

.highlighter-color.btn-rosa {
    background-color: #fbcfe8;
}

.highlighter-color.btn-laranja {
    background-color: #fed7aa;
}

.highlighter-eraser {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .highlighter-eraser {
    border-color: #ffffff;
}

.highlighter-eraser::before {
    content: "🧹";
}

.highlighter-eraser.active {
    border-width: 3px;
    box-shadow: 0 0 10px #ef4444;
}

/* ==========================================================================
   BALÕES EXPLICATIVOS INFORMAS (ESTILO COMIC BOOK/QUADRINHOS)
   ========================================================================== */
.balao-explicativo-popup {
    position: absolute;
    width: 330px;
    background-color: #fdfaf2;
    /* Soft warm cream background */
    border: 1.5px solid #f59e0b;
    /* Amber border */
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(180, 83, 9, 0.1), 0 4px 6px -2px rgba(180, 83, 9, 0.05);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    overflow: visible;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .balao-explicativo-popup {
    background-color: #1c150d;
    /* Warm dark cream */
    border-color: #f97316;
    /* Bright amber border */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.balao-body {
    padding: 16px 18px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #1e293b;
    /* Dark text body */
    font-weight: 500;
}

[data-theme="dark"] .balao-body {
    color: #fef3c7;
    /* Light cream text */
}

.balao-body strong {
    font-weight: 800;
    color: #b45309;
    /* Amber/gold title */
    display: block;
    font-size: 0.98rem;
    margin-bottom: 6px;
}

[data-theme="dark"] .balao-body strong {
    color: #fbbf24;
}

.balao-footer-comic {
    padding: 10px 18px 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .balao-footer-comic {
    border-top-color: rgba(249, 115, 22, 0.15);
}

.btn-balao-action {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 6px 12px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-balao-action:hover {
    background-color: #fef08a;
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-balao-action {
    background-color: #2b1f13;
    color: #fbbf24;
    border-color: #f97316;
}

[data-theme="dark"] .btn-balao-action:hover {
    background-color: #451a03;
}

.balao-nav-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #fcf6e8;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .balao-nav-btns {
    background-color: #2b1f13;
    border-color: rgba(249, 115, 22, 0.2);
}

.btn-balao-nav {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #b45309;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-balao-nav:hover:not(:disabled) {
    background-color: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

[data-theme="dark"] .btn-balao-nav {
    color: #fbbf24;
}

[data-theme="dark"] .btn-balao-nav:hover:not(:disabled) {
    background-color: rgba(249, 115, 22, 0.15);
}

.btn-balao-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-balao-nav.btn-avancar {
    color: #b45309;
}

[data-theme="dark"] .btn-balao-nav.btn-avancar {
    color: #fbbf24;
}

#balao-passo-label {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.78rem;
    color: #b45309;
    user-select: none;
}

[data-theme="dark"] #balao-passo-label {
    color: #fbbf24;
}

/* Seta direcionadora estilo quadrinhos */
.balao-explicativo-popup::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: #FFFDF0;
    /* Matches cream background */
    border-left: 1.2px solid rgba(253, 230, 138, 0.8);
    /* Match balloon border! */
    border-bottom: 1.2px solid rgba(253, 230, 138, 0.8);
    /* Match balloon border! */
    z-index: 10;
}

[data-theme="dark"] .balao-explicativo-popup::after {
    background-color: #1c150d;
    border-color: rgba(245, 158, 11, 0.6);
}

/* Seta apontando para esquerda */
.balao-explicativo-popup.seta-esquerda::after {
    left: -11px;
    top: 30px;
    transform: rotate(45deg);
    border-right: none;
    border-top: none;
}

/* Seta apontando para direita */
.balao-explicativo-popup.seta-direita::after {
    right: -11px;
    top: 30px;
    transform: rotate(-135deg);
    border-right: none;
    border-top: none;
}

/* Seta apontando para cima */
.balao-explicativo-popup.seta-cima::after {
    top: -11px;
    left: 40px;
    transform: rotate(135deg);
    border-right: none;
    border-top: none;
}

/* Seta apontando para baixo */
.balao-explicativo-popup.seta-baixo::after {
    bottom: -11px;
    left: 40px;
    transform: rotate(-45deg);
    border-right: none;
    border-top: none;
}

/* ==========================================================================
   MODO CORREÇÃO (DIMMING / OVERLAY DE ESCURECIMENTO IMERSIVO)
   ========================================================================== */
.correcao-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 1500 !important;
}

body.modo-correcao-ativo .app-sidebar {
    opacity: 0.25 !important;
    pointer-events: none !important;
}

/* Elevate the main content above the blocking overlay so its active question card is visible */
body.modo-correcao-ativo .app-content {
    position: relative !important;
    z-index: 1600 !important;
}

/* Darken, blur and disable other dashboard/config sections when in correction mode */
body.modo-correcao-ativo .section-header,
body.modo-correcao-ativo .filters-panel,
body.modo-correcao-ativo .import-area,
body.modo-correcao-ativo .lists-origin-filters,
body.modo-correcao-ativo #sala-setup-panel,
body.modo-correcao-ativo .active-caderno-bar,
body.modo-correcao-ativo .active-caderno-bar-dark,
body.modo-correcao-ativo .active-session-sidebar,
body.modo-correcao-ativo #active-session-sidebar-el,
body.modo-correcao-ativo .pagination-controls,
body.modo-correcao-ativo .navigation-panel {
    opacity: 0.15 !important;
    pointer-events: none !important;
    filter: blur(2px) !important;
    transition: all 0.3s ease;
}

/* Darken, blur and disable all other cards inside the list container in all views */
body.modo-correcao-ativo .questao-card:not(.em-correcao) {
    opacity: 0.15 !important;
    pointer-events: none !important;
    filter: blur(2px) !important;
    transition: all 0.3s ease;
}

.btn-sair-correcao-flutuante {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0f172a; /* Slate 900 / Navy Blue */
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 9999px; /* Pill shape */
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 2200;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-sair-correcao-flutuante:hover {
    background-color: #1e293b; /* Slate 800 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    transform: translateX(-50%) translateY(-2px);
}

.btn-sair-correcao-flutuante:active {
    transform: translateX(-50%) translateY(0) scale(0.95);
}

/* ==========================================================================
   PAINEL "MINHAS NOTAS"
   ========================================================================== */
.nota-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[data-theme="dark"] .nota-item-card {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.nota-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.nota-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

.nota-card-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.nota-card-body textarea {
    width: 100%;
    height: 100px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.88rem;
    resize: none;
    font-family: var(--font-body);
    outline: none;
}

.nota-card-body textarea:focus {
    border-color: var(--accent);
}

.nota-card-saved-balloons {
    margin-top: 15px;
    font-size: 0.82rem;
}

.nota-card-saved-balloons h5 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--accent);
}

.saved-balloon-item {
    background-color: var(--bg-primary);
    border-left: 3px solid var(--accent);
    padding: 8px 10px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 8px;
    position: relative;
}

.btn-remover-nota-balao {
    background: none;
    border: none;
    color: var(--incorrect);
    cursor: pointer;
    font-size: 0.75rem;
    position: absolute;
    right: 8px;
    top: 8px;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 900px) {
    .mobile-topbar {
        display: flex !important;
        align-items: center;
        background-color: var(--bg-sidebar);
        padding: 10px 15px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 1080;
        border-bottom: 2px solid #000000;
        gap: 15px;
    }

    [data-theme="dark"] .mobile-topbar {
        border-bottom-color: #ffffff;
    }

    .btn-burger {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .app-logo-mobile {
        font-family: var(--font-heading);
        font-weight: 800;
        color: #ffffff;
        font-size: 1.1rem;
    }

    .app-logo-mobile span {
        color: var(--accent);
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1090;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }

    .app-layout {
        grid-template-columns: 1fr;
        padding-top: 60px;
        /* Espaço para o topbar */
        height: calc(100vh - 60px);
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        border-right: 2px solid #000000;
        border-bottom: none;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    }

    [data-theme="dark"] .app-sidebar {
        border-right-color: #ffffff;
    }

    .app-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .app-content {
        padding: 0 15px 15px 15px;
        height: 100%;
        overflow-y: auto;
    }

    .content-section {
        padding-top: 15px;
    }

    .dashboard-details-grid {
        grid-template-columns: 1fr;
    }

    .foco-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sticky-highlighter-bar {
        position: fixed !important;
        bottom: 20px !important;
        top: auto !important;
        right: 50% !important;
        transform: translateX(50%) !important;
        flex-direction: row !important;
        border-radius: 30px !important;
        padding: 8px 12px !important;
        gap: 8px !important;
        box-shadow: var(--shadow-lg) !important;
        border: 1px solid var(--border) !important;
        background-color: var(--bg-card) !important;
        width: auto !important;
        max-width: 95vw !important;
        z-index: 1050;
    }
    
    .sticky-highlighter-bar .sidebar-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        gap: 6px !important;
    }
    
    .sticky-highlighter-bar .sidebar-card:first-child {
        display: none !important; /* Hide tonalidade card on mobile */
    }
    
    .sticky-highlighter-bar .sidebar-card:nth-child(2) {
        flex-direction: row !important; /* Render tools row horizontally */
        gap: 6px !important;
    }
    
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn {
        padding: 8px !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        font-size: 0 !important; /* Hide text label */
        color: transparent !important;
        background: transparent !important;
    }
    
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn svg,
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn span {
        margin: 0 !important;
        color: var(--text-secondary) !important;
        font-size: 1.1rem !important;
    }
    
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn.active {
        background-color: var(--accent-light) !important;
    }
    
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn.active svg,
    .sticky-highlighter-bar .sidebar-card:nth-child(2) .tool-btn.active span {
        color: var(--accent) !important;
    }
    
    .sticky-highlighter-bar > button {
        display: none !important; /* Hide Caneta dark button on mobile */
    }

    /* Outros ajustes responsivos */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pos-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .questao-meta {
        flex-wrap: wrap;
        gap: 5px;
    }

    .questao-footer {
        flex-direction: column;
        gap: 10px;
    }

    .questao-footer button {
        width: 100%;
    }
}

/* ==========================================================================
   CONTROLES DE PAGINAÇÃO LEVE
   ========================================================================== */
.pagination-controls {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.btn-pag {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.btn-pag:hover:not(:disabled) {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-pag:active:not(:disabled) {
    transform: translateY(0);
}

.pag-info {
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-itens-pagina:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   RECURSOS INTERATIVOS MVP (CONECTORES, TACHAMENTO CIRÚRGICO, LINHA DO TEMPO, CÁLCULO)
   ========================================================================== */
.keyword-connector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.keyword-connector-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 0.3s ease, stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0px 2px 4px rgba(59, 130, 246, 0.3));
}

.keyword-connector-line.active {
    opacity: 0.95;
    stroke: var(--correta);
    filter: drop-shadow(0px 2px 6px rgba(16, 185, 129, 0.5));
}

.termo-erro-tachado {
    text-decoration: none;
    color: inherit;
    font-weight: inherit;
    position: relative;
}

.em-correcao .termo-erro-tachado {
    text-decoration: line-through;
    text-decoration-color: var(--errada) !important;
    text-decoration-thickness: 2.5px;
    color: var(--text-secondary);
    cursor: help;
    font-weight: 700;
}

.termo-erro-tachado[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: normal;
    width: 240px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1.5px solid var(--border);
    font-family: var(--font-body);
    font-weight: normal;
    line-height: 1.3;
    display: none;
}

.em-correcao .termo-erro-tachado[data-tooltip]::before {
    display: block;
}

.em-correcao .termo-erro-tachado[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.quadro-calculo-container {
    background: rgba(15, 23, 42, 0.03);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

[data-theme="dark"] .quadro-calculo-container {
    background: rgba(255, 255, 255, 0.03);
}

.quadro-calculo-title {
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.95rem;
}

.timeline-wrapper {
    position: relative;
    padding: 10px 0 10px 24px;
    margin: 15px 0 15px 12px;
    border-left: 2px dashed var(--border);
}

.timeline-node {
    position: relative;
    margin-bottom: 18px;
}

.timeline-node:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -31px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--border);
    transition: transform 0.2s ease;
}

.timeline-node:hover .timeline-dot {
    transform: scale(1.3);
}

.timeline-node.blue .timeline-dot {
    background-color: #3b82f6;
}

.timeline-node.green .timeline-dot {
    background-color: #10b981;
}

.timeline-node.pink .timeline-dot {
    background-color: #ec4899;
}

.timeline-node.orange .timeline-dot {
    background-color: #f97316;
}

.timeline-node.yellow .timeline-dot {
    background-color: #eab308;
}

.timeline-date {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.timeline-content-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* ==========================================================================
   RECOLHIMENTO DA SIDEBAR E AJUSTES DE OPACIDADE E PRINT
   ========================================================================== */
:root {
    --highlight-opacity: 0.45;
}

.btn-collapse-sidebar {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    right: -12px;
    top: 24px;
    z-index: 1005;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn-collapse-sidebar:hover {
    background-color: var(--accent);
    transform: scale(1.1);
}

.sidebar-collapsed {
    grid-template-columns: 80px 1fr !important;
}

.sidebar-collapsed .app-sidebar {
    padding: 24px 10px;
    align-items: center;
}

.sidebar-collapsed .logo-text,
.sidebar-collapsed .menu-item .menu-label,
.sidebar-collapsed .menu-item .badge,
.sidebar-collapsed .sidebar-timer span:not(.timer-icon),
.sidebar-collapsed .timer-action-btn,
.sidebar-collapsed .theme-switch-btn .theme-label {
    display: none !important;
}

.sidebar-collapsed .menu-item {
    justify-content: center;
    padding: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.sidebar-collapsed .theme-switch-btn {
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
}

.sidebar-collapsed .sidebar-timer {
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
}

.sidebar-collapsed .btn-collapse-sidebar .icon-arrow {
    transform: rotate(180deg);
}

/* Aplicando a opacidade dinâmica das canetas marca-texto */
.highlight-blue {
    background-color: rgba(59, 130, 246, var(--highlight-opacity, 0.15)) !important;
    border: 1px solid #2563eb !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #1e40af !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-green {
    background-color: rgba(16, 185, 129, var(--highlight-opacity, 0.15)) !important;
    border: 1px solid #16a34a !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #166534 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    display: inline-block !important;
}

.highlight-pink {
    background-color: rgba(236, 72, 153, var(--highlight-opacity, 0.15)) !important;
    border: 1px solid #db2777 !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #9d174d !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-orange {
    background-color: rgba(249, 115, 22, var(--highlight-opacity, 0.15)) !important;
    border: 1px solid #ea580c !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #9a3412 !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.highlight-yellow {
    background-color: rgba(234, 179, 8, var(--highlight-opacity, 0.15)) !important;
    border: 1px solid #ca8a04 !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
    color: #854d0e !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

/* Estilo de Impressão Limpa para Simulados */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    .app-sidebar,
    .main-header,
    .filters-panel,
    .btn-collapse-sidebar,
    .sticky-highlighter-bar,
    .btn-eliminar,
    .questao-footer,
    .novo-comentario-box,
    .pos-tabs,
    .sidebar-backdrop,
    .mobile-topbar {
        display: none !important;
    }

    .app-layout {
        display: block !important;
        padding-top: 0 !important;
    }

    .app-content {
        padding: 0 !important;
    }

    .questao-card {
        page-break-inside: avoid !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
    }

    .pos-content-panel {
        display: block !important;
        opacity: 1 !important;
    }
}

/* ==========================================================================
   ESTILOS PREMIUM: BIBLIOTECA DE PROVAS
   ========================================================================== */
.prova-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 24px 30px;
    color: #ffffff;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prova-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.prova-banner-title {
    font-size: 1.6rem;
    font-weight: 850;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    color: #ffffff !important;
}

.prova-banner-desc {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 500;
}

.prova-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.prova-stat-card {
    flex: 1;
    min-width: 130px;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
}

.prova-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
}

.prova-stat-number {
    font-size: 1.25rem;
    font-weight: 850;
    color: var(--text-primary);
    line-height: 1.1;
}

.prova-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banca-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1.5px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.banca-tab {
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.banca-tab:hover {
    color: var(--text-primary);
}

.banca-tab.active {
    color: var(--accent);
}

.banca-tab.active::after {
    content: "";
    position: absolute;
    bottom: -3.5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

.premium-prova-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.premium-prova-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent);
    opacity: 0.85;
}

.premium-prova-card.banca-cebraspe::before {
    background-color: #3b82f6;
}

.premium-prova-card.banca-fgv::before {
    background-color: #f59e0b;
}

.premium-prova-card.banca-cesgranrio::before {
    background-color: #10b981;
}

.premium-prova-card.banca-fcc::before {
    background-color: #ec4899;
}

.premium-prova-card.banca-vunesp::before {
    background-color: #a855f7;
}

/* ==========================================================================
   MELHORIAS: PREVIEW CURAÇÃO & PAINEL DE ESTATÍSTICAS
   ========================================================================== */
.preview-curacao-toolbar {
    background-color: var(--accent-light);
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 750;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.preview-curacao-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-curacao-btns {
    display: flex;
    gap: 8px;
}

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

.category-stat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.category-stat-row:last-child {
    border-bottom: none;
}

.category-stat-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-stat-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.category-stat-count {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
}

.category-stat-bar-container {
    height: 8px;
    background-color: var(--bg-app);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.category-stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    background-color: var(--correta);
    transition: width 0.4s ease;
}

/* ==========================================================================
   PLANNER & CICLOS DE ESTUDOS
   ========================================================================== */
.planner-banner {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: 20px;
    padding: 30px 40px;
    color: #ffffff;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.planner-banner-title {
    font-size: 2.2rem;
    font-weight: 850;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.planner-banner-desc {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0;
    line-height: 1.5;
}

.planner-grid-config {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .planner-grid-config {
        grid-template-columns: 1fr;
    }
}

.planner-freq-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.planner-freq-card {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    background-color: var(--bg-card);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.planner-freq-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.planner-freq-card.active {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 0 10px var(--accent-light);
    font-weight: 750;
}

.planner-materia-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--bg-app);
    margin-bottom: 8px;
}

.planner-today-target-card {
    background-color: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.08);
}

.planner-week-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .planner-week-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .planner-week-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.planner-day-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.25s ease;
}

.planner-day-card.today {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.planner-day-card.completed {
    border-color: var(--correta);
    background-color: var(--correta-light);
}

.planner-day-card.completed .day-status {
    color: var(--correta);
    font-weight: bold;
}

.planner-day-card.rest {
    opacity: 0.65;
    background-color: var(--bg-app);
    border-style: dashed;
}

.day-num {
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.day-subject {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-primary);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.day-status {
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 6px;
    color: var(--text-secondary);
}

.planner-report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* ==========================================================================
   ADICIONADO: QUADRO DE HORÁRIOS & CHECKLIST METAS DO PLANNER
   ========================================================================== */

/* Sub-abas de Navegação Interna do Planner */
.planner-subtabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 2px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.planner-subtab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 750;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.planner-subtab:hover {
    color: var(--text-primary);
}

.planner-subtab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Grid de Horários de 24 horas */
.hours-timeline {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 15px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    background-color: var(--bg-primary);
}

.hours-timeline::-webkit-scrollbar {
    width: 6px;
}

.hours-timeline::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.hour-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hour-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
    user-select: none;
}

.hour-block {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.hour-block:hover {
    border-color: var(--accent);
    background-color: var(--bg-primary);
}

/* Cores das Atividades */
.hour-block.work {
    background-color: rgba(59, 130, 246, 0.12);
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
}

.hour-block.gym {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1.5px solid #10b981;
    color: #10b981;
}

.hour-block.rest {
    background-color: rgba(245, 158, 11, 0.12);
    border: 1.5px solid #f59e0b;
    color: #f59e0b;
}

.hour-block.random {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1.5px solid #ef4444;
    color: #ef4444;
}

.hour-block.study {
    background-color: rgba(139, 92, 246, 0.15);
    border: 1.5px solid #8b5cf6;
    color: #8b5cf6;
    font-weight: 800;
}

/* Legenda de Horários */
.schedule-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

.legend-item:hover {
    background-color: var(--bg-primary);
}

.legend-item.selected {
    background-color: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-color.empty {
    border: 1px dashed var(--border);
}

.legend-color.work {
    background-color: #3b82f6;
}

.legend-color.gym {
    background-color: #10b981;
}

.legend-color.rest {
    background-color: #f59e0b;
}

.legend-color.random {
    background-color: #ef4444;
}

.legend-color.study {
    background-color: #8b5cf6;
}

/* Seletores de Dia da Grade */
.day-selector {
    display: flex;
    gap: 4px;
    background-color: var(--bg-primary);
    padding: 4px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    flex-wrap: wrap;
}

.day-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-btn:hover {
    color: var(--text-primary);
}

.day-btn.active {
    background-color: var(--accent);
    color: #ffffff;
}

/* Checklist de Metas */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    border-color: var(--accent);
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checklist-item.checked .checklist-checkbox {
    background-color: var(--correct);
    border-color: var(--correct);
}

.checklist-checkbox svg {
    width: 12px;
    height: 12px;
    stroke: #ffffff;
    stroke-width: 3;
    fill: none;
    display: none;
}

.checklist-item.checked .checklist-checkbox svg {
    display: block;
}

.checklist-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.7;
}

.checklist-meta {
    font-size: 0.78rem;
    font-weight: 700;
    background-color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-secondary);
}

/* Gráficos e Histórico */
.chart-container-planner {
    height: 240px;
    position: relative;
    margin-top: 10px;
}

.history-cycles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-cycle-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.25s ease;
}

.history-cycle-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.history-cycle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-cycle-title {
    font-size: 1.1rem;
    font-weight: 850;
    color: var(--text-primary);
}

.history-cycle-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.history-cycle-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.history-cycle-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-cycle-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.history-cycle-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}



/* ==========================================================================
   AJUSTES PORTAIS (ALUNO/ADMIN)
   ========================================================================== */
.portal-selector-wrapper {
    display: flex;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px;
    width: 100%;
    margin-bottom: 12px;
}

[data-theme="dark"] .portal-selector-wrapper {
    background-color: #0b0f19;
    border-color: #1e293b;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portal-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .portal-btn {
    color: #94a3b8;
}

.portal-btn.active {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -2px rgba(37, 99, 235, 0.2) !important;
}

/* Ocultação Mútua Sidebar (Aluno vs Admin) */
body.portal-student .admin-only {
    display: none !important;
}

body.portal-admin .pedagogical-only {
    display: none !important;
}

/* Item Ativo Laranja no Portal Admin - Agora Azul */
body.portal-admin .menu-item.active {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

/* ==========================================================================
   MÓDULO: LISTAS DE QUESTÕES (DESIGN DE FOLHAS GRAMPEADAS)
   ========================================================================== */
.listas-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.listas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

/* Cartão Folha Grampeada (Stapled Paper) */
.stapled-paper {
    position: relative;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    padding: 30px 20px 20px 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    box-shadow:
        1px 1px 0px #000,
        2px 2px 0px #ffffff,
        3px 3px 0px #cbd5e1,
        4px 4px 0px #ffffff,
        5px 5px 0px #cbd5e1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

[data-theme="dark"] .stapled-paper {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow:
        1px 1px 0px #000,
        2px 2px 0px #1e293b,
        3px 3px 0px #334155,
        4px 4px 0px #1e293b,
        5px 5px 0px #334155;
}

.stapled-paper:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow:
        1px 1px 0px #000,
        3px 3px 0px #ffffff,
        5px 5px 0px #cbd5e1,
        7px 7px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .stapled-paper:hover {
    box-shadow:
        1px 1px 0px #000,
        3px 3px 0px #1e293b,
        5px 5px 0px #334155,
        7px 7px 12px rgba(0, 0, 0, 0.5);
}

/* O Grampo Físico Metálico (Staple) */
.stapled-paper::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
    border-radius: 1px;
    border: 1px solid #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.stapled-paper-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.stapled-paper-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.stapled-paper-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stapled-paper-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    margin-top: 15px;
}

.stapled-paper-badge {
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .stapled-paper-badge {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-delete-list {
    background: none;
    border: none;
    color: var(--incorrect);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-delete-list:hover {
    background-color: var(--incorrect-light);
}

/* Área de Upload (Dropzone) */
.upload-dropzone {
    border: 2px dashed var(--border);
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.upload-icon {
    font-size: 2.5rem;
}

.upload-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--text-primary);
}

.upload-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    max-width: 450px;
}

/* Botão Listas + nos Cards */
.btn-add-to-list-trigger {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.btn-add-to-list-trigger:hover {
    background-color: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

/* Modal Genérico Para Listas */
.lists-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lists-modal-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lists-modal-header {
    padding: 20px;
    border-bottom: 1.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lists-modal-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.lists-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
}

.lists-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lists-modal-footer {
    padding: 15px 20px;
    border-top: 1.5px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: var(--bg-primary);
}

/* ==========================================================================
   ESTILOS PREMIUM PARA GERADOR DE CADERNOS (SALA DE QUESTÕES)
   ========================================================================== */
.setup-panel-container {
    animation: fadeIn 0.4s ease;
}

.setup-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.setup-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg) !important;
}

/* Fila de Filtros Acumulados - Pills */
.filter-queue-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.filter-queue-pill:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-lg);
}

.filter-queue-pill .btn-remove-pill {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.filter-queue-pill .btn-remove-pill:hover {
    color: #b91c1c;
}

/* Filtros Salvos - Badges */
.saved-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.saved-filter-badge:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.saved-filter-badge .btn-delete-saved {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    margin-left: 4px;
    transition: color 0.15s ease;
}

.saved-filter-badge .btn-delete-saved:hover {
    color: #ef4444;
}

/* =========================================================
   BARRA SUPERIOR DA SESSÃO ATIVA
   Ocupa 100% da largura da viewport e permanece fixa
   ========================================================= */

.active-caderno-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    box-sizing: border-box;

    margin: 0 !important;

    padding: 10px 34px !important;

    border: none !important;
    border-radius: 0 !important;

    z-index: 9999;

    background-color: #0b1120 !important;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18) !important;

    display: flex;
    justify-content: space-between;
    align-items: center;

    flex-wrap: nowrap;
    gap: 15px;

    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-15px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ajustes Responsivos */
@media (max-width: 768px) {
    .active-caderno-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .active-caderno-progress-wrapper {
        margin: 10px 0 !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   BLOQUEIO DE FOCO E OCULTAÇÃO DURANTE CORREÇÃO INTERATIVA
   ========================================================================== */
body.modo-correcao-ativo .questao-card:not(.em-correcao) {
    display: none !important;
}

body.modo-correcao-ativo .pagination-controls {
    display: none !important;
}

body.modo-correcao-ativo .active-caderno-bar {
    display: none !important;
}

/* Efeito de pulso de destaque pedagógico temporário na aba de Comentários */
.item-highlight-pedagogico {
    animation: pulseHighlight 0.8s ease-in-out infinite alternate;
}

@keyframes pulseHighlight {
    from {
        transform: scale(1.002);
        box-shadow: 0 0 8px var(--accent);
    }

    to {
        transform: scale(1.015);
        box-shadow: 0 0 16px var(--accent);
    }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA A NOVA CENTRAL PESSOAL DE ESTUDOS (HOME)
   ========================================================================== */
.home-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.grid-card-continue {
    grid-column: 1;
    grid-row: 1;
}

.grid-card-revisoes {
    grid-column: 2;
    grid-row: 1;
}

.grid-card-novidades {
    grid-column: 3;
    grid-row: 1;
}

.grid-card-desempenho {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.grid-card-atalhos {
    grid-column: 3;
    grid-row: 2;
}

@media (max-width: 1200px) {
    .home-layout-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-card-continue {
        grid-column: 1;
        grid-row: 1;
    }

    .grid-card-revisoes {
        grid-column: 2;
        grid-row: 1;
    }

    .grid-card-desempenho {
        grid-column: 1 / span 2;
        grid-row: 2;
    }

    .grid-card-novidades {
        grid-column: 1;
        grid-row: 3;
    }

    .grid-card-atalhos {
        grid-column: 2;
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    .home-layout-grid {
        grid-template-columns: 1fr;
    }

    .grid-card-continue,
    .grid-card-revisoes,
    .grid-card-novidades,
    .grid-card-desempenho,
    .grid-card-atalhos {
        grid-column: auto;
        grid-row: auto;
    }
}

.home-panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-panel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.revision-mini-card {
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.revision-mini-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.mini-card-icon {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.mini-card-count {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.mini-card-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.shortcut-box {
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shortcut-box:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-lg);
}

.shortcut-box:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow);
}

.shortcut-box .shortcut-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcut-box.blue {
    background-color: #eff6ff;
}

.shortcut-box.blue .shortcut-icon {
    background-color: #dbeafe;
}

.shortcut-box.green {
    background-color: #f0fdf4;
}

.shortcut-box.green .shortcut-icon {
    background-color: #dcfce7;
}

.shortcut-box.purple {
    background-color: #faf5ff;
}

.shortcut-box.purple .shortcut-icon {
    background-color: #f3e8ff;
}

.shortcut-box.orange {
    background-color: #fff7ed;
}

.shortcut-box.orange .shortcut-icon {
    background-color: #ffedd5;
}

.shortcut-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #000;
}

.shortcut-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.weekly-bar-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding-top: 15px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 8px;
}

.chart-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 12%;
    height: 100%;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar-val {
    width: 100%;
    background-color: var(--border);
    border-radius: 4px 4px 0 0;
    min-height: 5px;
    transition: height 0.5s ease, background-color 0.3s ease;
}

.chart-bar-val.active {
    background-color: var(--accent);
}

.chart-bar-col:hover .chart-bar-val {
    background-color: var(--accent-light);
}

.chart-bar-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.mini-stat-badge {
    font-size: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    color: var(--text-secondary);
}

.mini-stat-badge span {
    color: var(--text-primary);
    font-weight: 800;
}

.mini-stat-badge.success span {
    color: var(--correta);
}

.mini-stat-badge.danger span {
    color: #ef4444;
}

.mini-stat-badge.percent span {
    color: var(--accent);
}

.home-list-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.feed-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.feed-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.feed-item-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-item-body {
    flex: 1;
}

.feed-item-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feed-item-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.feed-item-meta {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-align: right;
    min-width: 40px;
}

/* ==========================================================================
   MICRO-INTERAÇÕES PREMIUM TÁTEIS & GLOW SHIMMER
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-warning,
.btn-danger,
.btn-outline-primary,
.btn-outline-secondary,
.shortcut-box,
.home-kpi-card,
.revision-mini-card {
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s ease, background-color 0.15s ease !important;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px) scale(1.02) !important;
}

.btn-primary:active,
.btn-secondary:active,
.btn-warning:active,
.btn-danger:active,
.btn-outline-primary:active,
.btn-outline-secondary:active,
.shortcut-box:active,
.home-kpi-card:active,
.revision-mini-card:active {
    transform: scale(0.96) !important;
}

/* Progress Bar Shimmer Animation */
#kpi-meta-progress-bar,
.active-caderno-bar .progress-bar-fill,
.discipline-progress-bar-fill {
    position: relative;
    overflow: hidden;
}

#kpi-meta-progress-bar::after,
.active-caderno-bar .progress-bar-fill::after,
.discipline-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    animation: shimmerProgress 2.5s infinite;
}

@keyframes shimmerProgress {
    100% {
        transform: translateX(100%);
    }
}

/* ==========================================================================
   ESTILOS PREMIUM DE CADERNO PAUTADO E ELEMENTOS DO CARD
   ========================================================================== */
.app-content {
    background-color: #f8fafc;
    background-image: linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 100% 28px;
}

[data-theme="dark"] .app-content {
    background-color: #0b0f19;
    background-image: linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px);
}

.questao-card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.questao-card-body {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    text-align: left;
}

.questao-card.em-correcao {
    position: relative !important;
    z-index: 2010 !important;
    background-color: var(--bg-card) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08) !important;
}

.questao-card.em-correcao .questao-card-body {
    border-color: var(--accent) !important;
    box-shadow: 0px 8px 30px rgba(37, 99, 235, 0.15) !important;
}

[data-theme="dark"] .questao-card.em-correcao .questao-card-body {
    border-color: #ffffff !important;
    box-shadow: 0px 8px 30px rgba(255, 255, 255, 0.1) !important;
}

/* Custom Switch Toggle */
.switch input:checked+.slider {
    background-color: var(--accent);
}

.switch .slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked+.slider::before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

/* Custom Circular Close/Eliminar Button */
.btn-eliminar {
    background-color: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50% !important;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    margin-left: 10px;
    align-self: center;
    z-index: 6;
}

.alternativa-item:hover .btn-eliminar,
.alternativa-item.selecionada .btn-eliminar,
.alternativa-item.tachada .btn-eliminar {
    opacity: 1 !important;
}

.alternativa-item:hover .btn-eliminar {
    background-color: var(--accent-light) !important;
    color: var(--accent) !important;
}

.alternativa-item.selecionada .btn-eliminar {
    background-color: var(--accent) !important;
    color: white !important;
}

.alternativa-item.tachada .btn-eliminar {
    background-color: var(--accent-light) !important;
    color: var(--accent) !important;
}

/* Sidebar SVG Icon Alignments & Profile Styles */
.menu-item svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
}


.user-profile-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.02);
    color: #fff;
}

.sidebar-collapsed .menu-item svg {
    margin: 0 auto;
}

.sidebar-collapsed .user-profile-wrapper {
    padding: 8px !important;
    justify-content: center !important;
}

.sidebar-collapsed .user-profile-wrapper div {
    display: none !important;
}

.sidebar-collapsed .portal-selector-wrapper {
    display: none !important;
}

/* Sidebar Footer Switch & Moon Icon Color Adjustment */
.sidebar-footer .switch .slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
}

.sidebar-footer .switch input:checked+.slider::before {
    transform: translateX(20px);
}

.theme-moon-svg {
    color: #94a3b8;
    transition: color 0.3s ease;
}

[data-theme="dark"] .theme-moon-svg {
    color: #1e3a8a;
    /* Darker blue of visual identity */
}

/* Collapsed footer state adjustments */
.sidebar-collapsed .sidebar-footer-item {
    justify-content: center !important;
    padding: 10px 0 !important;
}

.sidebar-collapsed .sidebar-footer-item .theme-label,
.sidebar-collapsed .sidebar-footer-item .switch {
    display: none !important;
}

/* ==========================================================================
   CLASSIFICATION CARD (PREMIUM CORRECTION BALLOONS)
   ========================================================================== */
.balao-explicativo-popup {
    position: absolute;
    width: 288px !important;
    /* w-72 */
    background-color: #FFFDF0 !important;
    /* bg-[#FFFDF0] */
    border: 1px solid rgba(253, 230, 138, 0.8) !important;
    /* border-amber-200/80 */
    border-radius: 16px !important;
    /* rounded-2xl */
    box-shadow: 0 10px 40px -12px rgba(120, 90, 20, 0.25) !important;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    overflow: visible;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .balao-explicativo-popup {
    background-color: #1c150d !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.balao-explicativo-popup .card-title {
    font-size: 11px !important;
    /* text-[11px] */
    font-weight: 700 !important;
    /* font-bold */
    text-transform: uppercase !important;
    /* uppercase */
    letter-spacing: 0.12em !important;
    /* tracking-[0.12em] */
    color: #b45309 !important;
    /* text-amber-700 */
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
}

[data-theme="dark"] .balao-explicativo-popup .card-title {
    color: #fbbf24 !important;
}

.balao-explicativo-popup .card-message {
    font-size: 13px !important;
    /* text-[13px] */
    line-height: 1.625 !important;
    /* leading-relaxed */
    color: #1e293b !important;
    /* text-slate-800 */
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

[data-theme="dark"] .balao-explicativo-popup .card-message {
    color: #fef3c7 !important;
}

.balao-explicativo-popup .card-message strong {
    font-weight: 800 !important;
    color: #b45309 !important;
}

[data-theme="dark"] .balao-explicativo-popup .card-message strong {
    color: #fbbf24 !important;
}

.balao-explicativo-popup .card-footer {
    padding: 6px 12px 12px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-top: none !important;
    background: transparent !important;
}

/* Save note button style */
.balao-explicativo-popup .save-note {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background-color: #ffffff !important;
    color: #6d28d9 !important;
    /* text-violet-700 */
    border: 1px solid rgba(253, 230, 138, 0.8) !important;
    /* border-amber-200/80 */
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 12px !important;
    /* text-[12px] */
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.balao-explicativo-popup .save-note:hover {
    background-color: #f5f3ff !important;
    /* hover:bg-violet-50 */
    transform: translateY(-1px) !important;
}

[data-theme="dark"] .balao-explicativo-popup .save-note {
    background-color: rgba(109, 40, 217, 0.1) !important;
    color: #c084fc !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
}

[data-theme="dark"] .balao-explicativo-popup .save-note:hover {
    background-color: rgba(109, 40, 217, 0.2) !important;
}

.balao-explicativo-popup .save-icon {
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Pagination controls style */
.balao-explicativo-popup .pagination {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.balao-explicativo-popup .nav-button {
    background: transparent !important;
    border: none !important;
    width: 28px !important;
    /* w-7 */
    height: 28px !important;
    /* h-7 */
    border-radius: 8px !important;
    color: #64748b !important;
    /* text-slate-500 */
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    user-select: none !important;
}

.balao-explicativo-popup .nav-button:hover:not(:disabled) {
    background-color: #fef3c7 !important;
    /* hover:bg-amber-50 */
    color: #475569 !important;
}

.balao-explicativo-popup .nav-button:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.balao-explicativo-popup .nav-button.nav-next {
    background-color: #2563eb !important;
    /* bg-blue-600 */
    color: #ffffff !important;
}

.balao-explicativo-popup .nav-button.nav-next:hover:not(:disabled) {
    background-color: #1d4ed8 !important;
    /* hover:bg-blue-700 */
    color: #ffffff !important;
}

.balao-explicativo-popup .nav-button.btn-close-last {
    background-color: #ef4444 !important;
    /* red-500 for close */
    color: #ffffff !important;
}

.balao-explicativo-popup .nav-button.btn-close-last:hover:not(:disabled) {
    background-color: #dc2626 !important;
}

[data-theme="dark"] .balao-explicativo-popup .nav-button {
    color: #94a3b8 !important;
}

[data-theme="dark"] .balao-explicativo-popup .nav-button:hover:not(:disabled) {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

.balao-explicativo-popup .page-count {
    font-size: 11px !important;
    /* text-[11px] */
    font-weight: 600 !important;
    /* font-semibold */
    color: #475569 !important;
    /* text-slate-600 */
    min-w: 26px !important;
    /* min-w-[26px] */
    text-align: center !important;
    user-select: none !important;
}

[data-theme="dark"] .balao-explicativo-popup .page-count {
    color: #cbd5e1 !important;
}

/* Balão Pedagógico & Components generic styles */
.balao-explicativo-popup .balao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.balao-explicativo-popup .balao-header-dot {
    font-size: 14px;
    line-height: 1;
}
.balao-explicativo-popup .page-count-badge {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}
.balao-explicativo-popup .save-note {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}
.balao-explicativo-popup .save-note:hover {
    text-decoration: underline !important;
    transform: none !important;
}
.balao-explicativo-popup .pagination .nav-button {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s !important;
}
.balao-explicativo-popup .pagination .nav-button.nav-next {
    background-color: transparent !important;
    color: currentColor !important;
}
.balao-explicativo-popup .pagination .nav-button svg {
    width: 14px !important;
    height: 14px !important;
}
.balao-explicativo-popup .pagination .nav-button:hover:not(:disabled) {
    transform: scale(1.25);
}

/* Marcação Ativa (Acesa e Negrito) no Balão Pedagógico */
.highlight-active {
    font-weight: 800 !important;
    border-width: 1.5px !important;
}
.highlight-active.highlight-yellow {
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.8) !important;
    border-color: #ca8a04 !important;
}
.highlight-active.highlight-green {
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.8) !important;
    border-color: #16a34a !important;
}
.highlight-active.highlight-blue {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.8) !important;
    border-color: #2563eb !important;
}
.highlight-active.highlight-pink {
    box-shadow: 0 0 10px rgba(219, 39, 119, 0.8) !important;
    border-color: #db2777 !important;
}
.highlight-active.highlight-orange {
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.8) !important;
    border-color: #ea580c !important;
}
.balao-explicativo-popup .btn-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}
.balao-explicativo-popup .btn-primary-action:hover:not(:disabled) {
    transform: translateY(-1px);
}
.balao-explicativo-popup .btn-primary-action:active:not(:disabled) {
    transform: translateY(0);
}
.balao-explicativo-popup .btn-primary-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* BLUE THEME */
.balao-explicativo-popup.balao-theme-blue {
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
}
.balao-explicativo-popup.balao-theme-blue .balao-header {
    background-color: #dbeafe;
    border-bottom-color: #bfdbfe;
}
.balao-explicativo-popup.balao-theme-blue .card-title,
.balao-explicativo-popup.balao-theme-blue .balao-header-dot,
.balao-explicativo-popup.balao-theme-blue .page-count-badge {
    color: #1d4ed8 !important;
}
.balao-explicativo-popup.balao-theme-blue .page-count-badge {
    background-color: #eff6ff;
}
.balao-explicativo-popup.balao-theme-blue .save-note,
.balao-explicativo-popup.balao-theme-blue .pagination .nav-button {
    color: #1d4ed8 !important;
}
.balao-explicativo-popup.balao-theme-blue .btn-primary-action {
    background-color: #2563eb;
}
.balao-explicativo-popup.balao-theme-blue .btn-primary-action:hover:not(:disabled) {
    background-color: #1d4ed8;
}
.balao-explicativo-popup.balao-theme-blue.seta-baixo::after {
    border-top-color: #eff6ff !important;
}
.balao-explicativo-popup.balao-theme-blue.seta-cima::after {
    border-bottom-color: #eff6ff !important;
}

/* GREEN THEME */
.balao-explicativo-popup.balao-theme-green {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.balao-explicativo-popup.balao-theme-green .balao-header {
    background-color: #dcfce7;
    border-bottom-color: #bbf7d0;
}
.balao-explicativo-popup.balao-theme-green .card-title,
.balao-explicativo-popup.balao-theme-green .balao-header-dot,
.balao-explicativo-popup.balao-theme-green .page-count-badge {
    color: #15803d !important;
}
.balao-explicativo-popup.balao-theme-green .page-count-badge {
    background-color: #f0fdf4;
}
.balao-explicativo-popup.balao-theme-green .save-note,
.balao-explicativo-popup.balao-theme-green .pagination .nav-button {
    color: #15803d !important;
}
.balao-explicativo-popup.balao-theme-green .btn-primary-action {
    background-color: #16a34a;
}
.balao-explicativo-popup.balao-theme-green .btn-primary-action:hover:not(:disabled) {
    background-color: #15803d;
}
.balao-explicativo-popup.balao-theme-green.seta-baixo::after {
    border-top-color: #f0fdf4 !important;
}
.balao-explicativo-popup.balao-theme-green.seta-cima::after {
    border-bottom-color: #f0fdf4 !important;
}

/* YELLOW THEME */
.balao-explicativo-popup.balao-theme-yellow {
    background-color: #fffdf0 !important;
    border-color: #fde68a !important;
}
.balao-explicativo-popup.balao-theme-yellow .balao-header {
    background-color: #fef9c3;
    border-bottom-color: #fde68a;
}
.balao-explicativo-popup.balao-theme-yellow .card-title,
.balao-explicativo-popup.balao-theme-yellow .balao-header-dot,
.balao-explicativo-popup.balao-theme-yellow .page-count-badge {
    color: #b45309 !important;
}
.balao-explicativo-popup.balao-theme-yellow .page-count-badge {
    background-color: #fffdf0;
}
.balao-explicativo-popup.balao-theme-yellow .save-note,
.balao-explicativo-popup.balao-theme-yellow .pagination .nav-button {
    color: #b45309 !important;
}
.balao-explicativo-popup.balao-theme-yellow .btn-primary-action {
    background-color: #d97706;
}
.balao-explicativo-popup.balao-theme-yellow .btn-primary-action:hover:not(:disabled) {
    background-color: #b45309;
}
.balao-explicativo-popup.balao-theme-yellow.seta-baixo::after {
    border-top-color: #fffdf0 !important;
}
.balao-explicativo-popup.balao-theme-yellow.seta-cima::after {
    border-bottom-color: #fffdf0 !important;
}

/* ORANGE THEME */
.balao-explicativo-popup.balao-theme-orange {
    background-color: #fff7ed !important;
    border-color: #fed7aa !important;
}
.balao-explicativo-popup.balao-theme-orange .balao-header {
    background-color: #ffedd5;
    border-bottom-color: #fed7aa;
}
.balao-explicativo-popup.balao-theme-orange .card-title,
.balao-explicativo-popup.balao-theme-orange .balao-header-dot,
.balao-explicativo-popup.balao-theme-orange .page-count-badge {
    color: #c2410c !important;
}
.balao-explicativo-popup.balao-theme-orange .page-count-badge {
    background-color: #fff7ed;
}
.balao-explicativo-popup.balao-theme-orange .save-note,
.balao-explicativo-popup.balao-theme-orange .pagination .nav-button {
    color: #c2410c !important;
}
.balao-explicativo-popup.balao-theme-orange .btn-primary-action {
    background-color: #ea580c;
}
.balao-explicativo-popup.balao-theme-orange .btn-primary-action:hover:not(:disabled) {
    background-color: #c2410c;
}
.balao-explicativo-popup.balao-theme-orange.seta-baixo::after {
    border-top-color: #fff7ed !important;
}
.balao-explicativo-popup.balao-theme-orange.seta-cima::after {
    border-bottom-color: #fff7ed !important;
}

/* PINK THEME */
.balao-explicativo-popup.balao-theme-pink {
    background-color: #fdf2f8 !important;
    border-color: #fbcfe8 !important;
}
.balao-explicativo-popup.balao-theme-pink .balao-header {
    background-color: #fce7f3;
    border-bottom-color: #fbcfe8;
}
.balao-explicativo-popup.balao-theme-pink .card-title,
.balao-explicativo-popup.balao-theme-pink .balao-header-dot,
.balao-explicativo-popup.balao-theme-pink .page-count-badge {
    color: #db2777 !important;
}
.balao-explicativo-popup.balao-theme-pink .page-count-badge {
    background-color: #fdf2f8;
}
.balao-explicativo-popup.balao-theme-pink .save-note,
.balao-explicativo-popup.balao-theme-pink .pagination .nav-button {
    color: #db2777 !important;
}
.balao-explicativo-popup.balao-theme-pink .btn-primary-action {
    background-color: #db2777;
}
.balao-explicativo-popup.balao-theme-pink .btn-primary-action:hover:not(:disabled) {
    background-color: #be185d;
}
.balao-explicativo-popup.balao-theme-pink.seta-baixo::after {
    border-top-color: #fdf2f8 !important;
}
.balao-explicativo-popup.balao-theme-pink.seta-cima::after {
    border-bottom-color: #fdf2f8 !important;
}

/* DARK THEME Overrides */
[data-theme="dark"] .balao-explicativo-popup .balao-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue {
    background-color: #0f172a !important;
    border-color: #1e3a8a !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .balao-header {
    background-color: #1e293b;
    border-bottom-color: #1e3a8a;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .card-title,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .balao-header-dot,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .page-count-badge {
    color: #3b82f6 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .page-count-badge {
    background-color: #0f172a;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .save-note,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .pagination .nav-button {
    color: #3b82f6 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .btn-primary-action {
    background-color: #3b82f6;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-blue .btn-primary-action:hover:not(:disabled) {
    background-color: #1d4ed8;
}

[data-theme="dark"] .balao-explicativo-popup.balao-theme-green {
    background-color: #062f1c !important;
    border-color: #166534 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .balao-header {
    background-color: #0f3d2a;
    border-bottom-color: #166534;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .card-title,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .balao-header-dot,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .page-count-badge {
    color: #4ade80 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .page-count-badge {
    background-color: #062f1c;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .save-note,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .pagination .nav-button {
    color: #4ade80 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .btn-primary-action {
    background-color: #22c55e;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-green .btn-primary-action:hover:not(:disabled) {
    background-color: #15803d;
}

[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow {
    background-color: #1c150d !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .balao-header {
    background-color: #2b1f13;
    border-bottom-color: rgba(245, 158, 11, 0.6);
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .card-title,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .balao-header-dot,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .page-count-badge {
    color: #fbbf24 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .page-count-badge {
    background-color: #1c150d;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .save-note,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .pagination .nav-button {
    color: #fbbf24 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .btn-primary-action {
    background-color: #eab308;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-yellow .btn-primary-action:hover:not(:disabled) {
    background-color: #b45309;
}

[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange {
    background-color: #2a1205 !important;
    border-color: #9a3412 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .balao-header {
    background-color: #3d1a04;
    border-bottom-color: #9a3412;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .card-title,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .balao-header-dot,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .page-count-badge {
    color: #f97316 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .page-count-badge {
    background-color: #2a1205;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .save-note,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .pagination .nav-button {
    color: #f97316 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .btn-primary-action {
    background-color: #f97316;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-orange .btn-primary-action:hover:not(:disabled) {
    background-color: #c2410c;
}

[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink {
    background-color: #25121e !important;
    border-color: #9d174d !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .balao-header {
    background-color: #3b142c;
    border-bottom-color: #9d174d;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .card-title,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .balao-header-dot,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .page-count-badge {
    color: #fbcfe8 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .page-count-badge {
    background-color: #25121e;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .save-note,
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .pagination .nav-button {
    color: #fbcfe8 !important;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .btn-primary-action {
    background-color: #db2777;
}
[data-theme="dark"] .balao-explicativo-popup.balao-theme-pink .btn-primary-action:hover:not(:disabled) {
    background-color: #be185d;
}

/* Estilo do Balão de Justificativa de Alternativa */
.balao-explicativo-popup.alternative-explanation-card {
    min-height: auto !important;
    max-width: 320px !important;
    width: 300px !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    font-size: 0.82rem !important;
    padding: 2px !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-verde {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-verde .card-title {
    color: #166534 !important;
    font-size: 11px !important;
    font-weight: bold !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-verde.seta-baixo::after {
    border-top-color: #f0fdf4 !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-verde.seta-cima::after {
    border-bottom-color: #f0fdf4 !important;
}

.balao-explicativo-popup.alternative-explanation-card.tema-laranja {
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-laranja .card-title {
    color: #b45309 !important;
    font-size: 11px !important;
    font-weight: bold !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-laranja.seta-baixo::after {
    border-top-color: #fffbeb !important;
}
.balao-explicativo-popup.alternative-explanation-card.tema-laranja.seta-cima::after {
    border-bottom-color: #fffbeb !important;
}

/* Dark theme overrides for alternative card */
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-verde {
    background-color: #062f1c !important;
    border-color: #166534 !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-verde .card-title {
    color: #4ade80 !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-verde.seta-baixo::after {
    border-top-color: #062f1c !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-verde.seta-cima::after {
    border-bottom-color: #062f1c !important;
}

[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-laranja {
    background-color: #1c150d !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-laranja .card-title {
    color: #fbbf24 !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-laranja.seta-baixo::after {
    border-top-color: #1c150d !important;
}
[data-theme="dark"] .balao-explicativo-popup.alternative-explanation-card.tema-laranja.seta-cima::after {
    border-bottom-color: #1c150d !important;
}


/* Segmented Theme Switcher */
.theme-segmented-control {
    display: flex;
    background-color: rgba(15, 23, 42, 0.05);
    /* Light mode bg */
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 4px;
}

[data-theme="dark"] .theme-segmented-control {
    background-color: rgba(255, 255, 255, 0.04);
    /* Dark mode bg */
    border-color: rgba(255, 255, 255, 0.06);
}

.theme-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

[data-theme="dark"] .theme-btn {
    color: #94a3b8;
}

.theme-btn:hover {
    color: var(--accent);
}

.theme-btn.active {
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .theme-btn.active {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -2px rgba(37, 99, 235, 0.2) !important;
}

.sidebar-collapsed .theme-segmented-wrapper {
    display: none !important;
}

/* Responsive area for questions when caneta is active */
    /* Pen bar is now a static column in CSS Grid, no padding offset needed */

/* Custom premium tool buttons for highlighter */
.tool-btn {
    background-color: #f1f5f9 !important;
    /* bg-slate-100 */
    color: #475569 !important;
    /* text-slate-600 */
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

[data-theme="dark"] .tool-btn {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.tool-btn:hover {
    background-color: #e2e8f0 !important;
    /* bg-slate-200 */
    color: #0f172a !important;
}

[data-theme="dark"] .tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.tool-btn.active {
    background-color: #bae6fd !important;
    /* sky-200 */
    color: #0369a1 !important;
    /* sky-700 */
    border-color: #7dd3fc !important;
}

[data-theme="dark"] .tool-btn.active {
    background-color: rgba(2, 132, 199, 0.25) !important;
    /* sky-800/25 */
    color: #38bdf8 !important;
    /* sky-400 */
    border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Enhance appearance label highlight */
.theme-menu-title {
    font-family: var(--font-heading) !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: #cbd5e1 !important;
    /* Bright Slate-300 for high-contrast on dark sidebar in all themes */
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    user-select: none !important;
    display: block !important;
    text-align: left !important;
    margin-bottom: 4px !important;
    }

.sidebar-section-header {
    font-family: var(--font-heading) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #94a3b8 !important; /* Slate 400 - clean and bright on dark backgrounds */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 8px 16px 4px 45px !important; /* Aligned with button text labels */
    display: block !important;
    user-select: none !important;
    text-align: left !important;
}

.sidebar-divider {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin: 12px 16px 4px 16px !important;
}


@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');


.mobile-topbar {
    display: none;
}

/* Generic Block Card Balloon Style */
.balao-explicativo-popup.generic-card {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #ffffff !important;
    border: 1.5px solid #3b82f6 !important; /* Blue border matching image */
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05) !important;
    margin-bottom: 20px !important;
    z-index: 10 !important;
    overflow: hidden !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
}

.balao-explicativo-popup.generic-card::after {
    display: none !important; /* Hide pointer arrow */
}

.balao-explicativo-popup.generic-card .balao-header {
    background-color: #eff6ff !important; /* Light blue header background */
    border-bottom: 1.5px solid #dbeafe !important;
    color: #2563eb !important; /* Blue text */
    padding: 12px 18px !important;
    font-weight: 800 !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .balao-header {
    background-color: #0f172a !important;
    border-bottom: 1.5px solid #1e293b !important;
    color: #38bdf8 !important;
}

.balao-explicativo-popup.generic-card .balao-header-dot {
    color: #2563eb !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 800 !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .balao-header-dot {
    color: #38bdf8 !important;
}

.balao-explicativo-popup.generic-card .balao-header-dot::before {
    content: "●" !important;
    color: #2563eb !important;
    font-size: 14px !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .balao-header-dot::before {
    color: #38bdf8 !important;
}

.balao-explicativo-popup.generic-card .card-title {
    color: #2563eb !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .card-title {
    color: #38bdf8 !important;
}

.balao-explicativo-popup.generic-card .px-4 {
    padding: 16px 20px !important;
    background-color: #f8fafc !important; /* Very light slate background for the body */
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .px-4 {
    background-color: #1e293b !important;
}

.balao-explicativo-popup.generic-card .card-message {
    color: #1e293b !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
}

[data-theme="dark"] .balao-explicativo-popup.generic-card .card-message {
    color: #cbd5e1 !important;
}
.listas-helper-panel {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    border-radius: 8px;
    padding: 14px 16px;
}

.listas-helper-panel strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.listas-helper-panel p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.listas-gabarito-upload {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.listas-gabarito-upload input {
    display: none;
}

.listas-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 10px;
}

.listas-toolbar p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.listas-toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.listas-toolbar-actions input {
    width: min(360px, 70vw);
    padding: 9px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.88rem;
}

.lista-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.lista-card-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 800;
    cursor: pointer;
}

.lista-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.lista-tag-chip {
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lista-pendencia-badge {
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 850;
}

.lista-card-btn {
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.lista-card-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 760px) {
    .listas-helper-panel,
    .listas-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .listas-toolbar-actions,
    .listas-toolbar-actions input,
    .listas-gabarito-upload {
        width: 100%;
    }
}

/* Keep the resolve checkbox visible for long imported list names. */
.lista-card-topline{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;min-width:0}
.lista-card-topline .stapled-paper-title{min-width:0;overflow-wrap:anywhere;word-break:normal;white-space:normal}
.lista-card-topline .lista-card-check{flex-shrink:0;white-space:nowrap;min-width:max-content}
.lista-card-check input[type="checkbox"]{flex-shrink:0}

/* The active alternative comment is indicated without changing result colors or text layout. */
.alternativa-item.alternative-comment-active{outline:3px solid #2563eb!important;outline-offset:2px;box-shadow:0 0 0 5px rgba(37,99,235,.12)!important}
.alternative-comment-active [data-alternative-comment-open]{background-color:#dbeafe!important;box-shadow:0 0 0 3px rgba(37,99,235,.2)}
