/* =========================================================================
   style.css - Folha de Estilos Central do Painel do Professor (Dashboard)
   Base Global, Tokens, Design System Canónico, Casca e Componentes Comuns
   ========================================================================= */

:root {
    /* Fundos Neutros Profundos (Carbono / Grafite Fosco) */
    --bg-primary: #111318;
    --bg-secondary: #181b22;
    --bg-card: #1f232c;
    --border-card: #2e3440;

    /* Tipografia de Alto Conforto Visual */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;

    /* Identidade Executiva do Dashboard: Âmbar Dourado */
    --accent-blue: #f59e0b;       /* Seleções, focos e destaques principais */
    --accent-emerald: #10b981;    /* Aprovados, vistos e confirmações */
    --accent-amber: #fbbf24;      /* Avisos e estados de atenção */
    --accent-orange: #f97316;     /* Turistas e alertas de prazo */
    --danger: #ef4444;            /* Exclusões, bloqueios e plágios */
    --accent-violet: #a78bfa;     /* Raio-X do Tutor e Inteligência IA */
    --accent-rose: #f43f5e;       /* Métricas auxiliares de vídeo */

    /* Faixas Pedagógicas e Subtítulos */
    --hdr-teal: #2dd4bf;
    --hdr-indigo: #818cf8;
    --hdr-pink: #f472b6;
    --hdr-blue: #60a5fa;
    --hdr-slate: #94a3b8;
}

*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

body { 
    display: flex; 
    height: 100vh; 
    height: 100dvh;
    background-color: var(--bg-primary); 
    color: var(--text-main); 
    overflow: hidden; 
    font-size: 16px; 
}

/* -------------------------------------------------------------------------
   1. Reset Universal de Inputs e Controles de Formulário
   ------------------------------------------------------------------------- */
input, select, textarea {
    min-width: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue);
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Ícone Unificado do Calendário em Tema Escuro */
input[type="date"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
    cursor: pointer;
    opacity: 0.85;
    display: block;
    width: 16px;
    height: 16px;
    transition: opacity 0.15s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* -------------------------------------------------------------------------
   2. Ícones Flat e Avatares Genéricos
   ------------------------------------------------------------------------- */
.icon-flat, .icon-flat-sm, .icon-flat-lg { 
    stroke: currentColor; 
    fill: none; 
    stroke-linecap: round; 
    stroke-linejoin: round; 
    display: inline-block; 
}
.icon-flat { width: 20px; height: 20px; stroke-width: 2; }
.icon-flat-lg { width: 32px; height: 32px; stroke-width: 1.5; }
.icon-flat-sm { width: 16px; height: 16px; stroke-width: 2.2; }

.icon-blue-color { color: var(--accent-blue); }
.icon-emerald-color { color: var(--accent-emerald); }
.icon-amber-color { color: var(--accent-amber); }
.icon-orange-color { color: var(--accent-orange); }
.icon-danger-color { color: var(--danger); }
.icon-violet-color { color: var(--accent-violet); }
.icon-rose-color { color: var(--accent-rose); }
.icon-muted-color { color: var(--text-muted); }

.avatar-img { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid var(--border-card); 
    background-color: var(--bg-primary); 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
}

/* -------------------------------------------------------------------------
   3. Design System Unificado: Botões Semânticos (.btn)
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.15s ease-in-out;
    user-select: none;
    touch-action: manipulation;
}

.btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    filter: none !important;
}

.btn-sm { padding: 5px 10px; font-size: 0.78rem; gap: 5px; border-radius: 5px; }
.btn-lg { padding: 12px 22px; font-size: 0.98rem; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-primary, .btn-success {
    background-color: var(--accent-emerald);
    color: #0b0f19 !important;
    border-color: var(--accent-emerald);
}
.btn-primary:hover:not(:disabled), .btn-success:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.btn-info {
    background-color: var(--accent-blue);
    color: #0b0f19 !important;
    border-color: var(--accent-blue);
}
.btn-info:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border-color: var(--border-card);
}
.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff !important;
    border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
    filter: brightness(1.15);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
}

.btn-warning {
    background-color: var(--accent-amber);
    color: #0b0f19 !important;
    border-color: var(--accent-amber);
}
.btn-warning:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.35);
}

.btn-ghost-primary {
    background-color: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--accent-emerald);
}

.btn-ghost-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-ghost-info {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-blue);
}

.btn-icon-table {
    padding: 6px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.btn-icon-table:hover:not(:disabled) {
    border-color: var(--accent-blue);
    color: var(--text-main);
    background: rgba(245, 158, 11, 0.08);
}
.btn-icon-table.danger:hover:not(:disabled) {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* -------------------------------------------------------------------------
   4. Estrutura Principal do Painel e Barra Lateral
   ------------------------------------------------------------------------- */
#painelApp { 
    display: none; 
    width: 100vw; 
    height: 100vh; 
    height: 100dvh;
}

