:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --surface: #fff;
  --ink: #17211c;
  --muted: #5d6b64;
  --line: #d9e0dc;
  --accent: #0d7456;
  --accent-ink: #fff;
  --warn: #8a4b00;
  --warn-bg: #fff4e5;
  --danger: #8d1d18;
  --sans: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.5; }
h2 { margin: 0; font-weight: 650; font-size: 20px; }
.login { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; }
.login input, .login button { width: min(320px, 100%); }
.sample { margin: 0; color: var(--muted); font-size: 13px; }
.shell { display: flex; min-height: 100vh; }
.side { width: 196px; flex: none; display: flex; flex-direction: column; gap: 16px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side #logout { margin-top: auto; }
.content { flex: 1; min-width: 0; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; }
label { display: grid; gap: 6px; font-size: 14px; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
button { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button.ghost, button[data-tab] { background: transparent; color: var(--ink); border: 0; text-align: left; }
button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
button:disabled { opacity: .6; cursor: wait; }
.grid, .row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.card h2 + .muted { margin: 8px 0 16px; }
.grid > label { flex: 1 1 180px; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
code { font-family: var(--mono); }
textarea { min-height: 88px; font-family: var(--mono); }
dialog { border: 0; border-radius: 16px; padding: 20px; width: min(520px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(18, 24, 21, .45); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e7f5ef; color: var(--accent); font-size: 13px; }
.tag.off { background: #eee; color: #666; }
@media (max-width: 720px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 8px; }
  td { display: flex; justify-content: space-between; gap: 12px; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); }
}
