/* Scrollbar Customizada (Azulada) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #1e3a8a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* Animações Globais */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease-out forwards; }

.tab-content { display: none; }
.tab-content.active { display: flex; }

.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }


/* ============================================================== */
/* CONFIGURAÇÕES GLOBAIS E SCROLLBAR                              */
/* ============================================================== */

/* Trava global anti-scroll horizontal */
body, html { 
    max-width: 100vw; 
    overflow-x: hidden; 
}

/* ==========================================================================
   AJUSTE DE ESCALA GLOBAL (ZOOM OUT TAILWIND)
   ========================================================================== */
html {
    font-size: 12px; /* Reduz a escala base do rem. Diminui tudo proporcionalmente. */
}

main, .tab-content { 
    max-width: 100%; 
    overflow-x: hidden; 
}

/* Scrollbar Customizada (Azulada) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #1e3a8a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* Animações Globais */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease-out forwards; }

.tab-content { display: none; }
.tab-content.active { display: flex; }

.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 1); /* slate-600 */
}

/* Firefox: unify a largura fina da scrollbar em todo o site */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Utilitário importante para forçar o Tailwind a esconder elementos corretamente */
.hidden { display: none !important; }

/* ============================================================== */
/* COMPONENTE: CARROSSEL 3D (PÁGINA INICIAL)                      */
/* ============================================================== */

.kaz-carousel-perspective {
    width: 100%; height: 70vh; min-height: 500px; position: relative;
    display: flex; align-items: center; justify-content: center; perspective: 1500px; 
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 10%, rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.8) 90%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 10%, rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0.8) 90%, rgba(0,0,0,0) 100%);
}

.kaz-slide {
    position: absolute; width: 75%; height: 85%; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), z-index 0.8s, box-shadow 0.8s, border 0.8s, filter 0.8s;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: flex-start;
    border: 2px solid transparent; will-change: transform;
}

.kaz-slide:not(.active) { filter: brightness(0.3) saturate(0.5); cursor: pointer; }
.kaz-slide.active { border: 2px solid #3b82f6; box-shadow: 0 0 30px rgba(0,0,0,0.9), inset 0 0 20px rgba(59, 130, 246, 0.3); filter: brightness(1) saturate(1); }
.kaz-slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(15,23,42,0.95) 10%, rgba(15,23,42,0.6) 40%, transparent 100%); z-index: 1; pointer-events: none; }

.kaz-content-layer { position: relative; z-index: 5; padding: 3rem 5rem; max-width: 55%; }

