/* OpenClaw Console. An operations-tool look: a dark side rail, a cobalt accent, square corners,
   and one white working panel. The fonts are IBM Plex, served from /fonts. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }


:root {
  color-scheme: light;
  --ground: #eef1f5; --surface: #ffffff; --surface-2: #f6f8fa; --surface-3: #e9edf2;
  --line: #dde2e9; --line-strong: #c5ccd6;
  --fg: #111827; --fg-2: #4b5563; --fg-3: #6b7280;
  --accent: #2b59d9; --accent-hover: #1f47bd; --accent-fg: #ffffff; --accent-soft: #e8eefc; --accent-line: #c3d2f6;
  --rail: #111a2e; --rail-fg: #e6eaf2; --rail-dim: #8d97ab; --rail-hi: #1e2a45; --rail-link: #9db6ff;
  --ok: #0f7b31; --ok-soft: #e5f4e8;
  --warn: #9a5a00; --warn-soft: #fcf0dc;
  --bad: #c0281b; --bad-soft: #fde8e6;
  --info: #0e65b8; --info-soft: #e6f0fb;
  --c3: #6d3fd1; --c3-soft: #efe9fc;
  --code-bg: #141b2b; --code-fg: #e4e8f0; --code-dim: #8d97ab;
  --toast-bg: #111827; --toast-fg: #f3f5f9;
  --proto: #05080f; --proto-fg: #e7ebf3; --proto-dim: #8d97ab; --proto-hi: #1b2438;
  --shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 4px 14px rgba(17, 24, 39, .06);
  --shadow-lg: 0 10px 40px rgba(17, 24, 39, .2);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0b0f17; --surface: #121826; --surface-2: #172033; --surface-3: #1e2940;
    --line: #243049; --line-strong: #34425f;
    --fg: #e7ebf3; --fg-2: #a9b3c6; --fg-3: #7e89a0;
    --accent: #7da2ff; --accent-hover: #9ab7ff; --accent-fg: #0b1430; --accent-soft: #18244a; --accent-line: #2c3f78;
    --rail: #070b13; --rail-fg: #e7ebf3; --rail-dim: #7e89a0; --rail-hi: #172033; --rail-link: #9db6ff;
    --ok: #6fd08a; --ok-soft: #173020; --warn: #f0b35c; --warn-soft: #33260f; --bad: #ff8b80; --bad-soft: #3a1b1a; --info: #7ab8ff; --info-soft: #172a40;
    --c3: #b79cff; --c3-soft: #261d45;
    --code-bg: #070b13; --code-fg: #e4e8f0; --code-dim: #7e89a0; --toast-bg: #f3f5f9; --toast-fg: #111827;
    --proto: #000; --proto-hi: #161d2d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0f17; --surface: #121826; --surface-2: #172033; --surface-3: #1e2940;
  --line: #243049; --line-strong: #34425f;
  --fg: #e7ebf3; --fg-2: #a9b3c6; --fg-3: #7e89a0;
  --accent: #7da2ff; --accent-hover: #9ab7ff; --accent-fg: #0b1430; --accent-soft: #18244a; --accent-line: #2c3f78;
  --rail: #070b13; --rail-fg: #e7ebf3; --rail-dim: #7e89a0; --rail-hi: #172033; --rail-link: #9db6ff;
  --ok: #6fd08a; --ok-soft: #173020; --warn: #f0b35c; --warn-soft: #33260f; --bad: #ff8b80; --bad-soft: #3a1b1a; --info: #7ab8ff; --info-soft: #172a40;
  --c3: #b79cff; --c3-soft: #261d45;
  --code-bg: #070b13; --code-fg: #e4e8f0; --code-dim: #7e89a0; --toast-bg: #f3f5f9; --toast-fg: #111827;
  --proto: #000; --proto-hi: #161d2d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
.login-card { width: min(440px, calc(100% - 32px)); margin: 8vh auto; }
.client-choices { border: 1px solid var(--line); border-radius: 4px; padding: 12px; display: grid; gap: 10px; }
.client-choices legend { color: var(--fg-2); padding: 0 4px; }
.client-choices input, .dialog input[type=checkbox] { width: 18px; height: 18px; flex: none; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--ground); color: var(--fg); font: 14px/1.45 var(--font); padding: 0 16px 16px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.tight { gap: 5px; }
.row.keep { flex-wrap: nowrap; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.row.top > .grow { flex: 1 1 260px; }
.stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 18px; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.narrow { max-width: 640px; }
.medium { max-width: 860px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }

/* ---- Prototype bar (not part of the console) ---- */
.proto { background: var(--proto); color: var(--proto-fg); margin: 0 -16px 12px; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.proto .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proto .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--proto-dim); }
.vers { display: flex; gap: 2px; background: var(--proto-hi); padding: 3px; border-radius: 6px; flex-wrap: wrap; }
.vers button { border: 0; background: transparent; color: var(--proto-dim); padding: 5px 11px; border-radius: 4px; font-size: 12.5px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.vers button:hover { color: var(--proto-fg); }
.vers button[aria-pressed="true"] { background: #fff; color: #0b1020; font-weight: 600; }
.vers .vk { font: 600 10.5px/1 var(--mono); padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.12); }
.vers button[aria-pressed="true"] .vk { background: #e8eefc; color: #2b59d9; }
.proto .pbtn { border: 1px solid #2a3550; background: transparent; color: var(--proto-fg); border-radius: 4px; padding: 4px 10px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.proto .pbtn[aria-pressed="true"] { background: #2b59d9; border-color: #2b59d9; }
.proto .desc { font-size: 12.5px; color: var(--proto-dim); max-width: 900px; flex: 1 1 400px; }
.proto .desc b { color: var(--proto-fg); font-weight: 600; }
.proto .sample { font-size: 11.5px; color: var(--proto-dim); margin-left: auto; }

/* Idea markers: the number of the idea a part of the page comes from. */
.ftag { display: inline-grid; place-items: center; min-width: 19px; height: 17px; padding: 0 4px; border-radius: 3px; border: 0; font: 600 10.5px/1 var(--mono); vertical-align: 1px; flex: none; background: var(--ok-soft); color: var(--ok); }
.ftag.vB { background: var(--accent-soft); color: var(--accent); }
.ftag.vC { background: var(--c3-soft); color: var(--c3); }
.ftag:hover { outline: 1px solid currentColor; }
.nav .ftag { margin-left: auto; }
.nav .ftag + .count { margin-left: 6px; }
.rec { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 3px; white-space: nowrap; }
.rec.Now { background: var(--ok-soft); color: var(--ok); }
.rec.Next { background: var(--accent-soft); color: var(--accent); }
.rec.Later { background: var(--c3-soft); color: var(--c3); }
.eff { font: 500 11.5px var(--mono); color: var(--fg-2); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 6px; }

/* ---- Shell ---- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 16px; min-height: calc(100dvh - 30px); }
.mobile-nav { display: none; }
.rail { background: var(--rail); color: var(--rail-fg); border-radius: 8px; padding: 14px 10px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; align-self: start; max-height: calc(100dvh - 24px); overflow-y: auto; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; font-weight: 600; font-size: 14px; color: inherit; text-decoration: none; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--rail-dim); letter-spacing: .08em; text-transform: uppercase; }
.logo { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex: none; }
.logo .ic { width: 17px; height: 17px; stroke-width: 2; }
.logo.big { width: 44px; height: 44px; border-radius: 8px; }
.logo.big .ic { width: 26px; height: 26px; }
.logo.quiet { background: var(--surface-3); color: var(--fg-3); }
.logo.danger { background: var(--bad-soft); color: var(--bad); }
.nav { display: flex; flex-direction: column; gap: 2px; align-self: stretch; }
.nav .grp { font-size: 10.5px; font-weight: 600; color: var(--rail-dim); padding: 14px 10px 6px; text-transform: uppercase; letter-spacing: .1em; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 4px; font-size: 13.5px; color: var(--rail-dim); text-decoration: none; }
.nav a:hover { background: var(--rail-hi); color: var(--rail-fg); }
.nav a[aria-current="page"] { background: var(--rail-hi); color: var(--rail-fg); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav a[aria-current="page"] .ic { color: var(--rail-link); }
.nav .count { margin-left: auto; font-size: 11.5px; color: var(--rail-dim); }
.nav .count.hot { background: var(--warn); color: #111; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px 6px 2px; border-top: 1px solid var(--rail-hi); font-size: 12.5px; }
.rail-foot .hint { color: var(--rail-dim); }
.rail-foot .bar { background: var(--rail-hi); }
.rail-foot .who { min-width: 0; line-height: 1.3; }
.rail-foot .who b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--rail-hi); color: var(--rail-fg); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.topline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); padding: 0 2px; flex-wrap: wrap; min-height: 32px; }
.topline .select { width: auto; min-height: 30px; padding: 4px 8px; font-size: 13px; }
.search { flex: 0 1 320px; display: flex; justify-content: flex-end; min-width: 180px; }
.search label { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 0 12px; height: 32px; color: var(--fg-3); }
.search input { border: 0; outline: none; background: none; flex: 1; min-width: 0; font-size: 13px; color: var(--fg); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 24px 28px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.pagehead h1, .title h1 { font-size: 22px; font-weight: 600; }
.title p, .pagehead p { margin-top: 3px; }
.sechead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sechead h2 { font-size: 16px; font-weight: 600; flex: 1; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--fg-2); }
.crumbs a { text-decoration: none; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); border-radius: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.subtle { border-color: transparent; background: transparent; }
.btn.subtle:hover:not(:disabled) { background: var(--surface-3); }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.ok-fill { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 4px 13px; font-size: 13px; }
.filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tog { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 3px 9px; font-size: 12.5px; color: var(--fg-2); display: inline-flex; align-items: center; gap: 5px; }
.tog[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tog.danger[aria-pressed="true"] { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.tog .ic { width: 13px; height: 13px; }
.switch { position: relative; width: 34px; height: 20px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Status, chips, cards ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 3px; white-space: nowrap; background: var(--surface-3); color: var(--fg-2); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.running, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.creating, .pill.starting, .pill.info { background: var(--info-soft); color: var(--info); }
.pill.pausing, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.creating .dot, .pill.starting .dot, .pill.pausing .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; display: inline-block; }
.spin.sm { width: 12px; height: 12px; }
.spin.info { color: var(--info); }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--surface-3); color: var(--fg-2); font-family: var(--mono); white-space: nowrap; }
.chip.def { background: var(--accent-soft); color: var(--accent); }
.chip.plain { font-family: var(--font); }
.tier { font-size: 11px; font-weight: 600; text-transform: capitalize; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--fg-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.card-pad { padding: 16px 18px; }
.card h3 { font-size: 14px; font-weight: 600; }
.card.sunk { background: var(--surface-2); }
.vmglyph { width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; background: var(--surface-3); color: var(--fg-2); flex: none; }
.vmglyph.big { width: 44px; height: 44px; }
.vmglyph.acc { background: var(--accent-soft); color: var(--accent); }
.notice { display: flex; gap: 10px; padding: 10px 12px; border-radius: 4px; font-size: 13px; background: var(--info-soft); color: var(--fg); }
.notice .ic { color: var(--info); margin-top: 1px; }
.notice.warn { background: var(--warn-soft); } .notice.warn .ic { color: var(--warn); }
.notice.bad { background: var(--bad-soft); } .notice.bad .ic { color: var(--bad); }
.notice.ok { background: var(--ok-soft); } .notice.ok .ic { color: var(--ok); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .6s ease; }
.bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); } .bar i.ok { background: var(--ok); }
.bar.info i { background: var(--info); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .bar { height: 7px; }
.minibar { display: grid; grid-template-columns: minmax(70px, 1fr) auto; gap: 8px; align-items: center; min-width: 140px; }
.under { font-size: 12px; color: var(--fg-3); border-top: 1px dashed var(--line-strong); padding-top: 10px; display: flex; gap: 8px; }
.under .ic { color: var(--fg-3); margin-top: 1px; }
.under code, .hint code, p code { font-family: var(--mono); font-size: .95em; background: var(--surface-3); padding: 0 4px; border-radius: 3px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stats > div { padding: 14px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stats > div:last-child { border-right: 0; }
.stats .k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.stats .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stats .v small { font-size: 13px; color: var(--fg-3); font-weight: 500; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }

.tablewrap { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 6px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr[data-go] { cursor: pointer; }
table.t tbody tr[data-go]:hover td { background: var(--surface-2); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t th.num, table.t td.num { text-align: right; }
table.t tr.sub td:first-child { padding-left: 34px; }
table.t tr.grp td { background: var(--surface-2); font-weight: 600; }
table.t tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.namecell { min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.namecell a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.namecell small { display: block; font-weight: 400; color: var(--fg-3); font-size: 12px; }

.vmhead { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.vmhead h1 { font-size: 24px; font-weight: 600; }
.facts { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--fg-2); font-size: 13px; margin-top: 4px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.cmdbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); }
.cmdbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.cmdbar .btn { border-color: transparent; background: transparent; height: 30px; padding: 0 10px; }
.cmdbar .btn:hover:not(:disabled) { background: var(--surface-3); }
.cmdbar .btn.go { color: var(--accent); font-weight: 600; }
.cmdbar .btn.danger { color: var(--bad); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 10px 9px; font-size: 13.5px; color: var(--fg-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.ov { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 9px 20px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--fg-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quick { display: grid; gap: 10px; }
.qa { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 4px; padding: 12px 14px; width: 100%; color: inherit; text-decoration: none; }
.qa:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-soft); }
.qa:disabled { opacity: .5; cursor: not-allowed; }
.qa .qi { width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); flex: none; }
.qa b { display: block; font-size: 13.5px; }
.qa span span { font-size: 12.5px; color: var(--fg-3); }
.secret { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 2px 2px 10px; background: var(--surface-2); font-family: var(--mono); font-size: 13px; min-width: 0; max-width: 100%; }
.secret span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secret .btn { height: 26px; width: 26px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line-strong); }
.steps li:last-child::before { display: none; }
.steps .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--fg-3); font-size: 11px; font-weight: 600; }
.steps .done .mark { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.steps .done .mark .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.steps .now .mark { border-color: var(--info); color: var(--info); }
.steps .t { font-weight: 600; font-size: 13.5px; }
.steps .todo .t { color: var(--fg-2); font-weight: 500; }
.steps .d { font-size: 12.5px; color: var(--fg-3); }
.log { margin: 0; background: var(--code-bg); color: var(--code-fg); font: 12px/1.6 var(--mono); padding: 12px 14px; border-radius: 4px; overflow: auto; max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .dim { color: var(--code-dim); }
.mini { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.act-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--fg-2); }
.act-ic.done { background: var(--ok-soft); color: var(--ok); }
.act-ic.failed { background: var(--bad-soft); color: var(--bad); }
.act-ic.warn { background: var(--warn-soft); color: var(--warn); }
.act-ic.agent { background: var(--accent-soft); color: var(--accent); }
.act-ic .ic { width: 14px; height: 14px; stroke-width: 2.2; }

.chatbox { height: 60vh; min-height: 420px; display: flex; flex-direction: column; }
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 18px 4px; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; max-width: 760px; width: 100%; }
.msg > div { min-width: 0; }
.msg .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.msg.you .av { background: var(--surface-3); color: var(--fg-2); }
.msg.agent .av { background: var(--accent); color: var(--accent-fg); }
.msg .who { font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.msg .who span { font-weight: 400; color: var(--fg-3); }
.msg .body { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.you .body { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 4px 10px 10px 10px; width: fit-content; max-width: 100%; }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.composer { border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); padding: 8px 8px 8px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.composer textarea { border: 0; outline: none; resize: none; background: transparent; min-height: 44px; font-size: 14px; padding: 4px 0; }
.composer .foot { display: flex; align-items: center; gap: 8px; }
.empty-chat { margin: auto; text-align: center; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0; }
.empty-chat h2, .center-state h2 { font-size: 18px; font-weight: 600; }
.sugs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.sugs button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 5px 12px; font-size: 12.5px; color: var(--fg-2); }
.center-state { margin: auto; max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 24px 0; }
.center-state.mid { text-align: center; align-items: center; }
.playground { display: grid; grid-template-columns: 260px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pg-side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.pg-main { display: flex; flex-direction: column; padding: 0 18px 16px; min-width: 0; height: 64vh; min-height: 460px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .flabel { font-size: 13px; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--fg-3); }
.input, .select { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 7px 10px; font-size: 13.5px; min-height: 34px; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
textarea.input { resize: vertical; font-family: var(--mono); font-size: 12.5px; }
.input.n { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.input.money { width: 130px; font-variant-numeric: tabular-nums; }
.select.auto { width: auto; }
.prefix { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.prefix span { padding: 0 8px; color: var(--fg-3); font-size: 13px; }
.prefix .input { border: 0; box-shadow: none !important; padding-left: 0; }
.prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.opts.wide { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.opt { min-width: 0; overflow-wrap: anywhere; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; background: var(--surface); font-size: 12.5px; color: var(--fg-2); text-align: left; }
.opt b { padding-right: 18px; font-size: 13.5px; color: var(--fg); font-weight: 600; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked), .opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.opt .check { position: absolute; top: 9px; right: 9px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.opt:has(input:checked) .check, .opt[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.opt .check .ic { width: 11px; height: 11px; stroke-width: 3; opacity: 0; }
.opt:has(input:checked) .check .ic, .opt[aria-pressed="true"] .check .ic { opacity: 1; }
.opt > .ic { color: var(--accent); margin-bottom: 4px; }
.newvm { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.newvm .fields { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.summary { position: sticky; top: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.summary .big { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 13px; }
.summary dt { color: var(--fg-2); } .summary dd { margin: 0; text-align: right; }

/* ---- Budget ---- */
.bud { display: flex; flex-direction: column; gap: 6px; }
.bud-track { position: relative; height: 14px; border-radius: 3px; background: var(--surface-3); }
.bud-track .sp { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px 0 0 3px; background: var(--ok); }
.bud-track .sp.warn { background: var(--warn); } .bud-track .sp.bad { background: var(--bad); }
.bud-track .fc { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.bud-track .cap { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--fg); }
.bud-track .tk { position: absolute; top: -3px; width: 2px; height: 20px; background: var(--accent); }
.bud-track .tk.forecast { background: var(--fg-3); }
.bud-track .tk.act { background: var(--bad); }
.bud-scale { position: relative; height: 16px; font: 11px var(--mono); color: var(--fg-3); }
.bud-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.ths { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; }
.th { display: grid; grid-template-columns: 170px 120px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.th:last-child { border-bottom: 0; }
.th.head { background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); font-weight: 600; padding: 7px 12px; }
.th .acts { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---- Schedule grid ---- */
.sgrid { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); gap: 2px; font: 10.5px var(--mono); color: var(--fg-3); user-select: none; }
.sgrid .h { text-align: center; }
.sgrid button { height: 22px; border: 0; padding: 0; border-radius: 2px; background: var(--surface-3); }
.sgrid button.on { background: var(--accent); }
.sgrid button:hover { outline: 1px solid var(--fg-2); }
.days { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---- Roadmap ---- */
.vcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vcard { border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.vcard.pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.vcard h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.vcard ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.vcard li { display: flex; gap: 7px; align-items: baseline; }
.idea-row td { vertical-align: top !important; }
.idea-row .what { font-size: 12.5px; color: var(--fg-2); margin-top: 2px; }
.srcs { display: flex; flex-direction: column; gap: 6px; font-size: 13px; padding-left: 18px; margin: 0; }
.diagram { width: 100%; height: auto; color: var(--fg-2); }

/* ---- Client portal preview ---- */
.portal { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--ground); }
.portal-top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.portal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.clogo { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: #0f766e; flex: none; }

.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 24, .45); display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; }
.dialog.wide { width: min(720px, 100%); }
.dialog-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 8px; }
.dialog-h h2 { font-size: 18px; font-weight: 600; flex: 1; }
.dialog-b { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 14px; border: 0; margin: 0; min-width: 0; }
.dialog-f { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.dialog-f .left { margin-right: auto; }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 20px; background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: 4px; font-size: 13px; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
#err { position: fixed; bottom: 0; left: 0; right: 0; background: #c0281b; color: #fff; margin: 0; padding: 8px; font: 12px var(--mono); z-index: 99; white-space: pre-wrap; }

@media (max-width: 1100px) { .vcards { grid-template-columns: 1fr; } .th { grid-template-columns: 130px 110px minmax(0, 1fr) 32px; } }
@media (max-width: 1200px) {
  .newvm { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .rail { display: none; }
  .mobile-nav { display: block; min-width: 0; border-radius: 8px; background: var(--rail); color: var(--rail-fg); }
  .mobile-nav summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary:focus-visible { outline-offset: -4px; border-radius: 8px; }
  .mobile-nav .brand { padding: 0; }
  .menu-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
  .mobile-nav[open] .menu-label .ic { transform: rotate(90deg); }
  .mobile-nav[open] summary { border-bottom: 1px solid var(--rail-hi); margin-bottom: 6px; }
  .mobile-nav .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 0 8px 8px; }
  .mobile-nav .nav .grp { display: none; }
  .mobile-nav .nav a { min-height: 44px; color: var(--rail-fg); }
  .topline .select { max-width: calc(100% - 24px); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .two, .three, .ov, .newvm, .playground { grid-template-columns: 1fr; }
  .summary { position: static; }
  .proto { position: static; }
  .pg-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .th { grid-template-columns: 1fr 1fr; } .th .acts { grid-column: 1 / -1; } .th.head { display: none; }
}
@media (max-width: 640px) {
  body { padding: 10px 10px max(16px, env(safe-area-inset-bottom)); }
  .shell { gap: 12px; }
  .panel { padding: 18px 16px 24px; gap: 18px; }
  .card-pad { padding: 14px; }
  .pagehead > div { flex: 1 1 150px; min-width: 0; }
  .topline { gap: 8px; }
  .search { order: 3; flex-basis: 100%; min-width: 0; }
  .search label { height: 44px; }
  .search input, .input, .select, .topline .select, .composer textarea { font-size: 16px; }
  .input, .select, .topline .select { min-height: 44px; }
  .btn, .btn.sm, .cmdbar .btn { height: auto; min-height: 44px; padding: 10px 12px; white-space: normal; line-height: 1.3; }
  .btn.icon, .btn.sm.icon, .secret .btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .filters button, .tog, .sugs button, .tabs a { min-height: 44px; }
  .tabs a { align-items: center; }
  .stats .v { font-size: clamp(18px, 4.8vw, 22px); overflow-wrap: anywhere; }
  .stats > div { padding: 12px; }
  .stats .k { font-size: 10px; letter-spacing: .04em; }
  .grid-cards { grid-template-columns: minmax(0, 1fr); }
  .crumbs, .facts, .mini .grow { overflow-wrap: anywhere; }
  .scrim { padding: 12px; }
  .dialog { max-height: calc(100dvh - 24px); }
  .dialog-h, .dialog-b, .dialog-f { padding-left: 16px; padding-right: 16px; }
  .chatbox { height: 65dvh; min-height: 320px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .proto .sample { margin-left: 0; }
  .sgrid { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .sgrid .h:nth-child(odd) { visibility: hidden; }
  .stats.s3 { grid-template-columns: 1fr; }
  .stats.s3 > div { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
/* ---- Added for the service version: people, access, sessions, the plan ---- */

.stg { display: inline-block; font: 600 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); text-decoration: none; vertical-align: 2px; white-space: nowrap; }
.stg.s0 { background: var(--surface-3); color: var(--fg-2); }
.stg:hover { outline: 1px solid currentColor; }
h1 .stg { vertical-align: 5px; margin-left: 4px; }
.pav { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 700; color: #fff; flex: none; }
.clogo.xs { width: 20px; height: 20px; font-size: 9.5px; border-radius: 4px; }
.clogo.big { width: 44px; height: 44px; font-size: 16px; border-radius: 8px; }
.asbar { align-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); flex-wrap: wrap; }
.asbar .ic { color: var(--accent); margin-top: 0; }
.asbar .grow { flex: 1 1 260px; }
.attn { padding: 10px 18px; border-top: 1px solid var(--line); }
.attn-h { padding-bottom: 6px; }
.mini.top { align-items: flex-start; }
.say { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: 14px; line-height: 1.5; border-radius: 0 4px 4px 0; }
[inert] { opacity: .68; }
.opt:disabled { opacity: .55; cursor: not-allowed; }
.th.t3 { grid-template-columns: 170px minmax(0, 1fr) 32px; }
.legend i.hatch { background: repeating-linear-gradient(135deg, var(--line-strong) 0 3px, transparent 3px 6px); }
.tryit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--accent-line); background: var(--accent-soft); border-radius: 4px; font-size: 13px; }
.tryit .grow { flex: 1 1 280px; }
.jc { justify-content: center; }
.mt { margin-top: 8px; }
.addrow .select { flex: 1; min-width: 0; }
.stagenum { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-weight: 700; flex: none; }
.stagecard h3 { font-size: 15px; }
.stagecard .mini .btn { flex: none; }

/* A desktop or OpenClaw session: a sketch of the browser tab the real console would open. */
.bwin { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); max-width: 980px; }
.bwin-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-3); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.bwin-bar .dots { display: inline-flex; gap: 5px; flex: none; }
.bwin-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.bwin-bar .addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; font-family: var(--mono); font-size: 12px; color: var(--fg-2); }
.bwin-bar .addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bwin-bar .bwho { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); white-space: nowrap; }
.bwin-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.bwin-foot .grow { flex: 1 1 220px; }
.desk { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: linear-gradient(160deg, var(--rail-hi), var(--code-bg)); overflow: hidden; color: var(--code-fg); font-size: 12px; }
.desk-top { position: absolute; inset: 0 0 auto 0; height: 22px; display: flex; align-items: center; gap: 10px; padding: 0 10px; background: var(--code-bg); font-size: 11px; color: var(--code-dim); }
.dwin { position: absolute; background: var(--code-bg); border: 1px solid var(--rail-dim); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.dwin.a { left: 6%; top: 16%; width: 44%; height: 60%; }
.dwin.b { left: 42%; top: 28%; width: 52%; height: 56%; }
.dwin-h { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 11px; color: var(--code-fg); border-bottom: 1px solid var(--rail-hi); }
.dwin-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--code-dim); }
.dwin-b { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px; min-height: 0; }
.ln { display: block; height: 6px; border-radius: 3px; background: var(--code-dim); opacity: .45; flex: none; }
.ln.acc { background: var(--rail-link); opacity: .9; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.blk { flex: 1; border-radius: 4px; background: var(--code-dim); opacity: .18; min-height: 12px; }
.dock { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--rail-hi); }
.dock i { width: 18px; height: 18px; border-radius: 5px; background: var(--code-dim); opacity: .6; }
.dock i:first-child { background: var(--rail-link); opacity: 1; }
.desk-cap { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--code-dim); }
.ocui { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 320px; background: var(--surface); }
.oc-side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.oc-side b { padding: 2px 8px 10px; }
.oc-side span { padding: 6px 8px; border-radius: 4px; color: var(--fg-2); }
.oc-side span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.oc-main { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.oc-main h4 { margin: 0; font-size: 16px; font-weight: 600; }
.oc-main p { color: var(--fg-2); max-width: 60ch; }
.oc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.oc-cards i { height: 70px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.ocui .desk-cap { position: static; color: var(--fg-3); margin-top: auto; }

@media (max-width: 900px) {
  .th.t3 { grid-template-columns: minmax(0, 1fr) 32px; }
  .th.t3 .acts { grid-column: 1 / -1; grid-row: 2; }
  .th.t3.head { display: none; }
}
@media (max-width: 640px) {
  .ocui { grid-template-columns: minmax(0, 1fr); }
  .oc-side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .oc-side b { width: 100%; padding-bottom: 4px; }
  .bwin-bar .bwho span:last-child { display: none; }
  .stagecard .mini { flex-wrap: wrap; }
  .stagecard .mini .btn { margin-left: 34px; }
  .desk-cap { display: none; }
  .ocui .desk-cap { display: block; }
}

/* ---- Only in the real console ---- */
body { padding-top: 14px; }
.toast.bad { background: var(--bad); color: #fff; }
.hint.bad { color: var(--bad); }
.pill.deleting { background: var(--bad-soft); color: var(--bad); }
.pill.soon { background: var(--surface-3); color: var(--fg-3); font-weight: 500; }
.act-ic.running { background: var(--info-soft); color: var(--info); }
.jobrow { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.jobrow:first-child { border-top: 0; padding-top: 0; }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--code-bg); color: var(--code-fg); font: 12.5px/1.5 var(--mono); padding: 10px 12px; border-radius: 4px; overflow-x: auto; white-space: nowrap; }
.cmd span { flex: 1; }
.cmd .btn { background: transparent; color: var(--code-fg); border-color: var(--code-dim); }
.opt .mk { margin-top: 4px; font-size: 12px; }
.opt .mk button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 12px; }
.opt .is-def { color: var(--accent); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.savebar { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.msg.note .body { color: var(--fg-2); font-style: italic; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--fg-2); padding: 30px 0; justify-content: center; }

/* ---- The four limits, and the tidier form ---- */
.limits { display: flex; flex-direction: column; gap: 10px; }
.limrow { display: grid; grid-template-columns: 72px repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.limk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; padding-bottom: 8px; color: var(--fg-2); }
.limits .field > label { font-size: 12px; font-weight: 500; color: var(--fg-3); }
.limits .prefix { max-width: 100%; }
.limits .prefix .input { min-width: 0; width: 96px; padding-left: 10px; font-variant-numeric: tabular-nums; }
.limits .prefix span:first-child + .input { padding-left: 0; }
.limits .prefix .input + span { padding-left: 0; }
.formrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.shell { max-width: 1680px; margin: 0 auto; }
.vmhead > .btn { align-self: center; }
.rail-foot { gap: 12px; }
@media (max-width: 640px) {
  .limrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limk { grid-column: 1 / -1; padding-bottom: 0; }
  .limits .prefix { width: 100%; }
  .limits .prefix .input { flex: 1; min-width: 0; width: auto; }
  .formrow { grid-template-columns: 1fr; }
  .cmdbar .sep { display: none; }
  .vmhead > .btn { width: 100%; }
}
.flabel { font-size: 13px; font-weight: 600; }
