/*
 * pages.css — Estilos específicos de páginas e modais
 * Saci Digital · v2.0
 */

/* ════════ MODAL GERAL ══════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,30,54,.5);
  z-index: 500;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--bgCard);
  border-radius: 18px;
  width: 90%; max-width: 600px;
  padding: 28px 30px;
  box-shadow: 0 20px 60px rgba(11,30,54,.3);
  max-height: 85vh; overflow-y: auto;
}
.modal-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.modal-ttl {
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; color: var(--text1);
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
}

/* Ficha técnica */
.ft-row  { display: flex; gap: 0; margin-bottom: 10px; }
.ft-lbl  { font-size: 11.5px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; min-width: 130px; flex-shrink: 0; }
.ft-val  { font-size: 13px; color: var(--text1); line-height: 1.6; }

/* ════════ MODAL APS ════════════════════════ */
#aps-modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(11,30,54,.5); z-index: 600;
  align-items: center; justify-content: center;
}
#aps-modal-bg.aps-mshow { display: flex; }
.aps-modal {
  background: var(--bgCard); border-radius: 17px;
  width: 90%; max-width: 580px;
  padding: 26px 28px;
  box-shadow: 0 20px 60px rgba(11,30,54,.3);
  max-height: 85vh; overflow-y: auto;
}
.aps-modal-hdr { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.aps-modal-ttl { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--text1); }
.aps-modal-close { width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--bg); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.aps-ft-row { display: flex; gap: 0; margin-bottom: 9px; }
.aps-ft-lbl { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; min-width: 115px; flex-shrink: 0; }
.aps-ft-val { font-size: 12.5px; color: var(--text1); line-height: 1.6; }

/* ════════ MATURIDADE ═══════════════════════ */
#page-maturidade .gauge-wrap { flex-shrink: 0; }

/* ════════ FINANCIAMENTO ════════════════════ */
#page-financiamento .fonte-row { margin-bottom: 12px; }

/* ════════ TRILHAS ══════════════════════════ */
#page-trilhas .filter-bar { margin-bottom: 4px; }

/* ════════ EDUCAÇÃO ═════════════════════════ */
#page-educacao .coming-area { opacity: .5; }
#page-educacao .coming-soon { padding: 60px 40px; }

/* ════════ GESTÃO / APS ═════════════════════ */
.a-lc.selected { outline: 2px solid currentColor; }

/* ════════ RESPONSIVIDADE ═══════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 68px; }
  #sidebar { width: 68px; }
  #sidebar .logo-text,
  #sidebar .sb-group-label,
  #sidebar .nav-label,
  #sidebar .nav-dot,
  #sidebar .sb-user-info { display: none; }
  #sidebar .nav-btn { justify-content: center; padding: 10px 0; }
  #main { margin-left: 68px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-content { flex-direction: column; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .topbar-title { font-size: 13px; }
  .tb-btn span { display: none; }
  .a-ind { grid-template-columns: 1fr 60px 50px 30px 80px 36px; gap: 6px; }
}

@media (max-width: 600px) {
  #content { padding: 16px 14px 40px; }
  .card { padding: 16px 18px; }
  .grid-kpi { grid-template-columns: 1fr 1fr; }
  .aps-subnav { gap: 3px; }
  .aps-nb { padding: 6px 9px; font-size: 11px; }
}