#painelApp.visivel {
    display: flex;
}

.sidebar { 
    width: 260px; 
    background-color: var(--bg-secondary); 
    border-right: 1px solid var(--border-card); 
    display: flex; 
    flex-direction: column; 
    z-index: 10; 
    flex-shrink: 0;
}

.sidebar-header-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-card);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.sidebar-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 52px;
}

.sidebar-brand-logo {
    max-height: 48px !important;
    max-width: 130px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6));
    display: block;
    margin: 0 auto;
}

.sidebar-author-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
    width: 100%;
}

.sidebar-author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.sidebar-author-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
}

.menu { 
    list-style: none; 
    padding: 15px 0; 
    flex-grow: 1; 
    overflow-y: auto; 
}

.menu li.menu-item { 
    padding: 12px 22px; 
    cursor: pointer; 
    transition: background 0.15s ease, border-color 0.15s ease; 
    border-left: 3px solid transparent; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: var(--text-main); 
    font-size: 0.9rem; 
    font-weight: 500; 
    user-select: none;
    touch-action: manipulation;
}

.menu li.menu-item:hover { 
    background-color: rgba(245, 158, 11, 0.06); 
    color: var(--text-main); 
}

.menu li.menu-item.active { 
    border-left-color: var(--accent-amber); 
    background-color: rgba(245, 158, 11, 0.12); 
    color: var(--accent-amber); 
    font-weight: 600; 
}

.menu-icon-engajamento { color: var(--accent-emerald); width: 18px; height: 18px; }
.menu-icon-tutor { color: var(--accent-violet); width: 18px; height: 18px; }
.menu-icon-acad { color: var(--accent-blue); width: 18px; height: 18px; }
.menu-icon-config { color: var(--accent-amber); width: 18px; height: 18px; }

.menu-group { margin-top: 10px; }

.menu-group-title { 
    padding: 12px 22px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    color: var(--text-main); 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    transition: background 0.15s ease; 
    user-select: none;
    touch-action: manipulation;
}

.menu-group-title:hover { 
    background-color: rgba(255, 255, 255, 0.02); 
}

.menu-group-title-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.menu-group-title svg.seta { 
    width: 16px; 
    height: 16px; 
    transition: transform 0.3s; 
    color: var(--text-muted); 
}

.seta-rotacionada { transform: rotate(180deg); }

.submenu { 
    list-style: none; 
    display: none; 
    background: rgba(0, 0, 0, 0.2); 
    padding: 5px 0;
}

.submenu.submenu-aberto { display: block; }

.submenu li.menu-item { 
    padding: 10px 22px 10px 42px; 
    font-size: 0.85rem; 
    cursor: pointer; 
}

.menu-item-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-aviso-sidebar {
    background: var(--accent-orange);
    color: #0b0f19;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
}

/* -------------------------------------------------------------------------
   5. Área Principal (Cabeçalho, Filtros e Widgets)
   ------------------------------------------------------------------------- */
