/* The admin page (admin.mesotron-lab.com). An operator's console: summary
   strip, two charts, one tabbed register. System fonts only — the page loads
   nothing from anywhere but itself (_headers). */
:root {
  --bg: #f4f5f8; --panel: #ffffff; --fg: #15171c; --muted: #5d6474; --line: #dde1e8;
  --accent: #cf1f2e; --accent-soft: #fbe9ea; --bar: #2f3a4f; --bar-soft: #c9cfdb;
  --good: #1d7f48; --good-soft: #e3f3ea; --warn: #9a6512; --warn-soft: #f8eedb; --bad: #b8322a; --bad-soft: #f8e2e0;
  --body: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --data: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #101217; --panel: #171a21; --fg: #e8eaef; --muted: #9aa1b0; --line: #2a2f3a;
  --accent: #ff5a66; --accent-soft: #3a1d22; --bar: #b7c1d6; --bar-soft: #3a4252;
  --good: #5fd08f; --good-soft: #17301f; --warn: #e8b45c; --warn-soft: #33290f; --bad: #ff7a70; --bad-soft: #3a1b18;
  color-scheme: dark; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 14px; line-height: 1.55; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 20px 48px; display: grid; gap: 18px; }
.notice { border-radius: 6px; padding: 10px 14px; font-size: 13.5px; background: var(--warn-soft); color: var(--warn); }
.notice.error { background: var(--bad-soft); color: var(--bad); }
header { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
h1 { font-weight: 700; font-size: 22px; margin: 0; }
h1 small { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 8px; }
.meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.meta b { color: var(--fg); font-weight: 600; }
label.toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.kpi { background: var(--panel); padding: 14px 16px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.kpi .v { font-family: var(--data); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .v .u { font-size: 13px; color: var(--muted); margin-left: 3px; }
.kpi .s { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.panel h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel h2 > span { font-weight: 400; font-size: 12px; color: var(--muted); }
svg text { fill: var(--muted); font-family: var(--data); font-size: 10px; }
.legend { display: flex; gap: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw-pass { background: var(--bar); } .sw-rec { background: var(--bar-soft); }
.tasks { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.task .track { height: 10px; background: var(--bar-soft); border-radius: 3px; overflow: hidden; display: block; }
.task .fill { height: 100%; background: var(--bar); display: block; }
.task .n { font-family: var(--data); text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -2px 0 12px; flex-wrap: wrap; }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); border-color: var(--accent); font-weight: 600; }
.tabs button:focus-visible, .filters input:focus-visible, .filters select:focus-visible, tr.click:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filters input, .filters select { font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.filters input { min-width: 0; width: 280px; max-width: 100%; }
.tablebox { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
td.num, th.num { text-align: right; font-family: var(--data); font-variant-numeric: tabular-nums; }
td.code { font-family: var(--data); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.ok { background: var(--good-soft); color: var(--good); }
.warn { background: var(--warn-soft); color: var(--warn); }
.bad { background: var(--bad-soft); color: var(--bad); }
.dim { background: var(--bar-soft); color: var(--muted); }
.flags { display: flex; gap: 4px; flex-wrap: wrap; }
tr.detail td { background: var(--bg); white-space: normal; }
.detailgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; padding: 6px 4px; }
.detailgrid h3 { font-size: 12px; color: var(--muted); font-weight: 500; margin: 0 0 4px; letter-spacing: .04em; }
.detailgrid dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.detailgrid dt { color: var(--muted); }
.detailgrid dd { margin: 0; font-family: var(--data); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detailgrid dd.text { font-family: var(--body); }
.foot { color: var(--muted); font-size: 12px; margin: 0; }
