/* Portal de Empréstimo de Portáteis */
:root {
  /* Paleta inspirada no portal da Infoi9: azul-noite + azul elétrico */
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #e1e6ef;
  --text: #10172a;
  --text-2: #5a6478;
  --nav: #0b1530;
  --nav-2: #13234a;
  --brand: #0f6bff;
  --brand-2: #0a56d4;
  --brand-soft: #e3edff;
  --grad: linear-gradient(90deg, #1683ff 0%, #0a56d4 100%);
  --ok: #2f7d4f;    --ok-soft: #e2f2e8;
  --info: #2a5fa8;  --info-soft: #e3ecf8;
  --warn: #a8670f;  --warn-soft: #fbf0dc;
  --bad: #b33a3a;   --bad-soft: #f8e4e2;
  --muted: #6d7570; --muted-soft: #eceee9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 21, 48, .06), 0 1px 1px rgba(11, 21, 48, .03);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--text-2); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 12px; }
.right { text-align: right; }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  background: radial-gradient(500px 300px at 120% 105%, rgba(15,107,255,.35), transparent 70%), var(--nav);
  color: #c9d4ea; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 4px 8px 20px; }
.brand-logos { display: flex; gap: 8px; }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand span { display: block; font-size: 11.5px; color: #8fa0c3; line-height: 1.3; }
.brand strong { font-style: italic; font-weight: 800; letter-spacing: -.01em; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #fff; flex: none; }
.brand-logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; padding: 5px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.brand-logo img { max-width: 100%; max-height: 100%; }
.brand-mark.lg { width: 54px; height: 54px; border-radius: 13px; background: var(--brand); margin: 0 auto 12px; }
.brand-mark.lg .ico { width: 28px; height: 28px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #c9d4ea; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.side nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(15,107,255,.35); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #e6b54a; color: #3b2a05; display: grid; place-items: center; font-weight: 700; flex: none; }
.me-txt { flex: 1; min-width: 0; }
.me-txt strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt span { font-size: 11.5px; color: #8fa0c3; }
.me .icon-btn { color: #c9d4ea; }

.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 10px; padding: 22px 32px 6px; max-width: 1320px; }
.top h1 { font-size: 24px; letter-spacing: -.015em; font-style: italic; font-weight: 800; color: var(--nav); }
.content { padding: 8px 32px 48px; max-width: 1320px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 7px; color: inherit; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(127,127,127,.15); }
.menu-btn { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.lead { margin: 0; color: var(--text-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 600 13.5px/1.2 var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: #c7ccc2; background: var(--surface-2); }
.btn .ico { width: 16px; height: 16px; }
.btn.primary { background: var(--grad); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.ms { gap: 10px; }

/* ---------- Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.highlight { border-color: #b7cde8; background: linear-gradient(0deg, var(--surface), var(--surface)), var(--info-soft); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2 { font-size: 15.5px; }
.card-h a { font-size: 13px; }
.card-h.pad { padding: 16px 20px 0; }
.card-f { margin-top: 14px; }
.sub-h { font-size: 13px; color: var(--text-2); margin: 18px 0 8px; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols > * { min-width: 0; }
.cols.c-2-1 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px;
  display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--nav); }
a.kpi:hover { text-decoration: none; border-color: #c7ccc2; }
.kpi span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.kpi strong { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; color: var(--text-2); }
.kpi-ok::before { background: var(--ok); }   .kpi-ok strong { color: var(--ok); }
.kpi-info::before { background: var(--info); } .kpi-info strong { color: var(--info); }
.kpi-warn::before { background: var(--warn); } .kpi-warn strong { color: var(--warn); }
.kpi-bad::before { background: var(--bad); }   .kpi-bad strong { color: var(--bad); }

/* ---------- Gráficos ---------- */
.stackbar { display: flex; height: 20px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--muted-soft); }
.stackbar span { display: block; min-width: 4px; }
.seg-ok, .dot-ok { background: var(--ok); }
.seg-info, .dot-info { background: var(--info); }
.seg-warn, .dot-warn { background: var(--warn); }
.seg-bad, .dot-bad { background: var(--bad); }
.seg-muted, .dot-muted { background: #9aa39d; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.legend a, .legend li { display: flex; align-items: center; gap: 9px; color: var(--text); padding: 5px 6px; border-radius: 6px; }
.legend li:has(> a) { padding: 0; }
.legend a { flex: 1; }
.legend a:hover { text-decoration: none; background: var(--surface-2); }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend small { width: 40px; text-align: right; color: var(--text-2); }
.legend.inline { display: flex; gap: 16px; margin-top: 10px; }
.legend.inline li { padding: 0; font-size: 12.5px; color: var(--text-2); }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.bar { width: 40%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; position: relative; }
.bar b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--text-2); font-weight: 600; }
.b-e { background: var(--info); }
.b-d { background: var(--ok); }
.bar-col small { margin-top: 6px; margin-bottom: -24px; color: var(--text-2); font-size: 12px; }
.bars + .legend { margin-top: 30px; }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars a { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; color: var(--text); }
.hbars a:hover { text-decoration: none; }
.hbars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars i { height: 12px; border-radius: 4px; background: var(--grad); display: block; }
.hbars b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; color: var(--text); }
.list a:hover { text-decoration: none; background: var(--surface-2); }
.list .right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.list small { color: var(--text-2); font-size: 12px; }
.sub { color: var(--text-2); font-size: 12.5px; }
.split { display: flex; justify-content: space-between; gap: 12px; }
.split .right { display: flex; flex-direction: column; align-items: flex-end; color: var(--text-2); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li:last-child { padding-bottom: 0; }
.timeline p { margin: 0; }
.timeline small { color: var(--text-2); font-size: 12px; }
.timeline .t-entrega::before { border-color: var(--info); }
.timeline .t-devolucao::before { border-color: var(--ok); }
.timeline .t-estado::before { border-color: var(--warn); }
.timeline .t-nota::before { border-color: #9aa39d; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #f3f7ff; }
.table tr.off td { opacity: .6; }
.table .num { color: var(--text-2); font-variant-numeric: tabular-nums; }
.acc span { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; margin: 0 2px 2px 0; }
.acc .y { background: var(--ok-soft); color: var(--ok); }
.acc .n { background: var(--muted-soft); color: #a3aaa5; text-decoration: line-through; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--muted-soft); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; color: var(--text); font-size: 13px; }
.chip:hover { text-decoration: none; border-color: #c7ccc2; }
.chip b { color: var(--text-2); font-weight: 600; }
.chip.on { background: var(--nav); border-color: var(--nav); color: #fff; }
.chip.on b { color: #a9b8d8; }
.chip-bad:not(.on) b { color: var(--bad); }

/* ---------- Formulários ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 220px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid #cfd4ca; border-radius: 8px; padding: 8px 10px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand-2); }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
label small { font-weight: 400; color: var(--text-2); }
.filters select { width: auto; }
.form { padding: 4px 22px 18px; }
.fs { border: 0; padding: 0; margin: 18px 0 0; }
.fs legend { font-weight: 800; font-style: italic; font-size: 15px; padding: 0; margin-bottom: 12px; color: var(--nav); }
.fs + .fs { border-top: 1px solid var(--line); padding-top: 18px; }
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-form select { width: auto; padding: 5px 8px; }
td .inline-form { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.toggles { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.toggle { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; border: 1px solid var(--line); padding: 9px 13px; border-radius: 8px; cursor: pointer; background: var(--surface-2); }
.toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.toggle.mt { align-self: end; }
.seg { display: inline-flex; border: 1px solid #cfd4ca; border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.seg label { flex-direction: row; align-items: center; gap: 7px; padding: 7px 16px; cursor: pointer; font-weight: 500; }
.seg label + label { border-left: 1px solid #cfd4ca; }
.seg input { width: auto; accent-color: var(--brand); }
.seg label:has(input:checked) { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.field-static { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; align-items: flex-start; }
.field-static small { font-weight: 400; color: var(--text-2); }
.input-btn { display: flex; gap: 8px; }
.input-btn input { flex: 1; }
.aluno-busca { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 14px; align-items: end; }
.aluno-card { min-height: 64px; border: 1px dashed #c9d2e3; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; background: var(--surface-2); }
.aluno-card strong { font-size: 15px; }
.aluno-card span { font-size: 13px; color: var(--text-2); }
.aluno-card.ok { border-style: solid; border-color: #b9d8c4; background: var(--ok-soft); }
.aluno-card.bad { border-style: solid; border-color: #efc7c3; background: var(--bad-soft); color: #8a2727; }
.aluno-card.bad span { color: #8a2727; }
.aluno-card .warn { color: var(--warn); font-weight: 600; }
.aluno-card .geweb-ok { color: var(--ok); font-weight: 600; }
@media (max-width: 820px) { .aluno-busca { grid-template-columns: 1fr; } }

/* ---------- Ano letivo / arquivo ---------- */
.top { flex-wrap: wrap; }
.ano-sel, .ano-tag { margin-left: auto; }
.ano-sel label { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.ano-sel select { width: auto; padding: 7px 32px 7px 12px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.ano-sel.atual select { background-color: #e3f5ea; color: #1d6b3d; border: 1.5px solid #3fa66a; }
.ano-sel.arquivo select { background-color: #fff4d6; color: #6b4b00; border: 1.5px solid #e0b545; }
.ano-sel.atual label span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2f9e5b; margin-right: 6px; box-shadow: 0 0 0 3px rgba(47,158,91,.18); }
.ano-tag { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 9px; }
.ano-tag.atual { background: #e3f5ea; color: #1d6b3d; border: 1.5px solid #3fa66a; }
.ano-tag small { font-weight: 500; color: #3d7a55; margin-right: 4px; }
.arquivo-banner { max-width: 1256px; margin: 6px 32px 0; padding: 10px 14px; border-radius: 10px; background: #fff4d6; border: 1px solid #f0d58a; color: #6b4b00; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.arquivo-banner span { flex: 1; min-width: 220px; }
.modo-arquivo .side { background: radial-gradient(500px 300px at 120% 105%, rgba(240,180,40,.25), transparent 70%), #2a2410; }
.modo-arquivo form[method=post], .modo-arquivo .danger-zone { display: none !important; }
.copias td .acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.copias td .acoes form { display: inline; }
.check-col { width: 34px; }
.check-col input { width: 17px; height: 17px; accent-color: var(--brand); }
.bulk-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.bulk-bar[hidden] { display: none; }
.passos { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
@media (max-width: 820px) { .arquivo-banner { margin: 6px 16px 0; } }

.card.perigo { border-color: #efc7c3; }
.card.perigo h2 { color: var(--bad); }

/* ---------- Termo assinado / registos ---------- */
.termo-ok { display: flex; flex-direction: column; gap: 2px; margin-top: 0; border-color: #b9d8c4; background: var(--ok-soft); }
.upload-termo { padding-top: 12px; border-top: 1px solid var(--line); }
.small { font-size: 12.5px; }
.mini-log { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12.5px; display: grid; gap: 6px; }
.mini-log li { padding: 6px 9px; border-radius: 7px; background: var(--surface-2); overflow-wrap: anywhere; }
.mini-log li.ok b { color: var(--ok); }
.mini-log li.bad b { color: var(--bad); }
[hidden] { display: none !important; }

/* ---------- Configurações ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.set-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #cfd6e4; transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(15,107,255,.3); }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars code { background: var(--brand-soft); color: var(--brand-2); padding: 2px 7px; border-radius: 6px; font-size: 12px; }
.estado-svc { display: flex; align-items: center; gap: 8px; font-weight: 600; }
@media (max-width: 1080px) { .set-grid { grid-template-columns: 1fr; } }

/* ---------- Fotografias ---------- */
.eq-cell { display: flex; gap: 12px; align-items: center; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--surface-2); }
.thumb.vazia { display: grid; place-items: center; color: #a3adc2; }
.foto-campo { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.foto-preview { aspect-ratio: 4/3; border: 1px dashed #c9d2e3; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.foto-preview img { width: 100%; height: 100%; object-fit: cover; }
.foto-ficha { display: block; margin-bottom: 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); max-width: 420px; }
.foto-ficha img { display: block; width: 100%; max-height: 300px; object-fit: contain; }
.foto-ficha.vazia { padding: 18px; text-align: center; color: var(--brand); font-weight: 600; border-style: dashed; }
@media (max-width: 820px) { .foto-campo { grid-template-columns: 1fr; } }

/* ---------- Ficha ---------- */
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.specs dt { font-size: 12px; color: var(--text-2); font-weight: 600; }
.specs dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.note { margin-top: 14px; padding: 10px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Alertas / vazios ---------- */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { background: var(--ok-soft); color: #1f5a37; border-color: #c4e3cf; }
.alert-info { background: var(--info-soft); color: #23497f; border-color: #c8d9f0; }
.alert-warn { background: var(--warn-soft); color: #7a4a08; border-color: #f0dcb4; }
.alert-bad { background: var(--bad-soft); color: #8a2727; border-color: #efc7c3; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty.sm { padding: 18px 10px; }
.empty .btn { margin-top: 8px; }
.danger-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 4px; }
.danger-zone small { color: var(--text-2); }

.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 4px 0 20px; color: var(--text-2); }

/* ---------- Pesquisa AD ---------- */
.ad-search { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ad-results { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow: auto; }
.ad-results li button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 9px; border-radius: 7px; cursor: pointer; font: inherit; color: var(--text); }
.ad-results li button:hover { background: var(--surface-2); }
.ad-results li button:disabled { opacity: .55; cursor: default; }
.ad-results small { display: block; color: var(--text-2); }
.ad-results .msg { padding: 8px 9px; color: var(--text-2); font-size: 13px; }

/* ---------- Login (estilo Infoi9) ---------- */
.bare { min-height: 100vh; }
.auth { display: grid; grid-template-columns: 53fr 47fr; min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 600px at 85% 75%, #13285a 0%, transparent 60%), linear-gradient(160deg, #0d1a38 0%, #0b1530 55%, #08102a 100%); }
.auth-swoosh { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-hero-in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 56px 64px 48px; gap: 44px; }
.auth-brand { display: flex; align-items: center; gap: 18px; }
.auth-logos { display: flex; gap: 10px; }
.logo-tile { width: 76px; height: 76px; border-radius: 16px; background: #fff; display: grid; place-items: center; padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.logo-tile img { max-width: 100%; max-height: 100%; display: block; }
.auth-brand-txt { display: flex; flex-direction: column; gap: 2px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.25); }
.auth-brand-txt span { font-size: 12px; font-weight: 800; font-style: italic; letter-spacing: .18em; text-transform: uppercase; color: #d6e2ff; }
.auth-claim { margin-top: auto; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #b9c6e4; }
.auth-claim h1 { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.08; font-weight: 900; font-style: italic; letter-spacing: -.02em; margin: 0; }
.auth-claim h1 em { color: #2f8bff; font-style: italic; }
.auth-points { display: grid; gap: 16px; max-width: 560px; padding-left: 18px; border-left: 3px solid #2f8bff; }
.auth-points p { margin: 0; font-size: 16px; line-height: 1.55; color: #e4ebfa; }

.auth-panel { background: #f2f4f8; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 24px; }
.auth-form { width: 100%; max-width: 470px; margin: auto 0; }
.auth-form h2 { font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -.02em; color: var(--nav); margin: 0; }
.auth-sub { color: var(--text-2); margin: 8px 0 30px; font-size: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.lbl-caps { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #2b3550; gap: 9px; }
.lbl-caps input { height: 54px; border-radius: 10px; border-color: #d6dce8; font-size: 16px; padding: 0 16px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.lbl-caps input:focus { outline: 3px solid rgba(15,107,255,.18); border-color: var(--brand); }
.btn-auth { height: 54px; border: 0; border-radius: 10px; background: var(--grad); color: #fff; font: 700 16px var(--font); cursor: pointer; box-shadow: 0 10px 24px rgba(15,107,255,.35); margin-top: 4px; }
.btn-auth:hover { filter: brightness(1.06); }
.auth-help { margin: 22px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.auth-foot { font-size: 12.5px; color: #8a93a7; margin-top: 24px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero-in { padding: 32px 24px; gap: 26px; }
  .auth-points,   .auth-claim { margin-top: 0; }
  .auth-claim h1 { font-size: 28px; }
  .logo-tile { width: 60px; height: 60px; border-radius: 13px; }
  .auth-panel { padding: 32px 20px 20px; }
  .auth-form h2 { font-size: 28px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .cols, .cols.c-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: inline-grid; }
  .top { padding: 14px 16px 4px; }
  .top h1 { font-size: 19px; }
  .content { padding: 8px 16px 40px; }
  .g3, .specs { grid-template-columns: 1fr 1fr; }
  .span2 { grid-column: 1 / -1; }
  .form { padding: 4px 16px 16px; }
}
@media (max-width: 520px) {
  .g3, .specs { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 26px; }
  .page-head .actions { width: 100%; }
}
