:root {
  --bg: #0a0e0c;
  --surface: #111713;
  --surface-2: #172019;
  --surface-3: #1d2921;
  --line: #26342b;
  --line-strong: #3b4c40;
  --ink: #e7ede6;
  --muted: #94a197;
  --accent: #e58b50;
  --on-accent: #1b0f08;
  --accent-soft: #3a2417;
  --teal: #5bb9b3;
  --teal-soft: #12302d;
  --ok: #6fbf8f;
  --ok-soft: #142c1d;
  --warn: #d6a348;
  --warn-soft: #33270f;
  --danger: #e0796d;
  --danger-soft: #361b18;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --radius: 9px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f3ee;
    --surface: #fbfcf7;
    --surface-2: #edf0e8;
    --surface-3: #e4e8de;
    --line: #d2d8cc;
    --line-strong: #a9b3a6;
    --ink: #17201a;
    --muted: #5c675e;
    --accent: #b5470f;
    --on-accent: #fff8f2;
    --accent-soft: #f3e1d4;
    --teal: #0d6b68;
    --teal-soft: #d9e8e3;
    --ok: #2c6c45;
    --ok-soft: #dcefe2;
    --warn: #8a5a05;
    --warn-soft: #f4e8cf;
    --danger: #a52d23;
    --danger-soft: #f5ddd9;
    --shadow: 0 18px 50px rgba(23, 32, 26, .14);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }
