:root {
    --bg: #070a13;
    --card: #0f172a;
    --card-hover: #1e293b;
    --border: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #0ea5e9, #6366f1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --color-avanco: #0ea5e9;
    --color-revisao: #f59e0b;
    --color-manutencao: #10b981;
    --color-saneamento: #ef4444;
    --color-leisseca: #a855f7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body, input, select, textarea, button, td, th { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
}
h1, h2, h3, h4, h5, h6, .brand-title, .logo, .tab-btn {
    font-family: 'Outfit', -apple-system, sans-serif;
}
code, kbd, pre, samp, .task-id, .atividade-codigo, .badge-id, .subtopico-tag {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
}
body { 
    background: var(--bg); 
    color: var(--text); 
    min-height: 100vh;
    padding-bottom: 50px;
}
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 24px;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.logo-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.action-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-action {
    background: #1e293b;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-action:hover:not(:disabled) {
    background: var(--card-hover);
    border-color: #334155;
}
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-action.running {
    border-color: var(--warning);
    color: var(--warning);
}
.tabs {
    display: flex;
    gap: 8px;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
    color: var(--text);
    background: var(--card-hover);
}
.tab-btn.active {
    box-shadow: inset 0 0 0 1px var(--border);
}
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Dashboard */
.grid-progresso {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.card-disciplina {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}
.card-disciplina:hover {
    transform: translateY(-2px);
    border-color: #334155;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.disc-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 17px;
}
.disc-perc {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
}
.bar-container {
    background: #1e293b;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}
.bar-value {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}
.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}
.stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}
.badge-value { color: var(--text); font-weight: 600; }

/* Meta */
.meta-overview {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.meta-overview-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.meta-overview-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
}
.meta-overview-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}
.meta-progress-box {
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.meta-progress-text {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}
.meta-progress-bar {
    background: #1e293b;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}
.meta-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--success), #34d399);
    border-radius: 5px;
    transition: width 0.5s ease-out;
}

.setor-container {
    margin-bottom: 35px;
}
h2.setor-title,
h2.setor-title span,
.setor-title,
.setor-title span {
    font-family: 'Outfit', sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
}
.setor-avanco { border-bottom: 2px solid rgba(14, 165, 233, 0.4); }
.setor-revisao { border-bottom: 2px solid rgba(245, 158, 11, 0.4); }
.setor-manutencao { border-bottom: 2px solid rgba(16, 185, 129, 0.4); }
.setor-saneamento { border-bottom: 2px solid rgba(239, 68, 68, 0.4); }
.setor-leisseca { border-bottom: 2px solid rgba(168, 85, 247, 0.4); }

.atv-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.atv-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.atv-card:hover {
    transform: translateX(3px);
    border-color: #334155;
}
.atv-card.completed {
    border-left-color: var(--success) !important;
    opacity: 0.85;
}
.atv-card.completed .atv-code {
    text-decoration: line-through;
    color: var(--text-muted);
}

.atv-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
}
.status-indicator:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}
.status-indicator.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.status-indicator.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.atv-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.atv-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.atv-code {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.badge-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.atv-desc {
    font-size: 13px;
    color: var(--text-muted);
}
.atv-links {
    display: flex;
    gap: 8px;
}
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    color: white;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.15);
    transition: all 0.2s;
}
.btn-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.btn-link.painel-btn {
    background: linear-gradient(135deg, var(--color-leisseca), #8b5cf6);
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.15);
}

/* Lei Seca */
.lei-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.lei-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    transition: all 0.2s;
}
.lei-card:hover {
    transform: translateY(-2px);
    border-color: #334155;
}
.lei-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lei-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
}
.lei-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Buscador de Erros */
.erro-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--danger);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
}
.erro-card:hover {
    transform: translateX(3px);
    border-color: #475569;
}
.erro-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}
.erro-topic {
    font-weight: 600;
    color: var(--accent);
}
.erro-questao {
    font-weight: 600;
    color: var(--warning);
}
.erro-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-wrap;
}

/* Toast/Notificação */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   FASE 2: RECURSOS DE PRODUTIVIDADE & FOCO
   ========================================== */

/* Layout da Meta com Cockpit Superior Fixo (Sticky) de 4 Cards e Tabela em Largura Total (100%) */
.meta-layout-fullwidth {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
}
.meta-top-sticky-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 116px;
    z-index: 90;
    background: rgba(7, 10, 19, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
}
#meta-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
}
.meta-cockpit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    align-items: start;
}
.meta-cockpit-grid .widget-card {
    flex: 0 0 320px;
    width: 320px;
    max-width: 100%;
    border-radius: 12px;
    margin: 0;
    padding: 12px 14px !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    box-sizing: border-box;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.4);
}

