/* Radar Admin · mesma marca do Radar (Figtree, navy, teal), tela de operação densa */
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --frame: #f1f5f4; --surface: #ffffff; --raised: #f6f8f8; --active: #e2eae8; --border: #e3e8e7; --rule: #edf0f0;
  --control: #848f8e; --text: #0a1d38; --muted: #4e5a6b; --faint: #616c7d; --accent: #1a9e8b; --accent-ink: #137a6b;
  --positive: #137a6b; --negative: #b42318; --warning: #8a4b00; --primary-hover: #18304f;
  --pill-positive-bg: #ddf3ee; --pill-positive-ink: #0b4a41; --pill-negative-bg: #fdecea; --pill-negative-ink: #8a1c1c;
  --pill-neutral-bg: #edf0f0; --pill-neutral-ink: #34404f; --notice-bg: #fffaeb; --notice-border: #f3d38a;
  --font: "Figtree", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--frame); color: var(--text); font: 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.num, table, time { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topo { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--frame); position: sticky; top: 0; z-index: 5; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.marca img { width: 26px; height: 26px; }
.marca small { display: block; font-weight: 400; font-size: 12px; line-height: 16px; color: var(--muted); }
.abas { display: flex; gap: 2px; flex-wrap: wrap; }
.abas a { padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.abas a:hover, .abas a[aria-current="page"] { background: var(--active); color: var(--text); }
.quem-sou { margin-left: auto; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; }

main { margin: 0 8px 8px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; min-height: calc(100svh - 64px); }
.pagina { max-width: 1100px; display: grid; gap: 24px; }
.pagina > header h1 { font-size: 24px; line-height: 30px; }
.pagina > header p { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.painel { border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: grid; gap: 12px; }
.painel h2 { font-size: 16px; line-height: 22px; }
.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cartao { border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.cartao .rot { font-size: 12px; color: var(--muted); }
.cartao .val { font-size: 20px; line-height: 26px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.cartao .nota { font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--border); }
td { padding: 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; overflow-wrap: anywhere; }
td.acoes { white-space: nowrap; text-align: right; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.pill.ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.mal { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--control); background: var(--surface); cursor: pointer; }
.btn:hover { background: var(--raised); }
.btn.primario { background: var(--text); color: #fff; border-color: transparent; font-weight: 700; }
.btn.primario:hover { background: var(--primary-hover); }
.btn.perigo { color: var(--negative); border-color: var(--negative); }
.btn[disabled] { opacity: .55; cursor: default; }
.linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 700; font-size: 13px; }
.campo input[type="text"], .campo input[type="password"], .campo input[type="datetime-local"] { height: 40px; padding: 0 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); min-width: 220px; }
.aviso { padding: 12px 14px; border-radius: 10px; background: var(--notice-bg); border: 1px solid var(--notice-border); }
.aviso code { font-size: 16px; font-weight: 700; user-select: all; }
.erro { color: var(--negative); }
.logs { margin: 0; height: 60svh; overflow: auto; padding: 12px; border-radius: 10px; background: #0a1d38; color: #dfe8f1; font: 12px/18px ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.entrada { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.entrada form { width: min(100%, 400px); display: grid; gap: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.entrada h1 { font-size: 24px; line-height: 30px; }
.entrada .campo input { min-width: 0; width: 100%; }
.entrada .btn { justify-content: center; height: 40px; }
.entrada .erro:empty { display: none; }

@media (max-width: 720px) {
  .topo { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
  main { padding: 16px; }
  td.acoes { white-space: normal; }
}

textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); font: 13px/19px ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; }
.resultado:empty { display: none; }
.resultado h3 { font-size: 14px; }
.grade { max-height: 60svh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.grade table { font-size: 12px; }
.grade th { position: sticky; top: 0; background: var(--surface); }
.grade td { max-width: 420px; white-space: pre-wrap; }
.tabelas { display: flex; flex-wrap: wrap; gap: 6px; }
.tabelas .btn { height: 28px; font-size: 12px; }
.segmented { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--active); }
.segmented button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 700; }
