:root {
  --bg: #f6f6f4; --card: #fff; --ink: #1c1c1a; --muted: #6b6b66; --line: #e2e2dd;
  --accent: #2346d6; --ok: #138a3d; --warn: #c76a00; --bad: #c62828;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { min-width: 0; }
label { font-size: 14px; color: var(--muted); display: block; margin-bottom: 4px; }
input, select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
button { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.secondary { background: #fff; color: var(--accent); }
button.small { padding: 4px 10px; font-size: 14px; font-weight: 500; }
button.danger { border-color: var(--bad); color: var(--bad); background: #fff; }
a.button-link { font-size: 15px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; white-space: nowrap; }
button:disabled { opacity: .5; cursor: default; }
.hidden { display: none !important; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 8px; padding: 10px; }
.stat b { display: block; font-size: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: #e3f4e8; color: var(--ok); }
.pill.used { background: #fdeedd; color: var(--warn); }
.table-wrap { overflow-x: auto; }
.msg { padding: 10px 12px; border-radius: 8px; background: #fdecec; color: var(--bad); margin-bottom: 12px; }
.msg.info { background: #e8edfd; color: var(--accent); }