code, pre, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 15px; border-bottom: 1px solid var(--line); }
.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.brand-title { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.brand-sub { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.who-name { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.topbar-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.topbar-title .path { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.view { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 26px 60px; }
.page { display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.page-sub { margin-top: 4px; color: var(--muted); font-size: 13px; max-width: 70ch; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: center; gap: 8px; }
.backlink { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; text-decoration: none; margin-bottom: 8px; }
.backlink:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.06); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 8px; font-size: 11.5px; }
.icon-btn { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; }
.link-btn { border: 0; background: none; color: var(--teal); padding: 0; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--danger); }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 15px 16px; min-width: 0; }
.stat-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); }
.stat-value { margin-top: 7px; font-size: 27px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.stat-value small { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 13.5px; font-weight: 600; }
.panel-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-body { padding: 15px; }
.panel-body.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  padding: 9px 15px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 10px 15px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.cell-title { font-weight: 600; }
.cell-sub { margin-top: 1px; color: var(--muted); font-size: 11px; font-family: var(--mono); }
.cell-key { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cell-actions { text-align: right; white-space: nowrap; }
.empty-cell { padding: 34px 16px !important; text-align: center; color: var(--muted); }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.status.online .status-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status.offline .status-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.status.degraded .status-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status.disabled .status-dot { background: var(--line-strong); }
.status.unknown .status-dot { background: var(--muted); }
.status-text { color: var(--muted); }
.status.online .status-text { color: var(--ok); }
.status.offline .status-text { color: var(--danger); }
.status.degraded .status-text { color: var(--warn); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-family: var(--mono); border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.pill-pending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }
.pill-delivered { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); background: var(--teal-soft); }
.pill-running { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.pill-succeeded { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.pill-failed { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); }
.pill-expired, .pill-canceled { color: var(--muted); background: var(--surface-2); }
.badge { display: inline-flex; align-items: center; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field textarea { resize: vertical; min-height: 92px; }
.field textarea.code { font-family: var(--mono); font-size: 12px; line-height: 1.6; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error { color: var(--danger); font-size: 12px; min-height: 17px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.search { min-width: 220px; }
.select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 12px; }
.input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); font-size: 12px; }
.input-mono { font-family: var(--mono); font-size: 11.5px; }

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 15% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, var(--teal-soft), transparent 60%),
    var(--bg);
}
.login-card { width: min(410px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 25px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.login-sub { margin-top: 5px; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.login-hint { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-error { color: var(--danger); font-size: 12px; min-height: 17px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .58); backdrop-filter: blur(3px); }
.modal { width: min(580px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-sub { margin-top: 3px; color: var(--muted); font-size: 12px; }
.modal-close { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 17px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 17px; border-top: 1px solid var(--line); }
.modal-error { color: var(--danger); font-size: 12px; min-height: 17px; }

/* Toast */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 10px 13px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12.5px; box-shadow: var(--shadow); }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--ok); }

/* Client header */
.client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.client-identity { min-width: 0; }
.client-name { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.client-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: 12px; }
.client-key { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.base-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.base-url code { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); font-size: 11.5px; overflow-wrap: anywhere; }
.copy-row { display: inline-flex; align-items: center; gap: 6px; }
.copy-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 5px; padding: 3px 7px; font-size: 10.5px; font-family: var(--mono); }
.copy-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* KV */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.kv-label { font-family: var(--mono); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.kv-value { margin-top: 3px; font-size: 13px; word-break: break-word; }
.kv-value.mono { font-family: var(--mono); font-size: 12px; }

/* Chart */
.chart-wrap { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-family: var(--mono); font-size: 9px; }
.chart-line-cpu { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.chart-line-mem { fill: none; stroke: var(--teal); stroke-width: 1.8; }
.chart-area-cpu { fill: var(--accent-soft); opacity: .35; }
.chart-dot { fill: var(--accent); }
.chart-legend { display: flex; gap: 16px; align-items: center; margin-top: 8px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 2px; background: var(--muted); }
.swatch.cpu { background: var(--accent); }
.swatch.mem { background: var(--teal); }
.chart-empty { display: grid; place-items: center; min-height: 180px; color: var(--muted); font-size: 12px; border: 1px dashed var(--line); border-radius: 6px; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.timeline-item { position: relative; padding: 0 0 18px 22px; border-left: 1px solid var(--line); margin-left: 5px; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-dot { position: absolute; left: -4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.timeline-item.ok .timeline-dot { background: var(--ok); }
.timeline-item.bad .timeline-dot { background: var(--danger); }
.timeline-item.accent .timeline-dot { background: var(--accent); }
.timeline-event { font-size: 12.5px; font-weight: 600; }
.timeline-time { color: var(--muted); font-family: var(--mono); font-size: 10px; margin-top: 2px; }
.timeline-detail { margin-top: 4px; color: var(--muted); font-size: 11.5px; font-family: var(--mono); white-space: pre-wrap; word-break: break-word; }

/* Code / payload / result */
.pre { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: 11.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
.result-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.result-tab { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 5px; padding: 4px 8px; font-family: var(--mono); font-size: 10px; }
.result-tab.active { color: var(--ink); border-color: var(--line-strong); }
.result-note { margin-top: 8px; color: var(--warn); font-size: 11.5px; }
.secret-box { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 7px; padding: 12px; }
.secret-label { font-family: var(--mono); font-size: 9px; letter-spacing: .8px; text-transform: uppercase; color: var(--warn); }
.secret-value { margin-top: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.warning { color: var(--warn); font-size: 11.5px; line-height: 1.6; }

/* Empty / loading */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 40px 16px; text-align: center; }
.empty-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.empty-title { font-size: 13px; font-weight: 600; }
.empty-text { font-size: 12px; color: var(--muted); max-width: 40ch; }
.loading { display: flex; align-items: center; gap: 9px; padding: 30px 4px; color: var(--muted); font-size: 12.5px; }
.spinner { width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); background: var(--danger-soft); border-radius: var(--radius); padding: 14px 16px; }
.error-panel .title { color: var(--danger); font-size: 13px; font-weight: 600; }
.error-panel .text { margin-top: 3px; color: var(--muted); font-size: 12px; }

/* Meta strips */
.meter { display: flex; align-items: center; gap: 10px; }
.meter-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; background: var(--teal); border-radius: 999px; }
.meter-fill.warn { background: var(--warn); }
.meter-fill.danger { background: var(--danger); }
.metric-row { display: grid; grid-template-columns: 58px 1fr 44px; gap: 9px; align-items: center; }
.metric-label { font-family: var(--mono); font-size: 9px; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.metric-value { text-align: right; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* Responsive */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }
  .brand { padding-bottom: 10px; }
  .nav { flex-direction: row; overflow-x: auto; margin-top: 10px; gap: 4px; padding-bottom: 2px; }
  .nav-link { white-space: nowrap; padding: 6px 9px; }
  .sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; }
  .who { margin-bottom: 0; flex: 1; }
  .topbar { padding: 12px 16px; }
  .view { padding: 16px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .toolbar { width: 100%; }
  .search { flex: 1; min-width: 0; }
  .kv-grid { grid-template-columns: 1fr; }
  .topbar-title .path { display: none; }
  .modal-foot { flex-wrap: wrap; }
  .toast-wrap { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}