.main { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    background-color: var(--bg-primary); 
    min-width: 0;
}

.header { 
    background: var(--bg-secondary); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border-card); 
    padding: 16px 24px; 
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
    z-index: 5; 
}

.header-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    flex-wrap: wrap;
    gap: 10px;
}

.header-title { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--text-main); 
    display: flex; 
    align-items: center; 
    gap: 14px; 
}

.header-user { 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: var(--text-muted); 
    display: flex; 
    gap: 15px; 
    align-items: center; 
}

.widget-storage-consumo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    touch-action: manipulation;
}

.badge-storage-pct {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 800;
}

.container-central-notificacoes {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-sininho-alertas {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: 0.2s;
    touch-action: manipulation;
}

.badge-contador-global {
    background: var(--accent-orange);
    color: #0b0f19;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}

.dropdown-notificacoes-painel {
    display: none;
    position: absolute;
    right: 0;
    top: 46px;
    width: 320px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
    z-index: 1000;
    padding: 14px;
    box-sizing: border-box;
}

.dropdown-notificacoes-painel.aberto {
    display: block !important;
}

.dropdown-notificacoes-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.dropdown-notificacoes-titulo {
    font-size: 0.88rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-notificacoes-qtd { font-size: 0.78rem; color: var(--text-muted); }
.dropdown-notificacoes-scroll { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.dropdown-notificacoes-vazio { font-size: 0.85rem; color: var(--text-muted); margin: 0; text-align: center; padding: 12px 0; }

.btn-logout-link {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    touch-action: manipulation;
}

.filtros-area { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    align-items: center; 
    width: 100%; 
    border-top: 1px dashed var(--border-card); 
    padding-top: 14px; 
}

.seletor-filtro { 
    background: var(--bg-card); 
    border: 1px solid var(--border-card); 
    color: var(--text-main); 
    padding: 7px 12px; 
    border-radius: 6px; 
    font-size: 0.88rem; 
    font-weight: 600; 
    cursor: pointer; 
}

.icone-filtro { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; }
.divisor { color: var(--border-card); margin: 0 4px; }

.btn-reset { 
    background: var(--bg-card); 
    border: 1px solid var(--border-card); 
    color: var(--text-main); 
    border-radius: 6px; 
    padding: 7px 12px; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    font-size: 0.88rem; 
    display: flex; 
    align-items: center; 
    gap: 6px;
    touch-action: manipulation;
}

.btn-reset:hover { 
    background: rgba(239, 68, 68, 0.1); 
    border-color: var(--danger); 
    color: var(--danger); 
}

.checkbox-prof { 
    font-size: 0.88rem; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    background: var(--bg-card); 
    padding: 7px 12px; 
    border-radius: 6px; 
    border: 1px solid var(--border-card); 
    user-select: none; 
    touch-action: manipulation;
}

.checkbox-prof input { cursor: pointer; accent-color: var(--accent-blue); }

/* -------------------------------------------------------------------------
   6. Containers de Conteúdo e Abas
   ------------------------------------------------------------------------- */
.content { 
    padding: 24px; 
    overflow-y: auto; 
    flex-grow: 1; 
}

.tab-pane { display: none; }
.tab-pane.active { 
    display: block; 
    animation: fadeIn 0.3s ease; 
}

.card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-card); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    display: flex; 
    flex-direction: column; 
}

.card h3 { 
    margin-bottom: 6px; 
    color: var(--text-main); 
    font-size: 1.1rem; 
    font-weight: 600; 
    border-bottom: 1px solid var(--border-card); 
    padding-bottom: 10px; 
}

.card p { 
    color: var(--text-muted); 
    font-size: 0.88rem; 
    line-height: 1.45; 
    margin-bottom: 10px;
}

/* -------------------------------------------------------------------------
   7. Modais e Envelopes de Diálogo Universais
   ------------------------------------------------------------------------- */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    height: 100dvh;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px); 
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 9999; 
    padding: 1rem; 
}