/* Cores distintas e tom mais claro para os 4 cards da Meta (Alto Contraste) */
.meta-cockpit-grid .pomodoro-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(30, 58, 138, 0.55)) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
}
.meta-cockpit-grid .noise-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(88, 28, 135, 0.55)) !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
}
.meta-cockpit-grid .filters-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(6, 78, 59, 0.55)) !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
}
.meta-cockpit-grid .stats-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(120, 53, 15, 0.55)) !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
}

.meta-cockpit-grid .widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(0, 0, 0, 0.7);
}
.meta-conteudo-fullwidth {
    width: 100%;
}
.widget-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(51, 65, 85, 0.85)) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 16px;
    padding: 20px;
}
.widget-card h3 {
    font-family: 'Outfit', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: normal;
}
.pomodoro-timer {
    font-family: 'Outfit', monospace;
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin: 10px 0;
    color: var(--text);
}
.pomodoro-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.btn-pomo {
    flex: 1;
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
}
.btn-pomo.secondary {
    background: #1e293b;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-pomo:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}
.pomo-mode-select {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.btn-mode {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-mode.active, .btn-mode:hover {
    background: var(--card-hover);
    color: var(--text);
    border-color: var(--accent);
}
.pomo-active-task {
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pomo-task-label {
    font-size: 11px;
    color: var(--text-muted);
}
.pomo-task-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sound Player styling */
.noise-selectors {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.btn-noise {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-noise.active, .btn-noise:hover {
    background: var(--card-hover);
    color: var(--text);
    border-color: var(--accent);
}
.noise-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.slider-group label {
    font-size: 11px;
    color: var(--text-muted);
}
.slider-group input[type="range"] {
    width: 100%;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}
.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* Filter options */
.filter-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.btn-filter {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 7px 4px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}
.btn-filter.active, .btn-filter:hover {
    background: var(--card-hover);
    color: var(--text);
    border-color: var(--accent);
}

/* Stats */
.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.stat-item:last-child {
    border-bottom: none;
}
.stat-label {
    color: var(--text-muted);
}
.stat-value {
    font-weight: 600;
    color: var(--text);
}

/* Active focusing border style for task */
.atv-card.focused-pomo {
    border-color: #f87171 !important; /* Borda vermelha suave para a tarefa em foco */
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.15);
}
.atv-card {
    cursor: grab;
}
.atv-card:active {
    cursor: grabbing;
}
.atv-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--accent) !important;
}

@media print {
    body {
        background: white !important;
        color: black !important;
    }
    header, aside, .action-bar, .toast, .tabs {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .meta-layout {
        display: block !important;
    }
    .meta-conteudo {
        width: 100% !important;
    }
    .atv-card {
        background: white !important;
        color: black !important;
        border: 1px solid #cbd5e1 !important;
        page-break-inside: avoid;
        box-shadow: none !important;
    }
    .btn-link {
        display: none !important;
    }
}

/* =========================================================================
   TABELA DE METAS (FORMATO LAYOUT)
   ========================================================================= */
.meta-table-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-color);
    text-align: left;
}
.meta-table th {
    background: #0f172a;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.8px;
}
.meta-table tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease, border 0.15s ease;
    cursor: pointer;
}
.meta-table tr:last-child {
    border-bottom: none;
}
.meta-table tr:hover {
    background: rgba(255, 255, 255, 0.015);
}
.meta-table tr.completed {
    opacity: 0.55;
    background: rgba(16, 185, 129, 0.02);
}
.meta-table tr.completed .btn-link {
    pointer-events: none;
    opacity: 0.5;
}
.meta-table tr.completed td {
    /* No generic line-through on cells to avoid cutting checkmarks/buttons */
}
.meta-table tr.completed td:not(:has(a)):not(:has(.status-indicator)) {
    text-decoration: line-through;
    opacity: 0.7;
}
.meta-table tr.completed .status-indicator {
    background: var(--success);
    color: white;
}
.meta-table tr.focused-pomo {
    box-shadow: inset 4px 0 0 var(--danger);
    background: rgba(239, 68, 68, 0.02);
}
.meta-table td {
    padding: 12px 16px;
    vertical-align: middle;
    line-height: 1.5;
}
.meta-table td:first-child {
    font-weight: 700;
    color: var(--text-muted);
    width: 45px;
}
.meta-table td:nth-child(2) {
    font-weight: 600;
    font-family: monospace;
    font-size: 12px;
}
.meta-table td:last-child {
    width: 50px;
    text-align: center;
}

@media print {
    .meta-table-container {
        border: 1px solid #cbd5e1 !important;
        background: white !important;
        box-shadow: none !important;
        border-radius: 4px !important;
    }
    .meta-table th {
        background: #f8fafc !important;
        color: black !important;
        border-bottom: 1px solid #cbd5e1 !important;
    }
    .meta-table tr {
        border-bottom: 1px solid #cbd5e1 !important;
        background: white !important;
        color: black !important;
    }
    .meta-table td {
        color: black !important;
        padding: 8px 12px !important;
    }
    .status-indicator {
        border: 1px solid #cbd5e1 !important;
        color: black !important;
    }
}

/* Sleek number inputs inside widgets */
.pomo-config input[type=number]::-webkit-inner-spin-button,
.pomo-config input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pomo-config input[type=number] {
    -moz-appearance: textfield;
    outline: none;
    transition: border-bottom-color 0.2s ease;
}
.pomo-config input[type=number]:focus {
    border-bottom-color: var(--text) !important;
}

/* Skeleton Loading Animado */
@keyframes skeleton-glow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
}

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

