:root {
  color-scheme: light;
  --canvas: #F4F2EE;
  --panel: #FFFFFF;
  --line: #E6E1D8;
  --text: #1C1917;
  --muted: #6F6A64;
  --accent: #C23A2B;
  --rail: #1C1917;
  --rail-text: #F4F2EE;
  --rail-muted: #BAB4AC;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #171614;
    --panel: #24211E;
    --line: #413B35;
    --text: #F4F2EE;
    --muted: #B9B1A7;
    --accent: #F07868;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171614;
  --panel: #24211E;
  --line: #413B35;
  --text: #F4F2EE;
  --muted: #B9B1A7;
  --accent: #F07868;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--canvas); line-height: 1.5; }
a { color: inherit; }
button, select { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; background: var(--panel); z-index: 10; }
.skip-link:focus { top: 12px; }
.rail { width: 248px; position: fixed; inset: 0 auto 0 0; background: var(--rail); color: var(--rail-text); padding: 32px 20px 24px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 4px 36px; }
.brand-mark { width: 42px; height: 42px; border-radius: 8px; background: #C23A2B; display: grid; place-items: center; font-size: 14px; font-weight: 800; letter-spacing: -.5px; }
.brand strong { display: block; font-size: 16px; font-weight: 650; }
.brand small { display: block; color: var(--rail-muted); font-size: 12px; margin-top: 3px; }
.rail-label { text-transform: uppercase; font-size: 10px; letter-spacing: 1.8px; color: var(--rail-muted); margin: 0 12px 12px; }
nav { display: grid; gap: 5px; }
nav a, nav > span { padding: 11px 14px; border-radius: 5px; text-decoration: none; color: var(--rail-muted); }
nav a[aria-current] { background: #39322E; color: #FFFFFF; border-left: 3px solid #D95443; padding-left: 11px; font-weight: 600; }
nav > span { cursor: default; }
.rail-footer { margin-top: auto; padding: 32px 12px 0; font-size: 12px; }
.rail-footer strong, .rail-footer > span { display: block; }
.rail-footer > span { color: var(--rail-muted); margin-top: 3px; }
.rail-footer p { border-top: 1px solid #413A34; margin: 20px 0 0; padding-top: 18px; color: var(--rail-muted); line-height: 1.7; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: #B49A6A; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.workspace { margin-left: 248px; min-height: 100vh; }
.topbar { min-height: 74px; padding: 18px 44px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); }
.theme-control { display: flex; align-items: center; gap: 10px; }
select { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; font-size: 12px; }
main { max-width: 1260px; padding: 44px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.6px; font-size: 10px; font-weight: 650; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -.7px; }
.badge { border: 1px solid var(--line); border-radius: 4px; padding: 4px 9px; font-size: 11px; color: var(--muted); }
.intro { color: var(--muted); margin: 12px 0 30px; }
.empty-state { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; min-height: 390px; padding: 60px 24px 48px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.welcome-mark { font-size: 21px; font-weight: 800; color: var(--accent); margin-bottom: 25px; letter-spacing: -1px; }
h2 { font-size: 23px; font-weight: 550; margin: 3px 0 10px; letter-spacing: -.4px; }
.empty-state > p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.8; }
.empty-status { margin-top: 27px; font-size: 11px; border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; color: var(--muted); }
.workspace-note { text-align: center; color: var(--muted); font-size: 11px; margin-top: 25px; }
.workspace-note span { margin: 0 8px; }
.number, .numeric, time, td { font-variant-numeric: tabular-nums; }
table { border-collapse: collapse; width: 100%; }
tr { height: 36px; }
td, th { padding: 6px 12px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .rail { position: static; width: 100%; padding: 20px; }
  .brand { padding-bottom: 20px; }
  .rail-label, .rail-footer { display: none; }
  nav { display: flex; overflow-x: auto; gap: 6px; }
  nav a, nav > span { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .workspace { margin-left: 0; }
  .topbar { padding: 16px 20px; }
  main { padding: 28px 20px; }
  .empty-state { min-height: 360px; }
}
.update-banner:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 44px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.update-banner button { padding: 6px 14px; border: 1px solid var(--accent); border-radius: 4px; background: var(--panel); color: var(--text); cursor: pointer; }
@media (max-width: 760px) { .update-banner:not([hidden]) { margin: 16px 20px 0; } }

.auth-panel { max-width: 42rem; padding: 2rem; margin: 1.5rem 0; border: 1px solid var(--border, #ddd); border-radius: .75rem; }
.auth-panel form { display: grid; gap: .8rem; margin: 1rem 0; }
.auth-panel label { display: grid; gap: .35rem; }
.auth-panel input, .auth-panel select { padding: .7rem; border-radius: .3rem; border: 1px solid #777; font: inherit; }
.auth-panel button { padding: .7rem 1rem; cursor: pointer; font: inherit; }
table { border-collapse: collapse; } th, td { padding: .65rem; border-bottom: 1px solid #999; text-align: left; }

.auth-panel img[alt="Authenticator enrollment QR code"] { width: 220px; height: 220px; image-rendering: pixelated; }
.auth-panel input[type="checkbox"] { width: auto; display: inline-block; justify-self: start; }
.auth-links a { display: block; margin-top: .75rem; }