.modal-overlay.open { 
    display: flex; 
}

.modal-box { 
    background: var(--bg-card); 
    color: var(--text-main); 
    padding: 24px; 
    border-radius: 12px; 
    border: 1px solid var(--border-card); 
    width: 100%; 
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85); 
}

.modal-box-login { max-width: 400px; width: 92%; padding: 28px 24px; text-align: center; }
.modal-box-sm { max-width: 480px; width: 95%; }
.modal-box-md { max-width: 540px; width: 95%; }
.modal-box-lg { max-width: 780px; width: 95%; }
.modal-box-xl { max-width: 1200px; width: 95%; }
.modal-box-scroll { max-height: 90vh; overflow-y: auto; }
.modal-align-left { text-align: left; }

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

.modal-titulo-barra {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-titulo-inline {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.modal-subtitulo-barra {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 10px;
}

.modal-subtitulo-simples {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.modal-texto-explicativo {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.45;
}

.modal-cor-blue { color: var(--accent-blue); }
.modal-cor-emerald { color: var(--accent-emerald); }
.modal-cor-violet { color: var(--accent-violet); }
.modal-cor-amber { color: var(--accent-amber); }
.modal-cor-danger { color: var(--danger); }

.modal-rodape-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-card);
    padding-top: 15px;
    margin-top: 16px;
}

.btn-fechar-modal-x {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-fechar-modal-x:hover {
    color: var(--text-main);
}

/* Modal Rastro do Aluno */
.modal-scroll-rastro {
    max-height: 350px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-main);
    padding-right: 10px;
}

/* Modal Detalhes de Armazenamento (Supabase Storage) */
.storage-progresso-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 12px 14px;
}

.storage-progress-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

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

.storage-stat-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    padding: 10px 12px;
}

