/* TenderOne Cloud Admin. The read-only dashboard's look (dense tables,
   status chips, light and dark), plus forms, tabs and messages. Served as
   a file: the pages allow no inline styles or scripts (Content-Security-Policy). */
:root {
  --bg: #f3f6f6; --surface: #ffffff; --fg: #162325; --muted: #5a6b6d;
  --line: #d4dcdc; --head: #e9eeee; --accent: #0d6a70; --accent-soft: #d9eeee;
  --ok: #1d6b3a; --ok-soft: #dcf0e2; --warn: #7d5100; --warn-soft: #fbecc8;
  --bad: #a12a2a; --bad-soft: #f8dcdc;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1516; --surface: #152022; --fg: #e2ebeb; --muted: #94a6a7;
    --line: #2a3c3e; --head: #1b2729; --accent: #5cc0c5; --accent-soft: #163b3d;
    --ok: #7fd49c; --ok-soft: #173826; --warn: #f2c868; --warn-soft: #3a2f10;
    --bad: #f19a9a; --bad-soft: #401c1c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--text); }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { max-width: 1400px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.brand { font-weight: 700; white-space: nowrap; }
.brand small { font-weight: 500; color: var(--muted); margin-left: 6px; }
nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
nav a { text-decoration: none; color: var(--muted); padding: 5px 10px; border-radius: 6px; }
nav a:hover { background: var(--head); color: var(--fg); }
nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.clock { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
main { max-width: 1400px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 28px; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
p { margin: 0; }
.muted { color: var(--muted); }
.lede { color: var(--muted); margin-top: 4px; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile span { color: var(--muted); font-size: 0.88rem; }
.tile.bad { border-color: var(--bad); }
.tile.bad b { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 28px; }
.grid2 > * { min-width: 0; }
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); }
thead th { background: var(--head); color: var(--muted); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.cell { font-family: var(--mono); font-size: 0.82rem; max-width: 32ch; overflow-wrap: anywhere; }
.when { white-space: nowrap; }
.when small { display: block; color: var(--muted); font-size: 0.8rem; }
.none { color: var(--muted); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: var(--head); color: var(--muted); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
pre { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 0.82rem/1.5 var(--mono); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.9rem; }
.filters a[aria-current="true"] { font-weight: 700; color: var(--fg); text-decoration: none; }
.pager { display: flex; gap: 16px; align-items: center; font-size: 0.9rem; }
.note { border-left: 3px solid var(--line); padding: 4px 12px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.brand a { color: inherit; text-decoration: none; }
.version { font-weight: 500; color: var(--muted); font-size: 0.82rem; margin-left: 8px; text-decoration: none; }
.version:hover { color: var(--accent); }
.who { display: flex; gap: 12px; align-items: center; font-size: 0.9rem; white-space: nowrap; }
.who a { text-decoration: none; }
.who a[aria-current="page"] { font-weight: 600; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.subbar { max-width: 1400px; margin: 0 auto; padding: 0 16px 8px; display: flex; justify-content: flex-end; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.more { margin-top: 8px; }
.stack { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.card h2 { margin: 0; }
form.card { margin: 0; }
label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], select {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; width: 100%; max-width: 420px; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { font-family: var(--mono); letter-spacing: 0.2em; max-width: 160px; }
button.btn { font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--surface);
  border-radius: 6px; padding: 7px 14px; cursor: pointer; justify-self: start; }
button.btn:hover { filter: brightness(1.1); }
button.btn.quiet { background: var(--surface); color: var(--accent); }
button.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.msg { border-radius: 8px; padding: 10px 14px; font-size: 0.92rem; border: 1px solid var(--line); background: var(--surface); }
.msg.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.msg.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.msg.warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.secret { font-family: var(--mono); font-size: 0.9rem; overflow-wrap: anywhere; background: var(--head); border-radius: 6px; padding: 8px 10px; user-select: all; }
.qr { width: 200px; height: 200px; border-radius: 6px; background: #fff; }
.login { max-width: 440px; margin: 8vh auto 0; display: grid; gap: 16px; }
.login .brand { font-size: 1.2rem; }
.hint { font-size: 0.85rem; color: var(--muted); }
.details { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.changes ul { margin: 6px 0 0; padding-left: 20px; }