.skeleton-title {
    width: 35%;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.4) 25%, rgba(51, 65, 85, 0.6) 50%, rgba(30, 41, 59, 0.4) 75%);
    background-size: 200% 100%;
    animation: skeleton-glow 1.5s infinite;
}

.skeleton-badge {
    width: 12%;
    height: 18px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.4) 25%, rgba(51, 65, 85, 0.6) 50%, rgba(30, 41, 59, 0.4) 75%);
    background-size: 200% 100%;
    animation: skeleton-glow 1.5s infinite;
}

.skeleton-bar {
    width: 100%;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.4) 25%, rgba(51, 65, 85, 0.6) 50%, rgba(30, 41, 59, 0.4) 75%);
    background-size: 200% 100%;
    animation: skeleton-glow 1.5s infinite;
}

.skeleton-bar.short {
    width: 70%;
}

.skeleton-bar.tiny {
    width: 40%;
}

/* Body Premium Gradient Background */
body {
    background: radial-gradient(120% 120% at 50% 10%, #0d1527 0%, #05070d 100%) !important;
}

/* Glassmorphism Modais & Cards */
.modal-glass, .widget-card, .card-disciplina, .lei-card {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Transições e Hover de Escala Suave */
.card-disciplina, .lei-card, .btn-action, .tab-btn {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.card-disciplina:hover, .lei-card:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

/* Focus outline brilhante */
input:focus, select:focus, button:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.45) !important;
    outline: none !important;
}

/* High Contrast & Hover Micro-Animation for Lei Seca Links */
.lei-card a {
    color: var(--accent) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 12px !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.lei-card a:hover {
    color: #38bdf8 !important;
    transform: translateX(4px) !important;
}

/* Cards Premium (Bloco 1 - Desempenho Dashboard) — Fundo Mais Claro Alto Contraste */
.metric-sq-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92) 0%, rgba(51, 65, 85, 0.85) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 18px !important;
    padding: 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 120px !important;
    height: auto !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.metric-sq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0.6;
}

.metric-sq-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 25px rgba(56, 189, 248, 0.15) !important;
}

.metric-sq-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

.metric-sq-title {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: none !important;
}

.metric-sq-value {
    font-size: 54px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -1px !important;
    white-space: nowrap !important;
    margin-top: 2px !important;
}

.metric-sq-value .unit {
    font-size: 0.55em !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    margin-left: 2px !important;
    margin-right: 4px !important;
}

.metric-sq-sub {
    font-size: 11.5px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    margin-top: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Frames dos Sub-blocos do Dashboard (HOJE, SEMANA, TOTAIS) */
.dash-block-frame {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    padding: 18px 22px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25) !important;
    margin-bottom: 20px !important;
}

