/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS
   ========================================================================== */

/* Asterisco aqui para aplica a regra em tudo (NÃO APAGAR)*/ 
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  overflow-x: hidden; 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(to bottom, #bfdbfe 0%, #e5e7eb 100%); 
  background-attachment: fixed;
  color: #111827;
  position: relative;
}

body.dark {
  background: #0f172a; 
  color: #e5e7eb;
}
.animar-tema {
  transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

input, button, select, textarea {
    -webkit-appearance: none;
    appearance: none;
}
input[type="checkbox"], 
input[type="radio"], 
input[type="color"],
input[type="date"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
}

:root {
  --texto-titulo: #334155;
  --texto-subtitulo: #64748b;
  --texto-suave: #666666;
}

body.dark {
  --texto-titulo: #f1f5f9;
  --texto-subtitulo: #cbd5e1;
  --texto-suave: #94a3b8;
}

/* ==========================================================================
   2. FUNDOS ANIMADOS (NUVENS E ESTRELAS)
   ========================================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0; 
}

/* MODO CLARO: NUVENS */
body:not(.dark)::before {
  background-image: 
      radial-gradient(50% 20% at 20% 40%, rgba(255,255,255,0.7) 0%, transparent 60%),
      radial-gradient(40% 30% at 80% 30%, rgba(255,255,255,0.6) 0%, transparent 50%),
      radial-gradient(60% 25% at 50% 70%, rgba(255,255,255,0.5) 0%, transparent 50%);
      
  background-size: 100% 100%;
  filter: blur(40px); 
  opacity: 0.8; 
  animation: moverNuvens 90s linear infinite alternate;
}
@keyframes moverNuvens {
  from { transform: translateX(-40px); }
  to { transform: translateX(40px); }
}
/* MODO ESCURO: ESTRELAS */
body.dark::before {
  background-image:
    radial-gradient(2px 2px at 10% 20%, white, transparent),
    radial-gradient(1px 1px at 25% 80%, white, transparent),
    radial-gradient(2px 2px at 40% 40%, white, transparent),
    radial-gradient(2px 2px at 70% 30%, white, transparent),
    radial-gradient(1.5px 1.5px at 90% 90%, white, transparent);
  background-size: 500px 500px; 
  opacity: 0.8;
  animation: brilhoEstrelas 3s ease-in-out infinite alternate;
}

@keyframes brilhoEstrelas { 
  0% { opacity: 0.5; transform: scale(1); } 
  100% { opacity: 1; transform: scale(1.1); } 
}
/* ==========================================================================
   3. CABEÇALHO 
   ========================================================================== */
.topo {
    padding: 5px 15px;
    height: auto;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #2b6cb0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);    
    display: flex;
    align-items: center;
}

body.dark .topo {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1e293b;
}

.header-container {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 70px;
    padding-right: 50px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.logo-area {
    display: flex;
    justify-content: flex-start; 
    height: auto;
    padding-left: 0;
    min-width: 0; 
}

.icone-coruja {
  font-size: 40px;
  color: #fbbf24;
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.logo-area:hover .icone-coruja { transform: scale(1.1) rotate(-10deg); }

.textos-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    text-align: left;
}

.topo h1 { font-size: 28px; margin: 0; line-height: 1; color: white; letter-spacing: 1px; }

.subtitulo { 
    margin: 2px 0 0 0; 
    font-size: 12px;
    color: rgba(255,255,255,0.9); 
    font-weight: normal; 
    white-space: normal;
    word-wrap: break-word; 
    max-width: 100%;
    display: block;
}

/* LUA */
.lua {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    z-index: 1000;
    overflow: visible;
    background: radial-gradient(circle at 30% 30%, #ffffff, #cbebff);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
}
.avatar-lua {
    height: auto;
    width: 85%;
    object-fit: contain;
    bottom: -5px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

/*LUA NO MODO ESCURO */
body.dark .lua {
    background: radial-gradient(circle at 30% 30%, #e2e8f0, #64748b);
    box-shadow: 0 0 25px rgba(148, 163, 184, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   4. MENU HAMBURGUER E NAVEGAÇÃO
   ========================================================================== */
#menu-provas {
  display: none;
}

button.hamburger {
  position: fixed !important;
  top: 18px !important;
  right: 20px !important;
  left: auto !important;
  width: 36px; 
  height: 24px;
  background: transparent; 
  border: none; 
  cursor: pointer;
  z-index: 2000; 
  padding: 0; 
  display: block;
  -webkit-tap-highlight-color: transparent; 
}

.hamburger span {
  display: block; position: absolute; height: 3px; width: 100%;
  background-color: white !important; border-radius: 3px;
  transition: all 0.3s ease-in-out; left: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  pointer-events: none;
}
button.hamburger::before {
  content: '';
  position: absolute;
  top: -15px;
  bottom: -15px;
  left: -15px;
  right: -15px;
  background: transparent;
  cursor: pointer;
}

.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.hamburger.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger.active span:nth-child(2) { opacity: 0; left: -40px; }
.hamburger.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

/* Menu Para PC */
@media (min-width: 1024px) {
    button.hamburger {
        top: 12px !important;
    }
}

/* Overlay do Menu */
.menu-overlay {
  position: fixed; 
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100vh;
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  z-index: 1900;
  display: flex; 
  flex-direction: column; 
  justify-content: flex-start; 
  align-items: center;
  overflow-y: auto; 
  padding: 80px 0 40px 0;
  transform: translateX(100%); 
  will-change: transform; 
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden; 
  backdrop-filter: blur(10px);
}
body.dark .menu-overlay {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.menu-overlay.open { 
  transform: translateX(0); 
  visibility: visible; 
}

.links-menu { 
  width: 100%; 
  text-align: center; 
  margin-top: auto; 
}

/* Itens da Lista */
.links-menu li {
  margin: 15px 0; 
  opacity: 0; 
  transform: translateX(30px); 
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-overlay.open .links-menu li { 
  opacity: 1; 
  transform: translateX(0); 
}

.menu-overlay.open .links-menu li:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.open .links-menu li:nth-child(2) { transition-delay: 0.15s; }
.menu-overlay.open .links-menu li:nth-child(3) { transition-delay: 0.2s; }
.menu-overlay.open .links-menu li:nth-child(4) { transition-delay: 0.25s; }
.menu-overlay.open .links-menu li:nth-child(5) { transition-delay: 0.3s; }
.menu-overlay.open .links-menu li:nth-child(6) { transition-delay: 0.35s; }
.menu-overlay.open .links-menu li:nth-child(7) { transition-delay: 0.4s; }
.menu-overlay.open .links-menu li:nth-child(8) { transition-delay: 0.45s; }

.links-menu a {
  color: white; font-size: 26px; font-weight: 800;
  display: flex; justify-content: center; align-items: center;
  gap: 15px; padding: 10px 20px; transition: transform 0.2s;
}
.links-menu a i { 
  font-family: "Font Awesome 6 Free"; font-weight: 900; 
  color: #60a5fa; transition: color 0.3s; 
}
.links-menu a:hover { transform: scale(1.1); }
.links-menu a:hover i { color: #fbbf24; }

/* Botão Tema (Janela do Céu) */
.theme-toggle-new {
  background: none; border: none; cursor: pointer; padding: 0;
  margin-top: 40px; 
  margin-bottom: auto;
  opacity: 0; transform: scale(0.5); 
  transition: all 0.5s ease; 
  transition-delay: 0s; 
}
.menu-overlay.open .theme-toggle-new { 
  opacity: 1; transform: scale(1); 
  transition-delay: 0.5s;
}
@media (max-height: 750px) {
  .links-menu li {
    margin: 8px 0;
  }
  .links-menu a {
    font-size: 22px;
    padding: 5px 20px;
  }
  .theme-toggle-new {
    margin-top: 20px;
    flex-shrink: 0;
  }
  .sky-window {
    width: 65px; 
    height: 65px;
  }
  .celestial-body { font-size: 32px; }
}

.sky-window {
  width: 80px; height: 80px; border-radius: 50%;
  position: relative; overflow: hidden;
  background: linear-gradient(to bottom, #38bdf8, #bae6fd);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
  border: 4px solid white; transition: background 0.8s;
}
body.dark .sky-window {
  background: linear-gradient(to bottom, #0f172a, #312e81);
  border-color: #334155; box-shadow: 0 0 20px rgba(49, 46, 129, 0.5);
}
.celestial-body {
  position: absolute; font-size: 40px; left: 50%;
  transform: translateX(-50%); transition: top 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  line-height: 1;
}
.sun { top: 50%; transform: translate(-50%, -50%); }
body.dark .sun { top: 150%; }
.moon { top: 150%; transform: translate(-50%, -50%); }
body.dark .moon { top: 50%; }
.clouds { 
  position: absolute; bottom: -5px; left: 50%; 
  transform: translateX(-50%); font-size: 40px; color: rgba(255,255,255,0.6); 
}
body.dark .clouds { opacity: 0.2; transform: translateX(-60%); }

/* ==========================================================================
   ADAPTAÇÃO EXCLUSIVA PARA PC
   ========================================================================== */
@media (min-width: 1024px) {
    .topo {
        height: 80px !important;
        padding: 0 40px !important; 
    }

    .header-container {
        padding-left: 110px !important;
    }

    .textos-header {
        justify-content: center;
        height: 100%;
    }

    .topo h1 { 
        font-size: 36px !important;
    }
    
    .subtitulo { 
        font-size: 15px !important;
        margin-top: 6px !important;
        margin-bottom: 4px !important;
    }

    .lua {
        width: 85px !important;
        height: 85px !important;
        top: 20px !important;
        left: 40px !important;
    }

    button.hamburger {
        top: 28px !important; 
        right: 40px !important;
        transform: scale(1.1);
    }
}

/* ==========================================================================
   5. CONTEÚDO PRINCIPAL (Main, Filtros, Selects)
   ========================================================================== */
main {
  position: relative;
  z-index: 2;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* Filtros */
.filtros { margin-bottom: 20px; position: relative; z-index: 100; }
.filtros label {
  display: flex; flex-direction: column; font-weight: bold;
  color: #1e3a8a; margin-bottom: 5px;
}
body.dark .filtros label { color: #e5e7eb; }

/* Custom Select */
.custom-select {
    position: relative; width: 100%; display: flex; flex-direction: column;
    margin-bottom: 15px; z-index: 100;
}
.custom-select:has(.options-list.active) { z-index: 10001; }

.select-trigger {
    background-color: #ffffff; color: #1e3a8a;
    padding: 10px 14px; border-radius: 8px;
    border: 2px solid #2563eb;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; min-height: 40px; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
body.dark .select-trigger {
    background-color: #1e293b; color: white; border: 1px solid #475569;
}

.options-list {
    position: absolute; 
    top: calc(100% + 5px); 
    width: 100%;
    background-color: #ffffff; 
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: none; 
    z-index: 9999; 
    list-style: none; 
    padding: 6px;
    border: 1px solid #e2e8f0;
    max-height: 250px;
    overflow-y: auto; 
    scrollbar-width: thin; 
    scrollbar-color: #ccc transparent;
}
.options-list.active { display: block; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.options-list li { padding: 12px 15px; border-radius: 8px; cursor: pointer; color: #334155; }
.options-list li:hover { background-color: #eff6ff; color: #1d4ed8; }

body.dark .options-list { background-color: #1e293b; border-color: #475569; }
body.dark .options-list li { color: #f1f5f9; }
body.dark .options-list li:hover { background-color: #334155; color: white; }

.escola-tag {
    display: block; 
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 2px;
}

@media (max-width: 480px) {
    .escola-tag {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
}

/* =========================================
   CHIPS DE TURMAS (AVISOS)
   ========================================= */
#grid-chips-avisos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip-turma-aviso {
    padding: 6px 14px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.chip-turma-aviso:hover {
    background-color: #e2e8f0;
}

.chip-turma-aviso.selected {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
}

/* ==========================================================================
   6. CARTÕES (Avisos, Provas, Cards)
   ========================================================================== */

.flashcard-box {
    perspective: 1000px;
    width: 100%;
    height: 180px;
    margin: 15px 0;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard-inner.virado {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.flashcard-front {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    color: #1e293b;
}

.flashcard-back {
    background-color: #fdf4ff;
    border: 2px solid #d946ef;
    color: #86198f;
    transform: rotateY(180deg);
}

body.dark .flashcard-front {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark .flashcard-back {
    background-color: #4c1d95 !important;
    border-color: #d946ef !important;
    color: #ffffff !important;
}

.flashcard-dica {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 10px;
    text-transform: uppercase;
}

.card-progresso {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

body.dark .card-progresso {
    background: #1e293b;
    border-color: #334155;
}

.header-progresso {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 14px;
    color: #475569;
}

body.dark .header-progresso { color: #cbd5e1; }

.barra-fundo {
    background: #f1f5f9;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
}

body.dark .barra-fundo { background: #0f172a; }

.barra-preenchimento {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    height: 100%;
    width: 0%;
    transition: width 1.5s ease-in-out;
}

.footer-progresso {
    margin-top: 10px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

.profile-hero .card-progresso {
    margin-top: 30px;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: none; 
}

body.dark .profile-hero .card-progresso {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(51, 65, 85, 0.8);
}

.profile-hero .card-progresso::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: -40px auto 20px;
}

body.dark .profile-hero .card-progresso::before {
    background: #334155;
}

.aviso {
  display: block; background-color: #ffffff;
  border-left: 6px solid #1e88e5; padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; z-index: 5;
}
.aviso:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); }

.aviso h3 { margin: 8px 0 4px; font-size: 18px; color: #0d47a1; }
.aviso p { font-size: 15px; color: #333; margin: 5px 0; }
.data { font-size: 12px; color: #666; margin-bottom: 8px; }
.categoria { display: inline-block; font-size: 12px; font-weight: bold; text-transform: uppercase; color: #1e3a8a; }

/* Cores por Tipo */
.aviso.importante { border-left-color: #0d47a1; background-color: #e3f2fd; }
.aviso.evento { border-left-color: #2ca86a; background-color: #eafaf2; }
.aviso.prova { border-left-color: #e63946; background-color: #ffecec; }
.aviso.fixado { background-color: #fff7ed; border-left: 4px solid #dc2626; }
.aviso.fixado .categoria { color: #dc2626; }

/* Modo Escuro Avisos */
body.dark .aviso { background: #1e293b; box-shadow: 0 6px 16px rgba(0,0,0,0.6); }
body.dark .aviso h3 { color: #e5e7eb; }
body.dark .aviso p { color: #d1d5db; }
body.dark .aviso .data { color: #9ca3af; }
body.dark .categoria { color: #93c5fd; }
body.dark .aviso.fixado { background-color: #3f2e18; border-left-color: #f59e0b; }
body.dark .aviso.fixado h3 { color: #fcd34d; }
body.dark .aviso.evento { background-color: #064e3b; }
body.dark .aviso.evento h3 { color: #6ee7b7; }
body.dark .aviso.prova { background-color: #4c0519; }
body.dark .aviso.prova h3 { color: #fca5a5; }

/* Selo Novo */
.tag-novo {
  background-color: #16a34a; color: white;
  font-size: 11px; padding: 4px 8px; border-radius: 999px;
  display: inline-block; margin-bottom: 6px;
  animation: aparecer 0.4s ease-out;
}
@keyframes aparecer { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   7. ELEMENTOS ESPECÍFICOS (Horários, Provas)
   ========================================================================== */
.aula {
  background-color: #1e3a8a; color: white; padding: 10px 14px;
  border-radius: 8px; font-size: 14px; margin-bottom: 8px;
  opacity: 0; animation: entradaSuave 0.5s ease-out forwards;
}
.intervalo {
  background-color: #3b82f6; color: white; padding: 8px;
  border-radius: 8px; text-align: center; font-weight: bold;
  font-size: 13px; margin-bottom: 8px;
  opacity: 0; animation: entradaSuave 0.5s ease-out forwards;
}
@keyframes entradaSuave { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

body.dark .aula { background-color: #1e3a8a; border: 1px solid #60a5fa; }
body.dark .intervalo { background-color: #334155; color: #93c5fd; border-color: #475569; }
body.dark h2, body.dark #saudacao { color: #f1f5f9; }

/* --- ESTILOS DE STATUS DO HORÁRIO (AULA ATUAL) --- */
.aula.aula-atual {
    background-color: #f0fdf4;
    border: 2px solid #22c55e;
    color: #14532d;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    z-index: 10;
}
.aula-proxima {
    border-left: 4px solid #f59e0b;
    background: #ffedd5;
    color: #1f2937;
}

.status-badge {
    display: block; font-size: 11px; font-weight: bold; text-transform: uppercase;
    margin-bottom: 5px; width: fit-content; padding: 2px 8px; border-radius: 4px;
}
.badge-atual { background-color: #22c55e; color: white; }
.badge-proxima { background-color: #fbbf24; color: #78350f; opacity: 0.8; }

body.dark .aula.aula-atual { background-color: #052e16; border-color: #4ade80; color: #dcfce7 !important; }
body.dark .aula.aula-proxima { background-color: #451a03; border-left-color: #f59e0b; color: #ffedd5; }
body.dark #status-rodape { color: #94a3b8; }

/* Página Provas (Cards) */
.card-dica {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white; padding: 15px 20px; border-radius: 12px;
    display: flex; gap: 15px; margin-bottom: 25px;
    position: relative; overflow: hidden;
}
.dica-icone {
    font-size: 28px; background: rgba(255,255,255,0.2);
    width: 45px; height: 45px; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; flex-shrink: 0;
}
.dica-texto p { margin: 0; font-size: 14px; line-height: 1.4; color: #f3f4f6; }
.dica-titulo { font-weight: bold; font-size: 16px; display: block; margin-bottom: 2px; color: white; }

.aviso-vazio {
    background-color: #f0fdf4; border: 2px dashed #86efac;
    color: #166534; text-align: center; padding: 30px; border-radius: 12px;
}
body.dark .aviso-vazio { background-color: #052e16; border-color: #15803d; color: #86efac; }
.aviso-neutro { text-align: center; color: #666; }
body.dark .aviso-neutro { color: #9ca3af; }
.btn-video {
    display: inline-block; margin-top: 10px; padding: 8px 12px;
    background: #e63946; color: white; border-radius: 6px;
    font-size: 13px; font-weight: bold;
}

/* ==========================================================================
   8. LOGIN & PAINEL
   ========================================================================== */
/* 1. ANIMAÇÕES */
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes floatCoruja {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* 2. LAYOUT BASE */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f8fafc;
    font-family: 'Inter', sans-serif;
    padding: 20px 0;
}

.login-container {
    background: white;
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    width: 95%;
    max-width: 400px;
    animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 3. CABEÇALHO E IMAGEM */
.login-header {
    text-align: center;
    margin-bottom: 15px;
}

.coruja-boas-vindas {
    width: 85px;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
    animation: floatCoruja 3s ease-in-out infinite;
}

.login-header h1 { 
    color: #1e3a8a; 
    font-size: 20px;
    margin: 0;
}

.login-header p { 
    color: #64748b; 
    font-size: 13px;
    margin-top: 2px;
}

/* 4. FORMULÁRIO E INPUTS */
.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #334155;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.input-group input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 5. BOTÕES */
.btn-entrar, .btn-acao {
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    font-size: 15px;
    transition: 0.2s;
    animation: slideUpFade 0.5s ease forwards 0.4s;
}

.btn-entrar:hover { background: #1d4ed8; transform: translateY(-1px); }

/* 6. MODO ESCURO */
body.dark.login-body {
    background-color: #0f172a;
}

body.dark .login-container {
    background: #1e293b;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 1px solid #334155;
}

body.dark .login-header h1 { color: #60a5fa; }
body.dark .login-header p { color: #94a3b8; }
body.dark .input-group label { color: #cbd5e1; }

body.dark .input-group input {
    background: #0f172a;
    border-color: #334155;
    color: white;
}

/* 7. ADAPTAÇÃO PARA PC */
@media (min-width: 1024px) {
    .login-container {
        max-width: 520px;
        padding: 25px 35px;
        margin: auto;
    }

    .coruja-boas-vindas {
        width: 100px;
    }

    .login-header h1 { font-size: 24px; }
    .login-header p { font-size: 14px; }

    .login-body {
        align-items: flex-start; 
        padding: 40px 20px;
    }
}

/* Tela de Cadastro */
.cadastro-container {
    max-width: 500px;
    padding: 15px 25px !important;
}

.cadastro-container .login-header {
    margin-bottom: 10px;
}

.cadastro-container .input-group {
    margin-bottom: 8px;
}

.cadastro-container .input-group label {
    margin-bottom: 2px;
}

.cadastro-container .login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.cadastro-container .tab-btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}

.cadastro-container .tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.cadastro-container footer {
    margin-top: 10px !important;
    padding-bottom: 5px !important;
}

@media (min-width: 1024px) {
    .cadastro-container {
        max-width: 550px;
        padding: 20px 40px !important;
        margin: auto;
    }
}

.lista-admin li {
  display: flex; justify-content: space-between; align-items: center;
  background: #f8fafc; padding: 8px 12px; border-bottom: 1px solid #eee;
  margin-bottom: 5px; border-radius: 4px; font-size: 13px;
}
body.dark .lista-admin li { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.btn-excluir {
  background: #ef4444; color: white; border: none; padding: 4px 8px;
  border-radius: 4px; cursor: pointer; margin-left: 10px; width: auto;
}

.login-tabs {
    display: flex;
    background-color: #f3f4f6;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); 
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px; 
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
}

.tab-btn i {
    font-size: 1.1em;
}

/* Efeito ao passar o mouse no inativo */
.tab-btn:hover:not(.active) {
    background-color: rgba(0,0,0,0.04);
    color: #374151;
}

/* ESTADO ATIVO (Selecionado) */
.tab-btn.active {
    background: #fbbf24; 
    color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(251, 191, 36, 0.4), 
                0 2px 4px -1px rgba(251, 191, 36, 0.2);
    transform: scale(1.02);
}

/* MODO ESCURO */
body.dark .login-tabs {
    background-color: #374151;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

body.dark .tab-btn {
    color: #9ca3af;
}

body.dark .tab-btn:hover:not(.active) {
    background-color: rgba(255,255,255,0.05);
    color: #f3f4f6;
}

/* =========================================================
   TEXTO LIMITADO (LER MAIS)
   ========================================================= */

.texto-limitado {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-line;
    transition: max-height 0.3s ease;
}

.btn-ler-mais {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-ler-mais:hover {
    color: #1d4ed8;
}

body.dark .btn-ler-mais {
    color: #60a5fa;
}

body.dark .btn-ler-mais:hover {
    color: #93c5fd;
}

/* ==========================================================================
   9. ESTILOS DA ABA PROFESSORES E MODAL
   ========================================================================== */
/* Botão Principal (Votar) */
.btn-taca {
    background: linear-gradient(135deg, #d97706, #fbbf24);
    color: #451a03; border: none; padding: 12px 25px;
    border-radius: 50px; font-weight: bold; font-size: 14px;
    cursor: pointer; box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    width: 100%; transition: transform 0.2s;
}
.btn-taca:active { transform: scale(0.95); }
.btn-taca:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; box-shadow: none; }

/* Botões de Punição*/
.btn-punir {
    border: none; padding: 6px 12px; border-radius: 4px;
    cursor: pointer; font-weight: bold; font-size: 12px;
    transition: 0.2s;
}
.btn-punir:hover { filter: brightness(0.9); }

/* Ranking */
.ranking-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; margin-bottom: 5px; border-radius: 8px;
    background: #f8fafc; border: 1px solid #e2e8f0;
}
.rank-pos { font-weight: bold; width: 30px; text-align: center; }
.rank-turma { flex: 1; font-weight: 600; padding-left: 10px; }
.rank-pontos { font-weight: bold; color: #4c1d95; }

/* Destaques Ranking */
.rank-1 { background: #fef9c3; border-color: #facc15; }
.rank-2 { background: #f3f4f6; border-color: #94a3b8; }
.rank-3 { background: #fff7ed; border-color: #fdba74; } 
.rank-user { border: 2px solid #6366f1; background: #e0e7ff; }

.rank-separator {
    text-align: center; color: #94a3b8; margin: 10px 0; letter-spacing: 3px; font-size: 10px;
}

/* Dark Mode */
body.dark #banner-taca-salas { box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
body.dark .modal-content { background: #1e293b; color: #e2e8f0; }
body.dark .ranking-item { background: #334155; border-color: #475569; color: #e2e8f0; }
body.dark .rank-pontos { color: #fbbf24; }
body.dark .rank-1 { background: #422006; border-color: #eab308; }
body.dark .rank-2 { background: #374151; border-color: #9ca3af; }
body.dark .rank-3 { background: #431407; border-color: #f97316; }
body.dark .rank-user { background: #1e1b4b; border-color: #6366f1; }

/* --- PAINEL ADMIN TAÇA (CLARO) --- */
.painel-admin-taca {
    background: #fff1f2; border: 1px solid #fda4af; padding: 15px; border-radius: 8px;
}
.painel-admin-taca h4 { color: #be123c; margin: 0 0 10px 0; font-weight: bold; }
.btn-punir { border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.btn-punir:hover { filter: brightness(0.9); }

.btn-punir.btn-1 { background: #fecdd3; color: #9f1239; }
.btn-punir.btn-5 { background: #fda4af; color: #9f1239; }
.btn-punir.btn-10 { background: #fb7185; color: #881337; }
.btn-punir.btn-ok { background: #be123c; color: white; }
.input-punir { flex:1; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }

/* --- ESCURO --- */
body.dark .painel-admin-taca { background: #2d1521; border-color: #881337; }
body.dark .painel-admin-taca h4 { color: #fda4af; }
body.dark .btn-punir.btn-1 { background: #4c0519; color: #fecdd3; }
body.dark .btn-punir.btn-5 { background: #881337; color: #fecdd3; }
body.dark .btn-punir.btn-10 { background: #9f1239; color: #fff; }
body.dark .btn-punir.btn-ok { background: #e11d48; color: white; }
body.dark .input-punir { background: #1e293b; color: #fff; border-color: #475569; }

/* Card de Status (Visão do Aluno) */
.card-status {
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease;
}
.card-status.verde { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.card-status.cinza { background: #f1f5f9; color: #475569; border: 2px dashed #cbd5e1; }

.status-grande { font-size: 24px; font-weight: bold; margin: 10px 0; }

/* Mini Grade */
.mini-grade-container { display: flex; justify-content: center; gap: 5px; }
.mini-coluna { display: flex; flex-direction: column; gap: 2px; }
.mini-box {
    width: 30px; height: 20px; font-size: 10px; background: #eee;
    display: flex; align-items: center; justify-content: center; border-radius: 3px;
}
.mini-box.ocupado { background: #22c55e; color: white; }

/* --- MODAL (JANELA DE SELEÇÃO) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.modal-overlay.ativo {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h3 { margin-top: 0; color: #1e3a8a; }

.grid-turmas-modal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.btn-turma {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-turma:hover { background: #2563eb; color: white; border-color: #2563eb; transform: scale(1.05); }

.btn-atividade { width: 100%; background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.btn-atividade:hover { background: #d1fae5; color: #065f46; transform: none; }

.btn-cancelar {
    margin-top: 10px; background: transparent; border: none;
    color: #ef4444; cursor: pointer; font-size: 14px; text-decoration: underline;
}

/* Modo Escuro */
body.dark .coluna-dia h4 { color: white; }
body.dark .card-status.cinza { background: #1e293b; color: #cbd5e1; border-color: #334155; }
body.dark .modal-content { background: #1e293b; color: white; }
body.dark .modal-content h3 { color: white; }
body.dark .btn-turma { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark .btn-turma:hover { background: #2563eb; border-color: #2563eb; }
body.dark .btn-atividade { background: #064e3b; border-color: #065f46; color: #a7f3d0; }

/* Mobile */
@media (max-width: 1024px) {
    .grade-editor-container { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  main { max-width: 1200px; padding: 40px 20px; }
  .topo { padding: 20px 40px; }
  .icone-coruja { font-size: 56px; }
  .topo h1 { font-size: 42px; }
  .subtitulo { font-size: 16px; }
  button.hamburger { right: 3rem !important; top: 2rem !important; }
  .avisos-normais { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
  .avisos-fixados { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 25px; margin-bottom: 40px; }
  .aviso { height: 100%; display: flex; flex-direction: column; justify-content: flex-start; }
}

/* 1. Link de Cadastro */
.area-link-cadastro {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.area-link-cadastro p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.btn-link-cadastro {
    display: inline-block;
    color: #2563eb;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: #eff6ff;
    transition: background 0.2s;
}
.btn-link-cadastro:hover {
    background-color: #dbeafe;
}

/* Garante que o item apareça mesmo se a animação falhar */
.links-menu li {
    opacity: 1 !important; 
    transform: translateY(0) !important;
}

/* 3. Mensagem de Erro mais bonita */
.msg-erro {
    color: #e63946;
    background: #ffecec;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    display: none; /* aparece só quando dá erro */
    border: 1px solid #fca5a5;
    animation: fadeIn 0.3s ease;
}

/* Modo Escuro */
body.dark .area-link-cadastro { border-top-color: #334155; }
body.dark .area-link-cadastro p { color: #94a3b8; }
body.dark .btn-link-cadastro { background-color: #1e293b; color: #60a5fa; }
body.dark .msg-erro { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }
/* Botão Ver Senha */
.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
}

.icon-ver-senha {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px; 
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    transition: color 0.3s;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.input-wrapper input {
    width: 100%;
    padding-right: 45px !important; 
}

.icon-ver-senha:hover {
    color: #2563eb;
}

body.dark .icon-ver-senha { color: #9ca3af; }
body.dark .icon-ver-senha:hover { color: #60a5fa; }


.grid-boletim {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; 
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.header-boletim {
    font-weight: bold;
    color: #1e3a8a;
    border-bottom: 2px solid #2563eb;
    margin-bottom: 10px;
    font-size: 13px;
}

.input-nota {
    width: 100%;
    max-width: 50px;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    color: #334155;
}

.input-nota:focus {
    border-color: #2563eb;
    outline: none;
    background-color: #eff6ff;
}

.status-nota {
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 4px;
    border-radius: 4px;
}

.aprovado { color: #166534; background: #dcfce7; }
.reprovado { color: #991b1b; background: #fee2e2; }
.cursando { color: #854d0e; background: #fef9c3; }

.text-center { text-align: center; }

/* Ajuste para celular (Matéria fica em cima, notas embaixo) */
@media (max-width: 600px) {
    .grid-boletim {
        grid-template-columns: 1fr 1fr 1fr; 
        grid-template-rows: auto auto; 
        gap: 5px;
        background: #f8fafc;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .grid-boletim > div:first-child { /* Nome da Matéria */
        grid-column: span 3;
        font-weight: bold;
        margin-bottom: 5px;
        color: #1e3a8a;
    }
    .grid-boletim > div:last-child { /* Status */
        grid-column: span 3;
        margin-top: 5px;
    }
    .header-boletim { display: none; } /* Esconde cabeçalho */
}

/* Modo Escuro */
body.dark .input-nota { background: #0f172a; border-color: #334155; color: white; }
body.dark .grid-boletim { border-bottom-color: #334155; }
body.dark .grid-boletim > div:first-child { color: #93c5fd; }
@media (max-width: 600px) {
    body.dark .grid-boletim { background: #1e293b; }
}


/* --- ESTILOS DA PÁGINA DE ALIMENTAÇÃO --- */

/* Menu de Dias (Abas) */
.menu-dias-semana {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.btn-dia {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-weight: bold;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-dia.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Cards de Refeição */
.card-refeicao {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 6px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.icone-prato {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cores específicas */
.lanche { border-color: #f59e0b; } /* Amarelo */
.lanche .icone-prato { color: #d97706; background: #fffbeb; }

.almoco { border-color: #dc2626; } /* Vermelho */
.almoco .icone-prato { color: #b91c1c; background: #fef2f2; }

/* Ordem da Fila */
.card-fila {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}
.fila-numeros {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
    color: #fbbf24; /* Dourado */
    letter-spacing: 2px;
}

/* Modo Escuro */
body.dark .menu-dias-semana { background: #1e293b; }
body.dark .btn-dia { color: #94a3b8; }
body.dark .btn-dia.active { color: white; background: #3b82f6; }
body.dark .card-refeicao { background: #1e293b; }
body.dark .card-refeicao h3 { color: #e2e8f0; margin: 0 0 5px 0; }
body.dark .card-refeicao p { color: #cbd5e1; margin: 0; }
body.dark .lanche .icone-prato { background: #451a03; }
body.dark .almoco .icone-prato { background: #450a0a; }
/* =========================================
   ESTILOS DO MODAL GERADOR DE IMAGEM
========================================= */
/* Modo Claro (Padrão) */
.gerador-modal-box { background: #ffffff; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.gerador-titulo { color: #1e293b; }
.gerador-controles { background: #f1f5f9; }
.gerador-label { color: #475569; }
.gerador-data-box { background: #e2e8f0; }
.gerador-data-input { background: #ffffff; color: #1e293b; border: 1px solid #cbd5e1; }

/* Modo Escuro */
body.dark .gerador-modal-box { background: #1e293b; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
body.dark .gerador-titulo { color: #ffffff; }
body.dark .gerador-controles { background: #334155; }
body.dark .gerador-label { color: #cbd5e1; }
body.dark .gerador-data-box { background: #0f172a; }
body.dark .gerador-data-input { background: #1e293b; color: #f1f5f9; border: 1px solid #475569; }

/* --- BOAS-VINDAS DA MAI (HOME) --- */
.mai-welcome {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

/* O Avatar da Coruja */
.mai-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    border: 4px solid white;
    animation: flutuarMAI 3s ease-in-out infinite;
    overflow: visible;
}

@keyframes flutuarMAI {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.mascote-zoom {
    width: 100%;
    height: auto;
    transform: scale(1.8) translateY(-5px); 
    object-fit: contain;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.2));
}

/* O Balão de Fala */
.mai-balao {
    background: white;
    padding: 15px 25px;
    border-radius: 20px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    flex: 1; 
    border: 1px solid #e2e8f0;
}

/* Triângulo do balão (Seta) */
.mai-balao::before {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 15px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
    filter: drop-shadow(-2px 2px 1px rgba(0,0,0,0.05));
}

.mai-balao h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #1e3a8a;
}

.mai-balao p {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.4;
}
/* Fila Mini (dentro dos cards) */
.fila-mini {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-size: 12px;
    font-weight: bold;
    color: #4b5563;
}
body.dark .fila-mini {
    color: #9ca3af;
    border-top-color: rgba(255,255,255,0.1);
}

/* --- ESTILOS DO EDITOR DE CARDÁPIO (PERFIL) --- */
.box-refeicao {
    padding: 15px; 
    border-radius: 12px; 
    margin-bottom: 15px;
    border: 1px solid transparent;
    position: relative;
    z-index: 1; 
}

/* Modo CLARO */
.box-refeicao.lanche { background: #fff7ed; border-color: #ffedd5; }
.box-refeicao.lanche h4 { color: #c2410c; margin: 0 0 10px 0; }

.box-refeicao.almoco { background: #fef2f2; border-color: #fee2e2; }
.box-refeicao.almoco h4 { color: #b91c1c; margin: 0 0 10px 0; }

/* Modo ESCURO */
body.dark .box-refeicao.lanche { background: #431407; border-color: #7c2d12; }
body.dark .box-refeicao.lanche h4 { color: #fdba74; }

body.dark .box-refeicao.almoco { background: #450a0a; border-color: #7f1d1d; }
body.dark .box-refeicao.almoco h4 { color: #fca5a5; }

.box-refeicao .select-trigger {
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
}
body.dark .box-refeicao .select-trigger {
    background-color: rgba(0,0,0,0.3); 
    border-color: rgba(255,255,255,0.1);
}

/* Ajustes Mobile */
@media (max-width: 600px) {
    .mai-welcome { gap: 15px; }
    .mai-avatar { width: 55px; height: 55px; font-size: 26px; }
    .mai-balao { padding: 12px 18px; }
    .mai-balao h2 { font-size: 16px; }
    .mai-balao p { font-size: 13px; }
}
/* ESTILO PADRÃO DE TÍTULOS DAS PÁGINAS */
.titulo-pagina {
  text-align: center;
  margin-bottom: 25px;
  animation: fadeIn 0.5s ease-out;
  padding-top: 10px;
}

.titulo-pagina h2 {
  margin: 10px 0 5px 0;
  font-size: 28px;
  color: #1e3a8a;
}

.titulo-pagina p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.icone-titulo {
  font-size: 40px;
  color: #f59e0b; 
  background: #fffbeb;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ==========================================================================
   SISTEMA DE MODAIS MAI (Custom Alerts)
   ========================================================================== */
.mai-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mai-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mai-modal-box {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.mai-modal-overlay.active .mai-modal-box {
    transform: scale(1);
}

body.dark .mai-modal-box {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
}

.mai-modal-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.mai-modal-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1e3a8a;
}
body.dark .mai-modal-title { color: #60a5fa; }

.mai-modal-text {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}
body.dark .mai-modal-text { color: #94a3b8; }

.mai-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mai-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: filter 0.2s;
    font-size: 14px;
}
.mai-btn:hover { filter: brightness(0.9); }

.mai-btn-confirm { background: #16a34a; color: white; flex: 1; }
.mai-btn-cancel { background: #ef4444; color: white; flex: 1; }
.mai-btn-close { background: #2563eb; color: white; width: 100%; }

/* Modo Escuro para os Títulos */
body.dark .titulo-pagina h2 { color: #f1f5f9; }
body.dark .titulo-pagina p { color: #94a3b8; }
body.dark .icone-titulo { background: #451a03; color: #fbbf24; }
/* Modo Escuro */
body.dark .mai-avatar { border-color: #1e293b; box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2); }
body.dark .mai-balao { background: #1e293b; border-color: #334155; }
body.dark .mai-balao h2 { color: #fbbf24; }
body.dark .mai-balao p { color: #cbd5e1; }
body.dark .mai-balao::before { border-color: transparent #1e293b transparent transparent; }

/* =========================================
   COOKIES
   ========================================= */
.cookie-box {
    position: fixed;
    bottom: -400px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background-color: #ffffff;
    color: #334155;
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e2e8f0;
    transition: bottom 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-box.ativo {
    bottom: 30px;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-content p a {
    color: #3b82f6;
    font-weight: 800;
    text-decoration: none;
}

.cookie-img {
    width: 60px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    animation: flutuar-coruja 3s infinite ease-in-out;
}

@keyframes flutuar-coruja {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.btn-cookie {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cookie:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

body.dark .cookie-box {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

body.dark .cookie-content p a {
    color: #60a5fa;
}

/* --- RESPONSIVIDADE (CELULAR) --- */
@media (max-width: 600px) {
    .cookie-box {
        flex-direction: column;
        text-align: center;
        padding: 25px;
        bottom: -500px;
    }
    .cookie-content {
        flex-direction: column;
    }
}

/* ==========================================================================
   TEMAS SAZONAIS
   ========================================================================== */

body[class*="tema-"] {
    color: #111827;
}

body.dark[class*="tema-"] {
    color: #e5e7eb;
}

/* --- ANO NOVO --- */
body.tema-anonovo {
    background-color: #fef9c3;
    background: linear-gradient(to bottom, #fef9c3 0%, #e5e7eb 100%) fixed; 
}
body.tema-anonovo.dark {
    background-color: #3f2e05;
    background: linear-gradient(to bottom, #3f2e05 0%, #0f172a 100%) fixed; 
}
body.tema-anonovo .topo {
    background-color: #eab308; 
    border-bottom: 2px solid #fff;
}
body.tema-anonovo.dark .topo {
    background-color: #a16207; 
    border-bottom: 1px solid #fef08a;
}
body.tema-anonovo .lua {
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.8); 
    border-color: #fce7f3;
}


/* --- VOLTA ÀS AULAS --- */
body.tema-volta-aulas {
    background-color: #f8fafc;
    background-image: 
        linear-gradient(#e2e8f0 1px, transparent 1px),
        linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
}
body.tema-volta-aulas.dark {
    background-color: #0f172a;
    background-image: 
        linear-gradient(#1e293b 1px, transparent 1px),
        linear-gradient(90deg, #1e293b 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
}
body.tema-volta-aulas .topo {
    background-color: #2563eb;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.15) 10px,
        rgba(255, 255, 255, 0.15) 20px
    );
    border-bottom: 3px solid #fbbf24;
    animation: moveStripes 20s linear infinite; 
}

body.tema-volta-aulas.dark .topo {
    background-color: #1e40af;
    border-bottom: 3px solid #f59e0b;
}

@keyframes moveStripes {
    from { background-position: 0 0; }
    to { background-position: 500px 0; }
}

/* --- CARNAVAL --- */
@keyframes folia-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
body.tema-carnaval {
    background: linear-gradient(-45deg, #fef08a, #a7f3d0, #fbcfe8, #bfdbfe) fixed;
    background-size: 400% 400%;
    animation: folia-bg 15s ease infinite;
}

body.tema-carnaval.dark {
    background: linear-gradient(-45deg, #2e1065, #4a044e, #0f172a, #172554) fixed;
    background-size: 400% 400%;
    animation: folia-bg 15s ease infinite;
}

body.tema-carnaval .topo {
    background: linear-gradient(90deg, #3b82f6, #a855f7, #ec4899, #eab308);
    background-size: 300% 300%;
    animation: folia-bg 8s ease infinite;
}

body.tema-carnaval.dark .topo {
    background: linear-gradient(90deg, #4c1d95, #be185d, #b45309, #1d4ed8);
    background-size: 300% 300%;
    animation: folia-bg 8s ease infinite;
}

body.tema-carnaval .icone-coruja {
    color: #fde047;
    filter: drop-shadow(0 0 5px rgba(253, 224, 71, 0.8));
}

body.tema-carnaval.dark .icone-coruja {
    color: #38bdf8;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.8));
}

body.tema-carnaval:not(.dark)::before {
    filter: hue-rotate(120deg) blur(50px) saturate(150%);
}

/* --- SÃO JOÃO --- */
body.tema-saojoao {
    background-color: #ffedd5;
    background: linear-gradient(to bottom, #ffedd5 0%, #fff7ed 100%) fixed; 
}
body.tema-saojoao.dark {
    background-color: #431407;
    background: linear-gradient(to bottom, #431407 0%, #0f172a 100%) fixed;
}
body.tema-saojoao .topo {
    background-color: #c2410c;
    background-image: radial-gradient(#ea580c 15%, transparent 16%), radial-gradient(#ea580c 15%, transparent 16%);
    background-size: 20px 20px; 
    background-position: 0 0, 10px 10px;
}
body.tema-saojoao.dark .topo {
    background-color: #7c2d12;
    background-image: radial-gradient(#9a3412 15%, transparent 16%), radial-gradient(#9a3412 15%, transparent 16%);
}
body.tema-saojoao .lua {
    background: radial-gradient(circle at 30% 30%, #fff, #ffedd5);
    border-color: #fdba74;
}
body.tema-saojoao.dark .lua {
    background: radial-gradient(circle at 30% 30%, #e2e8f0, #7c2d12);
    border-color: #c2410c;
}


/* --- DIA DO ESTUDANTE --- */
body.tema-estudante .topo {
    background: linear-gradient(135deg, #16a34a, #0d9488);
}
body.tema-estudante.dark .topo {
    background: linear-gradient(135deg, #14532d, #0f766e); 
}

body.tema-estudante .icone-coruja {
    color: #fff;
}


/* --- NATAL --- */
body.tema-natal {
    background-color: #fee2e2;
    background: linear-gradient(to bottom, #fee2e2 0%, #f3f4f6 100%) fixed;
}
body.tema-natal.dark {
    background-color: #450a0a;
    background: linear-gradient(to bottom, #450a0a 0%, #0f172a 100%) fixed;
}
body.tema-natal .topo {
    background-color: #b91c1c;
    border-bottom: 4px solid #15803d;
}
body.tema-natal.dark .topo {
    background-color: #7f1d1d; 
    border-bottom-color: #14532d;
}
body.tema-natal .lua {
    border: 2px solid #16a34a;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}
body.tema-natal.dark .lua {
    border-color: #15803d;
    box-shadow: 0 0 15px rgba(127, 29, 29, 0.4);
}

/* --- PÁSCOA --- */
body.tema-pascoa {
    background-color: #fffbeb;
    background: linear-gradient(to bottom, #fffbeb 0%, #fff7ed 100%) fixed;
}
body.tema-pascoa.dark {
    background-color: #451a03; 
    background: linear-gradient(to bottom, #451a03 0%, #0f172a 100%) fixed;
}
body.tema-pascoa .topo {
    background-color: #92400e; 
    border-bottom: 4px solid #fcd34d;
}
body.tema-pascoa.dark .topo {
    background-color: #78350f;
    border-bottom: 2px solid #d97706;
}
body.tema-pascoa .lua {
    border: 2px solid #fcd34d;
    box-shadow: 0 0 15px rgba(146, 64, 14, 0.5);
}

/* --- 18 DE MAIO --- */
body.tema-maio18 {
    background-color: #fefce8;
    background: linear-gradient(to bottom, #fefce8 0%, #fff7ed 100%) fixed;
}
body.tema-maio18.dark {
    background-color: #422006;
    background: linear-gradient(to bottom, #422006 0%, #0f172a 100%) fixed;
}
body.tema-maio18 .topo {
    background-color: #eab308; 
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.2) 10px, rgba(255,255,255,0.2) 20px);
}
body.tema-maio18.dark .topo {
    background-color: #a16207;
}
body.tema-maio18 .lua {
    border-color: #fca5a5;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.6);
}

/* --- OUTUBRO ROSA --- */
body.tema-outubro {
    background-color: #fdf2f8;
    background: linear-gradient(to bottom, #fdf2f8 0%, #fbcfe8 100%) fixed;
}
body.tema-outubro.dark {
    background-color: #500724;
    background: linear-gradient(to bottom, #500724 0%, #0f172a 100%) fixed;
}
body.tema-outubro .topo {
    background-color: #db2777; 
}
body.tema-outubro.dark .topo {
    background-color: #9d174d;
}
body.tema-outubro .lua {
    border-color: #fbcfe8;
    box-shadow: 0 0 15px rgba(219, 39, 119, 0.6);
}

/* ==========================================================================
   CUSTOMIZAÇÃO DO MENU SAZONAL
   ========================================================================== */

/* --- NATAL --- */
body.tema-natal .menu-overlay {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d); 
}
body.tema-natal.dark .menu-overlay {
    background: linear-gradient(135deg, #7f1d1d, #0f172a); 
}
body.tema-natal .links-menu a i {
    color: #4ade80; 
}

/* --- VOLTA ÀS AULAS --- */
body.tema-volta-aulas .menu-overlay {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}
body.tema-volta-aulas.dark .menu-overlay {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}
body.tema-volta-aulas .links-menu a i {
    color: #fcd34d;
}
.elemento-escolar {
    position: fixed;
    font-size: 24px;
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
    animation: floatUp linear infinite;
}

body.dark .elemento-escolar {
    opacity: 0.15;
}

@keyframes floatUp {
    0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.2; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}
/* --- SÃO JOÃO --- */
body.tema-saojoao .menu-overlay {
    background: linear-gradient(135deg, #c2410c, #9a3412);
}
body.tema-saojoao.dark .menu-overlay {
    background: linear-gradient(135deg, #7c2d12, #0f172a);
}
body.tema-saojoao .links-menu a i {
    color: #fbbf24; 
}

/* --- CARNAVAL --- */
body.tema-carnaval .menu-overlay {
    background: linear-gradient(135deg, #0ea5e9, #a855f7, #ec4899);
    background-size: 200% 200%;
    animation: folia-bg 6s ease infinite;
}

body.tema-carnaval.dark .menu-overlay {
    background: linear-gradient(135deg, #4c1d95, #831843, #1e3a8a);
    background-size: 200% 200%;
    animation: folia-bg 6s ease infinite;
}

body.tema-carnaval .links-menu a i {
    color: #facc15;
}

body.tema-carnaval.dark .links-menu a i {
    color: #2dd4bf;
}

/* --- ANO NOVO --- */
body.tema-anonovo .menu-overlay {
    background: linear-gradient(135deg, #eab308, #a16207); 
}
body.tema-anonovo.dark .menu-overlay {
    background: linear-gradient(135deg, #a16207, #0f172a);
}
body.tema-anonovo .links-menu a i {
    color: #ffffff; 
}

/* --- DIA DO ESTUDANTE --- */
body.tema-estudante .menu-overlay {
    background: linear-gradient(135deg, #16a34a, #14532d); 
}
body.tema-estudante.dark .menu-overlay {
    background: linear-gradient(135deg, #14532d, #0f172a);
}
body.tema-estudante .links-menu a i {
    color: #fcd34d; 
}

/* --- PÁSCOA --- */
body.tema-pascoa .menu-overlay {
    background: linear-gradient(135deg, #92400e, #78350f);
}
body.tema-pascoa.dark .menu-overlay {
    background: linear-gradient(135deg, #451a03, #0f172a);
}
body.tema-pascoa .links-menu a i {
    color: #fcd34d;
}

/* --- 18 DE MAIO --- */
body.tema-maio18 .menu-overlay {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}
body.tema-maio18.dark .menu-overlay {
    background: linear-gradient(135deg, #854d0e, #0f172a);
}
body.tema-maio18 .links-menu a i {
    color: #fff;
}

/* --- OUTUBRO ROSA --- */
body.tema-outubro .menu-overlay {
    background: linear-gradient(135deg, #db2777, #be185d);
}
body.tema-outubro.dark .menu-overlay {
    background: linear-gradient(135deg, #831843, #0f172a);
}
body.tema-outubro .links-menu a i {
    color: #fbcfe8;
}

/* Botão de Som Flutuante */
.btn-som-flutuante {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-som-flutuante:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Quando estiver tocando, dá um brilho */
.btn-som-flutuante.tocando {
    background: #10b981;
    border-color: #10b981;
    animation: pulseAudio 2s infinite;
}

@keyframes pulseAudio {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

body.dark .btn-som-flutuante {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}
/* =========================================
   MODAL DE OPÇÕES DE MENSAGEM
   ========================================= */

.modal-opcoes-msg-content {
    text-align: center;
    padding: 25px 20px;
    gap: 10px;
}

.modal-opcoes-msg-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #1e293b;
}

.btn-msg-opcao {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
}

.btn-mim {
    background-color: #f1f5f9;
    color: #475569;
}
.btn-mim:hover {
    background-color: #e2e8f0;
}

.btn-todos {
    background-color: #fee2e2;
    color: #dc2626;
}
.btn-todos:hover {
    background-color: #fecaca;
}

.btn-cancelar-msg {
    width: 100%;
    background: none;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    margin-top: 5px;
    transition: color 0.2s;
}
.btn-cancelar-msg:hover {
    color: #1e293b;
    text-decoration: underline;
}

body.dark .modal-opcoes-msg-content h3 { color: #f1f5f9; }

body.dark .btn-mim {
    background-color: #334155;
    color: #cbd5e1;
}
body.dark .btn-mim:hover { background-color: #475569; }

body.dark .btn-todos {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
body.dark .btn-todos:hover { background-color: rgba(239, 68, 68, 0.25); }

body.dark .btn-cancelar-msg { color: #94a3b8; }
body.dark .btn-cancelar-msg:hover { color: #f1f5f9; }

/* =========================================
   ANIMAÇÕES DO MODAL DE OPÇÕES
   ========================================= */

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popInModal {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

#modal-opcoes-msg {
    animation: fadeInOverlay 0.2s ease-out forwards;
}

#modal-opcoes-msg .modal-opcoes-msg-content {
    animation: popInModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
/* =========================================================
   Garde Editor do Horário de Expediente
   ========================================================= */

.grade-editor-container {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

#editor-horario-prof {
    width: 100% !important;
}

.grade-clean-container {
    width: 100%;
    margin: 15px 0;
    padding: 0;
}

.grade-clean-grid {
    display: grid;
    grid-template-columns: 40px repeat(5, minmax(0, 1fr)); 
    gap: 6px; 
    width: 100%; 
    align-items: center;
    box-sizing: border-box;
}
.clean-cell {
    width: 100%;
    height: 42px; 
    box-sizing: border-box;
    background-color: #f3e8ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #a855f7;
    font-size: 16px; 
    border: 1px solid transparent;
}

@media (min-width: 768px) {
    .grade-clean-grid {
        gap: 12px; 
        grid-template-columns: 50px repeat(5, minmax(0, 1fr)); 
        max-width: 650px;
        margin: 0 auto;
    }
    .clean-cell {
        height: 48px;
        font-size: 18px;
        border-radius: 10px;
    }
    .clean-header { font-size: 14px; }
    .clean-label { font-size: 14px; }
}
.clean-header { 
    text-align: center; 
    font-size: 12px; 
    font-weight: 800; 
    color: #64748b; 
    margin-bottom: 5px; 
    text-transform: uppercase;
}

.clean-label { 
    text-align: right; 
    font-size: 13px; 
    font-weight: 700; 
    color: #94a3b8; 
    padding-right: 10px; 
}

.clean-cell:hover {
    background-color: #ede9fe;
    border-color: #c084fc;
}

.clean-cell.ocupado {
    background-color: #2563eb;
    color: white !important;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

@media (min-width: 768px) {
    .clean-cell.ocupado { font-size: 15px; }
}

/* MODO ESCURO */
body.dark .clean-header { color: #cbd5e1; }
body.dark .clean-cell { background-color: #2e1065; color: #c084fc; }
body.dark .clean-cell.ocupado { background-color: #3b82f6; color: white; }
body.dark .clean-cell:hover { background-color: #3b0764; }

/* Animação Lottie*/
#lottie-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#lottie-overlay.show {
    opacity: 1;
}

#lottie-player {
    width: 80% !important;
    max-width: 300px;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

/* Modal Vídeos ENEM*/
#lista-videos-enem-admin::-webkit-scrollbar {
    width: 6px;
}
#lista-videos-enem-admin::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
body.dark #lista-videos-enem-admin::-webkit-scrollbar-thumb {
    background: #475569;
}

.item-video-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    transition: 0.2s;
}

body.dark .item-video-admin {
    background: #1e293b;
    border-color: #334155;
}

.item-video-admin:hover {
    transform: scale(1.01);
}

textarea#novo-grupo-desc {
    resize: none;
    overflow: hidden;
    min-height: 42px;
    width: 100%;
}

.grupo-descricao {
    margin: 0 0 10px 0;
    font-size: 13px;
    flex: 1;
    color: #666;
}

body.dark .grupo-descricao {
    color: #94a3b8;
}

/* ==========================================
   SISTEMA DE NOTIFICAÇÕES INTERNAS
   ========================================== */
:root {
    --notif-bg: #ffffff;
    --notif-text: #1e293b;
    --notif-subtext: #64748b;
    --notif-accent: #2563eb;
    --notif-badge: #ef4444;
    --notif-border: #e2e8f0;
    --notif-shadow: rgba(0, 0, 0, 0.1);
}

body.dark {
    --notif-bg: #1e293b;
    --notif-text: #f1f5f9;
    --notif-subtext: #94a3b8;
    --notif-accent: #60a5fa;
    --notif-border: #334155;
    --notif-shadow: rgba(0, 0, 0, 0.4);
}

/* Bolinha de notificação do Menu */
.bolinha-notificacao {
    background-color: var(--notif-badge);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 0 0 2px var(--notif-bg); 
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Container dos Toasts */
#toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

/* O card da notificação */
.toast-notificacao {
    pointer-events: auto;
    background: var(--notif-bg);
    color: var(--notif-text);
    border-left: 5px solid var(--notif-accent);
    border-right: 1px solid var(--notif-border);
    border-top: 1px solid var(--notif-border);
    border-bottom: 1px solid var(--notif-border);
    box-shadow: 0 8px 20px -5px var(--notif-shadow);
    border-radius: 12px;
    padding: 16px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateX(130%);
    backdrop-filter: blur(8px);
}

.toast-notificacao.mostrar {
    transform: translateX(0);
}

.toast-notificacao.dragging {
    transition: none !important;
    cursor: grabbing;
}

.toast-notificacao:hover {
    transform: translateY(-3px);
    background: var(--notif-bg);
}

.toast-header {
    font-weight: 700;
    font-size: 14px;
    color: var(--notif-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-header i {
    color: var(--notif-accent);
}

.toast-body {
    font-size: 13px;
    color: var(--notif-subtext);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Animação de entrada */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Ajuste para Mobile */
@media (max-width: 480px) {
    #toast-container {
        top: 15px;
        bottom: auto;
        right: 15px;
        left: 15px;
        flex-direction: column;
    }
    
    .toast-notificacao {
        width: auto;
        transform: translateY(-130%);
        box-shadow: 0 4px 12px var(--notif-shadow);
    }

    .toast-notificacao.mostrar {
        transform: translateY(0);
    }
}
