/* 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                              */
/* ============================================================== */

/* 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; }

/* 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)           */
/* ============================================================== */

/* Estilização da barra de progresso do áudio nativo para combinar com Tailwind */
.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 */
.cont-tab-content { display: none; }
.cont-tab-content.active { display: block; 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);
}