.dash-block-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.dash-block-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* === UNIFIED FISHCAOS TYPOGRAPHY OVERRIDE (FINAL FORCE) === */
h1, h2, h3, h4, h5, h6,
.brand-title, .logo, .tab-btn,
.widget-card h3, .dash-block-title,
.meta-overview-title, .section-title,
.disc-card h3, .disc-card header {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.widget-card h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.dash-block-title.hoje { color: #38bdf8 !important; }
.dash-block-title.semana { color: #34d399 !important; }
.dash-block-title.totais { color: #fbbf24 !important; }

/* Cards Premium Quadrados, Maiores e Alinhados (Estilo Guruja / Mapa da Vitória) */
.metric-sq-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 110px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease-in-out !important;
    position: relative !important;
    overflow: hidden !important;
}

.metric-sq-card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(30, 41, 59, 0.75) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35) !important;
}

/* ==========================================================================
   🎨 FISHCAOS HARMONIZED TYPOGRAPHY SYSTEM v21.0
   Harmonização total das fontes em toda a aplicação.
   ========================================================================== */

/* 1. FONT PRINCIPAL PARA TODO O CORPO, INPUTS, BOTÕES E TABELAS */
*, body, html, input, select, textarea, button, td, th, p, span, label, div {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* 2. FONT DE DESTAQUE PARA TÍTULOS E CABEÇALHOS (Outfit) */
h1, h2, h3, h4, h5, h6,
.brand-title, .logo-text, .tab-btn,
.widget-card h3, .dash-block-title,
.meta-overview-title, .section-title,
.disc-card h3, .disc-card header,
.stat-value, .metric-sq-value, .pomodoro-timer {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -0.2px !important;
}

/* 3. TITULOS DE WIDGETS E CARDS (SEM UPPERCASE FORÇADO) */
.widget-card h3, .dash-block-title, h2, h3, .stat-label {
    text-transform: none !important;
}

/* 4. PONTOS FRACOS & DISCIPLINAS FRA GEIS CARD TITLES */
.frageis-card h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--danger) !important;
}

/* 5. FORMULÁRIOS E INPUTS DA SIDEBAR */
.log-form input, .log-form select, .log-form button {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 12px !important;
}

/* 6. LABELS DAS ESTATÍSTICAS DA META */
.stat-label {
    text-transform: none !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}

.stat-value {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #fbbf24 !important; /* Amarelo Dourado de Destaque */
}

/* Base Grids de Métricas */
.dash-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

.dash-elite-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
}

.dash-metrics-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
}

.dash-days-bar {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    background: rgba(15, 23, 42, 0.5) !important;
    padding: 14px 20px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    margin-bottom: 18px !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   📱 RESPONSIVIDADE COMPLETA PARA SMARTPHONES & TABLETS (v27.0)
   ========================================================================== */

/* 1. TABLET (Até 900px) */
@media (max-width: 900px) {
    header .header-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 12px 16px !important;
    }
    
    .action-bar {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    
    .tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 6px !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab-btn {
        flex: 0 0 auto !important;
    }

    .meta-layout {
        grid-template-columns: 1fr !important;
    }

    .dash-block-frame {
        padding: 16px !important;
    }

    .dash-metrics-grid, .dash-metrics-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .dash-days-bar {
        overflow-x: auto !important;
        padding: 10px !important;
        gap: 6px !important;
    }
}

/* 2. SMARTPHONE (Até 600px) */
@media (max-width: 600px) {
    body {
        padding: 8px !important;
    }

    header {
        margin-bottom: 16px !important;
    }

    .brand-title {
        font-size: 18px !important;
    }

    .action-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .btn-action {
        font-size: 11px !important;
        padding: 8px 6px !important;
        text-align: center !important;
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 4px 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab-btn {
        flex: 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }

    /* Grid 2x2 nos Cards no Celular para equilíbrio estético perfeito */
    .dash-metrics-grid, .dash-metrics-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .metric-sq-card {
        min-height: 95px !important;
        padding: 12px 14px !important;
    }

    .metric-sq-title {
        font-size: 11px !important;
    }

    .metric-sq-value {
        font-size: 20px !important;
    }

    .modal-box {
        width: 96% !important;
        padding: 16px !important;
        max-height: 94vh !important;
    }

    /* Barra de Dias da Semana no Celular */
    .dash-days-bar {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 10px !important;
        gap: 6px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .dash-days-bar > div {
        flex: 0 0 auto !important;
        min-width: 45px !important;
    }

    /* Matriz Gráfica do Simulado no Celular */
    div[id^="simulado-matriz-"], .matriz-questoes-grid {
        gap: 5px !important;
    }

    div[id^="simulado-matriz-"] button, .matriz-questoes-grid button {
        width: 34px !important;
        height: 34px !important;
        font-size: 11px !important;
    }
}