.kaz-nav-dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255,255,255,0.2); cursor: pointer; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.1); }
.kaz-nav-dot.active { background-color: #3b82f6; transform: scale(1.4); box-shadow: 0 0 10px #3b82f6; }

@media (max-width: 768px) {
    .kaz-slide { width: 95%; height: 90%; justify-content: center; }
    .kaz-slide::after { background: linear-gradient(to top, rgba(15,23,42,0.95) 10%, rgba(15,23,42,0.6) 60%, transparent 100%); }
    .kaz-content-layer { max-width: 90%; padding: 2rem; text-align: center; margin-top: auto; }
}

/* ============================================================== */
/* COMPONENTE: ALUNO TECH (PERFIL E FERRAMENTAS)                  */
/* ============================================================== */

/* LOADING OVERLAY */
.aluno-spinner {
    width: 50px; height: 50px; border: 5px solid #334155;
    border-top-color: #3b82f6; border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* MENU DE ABAS DO ALUNO (ESTILO CLEAN / DASHBOARD) */
.aluno-tab-btn {
    color: #64748b; 
    font-size: 0.85rem;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
}
.aluno-tab-btn:hover { color: #f1f5f9; border-bottom-color: #475569; }
.aluno-tab-btn.active { color: #3b82f6; border-bottom-color: #3b82f6; }

.aluno-tab-content { display: none; animation: fadeIn 0.4s; }
.aluno-tab-content.active { display: block; }

/* AVISOS & BOLETIM */
.aviso-item { background: rgba(0,0,0,0.2); border-left: 4px solid #f59e0b; padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.aviso-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: #64748b; margin-bottom: 8px; }
.aviso-text { color: #e2e8f0; line-height: 1.5; white-space: pre-wrap; }

.boletim-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; table-layout: fixed; border: 1px solid #334155; }
.boletim-table th { background-color: rgba(30, 41, 59, 0.8); color: #3b82f6; padding: 10px 4px; border: 1px solid #334155; text-transform: uppercase; font-size: 0.7rem; text-align: center; }
.boletim-table td { padding: 10px 4px; border: 1px solid #334155; color: #cbd5e1; text-align: center; }
.boletim-table th:first-child, .boletim-table td:first-child { text-align: left; padding-left: 15px; }
.boletim-table th:not(:first-child), .boletim-table td:not(:first-child) { width: 6%; }
.boletim-table .media-final-col { background-color: rgba(59, 130, 246, 0.1); font-weight: bold; color: #3b82f6; }
.nota-boa { color: #4ade80; font-weight: bold; }
.nota-ruim { color: #ef4444; font-weight: bold; }
.nota-neutra { color: #94a3b8; }
.trim-divider { border-right: 1px solid rgba(255,255,255,0.1); }

/* CADERNO DIGITAL */
.tags-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; flex-grow: 1; }
.tag-pill { background: rgba(15, 23, 42, 0.8); color: #94a3b8; border: 1px solid #334155; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.tag-pill:hover, .tag-pill.active { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border-color: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
.note-form-panel { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 25px; margin-bottom: 20px; display: none; animation: slideDown 0.3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border-left: 5px solid #3b82f6; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.color-selector { display: flex; gap: 10px; margin: 15px 0; flex-wrap: wrap; }
.color-option { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.color-option:hover { transform: scale(1.2); }
.color-option.selected { border-color: white; box-shadow: 0 0 10px white; transform: scale(1.1); }

.note-card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 20px; min-height: 220px; display: flex; flex-direction: column; position: relative; transition: all 0.3s ease; overflow: hidden; border-left-width: 5px; }
.note-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.note-card.pinned { background: rgba(59, 130, 246, 0.05); }
.note-pin { position: absolute; top: 15px; right: 15px; color: #94a3b8; cursor: pointer; transition: 0.2s; font-size: 1.1rem; }
.note-pin:hover, .note-pin.active { color: #00e5ff; text-shadow: 0 0 8px #00e5ff; transform: rotate(45deg); }
.note-title { font-family: 'Cinzel', serif; color: #f1f5f9; font-size: 1.2rem; margin-bottom: 10px; padding-right: 30px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-tag { font-size: 0.7rem; color: #3b82f6; background: rgba(59, 130, 246, 0.1); padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(59, 130, 246, 0.2); }
.note-body { flex-grow: 1; color: #94a3b8; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; margin-bottom: 15px; }
.note-footer { padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: flex-end; gap: 10px; opacity: 0.6; transition: 0.2s; }
.note-card:hover .note-footer { opacity: 1; }
.note-btn { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.85rem; font-weight: bold; display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 4px; transition: 0.2s; }
.note-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.note-btn.del:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.page-btn { background: #1e293b; border: 1px solid #334155; color: #f1f5f9; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.page-btn:hover:not(:disabled) { background: #3b82f6; color: white; border-color: #3b82f6; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; background: rgba(0,0,0,0.2); }

/* KANBAN */
.kanban-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; min-height: 500px; }
.kanban-column { background-color: #1e293b; border: 1px solid #334155; border-radius: 12px; display: flex; flex-direction: column; max-height: 80vh; }
.kanban-column-header { padding: 15px; border-bottom: 1px solid #334155; font-family: 'Cinzel', serif; font-weight: bold; text-align: center; border-radius: 12px 12px 0 0; letter-spacing: 1px; }
.col-todo .kanban-column-header { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.col-doing .kanban-column-header { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.col-done .kanban-column-header { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.kanban-cards-area { padding: 15px; flex-grow: 1; overflow-y: auto; min-height: 100px; display: flex; flex-direction: column; gap: 15px; }
.kanban-column.drag-over { box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); border-color: #3b82f6; background-color: rgba(255,255,255,0.02); }
.kanban-card { background-color: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 15px; cursor: grab; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { transform: translateY(-3px); border-color: #00e5ff; }
.kanban-card.dragging { opacity: 0.5; transform: scale(0.95); }
.kanban-card.expanded .k-card-body { -webkit-line-clamp: unset; max-height: none; }
.k-expand-btn { position: absolute; top: 10px; right: 10px; background: none; border: none; color: #94a3b8; cursor: pointer; }

/* HORÁRIO */
.horario-tabela { width: 100%; border-collapse: separate; border-spacing: 8px; min-width: 900px; table-layout: fixed; }
.horario-tabela th { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; padding: 15px; border-radius: 8px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.horario-tabela td { background-color: rgba(30, 41, 59, 0.5); border: 1px solid #334155; border-radius: 8px; padding: 10px; vertical-align: top; height: 120px; transition: 0.2s; width: 20%; overflow: hidden; word-wrap: break-word; }
.horario-tabela td:hover { background-color: rgba(30, 41, 59, 0.8); }
.horario-tabela th.hoje { background-color: #3b82f6; color: white; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.horario-tabela td.hoje { border-color: #3b82f6; background-color: rgba(59, 130, 246, 0.05); }
.aula-card { background-color: rgba(59, 130, 246, 0.1); border-left: 3px solid #00e5ff; padding: 8px; border-radius: 4px; margin-bottom: 8px; }
.aula-card h4 { margin: 0 0 4px 0; color: white; font-size: 0.85rem; line-height: 1.2; white-space: normal; }

/* CALENDÁRIO */
.cal-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); 
    z-index: 1000; display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.cal-modal-content {
    background: #1e293b; padding: 2rem; border-radius: 1rem;
    width: 90%; max-width: 500px; border: 1px solid #334155;
    position: relative;
}
.cal-close { position: absolute; top: 1rem; right: 1rem; cursor: pointer; color: #94a3b8; }

.calendar-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid #334155; background: #0f172a; }
.day-cell { min-height: 100px; padding: 10px; border: 1px solid #1e293b; position: relative; }
.day-cell.today { background: rgba(59, 130, 246, 0.1); }
.day-number { font-size: 0.8rem; font-weight: bold; color: #475569; }
.event-item { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-top: 2px; cursor: pointer; color: white; }

/* ============================================================== */
/* COMPONENTE: CONTEÚDOS AULA (MATERIAIS, AUDIO PLAYER)           */
/* ============================================================== */

/* ---- Casca da aba: ocupa 100% da tela, sem scroll externo ---- */
#conteudos-content {
    display: flex;
    flex-direction: column;   /* <- corrige o corte lateral (ver CHANGELOG) */
    overflow: hidden;
}
#conteudos-content > .kz-cont-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    height: 100%;
    padding: clamp(.6rem, 2vh, 1.4rem) clamp(.75rem, 2.4vw, 2rem) 0;
    /* Reserva a altura real do dock (medida em JS -> --kz-dock-h),
       evitando que o dock tape o rodape do acervo. */
    padding-bottom: calc(var(--kz-dock-h, 0px) + clamp(.6rem, 2vh, 1.2rem));
    gap: clamp(.6rem, 1.6vh, 1rem);
    min-height: 0;
}

/* ---- Navegacao das sub-categorias ---- */
.kz-seg {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .28rem;
    border-radius: .85rem;
    background: rgba(2,6,23,.72);
    border: 1px solid #1e293b;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
    flex: 0 1 auto;
    min-width: 0;
}
.kz-seg__btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-radius: .65rem;
    font-size: clamp(.62rem, 1.15vw, .75rem);
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    transition: color .25s ease, background .25s ease, box-shadow .25s ease;
    min-height: 40px;
}
.kz-seg__btn i { font-size: .8em; }
.kz-seg__btn:hover { color: #e2e8f0; background: rgba(30,41,59,.6); }
.kz-seg__btn.is-active {
    color: #fff;
    background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
    box-shadow: 0 6px 18px rgba(29,78,216,.4), inset 0 1px 0 rgba(255,255,255,.14);
}
.kz-seg__btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* ---- Painel generico (materiais / musicas / podcasts) ---- */
.kz-panel {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;            /* <- permite o overflow interno funcionar */
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
}

/* Barra de ferramentas (busca + filtros) */
.kz-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: .75rem clamp(.6rem, 1.6vw, 1rem);
    background: rgba(15,23,42,.72);
    border-bottom: 1px solid #1e293b;
}
.kz-search {
    position: relative;
    flex: 1 1 15rem;
    min-width: 0;
}
.kz-search__icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: .8rem;
    pointer-events: none;
}
.kz-search input {
    width: 100%;
    background: #020617;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: .7rem;
    padding: .65rem .9rem .65rem 2.4rem;
    font-size: .82rem;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
    min-height: 40px;
}
.kz-search input::placeholder { color: #475569; }
.kz-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.16);
}
.kz-select {
    background: #020617;
    border: 1px solid #1e293b;
    color: #cbd5e1;
    border-radius: .7rem;
    padding: .65rem .8rem;
    font-size: .78rem;
    outline: none;
    cursor: pointer;
    min-height: 40px;
    max-width: 100%;
    transition: border-color .25s ease;
}
.kz-select:focus { border-color: #3b82f6; }
.kz-select option { background: #0f172a; }

.kz-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .95rem;
    min-height: 40px;
    border-radius: .7rem;
    background: #020617;
    border: 1px solid #1e293b;
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: all .25s ease;
    white-space: nowrap;
}
.kz-chip:hover { color: #e2e8f0; border-color: #334155; }
.kz-chip.is-on {
    color: #fcd34d;
    border-color: rgba(245,158,11,.55);
    background: rgba(245,158,11,.1);
    box-shadow: 0 0 18px rgba(245,158,11,.18);
}
.kz-chip:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* ---- Grade de Materiais: preenche qualquer largura ---- */
.kz-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: clamp(.75rem, 2vw, 1.4rem);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(11rem, 22vw, 16.5rem), 1fr));
    gap: clamp(.75rem, 1.8vw, 1.25rem);
    align-content: start;
}

.kz-mcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: .95rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .3s ease, box-shadow .3s ease;
    text-align: left;
    width: 100%;
}
.kz-mcard:hover {
    transform: translateY(-5px);
    border-color: rgba(59,130,246,.55);
    box-shadow: 0 18px 40px rgba(0,0,0,.6);
}
.kz-mcard:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.kz-mcard__cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
    overflow: hidden;
    flex: 0 0 auto;
}
.kz-mcard__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.kz-mcard:hover .kz-mcard__cover img { transform: scale(1.08); }
.kz-mcard__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2,6,23,.92), transparent 62%);
}
.kz-mcard__star {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 3;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: rgba(2,6,23,.82);
    border: 1px solid rgba(245,158,11,.5);
    color: #fbbf24;
    font-size: .7rem;
    backdrop-filter: blur(6px);
}
.kz-mcard__body { padding: .75rem .85rem .9rem; display: flex; flex-direction: column; gap: .35rem; }
.kz-mcard__meta {
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kz-mcard__title {
    margin: 0;
    color: #60a5fa;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: .88rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Estado vazio */
.kz-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: clamp(2rem, 9vh, 5rem) 1rem;
    color: #475569;
    text-align: center;
}
.kz-empty i { font-size: 2.6rem; opacity: .35; }
.kz-empty p { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* Barra de Paginação de Conteúdos */
#cont-mat-pagination {
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    flex-shrink: 0;
    border-top: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.45);
}
#cont-mat-pagination.hidden {
    display: none !important;
}

/* ---- Estilo Spotify: lista lateral + area "tocando agora" ---- */
.kz-split {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kz-list-pane {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(2,6,23,.55);
    border-right: 1px solid #1e293b;
}
.kz-list-pane__head {
    flex: 0 0 auto;
    padding: .55rem clamp(.75rem, 2vw, 1.15rem);
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.kz-list-pane__title {
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.kz-list-pane__title b { color: #94a3b8; font-variant-numeric: tabular-nums; }

/* ---- Responsividade do layout Spotify ---- */
/* Desktop largo: lista lateral fixa */
@media (min-width: 1024px) {
    .kz-split { flex-direction: row; }
    .kz-list-pane { width: 19rem; min-width: 15rem; }
}

/* Tablet: lista estreita e painel com respiro reduzido */
@media (min-width: 768px) and (max-width: 1023px) {
    .kz-split { flex-direction: row; }
    .kz-list-pane { width: 15rem; min-width: 12rem; }
    .kz-now__body { padding: 1rem; gap: .6rem; }
}

/* Celular: lista vira painel superior rolável com altura maxima limitada
   e "tocando agora" ocupa o restante. Isso mantem o player acessivel. */
@media (max-width: 767px) {
    .kz-split { flex-direction: column; }
    .kz-list-pane {
        border-right: none;
        border-bottom: 1px solid #1e293b;
        max-height: 38%;
    }
    .kz-now__head { gap: .8rem; }
    .kz-now__cover { width: clamp(4.5rem, 22vw, 7rem); }
    .kz-now__body { padding: .75rem; gap: .55rem; }
    .kz-lyrics { padding: .8rem; }
    .kz-lyrics__text { line-height: 1.75; font-size: .8rem; }

    /* Dock do player empilha de forma compacta */
    .kz-player-dock { padding-top: .4rem; }
    .kz-player-dock__row { flex-wrap: wrap; }
    .kz-nowplaying { flex: 1 1 100%; order: -1; }
    .kz-progress { flex: 1 1 100%; order: 10; }
    .kz-volume { display: none; }
    .kz-transport { flex: 0 0 auto; order: 5; }
}

.kz-tracklist {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .35rem .4rem .9rem;
    margin: 0;
    list-style: none;
}

.kz-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .45rem .55rem;
    border-radius: .65rem;
    cursor: pointer;
    transition: background .2s ease;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
}
.kz-track:hover { background: rgba(30,41,59,.75); }
.kz-track:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.kz-track.is-playing {
    background: rgba(30,58,138,.32);
    border-color: rgba(59,130,246,.4);
}

.kz-track__art {
    position: relative;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: .45rem;
    overflow: hidden;
    background: #020617;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kz-track__art img { width: 100%; height: 100%; object-fit: cover; }
.kz-track__art i { color: #475569; font-size: .8rem; }

/* Botao de play que sobe no hover (canonico Spotify) */
.kz-track__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,.72);
    color: #fff;
    font-size: .78rem;
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
    backdrop-filter: blur(2px);
}
.kz-track:hover .kz-track__play,
.kz-track:focus-visible .kz-track__play { opacity: 1; }
.kz-track__play:hover { background: rgba(29,78,216,.8); }

/* Equalizador animado quando toca */
.kz-track.is-playing .kz-track__art i,
.kz-track.is-playing .kz-track__art .no-art { display: none; }
.kz-eq { display: none; align-items: flex-end; gap: 2px; height: 60%; }
.kz-track.is-playing .kz-eq { display: flex; }
.kz-eq span {
    width: 2.5px;
    background: #3b82f6;
    border-radius: 1px;
    animation: kz-eq .9s ease-in-out infinite;
}
.kz-eq span:nth-child(1) { height: 40%; animation-delay: -.2s; }
.kz-eq span:nth-child(2) { height: 80%; animation-delay: -.5s; }
.kz-eq span:nth-child(3) { height: 55%; animation-delay: -.35s; }
@keyframes kz-eq { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

.kz-track__meta { flex: 1 1 auto; min-width: 0; }
.kz-track__title {
    color: #e2e8f0;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kz-track.is-playing .kz-track__title { color: #93c5fd; }
.kz-track__sub {
    color: #64748b;
    font-size: .62rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: .1rem;
}
.kz-track__dur {
    flex: 0 0 auto;
    color: #475569;
    font-size: .62rem;
    font-variant-numeric: tabular-nums;
}

/* ---- Area de detalhe / "Tocando agora" ---- */
.kz-now {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    background: radial-gradient(120% 90% at 18% 0%, rgba(30,41,59,.75), #020617 62%);
    overflow: hidden;
}

/* Brilho ambientado na cor da faixa */
.kz-now__glow {
    position: absolute;
    top: -22%;
    left: -10%;
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .3;
    pointer-events: none;
    transition: background .8s ease;
}
.kz-now--emerald .kz-now__glow { background: #10b981; }
.kz-now--purple .kz-now__glow { background: #a855f7; }
.kz-now--blue .kz-now__glow { background: #3b82f6; }

.kz-now__empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #334155;
    text-align: center;
    padding: 1.5rem;
}
.kz-now__empty i { font-size: clamp(2.5rem, 7vw, 4rem); opacity: .45; }
.kz-now__empty h3 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: clamp(.8rem, 2.2vw, 1.05rem);
    color: #475569;
}

.kz-now__body {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(.6rem, 1.6vh, 1.1rem);
    padding: clamp(.9rem, 2.4vw, 1.9rem);
}

.kz-now__head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: clamp(.9rem, 2.4vw, 1.7rem);
}

/* Capa grande */
.kz-now__cover {
    position: relative;
    flex: 0 0 auto;
    width: clamp(6.5rem, 20vw, 15rem);
    aspect-ratio: 1;
    border-radius: .85rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 22px 50px rgba(0,0,0,.65);
}
.kz-now__cover img { width: 100%; height: 100%; object-fit: cover; }
.kz-now__cover--none {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.6rem, 4vw, 3rem);
}
.kz-now--emerald .kz-now__cover--none { color: #34d399; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); }
.kz-now--purple .kz-now__cover--none { color: #c084fc; background: rgba(168,85,247,.1); border-color: rgba(168,85,247,.3); }
.kz-now--blue .kz-now__cover--none { color: #60a5fa; background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }

/* Botao play gigante sobre a capa */
.kz-now__bigplay {
    position: absolute;
    right: -.55rem;
    bottom: -.55rem;
    width: clamp(2.6rem, 5.2vw, 3.5rem);
    height: clamp(2.6rem, 5.2vw, 3.5rem);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    border: 3px solid #020617;
    box-shadow: 0 10px 28px rgba(37,99,235,.5);
    transition: transform .25s cubic-bezier(.16,1,.3,1), background .25s ease;
}
.kz-now--emerald .kz-now__bigplay { background: #059669; box-shadow: 0 10px 28px rgba(5,150,105,.5); }
.kz-now--purple .kz-now__bigplay { background: #7e22ce; box-shadow: 0 10px 28px rgba(126,34,206,.5); }
.kz-now__bigplay:hover { transform: scale(1.12); filter: brightness(1.15); }
.kz-now__bigplay:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

.kz-now__info { flex: 1 1 auto; min-width: 0; }
.kz-now__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.kz-now--emerald .kz-now__eyebrow { color: #34d399; }
.kz-now--purple .kz-now__eyebrow { color: #c084fc; }
.kz-now--blue .kz-now__eyebrow { color: #60a5fa; }

.kz-now__title {
    margin: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -.015em;
    text-shadow: 0 6px 24px rgba(0,0,0,.7);
    font-size: clamp(1.15rem, 3.4vw, 2.6rem);
    overflow-wrap: anywhere;
}
.kz-now__artist {
    margin: .4rem 0 0;
    color: #94a3b8;
    font-weight: 700;
    font-size: clamp(.72rem, 1.5vw, .95rem);
}

.kz-now__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-bottom: clamp(.5rem, 1.4vh, .9rem);
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.kz-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-radius: .6rem;
    background: rgba(30,41,59,.8);
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: all .22s ease;
    min-height: 38px;
    white-space: nowrap;
}
.kz-btn:hover { background: #1e293b; border-color: #475569; color: #fff; transform: translateY(-1px); }
.kz-btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.kz-btn--accent { background: #1d4ed8; border-color: #2563eb; color: #fff; }
.kz-btn--accent:hover { background: #2563eb; }
.kz-btn--ml { margin-left: auto; }

/* Painel de letra / descricao */
.kz-lyrics {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: rgba(2,6,23,.55);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: .9rem;
    padding: clamp(.9rem, 2.2vw, 1.6rem);
    position: relative;
}
.kz-lyrics__text {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(.82rem, 1.6vw, 1.02rem);
    line-height: 1.9;
    color: #cbd5e1;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.kz-lyrics__empty { color: #475569; font-style: italic; }

/* ---- Dock do player: largura total, estilo barra inferior ---- */
.kz-player-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(2,6,23,.93);
    backdrop-filter: blur(22px) saturate(140%);
    border-top: 1px solid #1e293b;
    box-shadow: 0 -18px 50px rgba(0,0,0,.65);
    padding: .5rem clamp(.6rem, 2.5vw, 1.6rem) .55rem;
    padding-bottom: max(.55rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.kz-player-dock__bar {
    height: 3px;
    width: 100%;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.kz-player-dock__fill {
    height: 100%;
    width: calc(var(--kz-dock-progress, 0) * 100%);
    background: linear-gradient(90deg, #1d4ed8, #60a5fa);
    border-radius: 999px;
    transition: width .12s linear;
}
.kz-player-dock__bar:hover .kz-player-dock__fill { background: linear-gradient(90deg, #2563eb, #93c5fd); }

.kz-player-dock__row {
    display: flex;
    align-items: center;
    gap: clamp(.5rem, 1.6vw, 1rem);
    width: 100%;
}

.kz-nowplaying {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 0 1 16rem;
    min-width: 0;
}
.kz-nowplaying__art {
    flex: 0 0 auto;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: .45rem;
    overflow: hidden;
    background: #020617;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kz-nowplaying__art img { width: 100%; height: 100%; object-fit: cover; }
.kz-nowplaying__art i { color: #475569; font-size: .8rem; }
.kz-nowplaying__txt { min-width: 0; }
.kz-nowplaying__title { color: #e2e8f0; font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kz-nowplaying__artist { color: #64748b; font-size: .64rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kz-transport {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.4rem, 1.4vw, .9rem);
    min-width: 0;
}
.kz-tbtn {
    width: 2.2rem;
    height: 2.2rem;
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: transparent;
    transition: all .2s ease;
    font-size: .95rem;
}
.kz-tbtn:hover { color: #fff; background: rgba(30,41,59,.9); }
.kz-tbtn.is-on { color: #3b82f6; }
.kz-tbtn.is-on::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #3b82f6;
}
.kz-tbtn { position: relative; }
.kz-tbtn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

.kz-playbtn {
    width: 2.7rem;
    height: 2.7rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #0f172a;
    transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s ease;
    font-size: 1rem;
    flex: 0 0 auto;
}
.kz-playbtn:hover { transform: scale(1.08); background: #fff; }
.kz-playbtn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

.kz-progress {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex: 1 1 12rem;
    min-width: 6rem;
}
.kz-time {
    font-size: .6rem;
    font-weight: 700;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
    min-width: 2.1rem;
}
.kz-time--end { text-align: right; }

.kz-volume {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 8rem;
}
.kz-volume i { color: #64748b; font-size: .78rem; }

.kz-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #1e293b;
    outline: none;
    cursor: pointer;
}
.kz-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.kz-range::-webkit-slider-thumb:hover { transform: scale(1.3); background: #fff; }
.kz-range::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 999px;
    background: #e2e8f0; border: none; cursor: pointer;
}
.kz-range:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }

/* Estilização da barra de progresso do áudio nativo */
.custom-range::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6; /* Azul padrão */
    cursor: pointer;
    transition: transform 0.1s;
}
.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}
.custom-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}

/* Transição suave entre as sub-abas */
/* ATENÇÃO: precisa ser `flex` (e NÃO `block`). `.cont-tab-content.active` tem
   especificidade 0,2,0 e VENCE a classe utilitária `.flex` do Tailwind (0,1,0).
   Usar `display:block` aqui quebrava a altura e o overflow dos painéis de
   Músicas/Podcasts, causando o corte lateral direito. */
.cont-tab-content { display: none; }
.cont-tab-content.active { display: flex; animation: fadeIn 0.4s ease-out forwards; }

/* ============================================================== */
/* COMPONENTE: MESTRE LEOMA (PORTAL DO PROFESSOR)                 */
/* ============================================================== */

/* Botões da Sub-Aba Professor */
.prof-subtab-btn { border-bottom: 2px solid transparent; }
.prof-subtab-btn.active { border-bottom-color: #f59e0b; /* Amber 500 */ }
.prof-tab-content { display: none; }
.prof-tab-content.active { display: flex; animation: fadeIn 0.3s ease-out forwards; }

/* Linhas da Chamada */
.student-row {
    display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem;
    background-color: rgba(30, 41, 59, 0.5); border: 1px solid #334155; margin-bottom: 0.5rem; border-radius: 0.75rem;
    transition: all 0.2s;
}
.student-row:hover { background-color: rgba(30, 41, 59, 0.8); border-color: #475569; }
.student-row.inactive { opacity: 0.5; border-style: dashed; filter: grayscale(1); }

/* Botões de Presença (P/A/J) */
.p-btn {
    width: 38px; height: 38px; border-radius: 0.5rem; font-weight: 800; font-size: 0.9rem;
    border: 1px solid #475569; background: transparent; color: #94a3b8;
    cursor: pointer; margin-left: 6px; transition: all 0.2s;
}
.p-btn:hover:not(:disabled) { border-color: #94a3b8; color: #cbd5e1; }
.p-btn.presente.selected { background-color: #16a34a; color: white; border-color: #16a34a; box-shadow: 0 0 10px rgba(22,163,74,0.3); }
.p-btn.ausente.selected { background-color: #dc2626; color: white; border-color: #dc2626; box-shadow: 0 0 10px rgba(220,38,38,0.3); }
.p-btn.justificado.selected { background-color: #f59e0b; color: #0f172a; border-color: #f59e0b; box-shadow: 0 0 10px rgba(245,158,11,0.3); }

/* Inputs de Nota */
.nota-input { 
    width: 100%; padding: 8px 4px; text-align: center; background: transparent; 
    border: 1px solid transparent; color: inherit; border-radius: 0.5rem; 
    transition: 0.2s; font-size: 1rem; font-weight: bold; outline: none;
}
.nota-input:focus { background: rgba(15, 23, 42, 0.8); border-color: #f59e0b; }
.nota-input:hover:not(:disabled) { border-color: #475569; }

.nota-aprovado { color: #4ade80; }
.nota-atencao { color: #facc15; } 
.nota-reprovado { color: #f87171; } 

/* Status de Lançamento */
.launch-btn.selected[data-val="true"] { background-color: rgba(22, 163, 74, 0.2); border-color: #16a34a; color: #4ade80; }
.launch-btn.selected[data-val="false"] { background-color: rgba(220, 38, 38, 0.2); border-color: #dc2626; color: #f87171; }

/* Slider de Avaliação 360 */
.eval-range {
    -webkit-appearance: none; width: 100%; height: 6px; background: #334155;
    border-radius: 3px; outline: none; border: none;
}
.eval-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
    border-radius: 50%; background: #f59e0b; cursor: pointer;
    border: 3px solid #0f172a; transition: transform 0.1s;
}
.eval-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

.eval-eixo-row td {
    background-color: rgba(15, 23, 42, 0.9); color: #3b82f6;
    font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
    padding-top: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid #334155;
}

/* ============================================================== */
/* COMPONENTE: SORTEIOS (PROFESSOR)                               */
/* ============================================================== */

/* Animação do Vencedor na Roleta */
.roulette-winner {
    color: #fcd34d; /* Amber 300 */
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.8);
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Card das Equipes */
.group-card {
    background-color: rgba(30, 41, 59, 0.9);
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
.group-card:hover { transform: translateY(-5px); }
.group-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #f59e0b, #d97706); /* Amber gradient */
}

/* ============================================================== */
/* COMPONENTE: GRADE HORÁRIA                                      */
/* ============================================================== */

.grade-header {
    background-color: rgba(30, 41, 59, 0.95);
    font-weight: 900; color: #f59e0b; text-transform: uppercase; letter-spacing: 1px;
    font-size: 0.7rem; text-align: center; padding: 0.75rem;
    position: sticky; top: 0; z-index: 10;
}
.grade-time {
    background-color: rgba(15, 23, 42, 0.8);
    font-weight: 900; color: #94a3b8; font-size: 0.7rem; text-transform: uppercase;
    text-align: center; padding: 1rem 0.5rem; display: flex; align-items: center; justify-content: center;
}
.grade-cell {
    background-color: rgba(30, 41, 59, 0.5);
    min-height: 100px; padding: 0.5rem;
    transition: background-color 0.2s;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.grade-cell:hover { background-color: rgba(30, 41, 59, 0.9); }

.aula-card {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    padding: 0.75rem; border-radius: 0.5rem;
    font-size: 0.8rem; position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.aula-card strong { display: block; color: #e2e8f0; margin-bottom: 2px; }
.aula-card span { display: block; color: #94a3b8; font-size: 0.7rem; }
.aula-actions {
    display: flex; gap: 4px; margin-top: 8px; justify-content: flex-end; 
    opacity: 0; transition: opacity 0.2s;
}
.aula-card:hover .aula-actions { opacity: 1; }
.aula-actions button { padding: 4px 8px; font-size: 0.7rem; border-radius: 0.3rem; cursor: pointer; border: none; }


/* ============================================================== */
/* COMPONENTE: MODERADOR TECH (ATUALIZAÇÕES)                      */
/* ============================================================== */

.upd-row {
    transition: background-color 0.2s;
}
.upd-row:hover {
    background-color: rgba(30, 41, 59, 0.8);
}
.upd-status-dot {
    height: 10px; width: 10px; border-radius: 50%;
    display: inline-block; margin-right: 8px;
    box-shadow: 0 0 5px currentColor;
}
.upd-status-active { color: #4ade80; background-color: #4ade80; }
.upd-status-inactive { color: #94a3b8; background-color: #94a3b8; box-shadow: none; }

.upd-msg-success {
    background-color: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border: 1px solid rgba(22, 163, 74, 0.3);
}
.upd-msg-error {
    background-color: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* AJUSTES DO CROPPER.JS PARA O TEMA ESCURO */
.cropper-view-box,
.cropper-face {
    border-radius: 0;
}
/* Força visual redondo quando estiver cortando perfil */
.cropper-profile-mode .cropper-view-box,
.cropper-profile-mode .cropper-face {
    border-radius: 50%;
}
.cropper-profile-mode .cropper-dashed, 
.cropper-profile-mode .cropper-center {
    display: none;
}
.cropper-modal {
    background-color: rgba(2, 6, 23, 0.8) !important;
}
.cropper-line, .cropper-point {
    background-color: #3b82f6 !important;
}


/* =========================================
   CONEXÃO ALUNO - EFEITOS IMERSIVOS
========================================= */
.post-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* Bordas Laterais por Cargos */
.post-card[data-role="admin"] { border-left: 4px solid #FF00D8; }
.post-card[data-role="professor"] { border-left: 4px solid #062863; }
.post-card[data-role="aluno"] { border-left: 4px solid #31598c; }
.post-card[data-role="coordenacao"] { border-left: 4px solid #FF0000; }
.post-card[data-role="moderador"] { border-left: 4px solid #34495e; }
.post-card[data-role="default"] { border-left: 4px solid #bdc3c7; }

/* Animação de Elogio (Estrela) */
@keyframes pulseStar {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); color: #FFD700; }
    100% { transform: scale(1); }
}
.fa-star.elogio-animado {
    animation: pulseStar 1.5s ease-in-out infinite;
    color: #eab308;
}

/* Confetes da Publicação */
.confetti-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
.confetti { position: absolute; width: 10px; height: 10px; opacity: 0; animation: confetti-fall 4s ease-out forwards; }
@keyframes confetti-fall {
    0% { opacity: 1; transform: translateY(-20px) rotateZ(0deg); }
    100% { opacity: 0; transform: translateY(110vh) rotateZ(720deg); }
}

/* ==========================================
   CARROSSEL DE PROJETOS E CARDS EXPANSÍVEIS
   ========================================== */
.hide-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.projeto-card { 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
}
.projeto-card.expanded {
    height: 650px; /* Adjust as needed */
    min-width: 800px;
    max-width: 800px;
    z-index: 90; /* Increased z-index */
    cursor: auto; /* Change cursor back to default when expanded */
    transform: scale(1.05); /* Slightly bigger to emphasize expansion */
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 0 9999px rgba(0,0,0,0.7); /* Overlay effect */
}

.projeto-card.expanded .h-\[320px\] { /* Target the image container */
    height: 400px; /* Make image container larger */
}

.projeto-card.expanded img {
    transform: scale(1); /* Reset image scale to original when card is expanded */
}

/* Ensure buttons are clickable when expanded, might already be covered by JS */
.projeto-card.expanded .btn-ler-projeto,
.projeto-card.expanded .btn-favoritar,
.projeto-card.expanded .btn-editar,
.projeto-card.expanded .btn-excluir {
    pointer-events: auto; /* Ensure buttons are clickable */
    opacity: 1; /* Ensure visibility */
}

/* Styles for non-expanded cards when one is expanded */
.carouselContainer:has(.projeto-card.expanded) .projeto-card:not(.expanded) {
    opacity: 0.4;
    filter: blur(2px);
    transform: scale(0.9);
    pointer-events: none; /* Disable interaction on non-expanded cards */
}

/* Adjust button positioning for expanded state, if necessary */
.projeto-card.expanded .btn-acoes-admin {
    top: 1.5rem;
    left: 1.5rem;
}

.projeto-card.expanded .btn-favoritar {
    top: 1.5rem;
    right: 1.5rem;
}

.projeto-card.expanded { 
    min-width: 800px; 
    max-width: 800px; 
    z-index: 20; 
}

@media (max-width: 768px) {
    .projeto-card.expanded { 
        min-width: 100%; 
        max-width: 100%; 
        flex-direction: column !important; 
    }
}

/* ==========================================
   ESTILOS GERAIS PARA LEITURA DE PROJETOS (MODO ESCURO)
   ========================================== */
#detalheProjConteudo h2 {
    font-size: 1.8rem;
    font-weight: 900;
    color: #818cf8; /* indigo-400 */
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5); /* slate-700 */
    padding-bottom: 0.5rem;
}

#detalheProjConteudo h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e2e8f0; /* slate-200 */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#detalheProjConteudo p {
    color: #cbd5e1; /* slate-300 */
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

#detalheProjConteudo ul, #detalheProjConteudo ol {
    color: #cbd5e1;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style-type: disc;
}

#detalheProjConteudo li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#detalheProjConteudo strong {
    color: #f8fafc; /* white */
    font-weight: 800;
}

/* Tabelas e Caixas de Alerta */
#detalheProjConteudo .nota-importante {
    background-color: rgba(234, 179, 8, 0.1); /* yellow background */
    border-left: 4px solid #eab308; /* yellow border */
    padding: 1rem;
    border-radius: 0.5rem;
    color: #fef08a;
    font-style: italic;
    margin: 1.5rem 0;
}

/* ==========================================
   FORMATAÇÃO DE HTML PARA LEITURA DE PROJETOS
   ========================================== */
.custom-html-content {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.8;
}
.custom-html-content h1, .custom-html-content h2 {
    color: #818cf8; /* indigo-400 */
    font-size: 2rem;
    font-weight: 900;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    padding-bottom: 0.5rem;
}
.custom-html-content h3 {
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.custom-html-content p { margin-bottom: 1.5rem; }
.custom-html-content strong { color: #ffffff; font-weight: 800; }
.custom-html-content ul, .custom-html-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.custom-html-content ul { list-style-type: disc; }
.custom-html-content ol { list-style-type: decimal; }
.custom-html-content li { margin-bottom: 0.75rem; }


/* Ajuste fino para os botões do grid do professor no mobile */
.prof-subtab-btn { 
    white-space: normal !important; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 0.5rem;
}
@media (min-width: 768px) {
    .prof-subtab-btn {
        flex-direction: row;
    }
}


/* Padroniza botões de grid (Moderador e Aluno) */
.mod-subtab-btn { 
    white-space: normal !important; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 0.5rem;
}
@media (min-width: 768px) {
    .mod-subtab-btn { flex-direction: row; }
}

/* Força a quebra de linha da Chamada no celular */
.student-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .student-row {
        flex-direction: row;
        align-items: center !important;
        gap: 0;
    }
}


/* Estilização da Aura Global */
#aura-container {
    transition: all 0.3s ease;
    cursor: default;
}

#aura-container:hover {
    background-color: rgba(30, 58, 138, 0.4);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

#user-aura-value {
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
}

.animate-pulse {
    animation: pulseAura 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseAura {
    0%, 100% { opacity: 1; filter: brightness(1) drop-shadow(0 0 2px #3b82f6); }
    50% { opacity: 0.8; filter: brightness(1.3) drop-shadow(0 0 8px #3b82f6); }
}

/* Brilho especial quando a Aura for MAX */
#user-aura-value:contains("MAX") {
    color: #fbbf24; /* Amarelo/Dourado */
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

#aura-container img {
    cursor: help; /* Muda o cursor para uma interrogação ao passar no fogo */
}

.badge-status { font-size: 8px; padding: 2px 5px; border-radius: 4px; font-weight: bold; text-transform: uppercase; margin-left: 5px; }
.status-pendente { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-recusado { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.status-enviado { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }


/* ============================================================== */
/* CARROSSEL IMERSIVO DA PÁGINA INICIAL (v2)                      */
/* Substitui o bloco ".card-carrossel" antigo (zoom fixo de 0.85) */
/* ============================================================== */

/* Container: area de captura dos gestos */
.kz-hero {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #020617;
    touch-action: pan-y;           /* permite scroll vertical da pagina */
    user-select: none;
    -webkit-user-select: none;
}

/* Pilha de fundos (zoom out) */
.kz-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 900ms cubic-bezier(.4, 0, .2, 1), transform 1400ms cubic-bezier(.4, 0, .2, 1);
    transform: scale(1.06);
    will-change: opacity, transform;
}
.kz-hero__bg.is-on { opacity: 1; transform: scale(1); }

/* Ken Burns: movimento lento e continuo, cria profundidade */
.kz-hero__bg.is-on.kz-kenburns {
    animation: kz-kenburns 20s ease-in-out infinite alternate;
}
@keyframes kz-kenburns {
    0%   { transform: scale(1) translate3d(0, 0, 0); }
    100% { transform: scale(1.12) translate3d(-1.6%, -1.4%, 0); }
}

/* Escurecimento para o texto respirar */
.kz-hero__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(2,6,23,.98) 0%, rgba(2,6,23,.72) 26%, rgba(2,6,23,.18) 58%, rgba(2,6,23,.45) 100%),
        linear-gradient(to right, rgba(2,6,23,.94) 0%, rgba(2,6,23,.55) 42%, transparent 78%);
}

/* Vinheta + textura sutil para imersao */
.kz-hero__grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .05;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59,130,246,.9), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(168,85,247,.7), transparent 45%);
    mix-blend-mode: screen;
}

/* ---- Cabecalho / titulo ---- */
.kz-hero__intro {
    position: absolute;
    z-index: 20;
    top: clamp(1rem, 6vh, 4rem);
    left: clamp(1rem, 5vw, 4rem);
    max-width: min(46rem, 62vw);
    transition: opacity 600ms ease, transform 700ms cubic-bezier(.16,1,.3,1), filter 600ms ease;
}
.kz-hero__title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.03em;
    text-transform: uppercase;
    text-shadow: 0 6px 30px rgba(0,0,0,.85);
    font-size: clamp(2.1rem, 8vw, 6rem);
}
.kz-hero__title em {
    font-style: normal;
    color: #3b82f6;
    text-shadow: 0 0 44px rgba(59,130,246,.55);
}
.kz-hero__tagline {
    margin: 1rem 0 0;
    max-width: 34rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.65;
    border-left: 2px solid rgba(59,130,246,.55);
    padding-left: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.9);
    font-size: clamp(.75rem, 1.5vw, 1rem);
}

/* ---- Faixa inferior (trilho do carrossel) ---- */
.kz-rail {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 0 0 clamp(.9rem, 2.4vh, 1.6rem);
    background: linear-gradient(to top, rgba(2,6,23,.97) 12%, rgba(2,6,23,.55) 58%, transparent 100%);
    transition: opacity 500ms ease, transform 700ms cubic-bezier(.16,1,.3,1);
}

.kz-rail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 clamp(1rem, 5vw, 4rem) .7rem;
}
.kz-rail__title {
    font-family: 'Cinzel', serif;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(96,165,250,.85);
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}
.kz-rail__count {
    font-family: 'Inter', sans-serif;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

/* Trilho: janela com overflow hidden; o inner recebe o translate */
.kz-rail__viewport {
    position: relative;
    overflow: hidden;
    cursor: grab;
    padding: .75rem clamp(1rem, 5vw, 4rem);
    touch-action: pan-y;
}
.kz-rail__viewport.is-dragging { cursor: grabbing; }

.kz-rail__track {
    display: flex;
    align-items: center;
    gap: 1rem;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* ---- Card ---- */
.kz-card {
    position: relative;
    flex: 0 0 auto;
    width: clamp(9rem, 22vw, 15rem);
    aspect-ratio: 16 / 10;
    border-radius: .9rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 26px rgba(0,0,0,.55);
    cursor: pointer;
    transition: transform 550ms cubic-bezier(.16,1,.3,1),
                box-shadow 550ms ease,
                border-color 550ms ease,
                opacity 550ms ease,
                filter 550ms ease;
    will-change: transform;
}
.kz-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 900ms cubic-bezier(.16,1,.3,1);
    pointer-events: none;
}
.kz-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2,6,23,.96) 4%, rgba(2,6,23,.28) 52%, transparent 100%);
    pointer-events: none;
}
.kz-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: .6rem .7rem;
    pointer-events: none;
}
.kz-card__index {
    position: absolute;
    top: .5rem;
    left: .6rem;
    font-family: 'Inter', sans-serif;
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .16em;
    color: rgba(255,255,255,.62);
    text-shadow: 0 1px 6px rgba(0,0,0,.9);
    font-variant-numeric: tabular-nums;
}
.kz-card__title {
    margin: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: .68rem;
    line-height: 1.28;
    text-shadow: 0 2px 8px rgba(0,0,0,.95);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Barra de progresso do autoplay no card ativo */
.kz-card__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: rgba(255,255,255,.12);
    pointer-events: none;
}
.kz-card__progress::after {
    content: '';
    display: block;
    height: 100%;
    width: calc(var(--kz-progress, 0) * 100%);
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 8px rgba(59,130,246,.9);
}

/* Estados: vizinho (zoom-out), ativo (zoom-in), foco de teclado */
.kz-card.is-near {
    opacity: .62;
    filter: saturate(.72) brightness(.78);
    transform: scale(.9);
}
.kz-card.is-active {
    opacity: 1;
    filter: none;
    transform: scale(1.07);
    border-color: rgba(59,130,246,.65);
    box-shadow: 0 14px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(59,130,246,.35), 0 0 34px rgba(59,130,246,.28);
    z-index: 2;
}
.kz-card.is-active .kz-card__img { transform: scale(1.06); }

.kz-card:hover:not(.is-active) { opacity: .9; transform: scale(.96); }

.kz-card:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}

/* Marca de "arraste" nos extremos */
.kz-rail__hint {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
}
.kz-rail__hint kbd {
    font-family: 'Inter', sans-serif;
    font-size: .55rem;
    background: rgba(30,41,59,.85);
    border: 1px solid #334155;
    border-bottom-width: 2px;
    border-radius: .3rem;
    padding: .1rem .3rem;
    color: #94a3b8;
}

/* ---- Botoes de navegacao ---- */
.kz-navbtn {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #1e293b;
    background: rgba(15,23,42,.85);
    color: #94a3b8;
    backdrop-filter: blur(8px);
    transition: all .25s ease;
    z-index: 40;
}
.kz-navbtn:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #3b82f6;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(59,130,246,.5);
}
.kz-navbtn:disabled { opacity: .28; cursor: not-allowed; }
.kz-navbtn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* ---- MODO IMERSIVO (zoom-in via FLIP) ---- */
/* A imagem do card viaja do trilho ate o fundo de tela cheia. */
.kz-card.is-zoom {
    z-index: 100;
    /* vira um fundo de verdade: sem cantos, sem borda, cursor de "fechar" */
    border-radius: 0;
    border-color: transparent;
    cursor: zoom-out;
    /* o card ativo aplica scale(1.06); aqui ele preenche a tela exata,
       sem estourar as bordas do hero (que tem overflow: hidden) */
    transform: none;
    transition: transform 900ms cubic-bezier(.16, 1, .3, 1),
                box-shadow 900ms ease,
                opacity 900ms ease,
                border-radius 900ms ease,
                border-color 900ms ease;
    box-shadow: 0 40px 120px rgba(0,0,0,.9);
}
.kz-rail.is-immersive { pointer-events: none; }
.kz-rail.is-immersive .kz-rail__head { opacity: 0; }

/* Enquanto o card está em zoom, o hero "respira": fonte um pouco maior,
   scrim mais fechado e trilho/nav fora do caminho do ponteiro. */
.kz-hero.is-zoom { cursor: zoom-out; }
.kz-hero.is-zoom .kz-hero__bg {
    transition-duration: 1200ms;
    filter: saturate(1.15) contrast(1.05);
}
.kz-hero.is-zoom .kz-hero__bg.is-on { transform: scale(1.04); }
.kz-hero.is-zoom .kz-hero__scrim {
    background:
        linear-gradient(to top, rgba(2,6,23,.99) 0%, rgba(2,6,23,.8) 30%, rgba(2,6,23,.3) 62%, rgba(2,6,23,.55) 100%),
        linear-gradient(to right, rgba(2,6,23,.92) 0%, rgba(2,6,23,.62) 40%, transparent 82%);
}
.kz-hero.is-zoom .kz-hero__intro { transition: opacity .5s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.kz-hero.is-zoom .kz-hero__grain { opacity: .04; }

/* Botao de fechar (visivel so no modo imersivo) */
.kz-exit {
    position: absolute;
    z-index: 140;
    top: clamp(.8rem, 4vh, 2rem);
    right: clamp(.8rem, 4vw, 2.5rem);
    width: 2.6rem;
    height: 2.6rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(2,6,23,.7);
    border: 1px solid rgba(255,255,255,.14);
    color: #cbd5e1;
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms ease 250ms, background .25s ease, color .25s ease;
}
.kz-exit.is-visible { opacity: 1; pointer-events: auto; }
.kz-exit:hover { background: #dc2626; border-color: #ef4444; color: #fff; }
.kz-exit:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* ============================================================ */
/* DESIGN TOKENS INSPIRADOS NO MOVIDA ANALYTICS (Kazenski)      */
/* ============================================================ */
:root {
    --kz-bg: #0f172a;
    --kz-surface: #1e293b;
    --kz-surface-2: #0f172a;
    --kz-border: #334155;
    --kz-fg: #f1f5f9;
    --kz-fg-muted: #94a3b8;
    --kz-accent: #f59e0b;
    --kz-accent-soft: #451a03;
    --kz-accent-fg: #fbbf24;
    --kz-danger: #ef4444;
    --kz-success: #22c55e;
    --kz-radius: 14px;
    --kz-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.4);
}

.kz-card {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    box-shadow: var(--kz-shadow);
    padding: 1.25rem;
}

.kz-kpi {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    box-shadow: var(--kz-shadow);
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kz-kpi__label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--kz-fg-muted);
    margin-bottom: 0.5rem;
}

.kz-kpi__value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.kz-kpi__hint {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kz-fg-muted);
    margin-top: 0.5rem;
}

.kz-chart-host {
    background: var(--kz-surface);
    border: 1px solid var(--kz-border);
    border-radius: var(--kz-radius);
    box-shadow: var(--kz-shadow);
    padding: 1rem;
}

.kz-section-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--kz-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.kz-btn-ghost {
    background: transparent;
    border: 1px solid var(--kz-border);
    color: var(--kz-fg-muted);
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.15s ease;
}
.kz-btn-ghost:hover {
    border-color: var(--kz-accent);
    color: var(--kz-fg);
    background: rgba(245,158,11,0.08);
}

/* ============================================================ */
/* TEMA CLARO (toggle)                                          */
/* ============================================================ */
html.theme-light {
    --kz-bg: #f7f5f3;
    --kz-surface: #ffffff;
    --kz-surface-2: #f3ebe6;
    --kz-border: #e8ddd6;
    --kz-fg: #1a1410;
    --kz-fg-muted: #6b5e56;
    --kz-accent: #f59e0b;
    --kz-accent-soft: #ffe5d6;
    --kz-accent-fg: #c43d00;
}
html.theme-light body {
    background-color: #f7f5f3 !important;
    color: #1a1410 !important;
}
html.theme-light .bg-slate-900,
html.theme-light .bg-slate-950 {
    background-color: #ffffff !important;
    color: #1a1410 !important;
}
html.theme-light .bg-slate-800 {
    background-color: #f3ebe6 !important;
}
html.theme-light .text-slate-200,
html.theme-light .text-slate-300,
html.theme-light .text-white {
    color: #1a1410 !important;
}
html.theme-light .text-slate-400,
html.theme-light .text-slate-500 {
    color: #475569 !important;
}
html.theme-light .border-slate-700,
html.theme-light .border-slate-800 {
    border-color: #e8ddd6 !important;
}

/* Inputs, selects, textareas */
html.theme-light input,
html.theme-light select,
html.theme-light textarea {
    background-color: #ffffff !important;
    color: #1a1410 !important;
    border-color: #e8ddd6 !important;
}

/* Tabelas */
html.theme-light table thead {
    background-color: #f3ebe6 !important;
    color: #475569 !important;
}
html.theme-light table tbody tr {
    border-color: #e8ddd6 !important;
}
html.theme-light table tbody tr:hover {
    background-color: #f3ebe6 !important;
}

/* Modais e painéis */
html.theme-light .bg-slate-900\/50,
html.theme-light .bg-slate-900\/80 {
    background-color: rgba(255,255,255,0.8) !important;
}

/* Textos muted */
html.theme-light .text-slate-400 { color: #475569 !important; }
html.theme-light .text-slate-500 { color: #64748b !important; }

/* Sombras mais suaves no claro */
html.theme-light .shadow-lg,
html.theme-light .shadow-xl,
html.theme-light .shadow-2xl {
    box-shadow: 0 1px 2px rgba(26,20,16,0.06), 0 8px 24px rgba(26,20,16,0.08) !important;
}

/* Botões primários mantêm accent */
html.theme-light .bg-amber-600 { background-color: #f59e0b !important; color: #1a1410 !important; }
html.theme-light .bg-blue-600 { background-color: #3b82f6 !important; color: #ffffff !important; }
html.theme-light .bg-green-600 { background-color: #22c55e !important; color: #ffffff !important; }
html.theme-light .bg-red-600 { background-color: #ef4444 !important; color: #ffffff !important; }

/* Hover states */
html.theme-light .hover\:bg-slate-800:hover,
html.theme-light .hover\:bg-slate-700:hover {
    background-color: #f3ebe6 !important;
}

/* Scrollbar no tema claro */
html.theme-light ::-webkit-scrollbar-track { background: #f7f5f3; }
html.theme-light ::-webkit-scrollbar-thumb { background: #e8ddd6; }
html.theme-light ::-webkit-scrollbar-thumb:hover { background: #c43d00; }

/* ============================================================ */
/* TEMA CLARO — COBERTURA COMPLETA (todos os blocos)           */
/* ============================================================ */
html.theme-light .bg-slate-950 { background-color: #ffffff !important; }
html.theme-light .bg-slate-900 { background-color: #f7f5f3 !important; }
html.theme-light .bg-slate-800 { background-color: #ffffff !important; }
html.theme-light .bg-slate-700 { background-color: #f3ebe6 !important; }

html.theme-light .text-white { color: #1a1410 !important; }
html.theme-light .text-slate-100 { color: #1a1410 !important; }
html.theme-light .text-slate-200 { color: #1a1410 !important; }
html.theme-light .text-slate-300 { color: #3d3129 !important; }

html.theme-light .border-slate-900 { border-color: #e8ddd6 !important; }
html.theme-light .border-slate-800 { border-color: #e8ddd6 !important; }
html.theme-light .border-slate-700 { border-color: #e8ddd6 !important; }
html.theme-light .border-slate-600 { border-color: #d6c9bf !important; }

/* Cards/painéis genéricos */
html.theme-light .bg-slate-900\/30,
html.theme-light .bg-slate-900\/40,
html.theme-light .bg-slate-900\/50,
html.theme-light .bg-slate-900\/60,
html.theme-light .bg-slate-900\/70,
html.theme-light .bg-slate-900\/80,
html.theme-light .bg-slate-800\/30,
html.theme-light .bg-slate-800\/40,
html.theme-light .bg-slate-800\/50,
html.theme-light .bg-slate-800\/60,
html.theme-light .bg-slate-800\/70,
html.theme-light .bg-slate-800\/80 {
    background-color: #ffffff !important;
}

/* Texto em blocos escuros */
html.theme-light .text-slate-400 { color: #475569 !important; }
html.theme-light .text-slate-500 { color: #64748b !important; }
html.theme-light .text-slate-600 { color: #475569 !important; }

/* Sombras */
html.theme-light .shadow-sm,
html.theme-light .shadow,
html.theme-light .shadow-md,
html.theme-light .shadow-lg,
html.theme-light .shadow-xl,
html.theme-light .shadow-2xl {
    box-shadow: 0 1px 2px rgba(26,20,16,0.06), 0 4px 12px rgba(26,20,16,0.08) !important;
}

/* Hover/focus */
html.theme-light .hover\:bg-slate-800:hover,
html.theme-light .hover\:bg-slate-700:hover,
html.theme-light .hover\:bg-slate-600:hover {
    background-color: #f3ebe6 !important;
}
html.theme-light .focus\:border-amber-500:focus,
html.theme-light .focus\:border-blue-500:focus {
    border-color: #f59e0b !important;
}

/* Tabelas */
html.theme-light table { color: #1a1410 !important; }
html.theme-light thead { background-color: #f3ebe6 !important; color: #475569 !important; }
html.theme-light tbody tr { border-color: #e8ddd6 !important; }
html.theme-light tbody tr:hover { background-color: #f7f5f3 !important; }

/* Inputs/selects/textareas */
html.theme-light input,
html.theme-light select,
html.theme-light textarea {
    background-color: #ffffff !important;
    color: #1a1410 !important;
    border-color: #e8ddd6 !important;
}

/* Modais */
html.theme-light .backdrop-blur-sm,
html.theme-light .backdrop-blur-xl {
    background-color: rgba(247,245,243,0.8) !important;
}

html.theme-light .bg-amber-900\/20 { background-color: rgba(217,119,6,0.2) !important; }
html.theme-light .bg-blue-900\/10 { background-color: rgba(37,99,235,0.1) !important; }
html.theme-light .bg-blue-900\/20 { background-color: rgba(37,99,235,0.2) !important; }
html.theme-light .bg-blue-900\/30 { background-color: rgba(37,99,235,0.3) !important; }
html.theme-light .bg-blue-900\/40 { background-color: rgba(37,99,235,0.4) !important; }
html.theme-light .bg-cyan-900\/40 { background-color: rgba(8,145,178,0.4) !important; }
html.theme-light .bg-emerald-900\/10 { background-color: rgba(5,150,105,0.1) !important; }
html.theme-light .bg-emerald-900\/20 { background-color: rgba(5,150,105,0.2) !important; }
html.theme-light .bg-emerald-900\/40 { background-color: rgba(5,150,105,0.4) !important; }
html.theme-light .bg-emerald-950\/5 { background-color: rgba(5,150,105,0.05) !important; }
html.theme-light .bg-green-900\/20 { background-color: rgba(22,163,74,0.2) !important; }
html.theme-light .bg-indigo-900 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/20 { background-color: rgba(79,70,229,0.2) !important; }
html.theme-light .bg-indigo-900\/40 { background-color: rgba(79,70,229,0.4) !important; }
html.theme-light .bg-orange-900\/40 { background-color: rgba(234,88,12,0.4) !important; }
html.theme-light .bg-purple-900\/40 { background-color: rgba(147,51,234,0.4) !important; }
html.theme-light .bg-red-900 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/20 { background-color: rgba(220,38,38,0.2) !important; }
html.theme-light .bg-red-900\/25 { background-color: rgba(220,38,38,0.25) !important; }
html.theme-light .bg-red-900\/30 { background-color: rgba(220,38,38,0.3) !important; }
html.theme-light .bg-red-900\/40 { background-color: rgba(220,38,38,0.4) !important; }
html.theme-light .bg-red-900\/50 { background-color: rgba(220,38,38,0.5) !important; }
html.theme-light .bg-red-900\/80 { background-color: rgba(220,38,38,0.8) !important; }
html.theme-light .bg-red-950\/30 { background-color: rgba(220,38,38,0.3) !important; }
html.theme-light .bg-red-950\/40 { background-color: rgba(220,38,38,0.4) !important; }
html.theme-light .bg-sky-900\/40 { background-color: rgba(2,132,199,0.4) !important; }
html.theme-light .bg-slate-700 { background-color: #f3ebe6 !important; }
html.theme-light .bg-slate-700\/40 { background-color: rgba(243,235,230,0.4) !important; }
html.theme-light .bg-slate-700\/50 { background-color: rgba(243,235,230,0.5) !important; }
html.theme-light .bg-slate-700\/60 { background-color: rgba(243,235,230,0.6) !important; }
html.theme-light .bg-slate-700\/80 { background-color: rgba(243,235,230,0.8) !important; }
html.theme-light .bg-slate-800 { background-color: #ffffff !important; }
html.theme-light .bg-slate-800\/20 { background-color: rgba(255,255,255,0.2) !important; }
html.theme-light .bg-slate-800\/30 { background-color: rgba(255,255,255,0.3) !important; }
html.theme-light .bg-slate-800\/40 { background-color: rgba(255,255,255,0.4) !important; }
html.theme-light .bg-slate-800\/50 { background-color: rgba(255,255,255,0.5) !important; }
html.theme-light .bg-slate-800\/60 { background-color: rgba(255,255,255,0.6) !important; }
html.theme-light .bg-slate-800\/70 { background-color: rgba(255,255,255,0.7) !important; }
html.theme-light .bg-slate-800\/80 { background-color: rgba(255,255,255,0.8) !important; }
html.theme-light .bg-slate-800\/90 { background-color: rgba(255,255,255,0.9) !important; }
html.theme-light .bg-slate-900 { background-color: #f7f5f3 !important; }
html.theme-light .bg-slate-900\/10 { background-color: rgba(247,245,243,0.1) !important; }
html.theme-light .bg-slate-900\/20 { background-color: rgba(247,245,243,0.2) !important; }
html.theme-light .bg-slate-900\/30 { background-color: rgba(247,245,243,0.3) !important; }
html.theme-light .bg-slate-900\/40 { background-color: rgba(247,245,243,0.4) !important; }
html.theme-light .bg-slate-900\/50 { background-color: rgba(247,245,243,0.5) !important; }
html.theme-light .bg-slate-900\/60 { background-color: rgba(247,245,243,0.6) !important; }
html.theme-light .bg-slate-900\/70 { background-color: rgba(247,245,243,0.7) !important; }
html.theme-light .bg-slate-900\/80 { background-color: rgba(247,245,243,0.8) !important; }
html.theme-light .bg-slate-900\/90 { background-color: rgba(247,245,243,0.9) !important; }
html.theme-light .bg-slate-900\/95 { background-color: rgba(247,245,243,0.95) !important; }
html.theme-light .bg-slate-950 { background-color: #ffffff !important; }
html.theme-light .bg-slate-950\/20 { background-color: rgba(255,255,255,0.2) !important; }
html.theme-light .bg-slate-950\/30 { background-color: rgba(255,255,255,0.3) !important; }
html.theme-light .bg-slate-950\/40 { background-color: rgba(255,255,255,0.4) !important; }
html.theme-light .bg-slate-950\/50 { background-color: rgba(255,255,255,0.5) !important; }
html.theme-light .bg-slate-950\/60 { background-color: rgba(255,255,255,0.6) !important; }
html.theme-light .bg-slate-950\/80 { background-color: rgba(255,255,255,0.8) !important; }
html.theme-light .bg-slate-950\/85 { background-color: rgba(255,255,255,0.85) !important; }
html.theme-light .bg-slate-950\/90 { background-color: rgba(255,255,255,0.9) !important; }
html.theme-light .bg-slate-950\/95 { background-color: rgba(255,255,255,0.95) !important; }
html.theme-light .border-amber-600\/30 { border-color: rgba(217,119,6,0.3) !important; }
html.theme-light .border-blue-600\/30 { border-color: rgba(37,99,235,0.3) !important; }
html.theme-light .border-blue-900\/50 { border-color: rgba(37,99,235,0.5) !important; }
html.theme-light .border-cyan-900\/30 { border-color: rgba(8,145,178,0.3) !important; }
html.theme-light .border-emerald-700\/40 { border-color: rgba(5,150,105,0.4) !important; }
html.theme-light .border-emerald-900\/30 { border-color: rgba(5,150,105,0.3) !important; }
html.theme-light .border-green-600\/30 { border-color: rgba(22,163,74,0.3) !important; }
html.theme-light .border-indigo-700\/40 { border-color: rgba(79,70,229,0.4) !important; }
html.theme-light .border-indigo-900\/30 { border-color: rgba(79,70,229,0.3) !important; }
html.theme-light .border-orange-900\/30 { border-color: rgba(234,88,12,0.3) !important; }
html.theme-light .border-purple-900\/30 { border-color: rgba(147,51,234,0.3) !important; }
html.theme-light .border-red-600\/30 { border-color: rgba(220,38,38,0.3) !important; }
html.theme-light .border-red-900\/30 { border-color: rgba(220,38,38,0.3) !important; }
html.theme-light .border-red-900\/40 { border-color: rgba(220,38,38,0.4) !important; }
html.theme-light .border-red-900\/50 { border-color: rgba(220,38,38,0.5) !important; }
html.theme-light .border-sky-700\/40 { border-color: rgba(2,132,199,0.4) !important; }
html.theme-light .border-sky-900\/30 { border-color: rgba(2,132,199,0.3) !important; }
html.theme-light .border-slate-600 { border-color: #d6c9bf !important; }
html.theme-light .border-slate-700 { border-color: #e8ddd6 !important; }
html.theme-light .border-slate-700\/50 { border-color: rgba(232,221,214,0.5) !important; }
html.theme-light .border-slate-700\/70 { border-color: rgba(232,221,214,0.7) !important; }
html.theme-light .border-slate-700\/80 { border-color: rgba(232,221,214,0.8) !important; }
html.theme-light .border-slate-800 { border-color: #e8ddd6 !important; }
html.theme-light .border-slate-800\/60 { border-color: rgba(232,221,214,0.6) !important; }
html.theme-light .border-slate-800\/80 { border-color: rgba(232,221,214,0.8) !important; }
html.theme-light .border-slate-950 { border-color: #e8ddd6 !important; }
html.theme-light .from-slate-700 { --tw-gradient-from: #f7f5f3; }
html.theme-light .from-slate-800 { --tw-gradient-from: #ffffff; }
html.theme-light .from-slate-800\/30 { --tw-gradient-from: #ffffff; }
html.theme-light .from-slate-900 { --tw-gradient-from: #ffffff; }
html.theme-light .from-slate-950 { --tw-gradient-from: #ffffff; }
html.theme-light .text-amber-300 { color: #d97706 !important; }
html.theme-light .text-amber-400 { color: #d97706 !important; }
html.theme-light .text-amber-400\/50 { color: rgba(217,119,6,0.5) !important; }
html.theme-light .text-amber-400\/70 { color: rgba(217,119,6,0.7) !important; }
html.theme-light .text-amber-50 { color: #d97706 !important; }
html.theme-light .text-blue-200 { color: #2563eb !important; }
html.theme-light .text-blue-300 { color: #2563eb !important; }
html.theme-light .text-blue-400 { color: #2563eb !important; }
html.theme-light .text-blue-50 { color: #2563eb !important; }
html.theme-light .text-cyan-300 { color: #0891b2 !important; }
html.theme-light .text-cyan-400 { color: #0891b2 !important; }
html.theme-light .text-emerald-300 { color: #059669 !important; }
html.theme-light .text-emerald-400 { color: #059669 !important; }
html.theme-light .text-emerald-50 { color: #059669 !important; }
html.theme-light .text-fuchsia-400 { color: #c026d3 !important; }
html.theme-light .text-green-400 { color: #16a34a !important; }
html.theme-light .text-green-50 { color: #16a34a !important; }
html.theme-light .text-indigo-100 { color: #4f46e5 !important; }
html.theme-light .text-indigo-300 { color: #4f46e5 !important; }
html.theme-light .text-indigo-400 { color: #4f46e5 !important; }
html.theme-light .text-indigo-50 { color: #4f46e5 !important; }
html.theme-light .text-orange-300 { color: #ea580c !important; }
html.theme-light .text-orange-400 { color: #ea580c !important; }
html.theme-light .text-orange-50 { color: #ea580c !important; }
html.theme-light .text-purple-300 { color: #9333ea !important; }
html.theme-light .text-purple-400 { color: #9333ea !important; }
html.theme-light .text-purple-50 { color: #9333ea !important; }
html.theme-light .text-red-100 { color: #dc2626 !important; }
html.theme-light .text-red-200 { color: #dc2626 !important; }
html.theme-light .text-red-300 { color: #dc2626 !important; }
html.theme-light .text-red-300\/60 { color: rgba(220,38,38,0.6) !important; }
html.theme-light .text-red-400 { color: #dc2626 !important; }
html.theme-light .text-red-400\/70 { color: rgba(220,38,38,0.7) !important; }
html.theme-light .text-red-50 { color: #dc2626 !important; }
html.theme-light .text-rose-400 { color: #e11d48 !important; }
html.theme-light .text-sky-300 { color: #0284c7 !important; }
html.theme-light .text-sky-400 { color: #0284c7 !important; }
html.theme-light .text-slate-100 { color: #1a1410 !important; }
html.theme-light .text-slate-200 { color: #1a1410 !important; }
html.theme-light .text-slate-300 { color: #3d3129 !important; }
html.theme-light .text-slate-400 { color: #475569 !important; }
html.theme-light .text-slate-50 { color: #475569 !important; }
html.theme-light .text-teal-400 { color: #0d9488 !important; }
html.theme-light .text-teal-50 { color: #0d9488 !important; }
html.theme-light .text-violet-400 { color: #7c3aed !important; }
html.theme-light .text-yellow-300 { color: #ca8a04 !important; }
html.theme-light .text-yellow-400 { color: #ca8a04 !important; }
html.theme-light .text-yellow-50 { color: #ca8a04 !important; }
html.theme-light .to-slate-900 { --tw-gradient-to: #ffffff; }
html.theme-light .via-slate-900\/40 { --tw-gradient-via: #ffffff; }
html.theme-light .via-slate-900\/60 { --tw-gradient-via: #ffffff; }

html.theme-light .bg-red-900\/10 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/20 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/25 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/30 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/40 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/50 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/80 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-900\/90 { background-color: #fef2f2 !important; }
html.theme-light .bg-orange-900\/10 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/20 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/25 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/30 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/40 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/50 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/80 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-900\/90 { background-color: #fff7ed !important; }
html.theme-light .bg-amber-900\/10 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/20 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/25 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/30 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/40 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/50 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/80 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-900\/90 { background-color: #fffbeb !important; }
html.theme-light .bg-yellow-900\/10 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/20 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/25 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/30 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/40 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/50 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/80 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-900\/90 { background-color: #fefce8 !important; }
html.theme-light .bg-lime-900\/10 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/20 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/25 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/30 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/40 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/50 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/80 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-900\/90 { background-color: #f7fee7 !important; }
html.theme-light .bg-green-900\/10 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/20 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/25 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/30 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/40 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/50 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/80 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-900\/90 { background-color: #f0fdf4 !important; }
html.theme-light .bg-emerald-900\/10 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/20 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/25 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/30 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/40 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/50 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/80 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-900\/90 { background-color: #ecfdf5 !important; }
html.theme-light .bg-teal-900\/10 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/20 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/25 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/30 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/40 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/50 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/80 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-900\/90 { background-color: #f0fdfa !important; }
html.theme-light .bg-cyan-900\/10 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/20 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/25 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/30 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/40 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/50 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/80 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-900\/90 { background-color: #ecfeff !important; }
html.theme-light .bg-sky-900\/10 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/20 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/25 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/30 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/40 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/50 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/80 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-900\/90 { background-color: #f0f9ff !important; }
html.theme-light .bg-blue-900\/10 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/20 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/25 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/30 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/40 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/50 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/80 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-900\/90 { background-color: #eff6ff !important; }
html.theme-light .bg-indigo-900\/10 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/20 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/25 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/30 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/40 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/50 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/80 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-900\/90 { background-color: #eef2ff !important; }
html.theme-light .bg-violet-900\/10 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/20 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/25 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/30 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/40 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/50 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/80 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-900\/90 { background-color: #f5f3ff !important; }
html.theme-light .bg-purple-900\/10 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/20 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/25 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/30 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/40 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/50 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/80 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-900\/90 { background-color: #faf5ff !important; }
html.theme-light .bg-fuchsia-900\/10 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/20 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/25 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/30 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/40 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/50 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/80 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-900\/90 { background-color: #fdf4ff !important; }
html.theme-light .bg-pink-900\/10 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/20 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/25 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/30 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/40 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/50 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/80 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-900\/90 { background-color: #fdf2f8 !important; }
html.theme-light .bg-rose-900\/10 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/20 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/25 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/30 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/40 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/50 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/80 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-900\/90 { background-color: #fff1f2 !important; }
html.theme-light .bg-red-900 { background-color: #fef2f2 !important; }
html.theme-light .bg-red-800 { background-color: #fef2f2 !important; }
html.theme-light .bg-orange-900 { background-color: #fff7ed !important; }
html.theme-light .bg-orange-800 { background-color: #fff7ed !important; }
html.theme-light .bg-amber-900 { background-color: #fffbeb !important; }
html.theme-light .bg-amber-800 { background-color: #fffbeb !important; }
html.theme-light .bg-yellow-900 { background-color: #fefce8 !important; }
html.theme-light .bg-yellow-800 { background-color: #fefce8 !important; }
html.theme-light .bg-lime-900 { background-color: #f7fee7 !important; }
html.theme-light .bg-lime-800 { background-color: #f7fee7 !important; }
html.theme-light .bg-green-900 { background-color: #f0fdf4 !important; }
html.theme-light .bg-green-800 { background-color: #f0fdf4 !important; }
html.theme-light .bg-emerald-900 { background-color: #ecfdf5 !important; }
html.theme-light .bg-emerald-800 { background-color: #ecfdf5 !important; }
html.theme-light .bg-teal-900 { background-color: #f0fdfa !important; }
html.theme-light .bg-teal-800 { background-color: #f0fdfa !important; }
html.theme-light .bg-cyan-900 { background-color: #ecfeff !important; }
html.theme-light .bg-cyan-800 { background-color: #ecfeff !important; }
html.theme-light .bg-sky-900 { background-color: #f0f9ff !important; }
html.theme-light .bg-sky-800 { background-color: #f0f9ff !important; }
html.theme-light .bg-blue-900 { background-color: #eff6ff !important; }
html.theme-light .bg-blue-800 { background-color: #eff6ff !important; }
html.theme-light .bg-indigo-900 { background-color: #eef2ff !important; }
html.theme-light .bg-indigo-800 { background-color: #eef2ff !important; }
html.theme-light .bg-violet-900 { background-color: #f5f3ff !important; }
html.theme-light .bg-violet-800 { background-color: #f5f3ff !important; }
html.theme-light .bg-purple-900 { background-color: #faf5ff !important; }
html.theme-light .bg-purple-800 { background-color: #faf5ff !important; }
html.theme-light .bg-fuchsia-900 { background-color: #fdf4ff !important; }
html.theme-light .bg-fuchsia-800 { background-color: #fdf4ff !important; }
html.theme-light .bg-pink-900 { background-color: #fdf2f8 !important; }
html.theme-light .bg-pink-800 { background-color: #fdf2f8 !important; }
html.theme-light .bg-rose-900 { background-color: #fff1f2 !important; }
html.theme-light .bg-rose-800 { background-color: #fff1f2 !important; }


/* ============================================================ */
/* TEMA CLARO — superficies escuras hardcoded (atualizacoes/aura/aluno) */
/* ============================================================ */
html.theme-light .kz-panel { background: #ffffff !important; border-color: #e8ddd6 !important; box-shadow: 0 1px 2px rgba(26,20,16,0.06), 0 4px 12px rgba(26,20,16,0.08) !important; }
html.theme-light .kz-panel:hover { border-color: #d6c9bf !important; }
html.theme-light .kz-upd__entry { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .kz-upd__feed { background: #f7f5f3 !important; }
html.theme-light .kz-toolbar { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .note-form-panel { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .kanban-card { background-color: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .calendar-grid { background: #f7f5f3 !important; border-color: #e8ddd6 !important; }
html.theme-light .aviso-item { background: rgba(0,0,0,0.04) !important; }


html.theme-light .kanban-column { background-color: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .note-card { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .page-btn { background: #ffffff !important; border-color: #e8ddd6 !important; color: #1a1410 !important; }
html.theme-light .kz-select option { background: #ffffff !important; color: #1a1410 !important; }

html.theme-light .kz-news__eyebrow { background: rgba(37,99,235,0.12) !important; color: #1d4ed8 !important; border-color: rgba(37,99,235,0.3) !important; }


html.theme-light .kz-upd__head { background: linear-gradient(180deg, rgba(247,245,243,0.9) 0%, rgba(247,245,243,0.6) 100%) !important; border-color: #e8ddd6 !important; }
html.theme-light .kz-upd__head:hover { background: linear-gradient(180deg, rgba(243,235,230,0.9) 0%, rgba(243,235,230,0.6) 100%) !important; }
html.theme-light .kz-upd__ver { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important; color: #ffffff !important; }
html.theme-light .kz-upd__headtitle { color: #1a1410 !important; }
html.theme-light .kz-upd__chev { color: #64748b !important; }


html.theme-light .kz-adm { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light #kz-adm-msg { background: #ffffff !important; color: #1a1410 !important; border-color: #e8ddd6 !important; }


html.theme-light .kz-seg { background: rgba(243,235,230,0.8) !important; border-color: #e8ddd6 !important; }
html.theme-light .kz-seg__btn { color: #475569 !important; }
html.theme-light .kz-seg__btn:hover { color: #1a1410 !important; background: rgba(243,235,230,0.9) !important; }
html.theme-light .kz-seg__btn.is-active { color: #ffffff !important; background: linear-gradient(180deg, #3b82f6, #2563eb) !important; }


html.theme-light .podium-card { background: #ffffff !important; border-color: #e8ddd6 !important; }
html.theme-light .podium-1 { background: linear-gradient(to top, #ffffff, rgba(250,204,21,0.1)) !important; }
html.theme-light .podium-2 { background: linear-gradient(to top, #ffffff, rgba(148,163,184,0.1)) !important; }
html.theme-light .podium-3 { background: linear-gradient(to top, #ffffff, rgba(180,83,9,0.1)) !important; }
html.theme-light .aura-list-item { background: #ffffff !important; border-color: #e8ddd6 !important; }


html.theme-light .custom-html-content { color: #334155 !important; }
html.theme-light .custom-html-content h1, html.theme-light .custom-html-content h2 { color: #1d4ed8 !important; border-color: #e8ddd6 !important; }
html.theme-light .custom-html-content h3 { color: #334155 !important; }
html.theme-light .custom-html-content strong { color: #1a1410 !important; }

html.theme-light .nav-item-btn.bg-slate-800\/50 { background-color: #f3ebe6 !important; }
/* ============================================================ */
/* TEMA CLARO — ajustes finais por página                        */
/* ============================================================ */
/* Cabeçalho: mesma cor em toda a faixa; sem "corte" atrás do menu */
html.theme-light header {
    background-color: #f7f5f3 !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e8ddd6 !important;
}
html.theme-light #mobile-menu-container { background-color: #f7f5f3 !important; }
@media (min-width: 768px) {
    html.theme-light #mobile-menu-container {
        background-color: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }
}
html.theme-light .nav-item-btn { background-color: transparent !important; }
html.theme-light .nav-item-btn.border-blue-500 {
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(26,20,16,0.06) !important;
}
html.theme-light #aura-container {
    background-color: #ffffff !important;
    border-color: #e8ddd6 !important;
    box-shadow: none !important;
}

/* Gestão Aura: fundo claro e itens */
html.theme-light .bg-\[\#0f172a\] { background-color: #f7f5f3 !important; }
html.theme-light .kz-list-pane,
html.theme-light .kz-toolbar,
html.theme-light .kz-seg,
html.theme-light .kz-empty,
html.theme-light #cont-filter-fav { background-color: #ffffff !important; border-color: #e8ddd6 !important; }

/* Conteúdos: lista de itens em cor clara */
html.theme-light .kz-list-pane [class*="bg-slate-"],
html.theme-light .kz-list-pane [class*="bg-blue-"] { background-color: #ffffff !important; }

/* Atualizações: textos mais escuros */
html.theme-light #atualizacoes-content .kz-upd__headtitle,
html.theme-light #atualizacoes-content .kz-upd__p,
html.theme-light #atualizacoes-content .kz-upd__li,
html.theme-light #atualizacoes-content .kz-upd__escopo { color: #1a1410 !important; }
html.theme-light #atualizacoes-content .kz-upd__sectitle,
html.theme-light #atualizacoes-content .kz-upd__body .kz-upd__sectitle { color: #b45309 !important; }
html.theme-light #atualizacoes-content [class*="text-slate-"],
html.theme-light #atualizacoes-content [class*="text-sky-"],
html.theme-light #atualizacoes-content [class*="text-blue-"] { color: #334155 !important; }
html.theme-light #atualizacoes-content .kz-upd__body,
html.theme-light #atualizacoes-content .kz-upd__body * { color: #334155 !important; }
html.theme-light #atualizacoes-content .kz-upd__body strong,
html.theme-light #atualizacoes-content .kz-upd__body h1,
html.theme-light #atualizacoes-content .kz-upd__body h2,
html.theme-light #atualizacoes-content .kz-upd__body h3 { color: #1a1410 !important; }
html.theme-light #atualizacoes-content .kz-upd__body code { color: #1d4ed8 !important; }

/* Projetos: textos mais escuros (lista e leitura) */
html.theme-light #projetos-content [class*="text-slate-"],
html.theme-light #projetos-content [class*="text-sky-"],
html.theme-light #projetos-content [class*="text-blue-"],
html.theme-light #projeto-detalhes-view [class*="text-slate-"] { color: #334155 !important; }
html.theme-light #projeto-detalhes-view h2,
html.theme-light #detalheProjTitulo { color: #1a1410 !important; }

/* Aluno Tech: KPIs sem azul */
html.theme-light .kz-kpi {
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #e8ddd6 !important;
}
html.theme-light .kz-kpi::before { background: linear-gradient(180deg, #94a3b8, #cbd5e1) !important; }
html.theme-light .kz-kpi__icon--blue { background: #f1f5f9 !important; color: #475569 !important; }

/* Atualizações: destaque de escopo e chips de arquivo sem azul */
html.theme-light .kz-upd__escopo {
    border-left-color: #f59e0b !important;
    background: rgba(245,158,11,0.10) !important;
    color: #1a1410 !important;
}
html.theme-light .kz-upd__file {
    background: #ffffff !important;
    border-color: #e8ddd6 !important;
    color: #475569 !important;
}

/* Conteúdos: itens da lista (Músicas/Podcasts) em cor clara */
html.theme-light .kz-track {
    background: #ffffff !important;
    border-color: #e8ddd6 !important;
}
html.theme-light .kz-track:hover { background: #f3ebe6 !important; }
html.theme-light .kz-track.is-playing {
    background: #fff7ed !important;
    border-color: #f59e0b !important;
}
html.theme-light .kz-track__title { color: #1a1410 !important; }
html.theme-light .kz-track.is-playing .kz-track__title { color: #b45309 !important; }
html.theme-light .kz-track__sub,
html.theme-light .kz-track__dur { color: #64748b !important; }
html.theme-light .kz-track__art { background: #f3ebe6 !important; border-color: #e8ddd6 !important; }
html.theme-light .kz-track__art i { color: #94a3b8 !important; }
html.theme-light .kz-eq span { background: #f59e0b !important; }

/* Aluno Tech: sem azul nos títulos, abas e destaques */
html.theme-light #dashboard-aluno [class*="text-blue-"] { color: #334155 !important; }
html.theme-light #dashboard-aluno .aluno-tab-btn.active { border-bottom-color: #b45309 !important; color: #1a1410 !important; }
html.theme-light #dashboard-aluno #btn-edit-profile { background-color: #b45309 !important; }

/* Horário escolar: grade clara (sem azul/cinza escuro) */
html.theme-light .horario-tabela th {
    background-color: #f3ebe6 !important;
    color: #1a1410 !important;
    border: 1px solid #e8ddd6 !important;
}
html.theme-light .horario-tabela th.hoje,
html.theme-light .horario-tabela th.bg-blue-600 {
    background-color: #f59e0b !important;
    color: #1a1410 !important;
    box-shadow: 0 2px 8px rgba(245,158,11,0.35) !important;
}
html.theme-light .horario-tabela td {
    background-color: #ffffff !important;
    border: 1px solid #e8ddd6 !important;
}
html.theme-light .horario-tabela td:hover { background-color: #faf7f5 !important; }
html.theme-light .horario-tabela td.hoje,
html.theme-light .horario-tabela td.bg-blue-900\/20 {
    background-color: #fff7ed !important;
    border-color: #f59e0b !important;
}
html.theme-light .aula-card {
    background-color: #ffffff !important;
    border: 1px solid #e8ddd6 !important;
    border-left: 4px solid #f59e0b !important;
    box-shadow: 0 1px 2px rgba(26,20,16,0.06) !important;
}
html.theme-light .aula-card h4 { color: #1a1410 !important; }
html.theme-light .aula-card p { color: #6b5e56 !important; }

/* Conteúdos: cards de material e paginação em modo claro */
html.theme-light .kz-mcard {
    background-color: #ffffff !important;
    border-color: #e8ddd6 !important;
    box-shadow: 0 1px 2px rgba(26,20,16,0.06), 0 4px 12px rgba(26,20,16,0.06) !important;
}
html.theme-light .kz-mcard:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 10px 28px rgba(26,20,16,0.12) !important;
}
html.theme-light .kz-mcard__cover { background-color: #f3ebe6 !important; }
html.theme-light .kz-mcard__cover::after {
    background: linear-gradient(to top, rgba(255,255,255,0.95), transparent 62%) !important;
}
html.theme-light .kz-mcard__meta { color: #6b5e56 !important; }
html.theme-light .kz-mcard__title { color: #1a1410 !important; }
html.theme-light #cont-mat-pagination button { color: #b45309 !important; }
html.theme-light #cont-mat-pagination button:hover { background-color: #fff7ed !important; color: #92400e !important; }
html.theme-light #cont-mat-pagination button:disabled { color: #cbd5e1 !important; background-color: transparent !important; }
html.theme-light #cont-mat-pagination .text-blue-400 { color: #b45309 !important; }

/* ---- Contador de 30s do modo imersivo ---- */
.kz-immersive-timer {
    position: absolute;
    z-index: 135;
    left: clamp(1rem, 5vw, 4rem);
    bottom: clamp(1rem, 4vh, 2.5rem);
    width: min(22rem, 62vw);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.kz-immersive-timer.is-visible { opacity: 1; }
.kz-immersive-timer__track {
    height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    overflow: hidden;
}
.kz-immersive-timer__fill {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
    transform-origin: left center;
}
.kz-immersive-timer__label {
    margin-top: .5rem;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #94a3b8;
    text-shadow: 0 2px 10px rgba(0,0,0,.9);
}

/* ---- Painel de detalhes da noticia ---- */
/* ATENÇÃO (bug corrigido): este painel ficava ATRÁS do card ampliado
   (z-index 100 vs 60) e nunca recebia `pointer-events: auto` — o botão
   ficava visível mas totalmente inclicável, e não dava para fechar
   clicando na imagem. Acima: card 100 < painel 130 < sair 140. */
.kz-news {
    position: absolute;
    z-index: 130;
    top: clamp(1rem, 6vh, 4rem);
    left: clamp(1rem, 5vw, 4rem);
    max-width: min(40rem, 60vw);
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 600ms ease, transform 700ms cubic-bezier(.16,1,.3,1);
}
/* `pointer-events: auto` AQUI é o que torna o botão clicável de verdade. */
.kz-news.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
/* O texto não é interativo: evita "capturar" o clique de fechar. */
.kz-news__eyebrow,
.kz-news__title,
.kz-news__text { pointer-events: none; }
.kz-news__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,.4);
    background: rgba(30,58,138,.28);
    border-radius: 999px;
    padding: .3rem .7rem;
    margin-bottom: .85rem;
    backdrop-filter: blur(6px);
}
.kz-news__title {
    margin: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.02em;
    text-shadow: 0 6px 26px rgba(0,0,0,.9);
    font-size: clamp(1.5rem, 4.6vw, 3.4rem);
}
.kz-news__text {
    margin: .85rem 0 0;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 34rem;
    text-shadow: 0 2px 12px rgba(0,0,0,.95);
    font-size: clamp(.78rem, 1.6vw, 1rem);
}
.kz-news__cta {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.4rem;
    padding: .8rem 1.6rem;
    border-radius: .6rem;
    background: #2563eb;
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    border: 1px solid rgba(147,197,253,.45);
    box-shadow: 0 12px 34px rgba(37,99,235,.4);
    transition: all .25s ease;
}
.kz-news__cta:hover { background: #3b82f6; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(37,99,235,.55); }

/* ---- Tablet / celular: peek indica que ha mais conteudo ---- */
@media (max-width: 767px) {
    .kz-card { width: clamp(9.5rem, 46vw, 13rem); }
    .kz-card.is-active { transform: scale(1.04); }
    .kz-hero__intro { max-width: 88vw; }
    .kz-news { max-width: 86vw; }
    .kz-rail__hint { display: none; }
    .kz-rail__head { padding-bottom: .5rem; }
    .kz-rail__viewport { padding-bottom: .5rem; }
}

@media (max-width: 380px) {
    .kz-card { width: 62vw; }
}

/* ---- Acessibilidade: respeita quem pediu menos movimento ---- */
@media (prefers-reduced-motion: reduce) {
    .kz-hero__bg.is-on.kz-kenburns { animation: none; }
    .kz-card,
    .kz-hero__bg,
    .kz-hero__intro,
    .kz-rail,
    .kz-news,
    .kz-card__img { transition-duration: .01ms !important; animation: none !important; }
}


/* ============================================================== */
/* COMPONENTE: GESTÃO DE AURA                                     */
/* ============================================================== */

/* Para garantir que não haja scroll na tela inteira, o CSS já deve tratar o #app-main, mas reforçamos o container de Gestão Aura */
#gestao-aura-content {
    overflow: hidden; /* Remove o scroll duplo */
}

/* Botões da sub-aba Aura */
.aura-subtab-btn { border-bottom: 2px solid transparent; }
.aura-subtab-btn.active { border-bottom-color: #3b82f6; }
.aura-tab-content { display: none; }
.aura-tab-content.active { display: flex; animation: fadeIn 0.3s ease-out forwards; }

/* Layout Geral - Ajuste para responsividade extrema */
@media (max-width: 1024px) {
    #aura-tab-ranking {
        flex-direction: column;
    }
    .podium-card {
        width: 30%;
        max-width: none;
    }
    .podium-1 { height: 220px; }
    .podium-2 { height: 180px; }
    .podium-3 { height: 140px; }
    #aura-podium-container {
        min-height: 250px;
    }
}

/* Pódio do Top 3 */
.podium-card {
    background: #1e293b; 
    border-radius: 12px 12px 0 0;
    padding: 15px 10px;
    text-align: center;
    width: 30%;
    max-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.4);
    position: relative;
    border: 1px solid #334155;
    border-bottom: none;
    min-height: 220px;
    height: auto;
    padding-bottom: 10px;
    transition: all 0.3s ease;
}

/* Alturas e Bordas do Pódio */
@media (min-width: 1025px) {
    .podium-1 { height: 280px; border-top: 4px solid #facc15; z-index: 3; background: linear-gradient(to top, #1e293b, rgba(250, 204, 21, 0.1)); }
    .podium-2 { height: 220px; border-top: 4px solid #94a3b8; z-index: 2; background: linear-gradient(to top, #1e293b, rgba(148, 163, 184, 0.1)); }
    .podium-3 { height: 170px; border-top: 4px solid #b45309; z-index: 1; background: linear-gradient(to top, #1e293b, rgba(180, 83, 9, 0.1)); }
}
@media (max-width: 1024px) {
    .podium-1 { border-top: 4px solid #facc15; z-index: 3; background: linear-gradient(to top, #1e293b, rgba(250, 204, 21, 0.1)); }
    .podium-2 { border-top: 4px solid #94a3b8; z-index: 2; background: linear-gradient(to top, #1e293b, rgba(148, 163, 184, 0.1)); }
    .podium-3 { border-top: 4px solid #b45309; z-index: 1; background: linear-gradient(to top, #1e293b, rgba(180, 83, 9, 0.1)); }
}

/* Círculo do Número da Posição */
.podium-pos {
    position: absolute;
    top: -25px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    color: #0f172a; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 3px solid #0f172a;
}
@media (min-width: 768px) {
    .podium-pos { width: 50px; height: 50px; font-size: 1.5rem; top: -25px; }
}

.podium-1 .podium-pos { background: #facc15; }
.podium-2 .podium-pos { background: #cbd5e1; }
.podium-3 .podium-pos { background: #d97706; }

/* Item da Lista dos Demais */
.aura-list-item {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
    margin-bottom: 8px; /* Ajuste para espaçamento consistente */
}
.aura-list-item:hover { 
    transform: translateX(5px); 
    border-color: #3b82f6; 
    background: rgba(30, 41, 59, 0.9);
}
/* Centralização vertical dos nomes se houver poucos */
.podium-card .custom-scroll {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==========================================
   EFEITOS ESPECIAIS DE BORDAS (LOJA DE AURA)
   ========================================== */

/* 1. RAINBOW ANIMATED (WEB.DEV) */
.border-rainbow {
    position: relative;
    border: 3px solid transparent !important;
    background-image: linear-gradient(#0f172a, #0f172a), 
                      linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: rainbow-move 3s linear infinite;
    background-size: 200% auto;
}

@keyframes rainbow-move {
    to { background-position: 200% center; }
}

/* 2. FOGO VALIRIANO (PULSE VERDE) */
.border-valiriano {
    border: 2px solid #10b981 !important;
    box-shadow: inset 0 0 15px #059669, 0 0 20px #10b98180;
    animation: valiriano-glow 2s ease-in-out infinite alternate;
}

@keyframes valiriano-glow {
    from { box-shadow: inset 0 0 10px #059669, 0 0 10px #10b98140; }
    to { box-shadow: inset 0 0 25px #059669, 0 0 30px #10b98190; }
}

/* 3. NEON CYBERPUNK (ROTATIVO) */
.border-cyberpunk {
    border: 2px solid #06b6d4 !important;
    box-shadow: 0 0 15px #06b6d4, 0 0 5px #f5d0fe;
    animation: cyberpunk-flicker 4s infinite;
}

@keyframes cyberpunk-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
    20%, 22%, 24%, 55% { opacity: 0.8; box-shadow: none; }
}

/* ESTILOS PARA OS TEMAS DE PERFIL */
.theme-hacker { background-color: #000 !important; color: #10b981 !important; border-color: #10b981 !important; font-family: 'Fira Code', monospace !important; }
.theme-arcano { background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%) !important; border-color: #f59e0b !important; }







/* ============================================================== */
/* COMPONENTE: TCG (TRADING CARD GAME)                            */
/* ============================================================== */

.tcg-card {
    aspect-ratio: 2.5 / 3.5;
    position: relative;
    border-radius: 0.75rem; /* 12px */
    overflow: hidden;
    background-color: #1e293b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, filter 0.3s;
    cursor: pointer;
    border: 3px solid transparent;
}

.tcg-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    z-index: 10;
}

/* Estado de Carta Bloqueada (Aluno não conquistou) */
.tcg-card.locked {
    filter: grayscale(100%) brightness(0.4) contrast(1.2);
    box-shadow: none;
    border-color: #334155 !important;
}
.tcg-card.locked:hover {
    transform: none;
    cursor: not-allowed;
}
.tcg-lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
    z-index: 20;
}

/* Bordas baseadas na Raridade */
.rarity-comum { border-color: #94a3b8; } /* Slate 400 */
.rarity-incomum { border-color: #4ade80; } /* Green 400 */
.rarity-rara { border-color: #3b82f6; } /* Blue 500 */
.rarity-epica { border-color: #a855f7; } /* Purple 500 */
.rarity-lendaria { 
    border-color: #fbbf24; /* Amber 400 */
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

/* O Badge com a quantidade de cartas (Design Limitless TCG) */
.tcg-badge-qty {
    position: absolute;
    bottom: -5px;
    left: 10px;
    background-color: #dc2626; /* Red da imagem base */
    color: white;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 2px 10px;
    border-radius: 4px 4px 0 0;
    z-index: 30;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.5);
    border: 1px solid #7f1d1d;
    border-bottom: none;
}

/* ============================================================== */
/* EFEITO FOIL (HOLOGRÁFICO) PARA CARTAS RARAS E LENDÁRIAS        */
/* ============================================================== */
.tcg-foil {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    opacity: 0;
    transition: opacity 0.3s;
}

.tcg-card:hover .tcg-foil {
    opacity: 1;
}

/* Brilho Animado para Lendárias */
.rarity-lendaria .tcg-foil {
    opacity: 0.8; /* Sempre um pouco visível */
    background: linear-gradient(
        125deg, 
        rgba(255,0,0,0.3) 0%, 
        rgba(255,200,0,0.4) 20%, 
        rgba(0,255,0,0.3) 40%, 
        rgba(0,255,255,0.4) 60%, 
        rgba(0,0,255,0.3) 80%, 
        rgba(255,0,255,0.4) 100%
    );
    background-size: 200% 200%;
    animation: holo-move 4s ease infinite alternate;
}

@keyframes holo-move {
    0% { background-position: 0% 0%; filter: hue-rotate(0deg); }
    100% { background-position: 100% 100%; filter: hue-rotate(90deg); }
}

/* Reflexo diagonal para cartas Épicas e Raras */
.rarity-epica .tcg-foil,
.rarity-rara .tcg-foil {
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.4) 25%,
        rgba(255,255,255,0.6) 50%,
        transparent 55%
    );
    background-size: 300% 300%;
    background-position: 100% 100%;
    transition: background-position 0.6s ease-out;
}

.tcg-card:hover.rarity-epica .tcg-foil,
.tcg-card:hover.rarity-rara .tcg-foil {
    background-position: 0% 0%;
}

/* ==============================================================
   TELA DE MANUTENÇÃO  +  PÁGINA DE ATUALIZAÇÕES  (v1.6.0)
   ==============================================================
   Bloqueio do site, painel de manutenção para Admin/Moderador
   e o feed público de novidades alimentado pelo changelog.json
   (gerado a partir do CHANGELOG.md por tools/build_changelog.py).
   ============================================================== */

/* ---------- A. Overlay de manutenção (tela cheia) ---------- */
.kz-mnt {
    position: fixed;
    inset: 0;
    z-index: 4000;              /* acima do header (50) e do dock (2000) */
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: #020617;
    isolation: isolate;
}
.kz-mnt.is-on { display: flex; }

/* Camada da imagem (usa data-img do HTML; cai no gradiente se faltar o arquivo) */
.kz-mnt__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--kz-mnt-img, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.06);
    animation: kz-mnt-kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes kz-mnt-kenburns {
    0%   { transform: scale(1.04) translate3d(0, 0, 0); }
    100% { transform: scale(1.14) translate3d(-1.8%, -1.2%, 0); }
}

/* Véu para o texto respirar sobre qualquer imagem */
.kz-mnt__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(2,6,23,.99) 0%, rgba(2,6,23,.86) 32%, rgba(2,6,23,.62) 68%, rgba(2,6,23,.86) 100%),
        linear-gradient(to right, rgba(2,6,23,.92) 0%, rgba(2,6,23,.5) 55%, transparent 100%);
}

.kz-mnt__inner {
    position: relative;
    z-index: 2;
    width: min(56rem, 100%);
    margin: auto;
    padding: clamp(1.25rem, 4vh, 3rem) clamp(1rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(.7rem, 1.8vh, 1.15rem);
}

.kz-mnt__badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    background: rgba(217,119,6,.14);
    border: 1px solid rgba(245,158,11,.5);
    color: #fcd34d;
    font-size: clamp(.58rem, 1.4vw, .7rem);
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.kz-mnt__badge .kz-pulse {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245,158,11,.7);
    animation: kz-mnt-pulse 2s infinite;
}
@keyframes kz-mnt-pulse {
    70%  { box-shadow: 0 0 0 10px rgba(245,158,11,0); }
    100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

.kz-mnt__title {
    margin: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.015em;
    text-shadow: 0 10px 40px rgba(0,0,0,.85);
    font-size: clamp(1.7rem, 6.2vw, 3.6rem);
    overflow-wrap: anywhere;
}
.kz-mnt__text {
    margin: 0;
    max-width: 44rem;
    color: #cbd5e1;
    font-size: clamp(.82rem, 2.1vw, 1.02rem);
    line-height: 1.75;
    text-shadow: 0 4px 18px rgba(0,0,0,.8);
}
.kz-mnt__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
}
.kz-mnt__meta .kz-chip { background: rgba(2,6,23,.72); backdrop-filter: blur(8px); }
.kz-mnt__meta .kz-chip--live {
    color: #fcd34d;
    border-color: rgba(245,158,11,.5);
    background: rgba(245,158,11,.1);
}

.kz-mnt__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin-top: .35rem;
}

/* Resumo do que está sendo feito (espelha o changelog.json) */
.kz-mnt__upd {
    width: 100%;
    max-width: 46rem;
    margin-top: clamp(.6rem, 2vh, 1.2rem);
    background: rgba(2,6,23,.72);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    backdrop-filter: blur(14px);
    overflow: hidden;
    text-align: left;
}
.kz-mnt__upd > summary {
    cursor: pointer;
    list-style: none;
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #94a3b8;
    transition: color .2s ease, background .2s ease;
}
.kz-mnt__upd > summary::-webkit-details-marker { display: none; }
.kz-mnt__upd > summary:hover { color: #e2e8f0; background: rgba(30,41,59,.55); }
.kz-mnt__upd > summary .kz-mnt__chev { margin-left: auto; transition: transform .25s ease; }
.kz-mnt__upd[open] > summary .kz-mnt__chev { transform: rotate(180deg); }
.kz-mnt__updbody {
    padding: 0 1.1rem 1.1rem;
    max-height: min(34vh, 22rem);
    overflow-y: auto;
}

/* Rodapé discreto com o atalho de login (Admin/Moderador precisam entrar) */
.kz-mnt__foot {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: clamp(.8rem, 2.4vh, 1.4rem);
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    color: #64748b;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.kz-mnt__login {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(59,130,246,.5);
    background: rgba(29,78,216,.2);
    color: #bfdbfe;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: all .2s ease;
    min-height: 36px;
}
.kz-mnt__login:hover { background: rgba(37,99,235,.4); color: #fff; }
.kz-mnt__login:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
/* Alvo de toque confortável */
@media (pointer: coarse) {
    .kz-mnt__login { min-height: 44px; padding: .6rem 1.1rem; }
}

/* ---------- B. Trava real de interação ---------- */
/* O overlay já cobre a tela; isto garante que teclado/foco também não vazem.
   O atributo `inert` (aplicado via JS) cuida do foco e do teclado — o CSS
   abaixo cuida do ponteiro, do scroll e da leitura visual do conteúdo. */
body.kz-locked #app-main,
body.kz-locked > header,
body.kz-locked #player-master-container,
body.kz-locked #mobile-menu-container {
    pointer-events: none !important;
    user-select: none;
    filter: saturate(.35) brightness(.6);
}
body.kz-locked { overflow: hidden; }

/* ---------- C. Faixa para Admin/Moderador (não bloqueia) ---------- */
.kz-mntbar {
    position: fixed;
    z-index: 1900;
    left: 0;
    right: 0;
    top: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .5rem clamp(.6rem, 2.5vw, 1.4rem);
    background: linear-gradient(90deg, #78350f, #b45309 50%, #78350f);
    border-bottom: 1px solid rgba(245,158,11,.45);
    box-shadow: 0 10px 34px rgba(0,0,0,.6);
    color: #fef3c7;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.kz-mntbar.is-on { display: flex; }
.kz-mntbar__label { display: inline-flex; align-items: center; gap: .5rem; }
.kz-mntbar__dot {
    width: .5rem; height: .5rem; border-radius: 999px; background: #fbbf24;
    animation: kz-mnt-pulse 2s infinite;
}
.kz-mntbar__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(254,243,199,.45);
    background: rgba(0,0,0,.28);
    color: #fff;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: all .2s ease;
    min-height: 30px;
}
.kz-mntbar__btn:hover { background: rgba(255,255,255,.2); }
.kz-mntbar__btn--off { border-color: rgba(74,222,128,.6); background: rgba(22,101,52,.45); }
.kz-mntbar__btn--off:hover { background: #15803d; }
.kz-mntbar__btn:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }

/* Variações para aviso de versão diferente (deploy novo) */
.kz-mntbar__dot--warn {
    background: #f59e0b;
    animation: kz-mnt-pulse 1.5s infinite;
}
.kz-mntbar__link {
    color: #fcd34d;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}
.kz-mntbar__link:hover { color: #fde68a; }
.kz-mntbar__btn--warn {
    border-color: rgba(245,158,11,.6);
    background: rgba(120,53,15,.5);
}
.kz-mntbar__btn--warn:hover { background: #78350f; }

/* Botão flutuante de saída do preview (criado via JS) */
.kz-mntbar__sair {
    position: fixed;
    z-index: 4001;
    left: 50%;
    bottom: 1.2rem;
    transform: translateX(-50%);
    padding: .6rem 1.2rem;
    border-radius: 999px;
    font-size: .6rem;
    min-height: 40px;
    box-shadow: 0 14px 40px rgba(0,0,0,.6);
}

/* Utilitário: rótulo só para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Quando a faixa existe, empurra o app para baixo.
   A altura é medida por JS e publicada em `--kz-mntbar-h` (ResizeObserver),
   porque no celular a faixa quebra em duas linhas e um valor fixo sobreporia
   o header. Não definimos `height` em `#app-main`: ele já é `flex: 1 1 0%`,
   então o flexbox do body (`h-[100dvh]`) entrega o espaço restante. */
body.kz-mntbar-on header { margin-top: var(--kz-mntbar-h, 2.4rem); }

/* ---------- D. Página de Atualizações ---------- */
.kz-upd__shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: clamp(.6rem, 2vh, 1.4rem) clamp(.75rem, 2.4vw, 2rem) 0;
    padding-bottom: clamp(.6rem, 2vh, 1.2rem);
    gap: clamp(.6rem, 1.6vh, 1rem);
}
/* ============================================================================
   ATUALIZAÇÕES - Feed profissional com acordeão fluido
============================================================================ */
.kz-upd__feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: clamp(1rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59,130,246,.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139,92,246,.03) 0%, transparent 60%);
}

.kz-upd__entry {
    background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    overflow: hidden;
    transition: 
        border-color .3s cubic-bezier(.4,0,.2,1),
        box-shadow .3s cubic-bezier(.4,0,.2,1),
        transform .3s cubic-bezier(.4,0,.2,1);
    background-clip: padding-box;
}
.kz-upd__entry::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.3), transparent);
    opacity: 0;
    transition: opacity .3s ease;
}
.kz-upd__entry:hover {
    border-color: #334155;
    box-shadow: 
        0 12px 40px -10px rgba(0,0,0,.4),
        0 0 0 1px rgba(59,130,246,.15);
    transform: translateY(-3px);
}
.kz-upd__entry:hover::before { opacity: 1; }
.kz-upd__entry.is-open {
    overflow: visible;
    box-shadow: 
        0 20px 50px -15px rgba(0,0,0,.5),
        0 0 0 1px rgba(59,130,246,.25),
        inset 0 1px 0 rgba(59,130,246,.1);
    transform: translateY(-2px);
    z-index: 10;
}
.kz-upd__entry.is-current { 
    border-color: rgba(59,130,246,.55); 
    box-shadow: 
        0 0 0 1px rgba(59,130,246,.3),
        0 20px 50px -15px rgba(0,0,0,.5),
        inset 0 1px 0 rgba(59,130,246,.1);
}
.kz-upd__entry.is-current::before { opacity: 1; background: linear-gradient(90deg, transparent, #3b82f6, transparent); }

/* Cabeçalho do card - layout centralizado com versão + data */
.kz-upd__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem clamp(1rem, 2.5vw, 1.5rem);
    background: linear-gradient(180deg, rgba(2,6,23,.6) 0%, rgba(2,6,23,.3) 100%);
    border-bottom: 1px solid rgba(30,41,59,.5);
    cursor: pointer;
    transition: background .25s ease;
    position: relative;
}
.kz-upd__head::after {
    content: '';
    position: absolute;
    bottom: 0; left: 1rem; right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.15), transparent);
}
.kz-upd__head:hover { background: linear-gradient(180deg, rgba(30,41,59,.7) 0%, rgba(30,41,59,.4) 100%); }
.kz-upd__head:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }

/* Versão - badge elegante */
.kz-upd__ver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: .35rem .85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    flex: 0 0 auto;
    box-shadow: 
        0 2px 8px rgba(30,64,175,.4),
        inset 0 1px 0 rgba(255,255,255,.1);
    white-space: nowrap;
}
.kz-upd__entry.is-current .kz-upd__ver { 
    background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
    box-shadow: 
        0 2px 8px rgba(4,120,87,.4),
        inset 0 1px 0 rgba(34,197,94,.1);
}

/* Título centralizado */
.kz-upd__headtitle {
    font-size: .82rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.4;
    text-align: center;
    min-width: 0;
    word-break: break-word;
}

/* Data alinhada à direita */
.kz-upd__date {
    font-size: .65rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    opacity: .8;
}

/* Chevron animado */
.kz-upd__chev {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    color: #475569;
    transition: transform .35s cubic-bezier(.4,0,.2,1), color .2s ease;
    flex: 0 0 auto;
    flex-shrink: 0;
}
.kz-upd__entry:hover .kz-upd__chev { color: #60a5fa; }
.kz-upd__entry.is-open .kz-upd__chev { 
    transform: rotate(180deg); 
    color: #60a5fa; 
}

/* Corpo do acordeão - animação suave */
.kz-upd__body {
    padding: 0 1.25rem 1.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: 
        max-height .4s cubic-bezier(.4,0,.2,1),
        opacity .3s ease,
        padding .3s ease;
}
.kz-upd__entry.is-open .kz-upd__body {
    display: block;
    max-height: 5000px;
    opacity: 1;
    padding-top: 1.25rem;
    animation: kz-upd__slide-down .4s cubic-bezier(.4,0,.2,1);
}

@keyframes kz-upd__slide-down {
    from { 
        opacity: 0; 
        transform: translateY(-.75rem); 
        max-height: 0;
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
        max-height: 5000px;
    }
}

/* Feed spacing */
.kz-upd__feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: clamp(1rem, 2.5vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59,130,246,.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139,92,246,.03) 0%, transparent 60%);
    align-items: stretch;
}
.kz-upd__entry {
    flex-shrink: 0;
}

.kz-upd__escopo {
    margin: 0 0 1rem;
    padding: .8rem .95rem;
    border-left: 3px solid rgba(59,130,246,.55);
    background: rgba(59,130,246,.07);
    border-radius: 0 .6rem .6rem 0;
    color: #cbd5e1;
    font-size: .76rem;
    line-height: 1.75;
    white-space: pre-wrap;
}

.kz-upd__files {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}
.kz-upd__file {
    padding: .25rem .55rem;
    border-radius: .4rem;
    background: #020617;
    border: 1px solid #1e293b;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .6rem;
}

.kz-upd__sec { margin-bottom: 1.15rem; }
.kz-upd__sec:last-child { margin-bottom: 0; }
.kz-upd__sectitle {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .8rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(59,130,246,.15);
    color: #60a5fa;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.kz-upd__block { margin-bottom: 1rem; }
.kz-upd__block:last-child { margin-bottom: 0; }
.kz-upd__blocktitle {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: 0 0 .5rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid rgba(59,130,246,.15);
    color: #e2e8f0;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.4;
}
.kz-upd__lvl {
    flex: 0 0 auto;
    padding: .15rem .45rem;
    border-radius: .3rem;
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 1px solid;
}
.kz-upd__lvl--critico { color: #fca5a5; border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.12); }
.kz-upd__lvl--alto    { color: #fdba74; border-color: rgba(249,115,22,.55); background: rgba(249,115,22,.12); }
.kz-upd__lvl--medio   { color: #fde68a; border-color: rgba(234,179,8,.5);  background: rgba(234,179,8,.1); }
.kz-upd__lvl--baixo   { color: #7dd3fc; border-color: rgba(14,165,233,.45); background: rgba(14,165,233,.1); }

.kz-upd__ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.kz-upd__li {
    color: #94a3b8;
    font-size: .78rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    padding-left: .25rem;
    border-left: 2px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.kz-upd__li:hover { border-left-color: #3b82f6; color: #cbd5e1; }
.kz-upd__li strong { color: #e2e8f0; }
.kz-upd__li strong { color: #cbd5e1; }
.kz-upd__li code, .kz-upd__p code {
    padding: .1rem .32rem;
    border-radius: .28rem;
    background: #020617;
    border: 1px solid #1e293b;
    color: #7dd3fc;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
}
.kz-upd__p { margin: .3rem 0 0; color: #94a3b8; font-size: .74rem; line-height: 1.7; }
.kz-upd__pre {
    margin: .6rem 0 0;
    padding: .85rem 1rem;
    border-radius: .65rem;
    background: #030712;
    border: 1px solid #1e293b;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem;
    line-height: 1.7;
    overflow-x: auto;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.3);
}

/* Painel de controle do Admin */
.kz-adm {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: .95rem;
    padding: clamp(.9rem, 2vw, 1.35rem);
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.kz-adm__row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.kz-adm__status {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.kz-adm__status i { font-size: .85rem; }
.kz-adm__status--off { color: #4ade80; }
.kz-adm__status--on  { color: #fbbf24; }
.kz-adm__hint { color: #64748b; font-size: .68rem; line-height: 1.6; }

.kz-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
    user-select: none;
}
.kz-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.kz-switch__track {
    width: 3rem;
    min-width: 3rem;
    height: 1.7rem;
    border-radius: 999px;
    background: #1e293b;
    border: 1px solid #334155;
    position: relative;
    transition: background .25s ease, border-color .25s ease;
}
.kz-switch__track::after {
    content: '';
    position: absolute;
    top: 50%;
    left: .2rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #94a3b8;
    transform: translateY(-50%);
    transition: transform .25s cubic-bezier(.16,1,.3,1), background .25s ease;
}
.kz-switch input:checked + .kz-switch__track { background: #b45309; border-color: #f59e0b; }
.kz-switch input:checked + .kz-switch__track::after { transform: translate(1.25rem, -50%); background: #fff; }
.kz-switch input:focus-visible + .kz-switch__track { outline: 2px solid #60a5fa; outline-offset: 3px; }

/* ---------- Responsividade ---------- */
@media (max-width: 767px) {
    .kz-mnt__updbody { max-height: 30vh; }
    .kz-mnt__foot { flex-direction: column; gap: .5rem; }
    body.kz-mntbar-on header { margin-top: var(--kz-mntbar-h, 4.2rem); }
    .kz-mntbar { font-size: .55rem; padding: .45rem .7rem; gap: .45rem; }
    .kz-mntbar__btn { min-height: 38px; padding: .45rem .8rem; }
    .kz-mntbar__sair { min-height: 44px; }
}
@media (max-width: 380px) {
    .kz-mnt__actions { flex-direction: column; align-items: stretch; }
    .kz-mnt__actions .kz-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .kz-mnt__bg { animation: none; transform: scale(1.04); }
    .kz-mnt__badge .kz-pulse,
    .kz-mntbar__dot { animation: none; }
    .kz-upd__chev, .kz-switch__track::after { transition-duration: .01ms; }
}

/* ==========================================================================
   ALUNO TECH — SISTEMA VISUAL DAS ABAS
   Cards, KPIs e selects usados na Visão Geral e nas sub-abas do Aluno Tech.
   ========================================================================== */

/* ---------- Card base ---------- */
.kz-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, .78) 0%, rgba(15, 23, 42, .82) 100%);
    border: 1px solid rgba(51, 65, 85, .9);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.kz-panel:hover {
    border-color: rgba(71, 85, 105, 1);
    box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .7);
}

/* ---------- Títulos ---------- */
.kz-panel__title {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid rgba(51, 65, 85, .9);
    display: flex;
    align-items: center;
    gap: .55rem;
}
.kz-panel__title i { font-size: .9rem; opacity: .9; }

.kz-panel__subtitle {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.kz-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.kz-panel__head .kz-panel__title { flex: 1 1 auto; }

/* ---------- Select ---------- */
.kz-select {
    background: #0f172a;
    color: #e2e8f0;
    font-size: .7rem;
    font-weight: 700;
    padding: .4rem .6rem;
    border-radius: .5rem;
    border: 1px solid #475569;
    outline: none;
    cursor: pointer;
    max-width: 9rem;
    transition: border-color .2s ease, background .2s ease;
}
.kz-select:hover { border-color: #3b82f6; background: #111c33; }
.kz-select:focus-visible { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, .25); }

/* ---------- Estado vazio ---------- */
.kz-empty {
    background: rgba(15, 23, 42, .5);
    border: 1px dashed #475569;
    border-radius: .85rem;
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: .85rem;
}

/* ---------- KPIs ---------- */
.kz-kpi {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, .85) 0%, rgba(15, 23, 42, .9) 100%);
    border: 1px solid rgba(51, 65, 85, .9);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .7);
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.kz-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    opacity: .85;
}
.kz-kpi:hover {
    transform: none;
    border-color: rgba(71, 85, 105, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.4);
}

.kz-kpi__icon {
    flex: 0 0 auto;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
.kz-kpi__icon--emerald { background: rgba(16, 185, 129, .14); color: #34d399; }
.kz-kpi__icon--blue     { background: rgba(59, 130, 246, .14); color: #60a5fa; }
.kz-kpi__icon--violet   { background: rgba(139, 92, 246, .14); color: #a78bfa; }
.kz-kpi__icon--amber    { background: rgba(245, 158, 11, .14); color: #fbbf24; }

.kz-kpi__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: .1rem;
}
.kz-kpi__label {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kz-kpi__value {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.01em;
}
.kz-kpi__hint {
    font-size: .68rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    padding: .05rem .5rem;
    align-self: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 640px) {
    .kz-kpi { padding: .8rem; gap: .65rem; }
    .kz-kpi__icon { width: 2.4rem; height: 2.4rem; font-size: .9rem; }
    .kz-kpi__value { font-size: 1.25rem; }
    .kz-panel { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .kz-kpi, .kz-panel { transition: none; }
    .kz-kpi:hover { transform: none; }
}
