/* Kissflow Document Generator - workspace UI
   One memorable device: a red signal line marks whatever you are working in (active tab, active rail item).
   Everything else is quiet slate so documents and data stay the focus. */

:root {
  --bg: #e9edf2;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #edf1f6;
  --line: #d9dfe7;
  --line-strong: #c3ccd8;
  --text: #17202c;
  --muted: #5b697a;
  --faint: #8794a5;
  --rail: #101823;
  --rail-ink: #9db0c6;
  --rail-ink-active: #ffffff;
  --signal: #d3202a;
  --accent: #0e6aa8;
  --accent-ink: #ffffff;
  --accent-soft: #e2eff9;
  --ok: #17703f;       --ok-bg: #e1f3e8;
  --warn: #8a5a00;     --warn-bg: #fff2cf;
  --bad: #b3261e;      --bad-bg: #fde8e6;
  --info: #0e6aa8;     --info-bg: #e2eff9;
  --neutral: #4d5b6c;  --neutral-bg: #e8ecf1;
  --code-bg: #f5f7fa;
  --json-key: #7a3e9d; --json-str: #17703f; --json-num: #0e6aa8; --json-lit: #b3261e;
  --shadow: 0 8px 28px rgba(16, 24, 35, .18);
  --radius: 6px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

/* Dark follows the OS unless the person picked a theme in the user menu (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1118; --surface: #141c26; --surface-2: #18222e; --surface-3: #1e2a38;
    --line: #263345; --line-strong: #34445a; --text: #e5eaf1; --muted: #93a2b6; --faint: #6c7d92;
    --rail: #080d13; --rail-ink: #7f93ab; --accent: #4ba3e6; --accent-ink: #06121d; --accent-soft: #14283a;
    --ok: #5fcf8f; --ok-bg: #12301f; --warn: #f0c050; --warn-bg: #33270b; --bad: #ff8a80; --bad-bg: #3a1714;
    --info: #6bb6f0; --info-bg: #132a3d; --neutral: #a5b3c4; --neutral-bg: #202c3a; --code-bg: #101820;
    --json-key: #c79af0; --json-str: #7fd9a1; --json-num: #7cc0f5; --json-lit: #ff9d94;
    --shadow: 0 8px 28px rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1118; --surface: #141c26; --surface-2: #18222e; --surface-3: #1e2a38;
  --line: #263345; --line-strong: #34445a; --text: #e5eaf1; --muted: #93a2b6; --faint: #6c7d92;
  --rail: #080d13; --rail-ink: #7f93ab; --accent: #4ba3e6; --accent-ink: #06121d; --accent-soft: #14283a;
  --ok: #5fcf8f; --ok-bg: #12301f; --warn: #f0c050; --warn-bg: #33270b; --bad: #ff8a80; --bad-bg: #3a1714;
  --info: #6bb6f0; --info-bg: #132a3d; --neutral: #a5b3c4; --neutral-bg: #202c3a; --code-bg: #101820;
  --json-key: #c79af0; --json-str: #7fd9a1; --json-num: #7cc0f5; --json-lit: #ff9d94;
  --shadow: 0 8px 28px rgba(0, 0, 0, .55); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
code, pre, .mono { font-family: var(--mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- frame */
.app { height: 100vh; display: grid; grid-template-rows: 44px minmax(0, 1fr) 24px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 12px 0 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 14px 0 12px; font-weight: 650; letter-spacing: .1px; }
.brand-mark { width: 18px; height: 18px; border-radius: 3px; background: var(--signal); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; height: 2px; background: #fff; }
.brand small { font-weight: 400; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.env-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--neutral-bg); color: var(--neutral); }
.env-pill.live { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.env-pill.safe { background: var(--ok-bg); color: var(--ok); }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; padding: 4px 8px; border-radius: var(--radius); }
.user-btn:hover { background: var(--surface-3); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--rail); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 650; }
.body { display: grid; grid-template-columns: 52px var(--sidebar-w, 304px) minmax(0, 1fr); min-height: 0; }
.body.no-sidebar { grid-template-columns: 52px minmax(0, 1fr); }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 6px 0; gap: 2px; }
.rail-btn { position: relative; width: 52px; height: 46px; background: none; border: 0; color: var(--rail-ink); display: grid; place-items: center; }
.rail-btn:hover { color: var(--rail-ink-active); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn[aria-pressed="true"] { color: var(--rail-ink-active); background: rgba(255, 255, 255, .06); }
.rail-btn[aria-pressed="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--signal); border-radius: 0 2px 2px 0; }
.rail-btn .tip { position: absolute; left: 52px; z-index: 30; background: #0b1017; color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(-4px); transition: opacity .12s, transform .12s; }
.rail-btn:hover .tip, .rail-btn:focus-visible .tip { opacity: 1; transform: none; }
.rail-spacer { flex: 1; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.body.no-sidebar .sidebar { display: none; }
.sidebar-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; }
.sidebar-resize:hover, .sidebar-resize.dragging { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.side-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 14px; }
.side-head h2 { flex: 1; }
.side-tools { padding: 0 10px 8px; display: grid; gap: 6px; }
.side-scroll { overflow: auto; flex: 1; padding-bottom: 12px; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-2); }
.statusbar { display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--surface); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.statusbar .item { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); font-weight: 600; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line-strong)); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.icon { width: 28px; padding: 0; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn .spinner { width: 13px; height: 13px; }
.input, .select, .textarea { width: 100%; height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.input::placeholder { color: var(--faint); }
.select { padding-right: 4px; }
.textarea { height: auto; padding: 8px 10px; resize: vertical; }
.field { display: grid; gap: 5px; }
.field > span, .field > label { font-weight: 600; font-size: 12px; color: var(--muted); }
.field small { color: var(--faint); }
.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { margin-top: 2px; }
.form-grid { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.square { border-radius: 4px; font-family: var(--mono); font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: #d99a00; } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.kbd { font-family: var(--mono); font-size: 11px; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); }

/* ---------------------------------------------------------------- sidebar lists */
.tree-group { border-bottom: 1px solid var(--line); }
.tree-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px 8px 12px; border: 0; background: none; text-align: left; }
.tree-head:hover { background: var(--surface-3); }
.tree-head .caret { width: 12px; height: 12px; transition: transform .12s; flex: none; color: var(--faint); }
.tree-group.open .caret { transform: rotate(90deg); }
.tree-head .name { font-weight: 600; flex: 1; min-width: 0; }
.tree-children { display: none; padding-bottom: 6px; }
.tree-group.open .tree-children { display: block; }
.tree-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 12px 5px 32px; border: 0; background: none; text-align: left; color: var(--muted); }
.tree-item:hover { background: var(--surface-3); color: var(--text); }
.tree-item.active { background: var(--accent-soft); color: var(--text); }
.method { font: 700 10px/1 var(--mono); padding: 3px 4px; border-radius: 3px; background: var(--info-bg); color: var(--info); flex: none; }
.method.docx { background: var(--warn-bg); color: var(--warn); }
.day-label { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.hist-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 9px; align-items: start; width: 100%; padding: 7px 12px 7px 14px; border: 0; background: none; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.hist-item:hover { background: var(--surface-3); }
.hist-item.active { background: var(--accent-soft); }
.hist-item .dot { margin-top: 5px; }
.hist-item .t1 { font-weight: 600; }
.hist-item .t2, .hist-item .t3 { font-size: 12px; color: var(--muted); }
.hist-item .t3 { text-align: right; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty strong { color: var(--text); font-size: 14px; }

/* ---------------------------------------------------------------- tabs */
.tabbar { display: flex; align-items: stretch; background: var(--surface-3); border-bottom: 1px solid var(--line); min-height: 38px; overflow-x: auto; scrollbar-width: thin; }
.tab { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; max-width: 220px; min-width: 110px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); }
.tab[aria-selected="true"]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--signal); }
.tab .tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab .tab-close { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; border-radius: 4px; color: var(--faint); flex: none; }
.tab .tab-close:hover { background: var(--line); color: var(--text); }
.tab-new { width: 38px; border: 0; background: none; color: var(--muted); font-size: 18px; flex: none; }
.tab-new:hover { background: var(--surface-2); color: var(--text); }
.panels { flex: 1; min-height: 0; position: relative; }
.panel { position: absolute; inset: 0; overflow: auto; background: var(--surface-2); }
.panel.fill { overflow: hidden; display: flex; flex-direction: column; }
.page { padding: 18px 22px 40px; display: grid; gap: 16px; max-width: 1180px; align-content: start; }
.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 18px; }
.page-head .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card > header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.card > header h3 { flex: 1; }
.card .card-body { padding: 14px; }
.card.pad { padding: 14px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat b { display: block; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--surface-3) 60%, transparent); }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- run tab (request / response) */
.reqbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.urlbox { display: flex; align-items: center; flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.urlbox .method { margin: 0 8px; font-size: 11px; padding: 4px 6px; }
.urlbox .select { border: 0; border-left: 1px solid var(--line); border-radius: 0; height: 30px; background: transparent; flex: 1; min-width: 0; font-weight: 600; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, var(--req-w, 46%)) 6px minmax(0, 1fr); }
.split-handle { cursor: col-resize; background: var(--line); transition: background .1s; }
.split-handle:hover, .split-handle.dragging { background: var(--accent); }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.pane-tabs { display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); min-height: 36px; }
.pane-tab { position: relative; border: 0; background: none; padding: 9px 10px; color: var(--muted); font-weight: 600; }
.pane-tab:hover { color: var(--text); }
.pane-tab[aria-selected="true"] { color: var(--text); }
.pane-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: var(--accent); }
.pane-tab .count { margin-left: 5px; }
.pane-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.editor { flex: 1; min-height: 0; width: 100%; border: 0; resize: none; padding: 12px 14px; background: var(--surface); font: 12.5px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }
.editor:focus { outline: none; }
.editor-foot { display: flex; gap: 12px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--surface-2); min-height: 30px; }
.resp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); min-height: 38px; }
.resp-meta .grow { color: var(--muted); }
.resp-body { flex: 1; min-height: 0; overflow: auto; }
.resp-body.pad { padding: 14px; }
pre.code { margin: 0; padding: 12px 14px; background: var(--code-bg); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
pre.code.boxed { border: 1px solid var(--line); border-radius: var(--radius); max-height: 420px; overflow: auto; }
.j-key { color: var(--json-key); } .j-str { color: var(--json-str); } .j-num { color: var(--json-num); } .j-lit { color: var(--json-lit); }
.preview-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.resp-body.is-preview { display: flex; flex-direction: column; overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.preview-stage { flex: 1; min-height: 0; overflow: auto; background: #6c7684; padding: 18px; display: flex; justify-content: center; align-items: flex-start; }
.preview-stage img { max-width: none; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.preview-empty { color: #fff; opacity: .8; align-self: center; text-align: center; max-width: 280px; }
.alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid; font-size: 13px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.alert.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.alert.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.stack { display: grid; gap: 10px; }
.two-col { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.job-preview { height: min(78vh, 760px); display: flex; flex-direction: column; overflow: hidden; }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; background: rgba(8, 13, 20, .5); display: grid; place-items: start center; padding-top: 9vh; z-index: 50; }
.modal { width: min(520px, calc(100vw - 24px)); max-height: 82vh; overflow: auto; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.modal > header { padding: 14px 16px 6px; }
.modal > header h2 { font-size: 16px; }
.modal .modal-body { padding: 8px 16px 14px; display: grid; gap: 12px; }
.modal > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 8px 8px; }
.menu { position: fixed; z-index: 60; min-width: 190px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }
.menu button { display: flex; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 4px; text-align: left; gap: 8px; }
.menu button:hover { background: var(--surface-3); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .menu-head { padding: 6px 10px 8px; }
.toasts { position: fixed; right: 14px; bottom: 36px; display: grid; gap: 8px; z-index: 70; }
.toast { min-width: 240px; max-width: 380px; padding: 10px 12px; border-radius: var(--radius); background: var(--rail); color: #fff; box-shadow: var(--shadow); border-left: 3px solid var(--accent); animation: toast-in .18s ease-out; }
.toast.ok { border-left-color: #3ccf7c; } .toast.bad { border-left-color: #ff6a5e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
.checklist { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 170px; overflow: auto; background: var(--surface-2); }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--rail); padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.login-card::before { content: ""; display: block; height: 3px; background: var(--signal); }
.login-card .inner { padding: 24px 24px 22px; display: grid; gap: 14px; }
.login-card h1 { font-size: 19px; }
.login-card p { margin: 0; color: var(--muted); }
.login-card .btn { height: 36px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 45%) 6px minmax(0, 1fr); }
  .split-handle { cursor: row-resize; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .brand small { display: none; }
}
@media (max-width: 640px) {
  .body { grid-template-columns: 44px minmax(0, 1fr); }
  .rail-btn { width: 44px; }
  .sidebar { position: absolute; left: 44px; top: 44px; bottom: 24px; width: min(300px, calc(100vw - 56px)); z-index: 20; box-shadow: var(--shadow); }
  .body.no-sidebar .sidebar { display: none; }
  .page { padding: 14px 12px 30px; }
  .env-pill { display: none; }
  .statusbar { overflow: hidden; white-space: nowrap; gap: 12px; }
  .statusbar .item:nth-child(n+2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