.storage-lista-turmas-scroll {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

.storage-item-turma {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(46, 52, 64, 0.4);
    font-size: 0.82rem;
}
.storage-item-turma:last-child {
    border-bottom: none;
}

/* -------------------------------------------------------------------------
   8. Utilitários Estruturais Globais
   ------------------------------------------------------------------------- */
.w-full { width: 100%; }
.w-full-max { width: 100%; max-width: 100%; }
.h-38 { height: 38px; }
.h-36 { height: 36px; }
.h-32 { height: 32px; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 2px !important; }
.mb-4 { margin-bottom: 4px !important; }
.mb-5 { margin-bottom: 5px !important; }
.mb-6 { margin-bottom: 6px !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-12 { margin-bottom: 12px !important; }
.mb-14 { margin-bottom: 14px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-18 { margin-bottom: 18px !important; }
.mb-20 { margin-bottom: 20px !important; }
.my-6 { margin-top: 6px !important; margin-bottom: 6px !important; }
.my-15 { margin-top: 15px !important; margin-bottom: 15px !important; }
.mt-2 { margin-top: 2px !important; }
.mt-4 { margin-top: 4px !important; }
.mt-6 { margin-top: 6px !important; }
.mt-8 { margin-top: 8px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mr-4 { margin-right: 4px !important; }
.mr-8 { margin-right: 8px !important; }
.ml-4 { margin-left: 4px !important; }
.ml-10 { margin-left: 10px !important; }
.ml-auto { margin-left: auto !important; }
.p-0 { padding: 0 !important; }
.p-10 { padding: 10px !important; }
.p-12 { padding: 12px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }
.p-22 { padding: 22px !important; }
.pl-10 { padding-left: 10px !important; }
.pb-8 { padding-bottom: 8px !important; }
.pb-10 { padding-bottom: 10px !important; }
.pb-12 { padding-bottom: 12px !important; }
.pb-15 { padding-bottom: 15px !important; }
.pr-4 { padding-right: 4px !important; }
.pr-15 { padding-right: 15px !important; }
.pt-6 { padding-top: 6px !important; }
.pt-10 { padding-top: 10px !important; }

.block { display: block; }
.inline-block { display: inline-block; }
.d-none { display: none !important; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.min-w-140 { min-width: 140px; }
.min-w-200 { min-width: 200px; }
.w-140 { width: 140px; }
.opacity-50 { opacity: 0.5; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }
.max-h-280 { max-height: 280px; }
.line-height-1-6 { line-height: 1.6; }
.line-height-1-7 { line-height: 1.7; }
.font-monospace { font-family: monospace; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.font-weight-normal { font-weight: normal; }
.font-weight-600 { font-weight: 600; }
.border-radius-6 { border-radius: 6px; }
.border-dashed { border: 1px dashed var(--border-card); }
.border-bottom-card { border-bottom: 1px solid var(--border-card); }
.border-top-dashed { border-top: 1px dashed var(--border-card); }

.flex-col { display: flex; flex-direction: column; }
.flex-gap-4 { display: flex; gap: 4px; }
.flex-gap-6 { display: flex; gap: 6px; }
.flex-gap-8 { display: flex; gap: 8px; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.flex-wrap-gap-8 { display: flex; flex-wrap: wrap; gap: 8px; }
.flex-wrap-gap-15 { display: flex; flex-wrap: wrap; gap: 15px; }
.flex-col-gap-4 { display: flex; flex-direction: column; gap: 4px; }
.flex-justify-between { display: flex; justify-content: space-between; }
.flex-justify-center { display: flex; justify-content: center; }
.flex-justify-end { display: flex; justify-content: flex-end; }
.flex-align-center { display: flex; align-items: center; }
.flex-align-center-gap-2 { display: flex; align-items: center; gap: 2px; }
.flex-align-center-gap-4 { display: flex; align-items: center; gap: 4px; }
.flex-align-center-gap-6 { display: flex; align-items: center; gap: 6px; }
.flex-align-center-gap-8 { display: flex; align-items: center; gap: 8px; }
.flex-align-center-gap-10 { display: flex; align-items: center; gap: 10px; }
.flex-align-center-gap-12 { display: flex; align-items: center; gap: 12px; }
.flex-align-start-gap-6 { display: flex; align-items: flex-start; gap: 6px; }
.flex-center-gap-6 { display: flex; align-items: center; justify-content: center; gap: 6px; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: flex-end; }

.grid-col-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-col-15-1 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }

.font-xs { font-size: 0.78rem !important; }
.font-md { font-size: 1.1rem; }
.txt-muted-sm { font-size: 0.82rem; color: var(--text-muted); }
.txt-muted-xs { font-size: 0.76rem; color: var(--text-muted); }
.txt-main-bold { color: var(--text-main); font-weight: bold; }
.txt-orange { color: var(--accent-orange) !important; }
.txt-emerald { color: var(--accent-emerald) !important; }
.txt-violet { color: var(--accent-violet) !important; }
.txt-danger { color: var(--danger) !important; }
.border-blue { border-color: var(--accent-blue) !important; }
.border-emerald { border-color: var(--accent-emerald) !important; }
.border-violet { border-color: var(--accent-violet) !important; }
.border-danger { border-color: var(--danger) !important; }

.form-label-padrao { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 4px; }
.form-label-bold { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; display: block; }
.form-label-sm { font-size: 0.82rem; color: var(--text-muted); display: block; margin-bottom: 3px; }
.form-label-xs { font-size: 0.74rem; color: var(--text-muted); display: block; margin-bottom: 3px; }
.form-dica-texto { display: block; margin-top: 5px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.35; }
.form-dica-texto-sm { display: block; margin-top: 2px; color: var(--text-muted); font-size: 0.72rem; }
.form-grupo-campo { margin-bottom: 14px; }
.form-grupo-campo-sm { margin-bottom: 10px; }
.input-check-sm { accent-color: var(--accent-emerald); width: 16px; height: 16px; }

.txt-carregando-centro { text-align: center; color: var(--text-muted); padding: 2rem; }

/* -------------------------------------------------------------------------
   Scrollbars Globais Padronizadas (Chrome, Edge, Safari, Firefox)
   ------------------------------------------------------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-card) rgba(0, 0, 0, 0.25);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: 4px;
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

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

/* Modificadores Semânticos do Widget de Armazenamento */
.widget-storage-consumo.critico {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.12);
}
.widget-storage-consumo.critico .badge-storage-pct {
    background: var(--danger);
    color: #ffffff;
}
.widget-storage-consumo.critico .icon-flat-sm {
    color: var(--danger);
}

.storage-progress-bar-fill.critico { background-color: var(--danger); }
.storage-progress-bar-fill.atencao { background-color: var(--accent-amber); }
.storage-progress-bar-fill.seguro  { background-color: var(--accent-emerald); }

/* Componente Canônico do Dropdown de Pendências */
.item-pendencia-dropdown {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.item-pendencia-dropdown:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--accent-blue);
}
.item-pendencia-dropdown.tipo-vistos  { border-left: 3px solid var(--accent-orange); }
.item-pendencia-dropdown.tipo-plagio  { border-left: 3px solid var(--danger); }
.item-pendencia-dropdown.tipo-storage { border-left: 3px solid var(--danger); }
.item-pendencia-dropdown.tipo-duvidas { border-left: 3px solid var(--accent-blue); }

.item-pendencia-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-pendencia-titulo {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}
.item-pendencia-badge {
    color: #0b0f19;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 8px;
}
.item-pendencia-badge.vistos  { background: var(--accent-orange); }
.item-pendencia-badge.plagio  { background: var(--danger); color: #fff; }
.item-pendencia-badge.storage { background: var(--danger); color: #fff; }
.item-pendencia-badge.duvidas { background: var(--accent-blue); }

/* -------------------------------------------------------------------------
   Componentes de Renderização LaTeX / Gabarito / Zoom
   ------------------------------------------------------------------------- */
.modal-zoom-imagem {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(5px);
    touch-action: manipulation;
}
.modal-zoom-imagem.aberto {
    opacity: 1;
    pointer-events: auto;
}

.modal-zoom-conteudo {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-fechar-zoom {
    position: absolute;
    top: -50px;
    right: -10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
}
.btn-fechar-zoom:hover {
    background: rgba(255, 255, 255, 0.2);
}

.img-zoom-display {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.img-gabarito-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}
.img-gabarito-thumb {
    cursor: zoom-in;
    max-height: 280px;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

/* Caixas Pedagógicas do LaTeX */
.box-latex-responda {
    border-left: 4px solid var(--accent-amber);
    background: rgba(245, 158, 11, 0.05);
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
}
.box-latex-dica {
    background-color: rgba(56, 189, 248, 0.1);
    border-left: 4px solid var(--accent-blue);
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
    color: #93c5fd;
    font-size: 0.9rem;
}
.box-latex-explicacao {
    background-color: rgba(16, 185, 129, 0.05);
    border-left: 4px solid var(--accent-emerald);
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
    color: var(--text-main);
    font-size: 0.9rem;
}
.tabela-latex-wrap {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid var(--border-card);
}
/* -------------------------------------------------------------------------
   Componentes Canônicos de Casca (Topos de Card, Tabelas e Badges Gerais)
   ------------------------------------------------------------------------- */
.card-topo-subabas-barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.card-titulo-flex {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tabela-ranking {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.tabela-ranking thead th {
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-card);
}

.tabela-ranking tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(46, 52, 64, 0.4);
    color: var(--text-main);
    vertical-align: middle;
}

.tabela-ranking tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.tabela-ranking tbody tr:last-child td {
    border-bottom: none;
}

.badge-turma {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}