/* ==========================================================================
   Intranet Marillac — Análise geral (visão geral)
   ========================================================================== */

.an-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.an-kpi { position: relative; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.an-kpi .al-kpi-ic { width: 38px; height: 38px; border-radius: 12px; }
.an-kpi .valor { font-size: 28px; }
.an-kpi .detalhe { padding-right: 18px; }
a.an-kpi:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(27, 42, 107, .45); }
.an-kpi-ir { position: absolute; right: 12px; bottom: 10px; color: var(--muted); transition: transform .25s var(--ease-mola), color .2s; }
a.an-kpi:hover .an-kpi-ir { transform: translateX(3px); color: var(--kc); }
.an-kpi:nth-child(5) .al-kpi-ic::after { animation-delay: 3.2s; }
.an-kpi:nth-child(6) .al-kpi-ic::after { animation-delay: 4s; }

.an-grade { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.an-principal, .an-lateral { display: grid; gap: 20px; min-width: 0; }
.an-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.an-duo > .bloco { display: flex; flex-direction: column; }

/* tabela de disciplinas */
.an-tabela td { vertical-align: middle; }
.an-badge {
  display: inline-grid; place-items: center; min-width: 30px; padding: 2px 8px; border-radius: 8px;
  background: var(--s-abaixo-bg); color: var(--s-abaixo); font-weight: 800; font-size: 12.5px;
}

/* média por segmento e bimestre */
.an-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 12px; color: var(--ink-2); }
.an-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.an-segbim { display: grid; gap: 14px; }
.an-segbim-g { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); animation: subir .4s var(--ease) backwards; animation-delay: calc(var(--i) * 80ms); }
.an-segbim-g:first-child { border-top: 0; padding-top: 0; }
.an-segbim-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.an-segbim-t b { color: var(--tx-titulo); display: inline-flex; align-items: center; gap: 7px; }
.an-segbim-t b::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.an-segbim-t small { font-size: 11.5px; color: var(--muted); }
.an-segbim-l { display: grid; grid-template-columns: 24px 1fr 40px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.an-segbim-l b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.an-trilho { height: 7px; border-radius: 99px; background: var(--trilho); overflow: hidden; }
.an-trilho span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1s var(--ease); }
.barras-prontas .an-trilho span { width: var(--w); }
.an-parcial { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: 12px; }

/* turmas por segmento */
.an-segs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.an-seg-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--c) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 20%, var(--line));
  transition: transform .25s var(--ease), box-shadow .25s; animation: card-entra .5s var(--ease) backwards; animation-delay: calc(var(--i) * 60ms);
}
.an-seg-card strong { display: block; font-size: 14px; color: var(--tx-titulo); }
.an-seg-card small { font-size: 12px; color: var(--muted); }
.an-seg-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.an-seg-ir { margin-left: auto; color: var(--muted); transition: transform .25s var(--ease-mola); }
a.an-seg-card:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--c) 70%, #0B1440); }
a.an-seg-card:hover .an-seg-ir { transform: translateX(3px); color: var(--c); }
a.an-seg-card:hover .an-seg-ic .ic { animation: ic-pulo .7s var(--ease-mola); }

/* alunos com mais faltas */
.an-faltas { list-style: none; margin: 0; padding: 0 0 8px; }
.an-faltas li { animation: subir .4s var(--ease) backwards; animation-delay: calc(var(--i) * 60ms); }
.an-faltas li > a, .an-faltas li > div {
  display: grid; grid-template-columns: 16px 30px minmax(0, 1fr) 70px 34px; gap: 10px; align-items: center;
  padding: 10px 20px; color: inherit; text-decoration: none; border-top: 1px solid var(--line);
}
.an-faltas li:first-child > * { border-top: 0; }
.an-faltas li > a:hover { background: var(--blue-50); }
.an-pos { font-size: 12px; color: var(--muted); font-weight: 700; }
.an-faltas-txt { min-width: 0; display: grid; }
.an-faltas-txt b { font-size: 12.5px; color: var(--tx-forte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-faltas-txt small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-faltas strong { text-align: right; color: var(--s-abaixo); font-variant-numeric: tabular-nums; font-size: 13px; }
.an-faltas-barra { height: 5px; border-radius: 99px; background: var(--trilho); overflow: hidden; }
.an-faltas-barra span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #E8622C, #BE123C); transition: width 1s var(--ease); }
.barras-prontas .an-faltas-barra span { width: var(--w); }
.an-nominal { display: flex; gap: 6px; align-items: center; margin: 4px 20px 14px; font-size: 12px; }

/* professores ativos */
.an-profs { list-style: none; margin: 0; padding: 0 0 8px; }
.an-profs a { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.an-profs li:first-child a { border-top: 0; }
.an-profs a:hover { background: var(--blue-50); }
.an-profs a > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.an-profs b { font-size: 12.5px; color: var(--tx-forte); }
.an-profs small { font-size: 11px; color: var(--muted); }
.an-profs .ic { color: var(--muted); transition: transform .25s var(--ease-mola); }
.an-profs a:hover .ic { transform: translateX(3px); color: var(--tx-forte); }
.an-profs li { animation: subir .4s var(--ease) backwards; animation-delay: calc(var(--i) * 60ms); }

/* informações importantes */
.an-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.an-info li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }
.an-info li:first-child { border-top: 0; padding-top: 0; }
.an-info li .ic { color: var(--navy-500); margin-top: 1px; }
.an-info li.aviso .ic { color: var(--s-na); }
.an-info li.ok .ic { color: var(--ok); }
.an-info b { display: block; color: var(--tx-titulo); margin-bottom: 2px; }
.an-info small { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }

@media (max-width: 1400px) { .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .an-grade { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .an-duo, .an-segs { grid-template-columns: 1fr; } .an-kpis { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .an-segbim-g, .an-seg-card, .an-faltas li, .an-profs li { animation: none; }
  .an-trilho span, .an-faltas-barra span { transition: none; }
}
