/* AllowID platform admin.
   Dense, quiet, and legible at three in the morning. No web font: this portal
   makes no external request, and a font that fails to load is a layout that
   shifts under someone reading an alert. */

:root {
  --bg: #12151a;  --panel: #1a1e25;  --panel-2: #212630;
  --line: #2c323d; --ink: #dfe4ec;   --muted: #8c96a6;
  --accent: #64b1ff; --ok: #4caf7d;  --warn: #d9a441;
  --bad: #e2685f;  --crit: #ff4d4d;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 14px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top { display: flex; align-items: center; gap: 1.25rem; padding: .6rem 1.25rem;
             background: var(--panel); border-bottom: 1px solid var(--line);
             position: sticky; top: 0; z-index: 10; }
header.top .brand { font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
header.top .brand small { color: var(--muted); font-weight: 400; }
header.top nav { display: flex; gap: .9rem; flex-wrap: wrap; flex: 1; }
header.top nav a { color: var(--ink); opacity: .75; font-size: 13px; }
header.top nav a.on { opacity: 1; border-bottom: 2px solid var(--accent);
                      padding-bottom: 2px; }
header.top .who { color: var(--muted); font-size: 12px; text-align: right;
                  white-space: nowrap; }

main { padding: 1.25rem; max-width: 1500px; }
h1 { font-size: 19px; margin: 0 0 .25rem; font-weight: 600; }
h2 { font-size: 15px; margin: 1.75rem 0 .6rem; font-weight: 600; }
h3 { font-size: 13px; margin: 1.1rem 0 .4rem; font-weight: 600; color: var(--muted);
     text-transform: uppercase; letter-spacing: .06em; }
p.lede { color: var(--muted); margin: 0 0 1.25rem; max-width: 78ch; }
p.muted, .muted { color: var(--muted); }
small { font-size: 12px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
         padding: 1rem 1.1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
        padding: .75rem .9rem; }
.stat .n { font: 600 24px/1.1 var(--mono); }
.stat .k { color: var(--muted); font-size: 12px; margin-top: .2rem; }
.stat.bad .n { color: var(--bad); }
.stat.ok  .n { color: var(--ok); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px;
     text-transform: uppercase; letter-spacing: .06em; padding: .4rem .6rem;
     border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .45rem .6rem; border-bottom: 1px solid var(--line);
     vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
td.n, th.n { text-align: right; font-family: var(--mono); }
code, .mono { font-family: var(--mono); font-size: 12px; }
.scroll { overflow-x: auto; }

.tag { display: inline-block; padding: .05rem .4rem; border-radius: 3px;
       font-size: 11px; font-family: var(--mono); border: 1px solid var(--line);
       color: var(--muted); }
.tag.ok    { color: var(--ok);   border-color: #2c5a44; }
.tag.warn  { color: var(--warn); border-color: #5c4a22; }
.tag.bad   { color: var(--bad);  border-color: #5e3330; }
.tag.crit  { color: #fff; background: #7c2020; border-color: #7c2020; }
.tag.info  { color: var(--accent); border-color: #2a4a6b; }

.banner { border-radius: 6px; padding: .75rem 1rem; margin-bottom: 1rem;
          border: 1px solid; font-size: 13px; }
.banner.bad  { background: #2a1717; border-color: #6b2f2b; color: #ffc9c4; }
.banner.warn { background: #2a2417; border-color: #6b5a2b; color: #ffe2ad; }
.banner.info { background: #16222e; border-color: #2a4a6b; color: #cfe6ff; }
.banner.ok   { background: #16261f; border-color: #2c5a44; color: #bdeed4; }
.banner b { display: block; margin-bottom: .2rem; }

form.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 4px; padding: .4rem .55rem; font: 13px var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent);
                                            outline-offset: -1px; }
textarea { width: 100%; font-family: var(--sans); }
button { background: var(--accent); color: #06121f; border: 0; border-radius: 4px;
         padding: .45rem .8rem; font: 600 13px var(--sans); cursor: pointer; }
button.quiet { background: transparent; color: var(--ink);
               border: 1px solid var(--line); font-weight: 400; }
button.danger { background: #8c2b26; color: #ffdedb; }
label { display: block; font-size: 12px; color: var(--muted); margin: .6rem 0 .2rem; }

.chart { width: 100%; height: auto; }
.chart .axis { stroke: var(--line); }
.chart .tick, .chart .blabel, .chart .bvalue {
  fill: var(--muted); font: 11px var(--mono); }
.chart .blabel { fill: var(--ink); }

.auth { max-width: 380px; margin: 8vh auto; }
.auth .panel { padding: 1.5rem; }
.auth h1 { margin-bottom: 1rem; }
.auth input { width: 100%; }
.auth button { width: 100%; margin-top: 1rem; }
.qr { background: #fff; padding: .6rem; border-radius: 6px; width: 190px;
      margin: .75rem 0; }
.qr svg { width: 100%; height: auto; display: block; }

.note { font-size: 12px; color: var(--muted); max-width: 74ch; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
pre.body { background: var(--panel-2); border: 1px solid var(--line);
           border-radius: 4px; padding: .8rem; white-space: pre-wrap;
           font: 12px/1.5 var(--mono); color: var(--ink); }
