:root { --bg: #f6f7f9; --fg: #1d2330; --muted: #6b7280; --line: #e3e6eb; --card: #fff; --accent: #2b59c3;
  --warn: #b7791f; --bad: #c53030; --ok: #2f855a; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --fg: #e6e8eb; --muted: #9aa3af; --line: #2a2f37; --card: #1b1f26; --accent: #7aa2ff;
    --warn: #e0b04f; --bad: #ff7b7b; --ok: #68d391; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
main { padding: 16px; max-width: 1200px; }
main.with-side { margin-left: 200px; }
.side { position: fixed; inset: 0 auto 0 0; width: 200px; padding: 16px 12px; background: var(--card);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side .brand { font-weight: 600; margin-bottom: 12px; }
.side a, .side .soon { padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--fg); }
.side a.on { background: var(--bg); font-weight: 600; }
.side .soon { color: var(--muted); }
.side small { font-size: 11px; }
.side .out { margin-top: auto; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.narrow { max-width: 380px; margin: 60px auto; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; }
label.inline { flex-direction: row; align-items: center; }
input, select, button { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--fg); }
button { cursor: pointer; background: var(--accent); color: #fff; border-color: var(--accent); }
button.small { padding: 2px 8px; font-size: 12px; background: transparent; color: var(--accent); }
button.danger { background: var(--bad); border-color: var(--bad); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.grid th, .grid td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { font-weight: 600; color: var(--muted); font-size: 12px; }
.r { text-align: right !important; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--bad); }
tr.deleted td { opacity: .5; text-decoration: line-through; }
tr.attn td { background: color-mix(in srgb, var(--warn) 10%, transparent); }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 12px; border: 1px solid currentColor; }
.tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); }
.plates { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.plate { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 180px;
  display: flex; flex-direction: column; text-decoration: none; color: var(--fg); }
.plate span { color: var(--muted); font-size: 12px; } .plate b { font-size: 18px; } .plate small { color: var(--muted); }
.plate.warn { border-color: var(--warn); } .plate.bad { border-color: var(--bad); }
@media (max-width: 760px) {
  main.with-side { margin-left: 0; }
  .side { position: static; width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .soon { display: none; }
  .side .out { margin-top: 0; }
  table.grid { display: block; overflow-x: auto; }
}
