
:root {
  color-scheme: light;
  --ink: #132235;
  --body: #1c2b3d;
  --muted: #536477;
  --canvas: #ffffff;
  --surface: #f5f7fa;
  --line: #d8dee7;
  --blue: #3267d5;
  --blue-dark: #204ca8;
  --blue-soft: #e7edff;
  --honey: #f1c35a;
  --green: #168a55;
  --green-soft: #e5f5ed;
  --red: #b7333b;
  --red-soft: #fdebec;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--body); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button { min-height: 44px; border: 0; border-radius: 10px; padding: .7rem 1rem; font-weight: 700; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: var(--blue-soft); color: var(--blue-dark); }
.button-danger { background: var(--red-soft); color: var(--red); }
.button-quiet { background: transparent; color: var(--muted); }
.topbar { background: var(--ink); color: white; }
.topbar-inner { max-width: 1180px; margin: auto; min-height: 68px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { padding: .55rem .75rem; border-radius: 8px; text-decoration: none; color: #dce6f3; }
.nav a:hover { background: #26394f; color: white; }
.nav form { margin: 0; }
.nav button { color: #dce6f3; }
main { max-width: 1180px; margin: auto; padding: 44px 24px 72px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { margin: 0; font-size: 2rem; line-height: 1.15; letter-spacing: -.025em; }
h2 { margin: 0; font-size: 1.25rem; }
p { text-wrap: pretty; }
.lede { margin: .5rem 0 0; color: var(--muted); max-width: 68ch; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.metrics { display: flex; flex-wrap: wrap; gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.metric { flex: 1 1 180px; background: var(--surface); padding: 20px; }
.metric strong { display: block; color: var(--ink); font-size: 1.65rem; line-height: 1.1; }
.metric span { color: var(--muted); font-size: .9rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.section { margin-bottom: 34px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading span { color: var(--muted); font-size: .9rem; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.side-stack { display: grid; gap: 18px; }
.settings-panel { max-width: 620px; }
.pair-code { display: block; margin: 16px 0 8px; padding: 16px; background: var(--ink); color: white; border-radius: 10px; font: 800 1.55rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-align: center; user-select: all; }
.notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; background: var(--green-soft); color: #0d633d; }
.notice-error { background: var(--red-soft); color: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th { color: var(--muted); font-size: .82rem; text-align: left; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--surface); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .25rem .6rem; font-size: .78rem; font-weight: 750; background: var(--green-soft); color: #0d633d; }
.badge-muted { background: #e8ebef; color: #465567; }
.badge-blue { background: var(--blue-soft); color: var(--blue-dark); }
.badge-warning { background: #fff2cc; color: #725000; }
.empty { color: var(--muted); padding: 28px 12px; text-align: center; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--ink); font-weight: 700; }
label span { color: var(--muted); font-size: .86rem; font-weight: 500; }
input, select { width: 100%; min-height: 46px; border: 1px solid #9ca9b7; border-radius: 9px; padding: .7rem .8rem; color: var(--body); background: white; }
.compact-form { display: grid; gap: 12px; margin-top: 16px; }
.confirm { display: flex; grid-template-columns: none; align-items: start; gap: 9px; color: var(--body); font-size: .88rem; font-weight: 500; }
.confirm input { width: 18px; min-height: 18px; margin-top: 2px; padding: 0; accent-color: var(--blue); }
.action-note { color: var(--muted); font-size: .82rem; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--surface); }
.login { width: min(440px, 100%); background: white; padding: 32px; border-radius: 16px; box-shadow: 0 6px 8px rgba(19,34,53,.08); }
.login-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--honey); font-weight: 900; margin-bottom: 24px; }
.login h1 { font-size: 1.7rem; }
.login .stack { margin-top: 24px; }
.help { color: var(--muted); font-size: .88rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .page-heading { align-items: start; flex-direction: column; }
  .topbar-inner { padding: 0 16px; }
  main { padding: 30px 16px 56px; }
  .nav a { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --canvas:#132235; --surface:#1b2b40; --body:#e8edf5; --muted:#c3cedb; --ink:#f5f8fc; --line:#34465c; --blue-soft:#183f80; --green-soft:#123e2c; --red-soft:#51222a; }
  .topbar { background: #0c1724; }
  input, select { background: #17283b; color: white; border-color: #718096; }
  .badge-warning { background:#4c3b13; color:#ffe7a3; }
  .login-shell { background: #0f1c2b; }
  .login { background: var(--surface); box-shadow: 0 6px 8px rgba(0,0,0,.22); }
  .login-mark, .pair-code { background: #08121d; }
  .badge-muted { background:#34465c; color:#e8edf5; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
