/* Portal (Área dos Pais + Administrativo) — estilo "accent ladder":
   o azul royal cheio só em marcas pequenas (botão, ícone ativo, dado principal);
   os tons claros do azul fazem as áreas. Shell "open plane": sidebar no próprio fundo, sem barra superior.
   Grade: canvas = 1440 - 248 (sidebar) = 1192; padding 32 + 32 → 1128 úteis;
   colunas 1fr + 360 com gap 24 → 744 + 24 + 360 = 1128. */
body { background: var(--ground); color: var(--text); font: 400 14px/20px var(--sans); }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100svh; }
.side { position: sticky; top: 0; height: 100svh; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand img { width: 44px; height: 33px; object-fit: cover; border-radius: 6px; }
.brand b { display: block; font: 700 15px/1.2 var(--sans); }
.brand small { display: block; font: 400 12px/1.3 var(--sans); color: var(--muted); }
.side .grp { margin: 20px 10px 6px; font: 500 12px/1 var(--sans); color: var(--faint); }
.side a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.side a:hover { background: var(--raised); color: var(--text); }
.side a[aria-current] { background: var(--blue-100); color: var(--blue-ink); font-weight: 600; }
.side a[aria-current] svg { stroke: var(--blue); }
.side svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side .count { margin-left: auto; font: 600 12px/1 var(--sans); color: var(--blue-ink); background: var(--blue-100); padding: 3px 7px; border-radius: 999px; }
.side a[aria-current] .count { background: #fff; }
.side .user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--sans); flex: none; }

.canvas { padding: 32px; min-width: 0; }
.title { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.title h1 { font: 700 24px/30px var(--sans); letter-spacing: -0.01em; }
.title p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.title p b { color: var(--text); font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; } .btn.primary:hover { background: var(--blue-ink); }
.btn.ghost { background: var(--surface); border-color: var(--control); color: var(--text); } .btn.ghost:hover { background: var(--raised); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.card > header h2 { font: 600 16px/22px var(--sans); }
.card > header a { font: 500 13px var(--sans); color: var(--blue); }
.card .body { padding: 14px 20px 18px; }
.rail-h { font: 600 16px/22px var(--sans); margin: 0 0 8px; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 12px/1 var(--sans); white-space: nowrap; }
.pill.ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill.neu { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.pill.blue { background: var(--blue-100); color: var(--blue-ink); }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 500 12px/1 var(--sans); color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 0 12px; height: 48px; border-bottom: 1px solid var(--rule); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--blue-50); }
th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
.r { text-align: right; }
.mut { color: var(--muted); }
.sub { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }

.list > li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.date { width: 44px; flex: none; text-align: center; border-radius: 8px; background: var(--blue-50); padding: 6px 0; }
.date b { display: block; font: 700 18px/1 var(--sans); color: var(--blue-ink); }
.date small { font: 600 11px/1 var(--sans); color: var(--muted); text-transform: lowercase; }
.list h3 { font: 600 14px/20px var(--sans); }
.list p { font-size: 13px; color: var(--muted); line-height: 18px; }

@media (max-width: 760px) {
  .app { display: block; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side > :not(.brand) { display: none; } .brand { padding: 0; }
  .canvas { padding: 20px 16px; }
  .title { flex-direction: column; align-items: stretch; } .title .btn { justify-content: center; height: 44px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card .body { overflow-x: auto; }
  .kids { grid-template-columns: minmax(0, 1fr) !important; }
}
