:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1a1f27; --muted: #667085; --line: #e3e6eb;
  --accent: #1f6feb; --ok: #1a7f37; --ok-bg: #e7f5ea; --warn: #9a6700; --warn-bg: #fdf3d8; --bad: #b42318; --bad-bg: #fbe9e7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a; --panel: #1b2027; --text: #e7eaf0; --muted: #98a2b3; --line: #2c333d;
    --accent: #5b9dff; --ok: #5fd07c; --ok-bg: #16301f; --warn: #e6b450; --warn-bg: #352a12; --bad: #ff8a7a; --bad-bg: #3a1c19;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; gap: 24px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
nav { display: flex; gap: 8px; flex: 1; }
#logout { margin-left: auto; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
select, input:not([type=checkbox]) { max-width: 100%; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr.link { cursor: pointer; }
tr.link:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); }
button.quiet { border-color: transparent; background: none; color: var(--muted); }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
textarea { width: 100%; min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
label { display: flex; gap: 6px; align-items: center; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.ok { color: var(--ok); background: var(--ok-bg); }
.warn { color: var(--warn); background: var(--warn-bg); }
.bad { color: var(--bad); background: var(--bad-bg); }
.note { padding: 8px 12px; border-radius: 8px; }
.login { max-width: 380px; margin: 8vh auto 0; width: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.facts div span { display: block; color: var(--muted); font-size: 13px; }
img.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; }
