/* ============================================================================
   B.O.R Command Center
   Design language from the V2 concept (deep navy, mono eyebrows, cyan signal)
   on top of the three Command Center themes (Midnight · Light · Brand).
   Text scales with --fs (rem), layout stays put.
   ========================================================================== */
@font-face { font-family: "Saira SemiExpanded"; src: url("/fonts/Saira_SemiExpanded-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Saira SemiExpanded"; src: url("/fonts/Saira_SemiExpanded-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Saira SemiExpanded"; src: url("/fonts/Saira_SemiExpanded-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Saira SemiExpanded"; src: url("/fonts/Saira_SemiExpanded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root { --fs: .92; --nav-w: 248px; --top-h: 64px; }
:root, [data-theme="midnight"] {
  --bg: #060a12; --bg-rgb: 6, 10, 18;
  --s1-rgb: 10, 16, 28; --s2-rgb: 16, 25, 42; --s3-rgb: 20, 31, 52; --well-rgb: 5, 8, 15;
  --panel: linear-gradient(145deg, rgba(13, 20, 34, .94), rgba(8, 13, 23, .94)); --panel-solid: #0b111e; --panel-2: rgba(var(--s2-rgb), .7);
  --l-rgb: 110, 145, 200; --line: rgba(var(--l-rgb), .14); --line-2: rgba(var(--l-rgb), .24); --line-soft: rgba(var(--l-rgb), .08);
  --text: #e8edf7; --text-2: #aab6c9; --muted: #6c7b92; --muted-2: #4a586d; --tint: #cfe0ff;
  --blue: #3d8bff; --a-rgb: 61, 139, 255; --cyan: #31d7f4; --c-rgb: 49, 215, 244; --violet: #8b6dff; --v-rgb: 139, 109, 255;
  --teal: #2ed3b7; --pink: #e868d6; --amber: #f2b84b;
  --ok: #38d69b; --ok-rgb: 56, 214, 155; --warn: #f2b84b; --warn-rgb: 242, 184, 75; --bad: #ff647c; --bad-rgb: 255, 100, 124; --run: #31d7f4; --run-rgb: 49, 215, 244;
  --btn-grad: linear-gradient(135deg, #2a72e0, #6a54e8); --btn-ink: #fff;
  --grid-dot: rgba(var(--l-rgb), .07);
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f2f5fa; --bg-rgb: 255, 255, 255;
  --s1-rgb: 255, 255, 255; --s2-rgb: 236, 241, 249; --s3-rgb: 255, 255, 255; --well-rgb: 244, 247, 252;
  --panel: #ffffff; --panel-solid: #ffffff; --panel-2: rgba(var(--s2-rgb), .9);
  --l-rgb: 30, 50, 100; --line: rgba(var(--l-rgb), .1); --line-2: rgba(var(--l-rgb), .18); --line-soft: rgba(var(--l-rgb), .06);
  --text: #0f172a; --text-2: #3b4760; --muted: #67728a; --muted-2: #8a94a8; --tint: #1e3a8a;
  --blue: #2563eb; --a-rgb: 37, 99, 235; --cyan: #0891b2; --c-rgb: 8, 145, 178; --violet: #6d4fe0; --v-rgb: 109, 79, 224;
  --teal: #0f9f87; --pink: #c03aa9; --amber: #b7791f;
  --ok: #138a4b; --ok-rgb: 19, 138, 75; --warn: #b26b00; --warn-rgb: 200, 130, 0; --bad: #c7303f; --bad-rgb: 199, 48, 63; --run: #0e7fb8; --run-rgb: 14, 127, 184;
  --btn-grad: linear-gradient(135deg, #2f6bff, #6247e6); --grid-dot: rgba(var(--l-rgb), .08);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .07);
  color-scheme: light;
}
[data-theme="brand"] {
  --bg: #05050a; --bg-rgb: 6, 5, 12;
  --s1-rgb: 12, 10, 22; --s2-rgb: 22, 18, 40; --s3-rgb: 18, 14, 34; --well-rgb: 4, 4, 10;
  --panel: linear-gradient(165deg, rgba(10, 11, 20, .96), rgba(5, 5, 11, .97) 55%, rgba(8, 6, 16, .96)); --panel-solid: #0a0914; --panel-2: rgba(var(--s2-rgb), .7);
  --l-rgb: 0, 210, 255; --line: rgba(var(--l-rgb), .15); --line-2: rgba(var(--l-rgb), .28); --line-soft: rgba(var(--l-rgb), .08);
  --text: #f4f6ff; --text-2: #c3c7dc; --muted: #8a8ea8; --muted-2: #5d6080; --tint: #a5ecff;
  --blue: #00d2ff; --a-rgb: 0, 210, 255; --cyan: #e040fb; --c-rgb: 224, 64, 251; --violet: #a46bff; --v-rgb: 164, 107, 255;
  --run: #00d2ff; --run-rgb: 0, 210, 255;
  --btn-grad: linear-gradient(90deg, #00c4e8, #1e85ff 60%, #7b5cff); --btn-ink: #fff;
  --frame: linear-gradient(145deg, rgba(0,210,255,.55), rgba(90,60,200,.3) 38%, rgba(189,0,255,.55) 72%, rgba(120,50,180,.4));
  --hero: linear-gradient(90deg, #00c8ff, #2d9cff 28%, #7b5cff 62%, #c026d3);
  --sans: "Saira SemiExpanded", "Segoe UI", system-ui, sans-serif; --display: var(--sans);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--fs)); }
html, body { margin: 0; height: 100%; }
body { background: radial-gradient(1100px 560px at 70% -12%, rgba(var(--a-rgb), .1), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(var(--c-rgb), .05), transparent 60%), var(--bg); color: var(--text); font: .875rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
[data-theme="brand"] body { background: radial-gradient(900px 500px at 85% -10%, rgba(189,0,255,.13), transparent 60%), radial-gradient(900px 500px at 10% -20%, rgba(0,210,255,.11), transparent 60%), var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; }
code { font-family: var(--mono); font-size: .9em; background: rgba(var(--a-rgb), .1); color: var(--tint); padding: 1px 5px; border-radius: 5px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); } .small { font-size: .78rem; } .mono { font-family: var(--mono); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
::selection { background: rgba(var(--a-rgb), .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--l-rgb), .18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); height: 100vh; transition: grid-template-columns .25s; }
.nav-collapsed { --nav-w: 68px; }
.sidebar { display: flex; flex-direction: column; min-height: 0; background: rgba(var(--bg-rgb), .9); border-inline-end: 1px solid var(--line); backdrop-filter: blur(14px); z-index: 30; overflow: hidden; }
[data-theme="light"] .sidebar { background: #fbfcfe; }
.brand { height: var(--top-h); display: flex; align-items: center; gap: 11px; padding-block: 0; padding-inline: 18px 12px; border-bottom: 1px solid var(--line-soft); flex: none; }
.brand-mark { width: 30px; height: 36px; display: grid; place-items: center; flex: none; filter: drop-shadow(0 0 10px rgba(233, 65, 36, .25)); }
.brand-mark img { width: 24px; height: 30px; object-fit: contain; }
[data-theme="light"] .brand-mark img { filter: invert(1) hue-rotate(180deg) brightness(.35); }
.brand-txt { min-width: 0; flex: 1; }
.brand-txt strong { display: block; font-family: var(--display); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { display: block; font: 600 .5rem var(--mono); letter-spacing: .16em; color: var(--muted); margin-top: 2px; }
.nav-toggle { flex: none; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; scrollbar-width: none; }
.nav-group { margin-bottom: 14px; }
.nav-label { color: var(--muted-2); padding: 4px 11px 6px; font: 700 .58rem var(--mono); letter-spacing: .16em; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: .8rem; white-space: nowrap; transition: background .15s, color .15s; }
.nav-item .i { width: 17px; height: 17px; }
.nav-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { color: var(--text); background: rgba(var(--l-rgb), .06); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(var(--a-rgb), .17), rgba(var(--a-rgb), .02)); }
.nav-item.active::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-start-end-radius: 3px; border-end-end-radius: 3px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.nav-item.active .i { color: var(--cyan); }
.nav-item b { font: 700 .6rem var(--mono); background: rgba(var(--a-rgb), .15); color: var(--blue); padding: 2px 6px; border-radius: 8px; }
.nav-item b.warn { background: rgba(var(--warn-rgb), .18); color: var(--warn); animation: pulse 1.6s infinite; }
.nav-item b.live { background: rgba(var(--run-rgb), .15); color: var(--run); letter-spacing: .08em; }
.side-foot { flex: none; border-top: 1px solid var(--line-soft); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.active-run { text-align: start; border: 1px solid rgba(var(--run-rgb), .35); background: linear-gradient(145deg, rgba(var(--run-rgb), .1), rgba(var(--a-rgb), .04)); border-radius: 9px; padding: 10px 11px; display: flex; flex-direction: column; gap: 6px; }
.active-run.waiting { border-color: rgba(var(--warn-rgb), .45); background: linear-gradient(145deg, rgba(var(--warn-rgb), .1), transparent); }
.ar-top { display: flex; align-items: center; gap: 7px; font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--run); }
.active-run.waiting .ar-top { color: var(--warn); }
.ar-top i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1.2s infinite; }
.ar-top em { margin-inline-start: auto; font-style: normal; color: var(--text-2); }
.active-run b { font-size: .76rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.keycard { font-size: .7rem; color: var(--muted); display: flex; flex-direction: column; gap: 5px; padding: 2px 4px; }
.kc-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.kc-row b { margin-inline-start: auto; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.ok, .dot.t-ok { background: var(--ok); } .dot.warn, .dot.t-warn { background: var(--warn); } .dot.bad, .dot.t-bad { background: var(--bad); }
.dot.t-run { background: var(--run); box-shadow: 0 0 8px var(--run); animation: pulse 1.3s infinite; } .dot.t-blue { background: var(--blue); } .dot.t-mute { background: var(--muted-2); }
.nav-collapsed .brand-txt, .nav-collapsed .nav-label, .nav-collapsed .nav-item span, .nav-collapsed .nav-item b, .nav-collapsed .side-foot { display: none; }
.nav-collapsed .brand { padding: 0; flex-direction: column; justify-content: center; gap: 2px; height: var(--top-h); }
.nav-collapsed .brand-mark { display: none; }
.nav-collapsed .nav-item { justify-content: center; padding: 0; }
.nav-collapsed .nav-group { margin-bottom: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.nav-scrim { display: none; }

.shell { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(var(--bg-rgb), .72); backdrop-filter: blur(14px); position: relative; z-index: 20; }
.crumbs { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; max-width: 36%; }
.crumbs b { color: var(--text); font-weight: 600; } .crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); } .crumbs .sep { margin: 0 6px; color: var(--muted-2); }
.search-box { flex: 0 1 400px; min-width: 170px; height: 36px; margin-inline-start: auto; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 1px solid var(--line); background: rgba(var(--well-rgb), .7); border-radius: 8px; color: var(--muted); text-align: start; }
.search-box span { flex: 1; font-size: .76rem; white-space: nowrap; overflow: hidden; }
.search-box:hover { border-color: var(--line-2); color: var(--text-2); }
kbd { font: 600 .6rem var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; background: rgba(var(--s2-rgb), .6); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.runtime, .conn { display: inline-flex; align-items: center; gap: 7px; font: 700 .6rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; border: 1px solid var(--line); white-space: nowrap; }
.runtime i, .conn i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.runtime.rt-live { color: var(--ok); border-color: rgba(var(--ok-rgb), .3); background: rgba(var(--ok-rgb), .07); }
.runtime.rt-sim { color: var(--violet); border-color: rgba(var(--v-rgb), .3); background: rgba(var(--v-rgb), .08); }
.conn { color: var(--muted); } .conn.on { color: var(--run); } .conn.off { color: var(--bad); border-color: rgba(var(--bad-rgb), .35); }
.conn.on span { display: none; } .conn.on { padding: 6px 8px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--text); background: rgba(var(--l-rgb), .08); }
.icon-btn .i { width: 17px; height: 17px; }
.notify { position: relative; }
.notify b { position: absolute; top: 1px; inset-inline-end: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font: 700 .58rem/16px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.pop-wrap { position: relative; }
.pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: 340px; max-height: 70vh; overflow: auto; border: 1px solid var(--line-2); background: var(--panel-solid); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: .8rem; } .pop-head a { font-size: .72rem; }
.pop-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; border: 0; background: none; text-align: start; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.pop-item:hover { background: var(--panel-2); }
.pop-item b { display: block; font-size: .78rem; font-weight: 600; } .pop-item small { color: var(--muted); font-size: .7rem; }
.pop-item.warn .i { color: var(--warn); } .pop-item.ok .i { color: var(--ok); } .pop-item.bad .i { color: var(--bad); }
.pop-empty { color: var(--muted); font-size: .76rem; padding: 14px 10px; }
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(var(--well-rgb), .6); }
.theme-switch button { width: 28px; height: 26px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 6px; padding: 0; }
.theme-switch button .i { width: 15px; height: 15px; } .theme-switch img { width: 11px; height: 14px; object-fit: contain; }
[data-theme="light"] .theme-switch img { filter: invert(1) brightness(.4); }
.theme-switch button[aria-pressed="true"] { background: rgba(var(--a-rgb), .18); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--a-rgb), .35); }
.clock { line-height: 1.15; text-align: end; }
.clock small { display: block; white-space: nowrap; font: 700 .5rem var(--mono); letter-spacing: .16em; color: var(--muted-2); }
.clock span { font: .8rem var(--mono); color: var(--text); }
.mobile-menu { display: none; }
.main { flex: 1; min-height: 0; overflow: auto; position: relative; }
.page-host { max-width: 1520px; margin: 0 auto; padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 14px; }
.page-host.p-workflow { max-width: none; height: 100%; padding: 0; gap: 0; }
.main:has(> .p-workflow:not([hidden])) { overflow: hidden; }

/* ---------------------------------------------------------------- atoms */
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.eyebrow { color: var(--blue); font: 700 .6rem var(--mono); letter-spacing: .15em; margin-bottom: 7px; opacity: .85; }
.eyebrow i { display: inline-block; width: 16px; height: 1px; background: var(--cyan); vertical-align: middle; margin-inline-end: 8px; }
.page-heading h1 { font-size: 1.7rem; letter-spacing: -.03em; }
[data-theme="brand"] .page-heading h1, [data-theme="brand"] .run-head h1 { background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-heading p { color: var(--muted); margin-top: 5px; font-size: .82rem; }
.page-heading p b { color: var(--text-2); }
.heading-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(var(--s2-rgb), .55); color: var(--text-2); font-size: .76rem; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, filter .15s; }
.btn .i { width: 15px; height: 15px; }
.btn:hover { color: var(--text); border-color: rgba(var(--l-rgb), .4); background: rgba(var(--s3-rgb), .8); }
.btn.primary { color: var(--btn-ink); border-color: rgba(var(--a-rgb), .55); background: var(--btn-grad); box-shadow: 0 6px 22px rgba(var(--a-rgb), .22), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { filter: brightness(1.12); color: var(--btn-ink); }
.btn.danger { color: var(--bad); border-color: rgba(var(--bad-rgb), .35); background: rgba(var(--bad-rgb), .08); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { height: 30px; padding: 0 11px; font-size: .72rem; } .btn.xs { height: 26px; padding: 0 9px; font-size: .68rem; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn[aria-pressed="true"] { color: var(--text); border-color: rgba(var(--a-rgb), .5); background: rgba(var(--a-rgb), .14); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); background: rgba(var(--well-rgb), .6); border-radius: 8px; }
.seg button { border: 0; background: none; color: var(--muted); font-size: .72rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.seg button .i { width: 15px; height: 15px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: rgba(var(--a-rgb), .18); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--a-rgb), .32); }
.input, .select, textarea { background: rgba(var(--well-rgb), .7); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); outline: none; }
.input { width: 100%; height: 36px; padding: 0 11px; }
.select { height: 34px; padding: 0 9px; font-size: .76rem; max-width: 260px; }
.select option { background: var(--panel-solid); }
.input:focus, .select:focus, textarea:focus { border-color: rgba(var(--a-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .14); }
.filter { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: rgba(var(--well-rgb), .7); border-radius: 8px; color: var(--muted); min-width: 220px; }
.filter input { border: 0; background: none; outline: none; flex: 1; min-width: 0; font-size: .78rem; color: var(--text); }
.filter:focus-within { border-color: rgba(var(--a-rgb), .55); }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--text-2); cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: rgba(var(--l-rgb), .16); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .2s; }
.switch input:checked + .track { background: var(--blue); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:disabled + .track { opacity: .5; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(var(--a-rgb), .3); }
.input-prefix { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 9px; background: rgba(var(--well-rgb), .7); color: var(--muted); height: 34px; }
.input-prefix input { width: 70px; border: 0; background: none; outline: none; color: var(--text); padding: 0 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span, .tag { font: 600 .62rem var(--mono); color: var(--text-2); border: 1px solid var(--line); background: rgba(var(--s2-rgb), .5); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(var(--s2-rgb), .45); border-radius: 7px; padding: 5px 9px; font-size: .74rem; color: var(--text-2); }
.chip .i { width: 14px; height: 14px; color: var(--blue); }
.chip:hover { border-color: rgba(var(--a-rgb), .45); color: var(--text); }
.chip.ghost { border-style: dashed; background: none; color: var(--muted); }
.pill-st { display: inline-flex; align-items: center; gap: 6px; font: 700 .6rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.pill-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-st.t-ok { color: var(--ok); border-color: rgba(var(--ok-rgb), .3); background: rgba(var(--ok-rgb), .09); }
.pill-st.t-run { color: var(--run); border-color: rgba(var(--run-rgb), .35); background: rgba(var(--run-rgb), .09); } .pill-st.t-run i { box-shadow: 0 0 8px currentColor; animation: pulse 1.2s infinite; }
.pill-st.t-warn { color: var(--warn); border-color: rgba(var(--warn-rgb), .35); background: rgba(var(--warn-rgb), .09); } .pill-st.t-warn i { animation: pulse 1.6s infinite; }
.pill-st.t-bad { color: var(--bad); border-color: rgba(var(--bad-rgb), .3); background: rgba(var(--bad-rgb), .08); }
.pill-st.t-mute { color: var(--muted); border-color: var(--line); background: rgba(var(--s2-rgb), .4); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 34px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 10px; }
.empty .i { width: 28px; height: 28px; color: var(--muted-2); margin-bottom: 4px; }
.empty b { color: var(--text-2); font-size: .86rem; } .empty span { font-size: .78rem; max-width: 52ch; } .empty .btn { margin-top: 8px; }
.loading { padding: 30px; text-align: center; color: var(--muted); font-size: .8rem; }
.loading::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 10px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: spin2 .8s linear infinite; }
.hint { font-size: .72rem; color: var(--muted); }
.grow { flex: 1; }
.av { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; background: rgba(var(--tone-rgb, var(--a-rgb)), .14); color: rgb(var(--tone-rgb, var(--a-rgb))); border: 1px solid rgba(var(--tone-rgb, var(--a-rgb)), .3); }
.av .i { width: 14px; height: 14px; }
.avatars { display: inline-flex; } .avatars .av { margin-inline-start: -5px; box-shadow: 0 0 0 2px var(--panel-solid); background: var(--panel-solid); } .avatars .av:first-child { margin-inline-start: 0; }
.tone-blue { --tone-rgb: 61, 139, 255; } .tone-cyan { --tone-rgb: 49, 215, 244; } .tone-violet { --tone-rgb: 139, 109, 255; } .tone-teal { --tone-rgb: 46, 211, 183; } .tone-pink { --tone-rgb: 232, 104, 214; } .tone-amber { --tone-rgb: 242, 184, 75; }
[data-theme="light"] .tone-blue { --tone-rgb: 37, 99, 235; } [data-theme="light"] .tone-cyan { --tone-rgb: 8, 145, 178; } [data-theme="light"] .tone-violet { --tone-rgb: 109, 79, 224; } [data-theme="light"] .tone-teal { --tone-rgb: 15, 159, 135; } [data-theme="light"] .tone-pink { --tone-rgb: 192, 58, 169; } [data-theme="light"] .tone-amber { --tone-rgb: 183, 121, 31; }
.t-blue { --tc: var(--blue); } .t-cyan { --tc: var(--cyan); } .t-violet { --tc: var(--violet); } .t-teal { --tc: var(--teal); } .t-pink { --tc: var(--pink); } .t-amber { --tc: var(--amber); }
.t-ok { --tc: var(--ok); } .t-warn { --tc: var(--warn); } .t-bad { --tc: var(--bad); } .t-run { --tc: var(--run); } .t-mute { --tc: var(--muted); }
.bar { display: block; height: 4px; border-radius: 4px; background: rgba(var(--l-rgb), .14); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .5s; }
.bar i.t-ok { background: var(--ok); } .bar i.t-bad { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin2 { to { transform: rotate(360deg); } }
@keyframes spin { to { --ang: 360deg; } }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-width: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
[data-theme="brand"] .panel, [data-theme="brand"] .metric, [data-theme="brand"] .kpi, [data-theme="brand"] .card { border: 1px solid transparent; background: var(--panel) padding-box, var(--frame) border-box; }
.panel-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head h2 { font-size: .8rem; font-weight: 600; letter-spacing: .01em; }
.panel-head p { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.panel-tools { display: flex; align-items: center; gap: 8px; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font: 700 .58rem var(--mono); letter-spacing: .14em; color: var(--ok); }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1.2s infinite; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.toolbar.flat { padding: 0; border: 0; }
.bulkbar { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(var(--a-rgb), .07); border-bottom: 1px solid var(--line-soft); font-size: .76rem; color: var(--text-2); flex-wrap: wrap; }
.bulkbar span { margin-inline-end: auto; font-weight: 600; }

/* ---------------------------------------------------------------- notice + quick */
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 12%, transparent), transparent 70%); }
.notice .n-ico { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 15%, transparent); flex: none; }
.notice > div { flex: 1; min-width: 0; } .notice b { display: block; font-size: .8rem; } .notice span { display: block; font-size: .72rem; color: var(--muted); }
.notice a { display: inline-flex; align-items: center; gap: 4px; color: var(--tc); font-size: .74rem; font-weight: 600; white-space: nowrap; } .notice a .i { width: 14px; height: 14px; }
.quick { display: flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 12px 6px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(var(--well-rgb), .7); transition: border-color .2s, box-shadow .2s; }
.quick:focus-within { border-color: rgba(var(--a-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .12), 0 0 30px rgba(var(--a-rgb), .1); }
.q-ico { color: var(--cyan); display: grid; } .quick input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: .84rem; color: var(--text); height: 32px; }
.quick input::placeholder { color: var(--muted); }
.q-meta { font: .64rem var(--mono); color: var(--muted); white-space: nowrap; }

/* ---------------------------------------------------------------- metrics */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.metric { position: relative; overflow: hidden; min-height: 112px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); display: grid; grid-template-columns: 32px 1fr auto; grid-template-rows: auto 1fr auto; column-gap: 10px; }
.metric::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--c-rgb), .3), transparent); }
.m-ico { grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent); }
.m-label { font: 700 .58rem var(--mono); letter-spacing: .1em; color: var(--muted); align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m-value { grid-column: 2 / 4; font: 600 1.55rem var(--mono); letter-spacing: -.04em; margin-top: 6px; white-space: nowrap; }
.m-value small { font-size: .8rem; color: var(--muted); letter-spacing: 0; font-weight: 500; }
[data-theme="brand"] .m-value { background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent; } [data-theme="brand"] .m-value small { -webkit-text-fill-color: var(--muted); }
.m-sub { grid-column: 1 / 3; font-size: .68rem; color: var(--muted); align-self: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-family: var(--mono); font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.spark { grid-column: 3; grid-row: 3; width: 70px; height: 26px; align-self: end; opacity: .8; }
.spark rect { fill: var(--tc); } .spark rect.z { fill: rgba(var(--l-rgb), .18); }

/* ---------------------------------------------------------------- dashboard */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .95fr); gap: 12px; }
.dash-grid > .panel { display: flex; flex-direction: column; }
.orbit-stage { position: relative; height: 440px; overflow: hidden; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 22px 22px; }
.orbit-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(var(--c-rgb), .12), transparent 42%); }
.orbit-lines { position: absolute; inset: 0; overflow: visible; }
.orbit-lines .ring { fill: none; stroke: rgba(var(--c-rgb), .18); stroke-dasharray: 2 5; }
.orbit-lines .ln { fill: none; stroke: rgba(var(--c-rgb), .3); stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(var(--c-rgb), .35)); }
.orbit-lines .ln.active { stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(var(--c-rgb), .9)); }
.orbit-lines .ln.done { stroke: rgba(var(--ok-rgb), .6); filter: drop-shadow(0 0 3px rgba(var(--ok-rgb), .4)); }
.orbit-lines .ln.dim { stroke: rgba(var(--l-rgb), .12); filter: none; }
.orbit-lines .spark { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 6 94; animation: orbit-spark 1.4s linear infinite; filter: drop-shadow(0 0 6px var(--cyan)); }
.orbit-lines .joint { fill: rgba(var(--c-rgb), .9); filter: drop-shadow(0 0 4px rgba(var(--c-rgb), .9)); }
.orbit-lines .joint.done { fill: var(--ok); filter: none; } .orbit-lines .joint.dim { fill: rgba(var(--l-rgb), .3); filter: none; }
@keyframes orbit-spark { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* hub */
.orbit-core { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 124px; height: 124px; border: 0; background: none; color: var(--text); padding: 0; border-radius: 50%; }
.oc-halo { position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--c-rgb), .25), transparent 68%); animation: breathe 3.2s ease-in-out infinite; }
.oc-spin { position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(var(--c-rgb), .55); animation: orbit-spin 18s linear infinite; }
.oc-spin::after { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.oc-ring { position: absolute; inset: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(var(--c-rgb), .22), rgba(var(--s1-rgb), .96) 70%); border: 2px solid rgba(var(--c-rgb), .75);
  box-shadow: 0 0 0 5px rgba(var(--c-rgb), .07), 0 0 30px rgba(var(--c-rgb), .45), inset 0 0 22px rgba(var(--c-rgb), .25); }
.oc-ico { color: var(--cyan); line-height: 0; } .oc-ico .i { width: 18px; height: 18px; }
.oc-ring strong { font-size: 1.02rem; letter-spacing: .14em; margin-top: 2px; text-shadow: 0 0 12px rgba(var(--c-rgb), .7); }
.oc-ring b { font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.oc-ring small { font-size: .58rem; color: var(--muted); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orbit-core.working .oc-ring { border-color: var(--cyan); box-shadow: 0 0 0 6px rgba(var(--c-rgb), .1), 0 0 50px rgba(var(--c-rgb), .7), inset 0 0 26px rgba(var(--c-rgb), .35); }
.orbit-core.working .oc-spin { animation-duration: 5s; }
.orbit-core:hover .oc-ring { border-color: var(--cyan); }
@keyframes breathe { 50% { opacity: .55; transform: scale(1.06); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* agent cards */
.orbit-node { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; justify-content: space-between; gap: 4px; padding: 10px 12px; border-radius: 12px; text-align: start; color: var(--text);
  border: 1px solid rgba(var(--c-rgb), .32); background: linear-gradient(160deg, rgba(var(--s2-rgb), .96), rgba(var(--s1-rgb), .96));
  box-shadow: 0 0 0 1px rgba(var(--c-rgb), .05), 0 0 18px rgba(var(--c-rgb), .12), inset 0 1px 0 rgba(255, 255, 255, .04); transition: transform .2s, border-color .2s, box-shadow .2s, opacity .2s; }
[data-theme="light"] .orbit-node { background: #fff; box-shadow: 0 2px 12px rgba(15, 23, 42, .08); }
.orbit-node:hover { transform: translate(-50%, calc(-50% - 2px)); border-color: rgba(var(--c-rgb), .7); box-shadow: 0 0 24px rgba(var(--c-rgb), .3); }
.on-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.on-head b { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; color: rgb(var(--tone-rgb)); background: rgba(var(--tone-rgb), .14); position: relative; }
.on-ico .i { width: 13px; height: 13px; }
.on-num { font-size: 1.55rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.on-num em { font-style: normal; font-size: .62rem; font-weight: 500; color: var(--muted); }
.orbit-node small { display: flex; align-items: center; gap: 6px; font-size: .62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orbit-node small i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--muted-2); }
.orbit-node.working { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .4), 0 0 30px rgba(var(--c-rgb), .45); }
.orbit-node.working .on-ico::after { content: ""; position: absolute; inset: -4px; border-radius: 8px; border: 1px solid var(--cyan); animation: ping 1.6s ease-out infinite; }
.orbit-node.working small { color: var(--cyan); } .orbit-node.working small i { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.orbit-node.done small { color: var(--ok); } .orbit-node.done small i { background: var(--ok); }
.orbit-node.idle { opacity: .45; }

/* narrow: hub on top, cards in a grid, no traces */
.orbit-stage.compact { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.orbit-stage.compact .orbit-core { position: relative; transform: none; grid-column: 1 / -1; justify-self: center; margin: 22px 0; }
.orbit-stage.compact .orbit-node { position: relative; transform: none; min-height: 92px; }
@keyframes ping { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
.legend-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: .68rem; color: var(--muted); flex-wrap: wrap; }
.legend-row.inline { border: 0; padding: 0; }
.legend-row i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-inline-end: 6px; }
.legend-row .right { margin-inline-start: auto; font-family: var(--mono); }
.lg-run { background: var(--run); box-shadow: 0 0 6px var(--run); } .lg-ok { background: var(--ok); } .lg-idle { background: var(--muted-2); } .lg-bad { background: var(--bad); }
.stream { padding: 4px 8px 8px; overflow: auto; max-height: 410px; }
.st-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--text-2); position: relative; }
.st-row:hover { background: var(--panel-2); }
.st-row:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 21px; top: 38px; bottom: -8px; border-inline-start: 1px solid var(--line); }
.st-ico { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--panel-solid)); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); z-index: 1; }
.st-ico .i { width: 13px; height: 13px; }
.st-txt { min-width: 0; font-size: .76rem; } .st-txt > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .st-txt b { color: var(--text); font-weight: 600; }
.st-txt small { display: block; color: var(--muted); font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row time { font: .64rem var(--mono); color: var(--muted); white-space: nowrap; }

/* run table */
.table-wrap { overflow-x: auto; }
.rtable { min-width: 760px; }
.rt-row { display: grid; grid-template-columns: 26px minmax(220px, 2.2fr) 130px minmax(110px, 1fr) 110px 80px 80px 110px 76px; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); font-size: .78rem; cursor: pointer; }
.rt-row:hover { background: rgba(var(--l-rgb), .04); }
.rt-row.picked { background: rgba(var(--a-rgb), .08); }
.rt-head { cursor: default; font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--muted); padding-top: 9px; padding-bottom: 9px; } .rt-head:hover { background: none; }
.rt-title { min-width: 0; } .rt-title b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rt-title small { color: var(--muted); font-size: .66rem; }
.rt-pick input { accent-color: var(--blue); width: 15px; height: 15px; }
.rt-prog { display: flex; flex-direction: column; gap: 4px; } .rt-prog small { font: .62rem var(--mono); color: var(--muted); }
.rt-act { display: flex; justify-content: flex-end; gap: 2px; }
.num { font-family: var(--mono); font-size: .74rem; color: var(--text-2); white-space: nowrap; }
.rtable.compact .rt-row { padding: 9px 16px; }

/* ---------------------------------------------------------------- approvals */
.ap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
#ap-list { display: flex; flex-direction: column; gap: 12px; }
.ap-card { padding: 16px 18px; border-color: rgba(var(--warn-rgb), .35); }
.ap-head { display: flex; gap: 12px; align-items: flex-start; }
.ap-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--warn); background: rgba(var(--warn-rgb), .12); flex: none; }
.ap-head small { font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--warn); } .ap-head h3 { font-size: 1rem; margin: 2px 0 3px; }
.ap-body { margin: 12px 0; font-size: .8rem; color: var(--text-2); }
.ap-goal { margin-bottom: 8px; } .ap-goal b { color: var(--text); }
.ap-crit { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; } .ap-crit span { display: flex; gap: 7px; align-items: flex-start; font-size: .76rem; } .ap-crit .i { width: 14px; height: 14px; color: var(--ok); margin-top: 2px; }
.ap-tasks { margin: 8px 0; padding-inline-start: 20px; font-size: .78rem; } .ap-tasks li { margin: 3px 0; } .ap-tasks b { color: var(--text); }
.ap-pre { font: .74rem/1.5 var(--mono); background: rgba(var(--well-rgb), .8); border: 1px solid var(--line); padding: 9px 11px; border-radius: 8px; white-space: pre-wrap; color: var(--tint); max-height: 220px; overflow: auto; margin: 8px 0; }
.ap-acts { display: flex; justify-content: flex-end; gap: 8px; }
.policy { list-style: none; margin: 0; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.policy li { display: flex; gap: 10px; font-size: .74rem; color: var(--muted); } .policy .i { color: var(--blue); margin-top: 1px; } .policy b { display: block; color: var(--text); font-size: .78rem; }
.dock { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 70; width: min(400px, calc(100vw - 36px)); display: flex; flex-direction: column; gap: 8px; }
.dock-card { border: 1px solid rgba(var(--warn-rgb), .45); background: var(--panel-solid); border-radius: 12px; box-shadow: 0 0 0 1px rgba(var(--warn-rgb), .1), 0 18px 50px rgba(0,0,0,.5), 0 0 40px rgba(var(--warn-rgb), .1); overflow: hidden; animation: rise .3s ease-out; }
[data-theme="light"] .dock-card { box-shadow: 0 18px 40px rgba(15,23,42,.15); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.dc-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 0; background: linear-gradient(90deg, rgba(var(--warn-rgb), .12), transparent); text-align: start; color: var(--text); }
.dc-head > .i:first-child { color: var(--warn); } .dc-head span { flex: 1; min-width: 0; }
.dc-head small { display: block; font: 700 .56rem var(--mono); letter-spacing: .12em; color: var(--warn); text-transform: uppercase; } .dc-head b { display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-head .chev { transition: transform .2s; } .dock-card.open .chev { transform: rotate(180deg); }
.dc-body { padding: 4px 14px 2px; max-height: 42vh; overflow: auto; font-size: .78rem; color: var(--text-2); }
.dc-acts { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line-soft); } .dc-acts > span { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- new brief */
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.compose-panel { padding: 18px; }
.compose { display: flex; flex-direction: column; gap: 12px; }
.lbl { font: 700 .6rem var(--mono); letter-spacing: .14em; color: var(--muted); }
.compose textarea { width: 100%; min-height: 200px; resize: vertical; padding: 13px 14px; line-height: 1.6; font-size: .9rem; }
.compose.dropping textarea { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(var(--c-rgb), .2); }
.brief-count { font-size: .7rem; color: var(--muted); margin-top: -6px; } .brief-count.warn { color: var(--warn); } .brief-count.bad { color: var(--bad); }
.attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.att { position: relative; display: flex; align-items: center; gap: 9px; max-width: 250px; padding-block: 6px; padding-inline: 6px 30px; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(var(--well-rgb), .7); overflow: hidden; }
.att .pv { width: 36px; height: 36px; flex: none; border-radius: 7px; object-fit: cover; display: grid; place-items: center; background: var(--panel-2); color: var(--tint); }
.att .nm { min-width: 0; font-size: .74rem; line-height: 1.3; } .att .nm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .att .nm small { color: var(--muted); }
.att.err { border-color: rgba(var(--bad-rgb), .5); } .att.err small { color: var(--bad); }
.att .x { position: absolute; top: 5px; inset-inline-end: 5px; width: 20px; height: 20px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; } .att .x .i { width: 13px; height: 13px; }
.att .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--cyan); border-radius: 0; }
.form-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--text-2); }
.form-error { color: var(--bad); font-size: .78rem; min-height: 1em; } .form-error:empty { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.side-stack { display: flex; flex-direction: column; gap: 12px; }
.steps { list-style: none; margin: 0; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 2px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; padding: 7px 0; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 14px; top: 36px; bottom: -6px; border-inline-start: 1px dashed var(--line-2); }
.steps li > span { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.steps li > span .i { width: 15px; height: 15px; }
.steps b { font-size: .78rem; } .steps small { font-size: .68rem; color: var(--muted); }
.team-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.team-row { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 8px; text-align: start; }
.team-row:hover { background: var(--panel-2); } .team-row b { display: block; font-size: .76rem; } .team-row small { color: var(--muted); font-size: .66rem; }

/* ---------------------------------------------------------------- cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 9px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: var(--line-2); }
.card-top { display: flex; align-items: center; gap: 8px; } .card-top > :last-child:not(:first-child) { margin-inline-start: auto; }
.c-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--tc, rgb(var(--tone-rgb))); background: color-mix(in srgb, var(--tc, rgb(var(--tone-rgb))) 13%, transparent); flex: none; }
.c-ico.big { width: 42px; height: 42px; border-radius: 11px; } .c-ico.big .i { width: 21px; height: 21px; }
.card h3 { font-size: .95rem; } .card p { font-size: .76rem; color: var(--muted); line-height: 1.55; }
.card .tag { margin-inline-start: auto; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.card.tpl .card-bottom { justify-content: flex-end; }
.card.agent.working { border-color: rgba(var(--c-rgb), .55); box-shadow: 0 0 30px rgba(var(--c-rgb), .12); }
.ag-live { display: inline-flex; align-items: center; gap: 6px; font: 700 .6rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ag-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.ag-live.working { color: var(--run); } .ag-live.working i { background: var(--run); box-shadow: 0 0 8px var(--run); animation: pulse 1.2s infinite; }
.ag-live.done { color: var(--ok); } .ag-live.done i { background: var(--ok); }
.ag-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 0 4px; border-top: 1px solid var(--line-soft); }
.ag-stats b { display: block; font: 600 .86rem var(--mono); } .ag-stats small { font-size: .62rem; color: var(--muted); }
.load { height: 4px; border-radius: 4px; background: rgba(var(--l-rgb), .12); overflow: hidden; } .load i { display: block; height: 100%; background: linear-gradient(90deg, rgb(var(--tone-rgb, var(--a-rgb))), var(--cyan)); }
.card.agent .load i { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.mini-dl { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: .76rem; }
.mini-dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 5px; }
.mini-dl dt { color: var(--muted); } .mini-dl dd { margin: 0; text-align: end; color: var(--text-2); }
.mcp-list { padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mcp-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; } .mcp-row b { flex: 1; font-size: .8rem; }
#in-mcp > .empty { margin: 12px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(2, 4, 10, .5); backdrop-filter: blur(2px); z-index: 80; }
.drawer { position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: min(440px, 94vw); z-index: 81; background: var(--panel-solid); border-inline-start: 1px solid var(--line-2); box-shadow: -20px 0 60px rgba(0,0,0,.4); overflow: auto; transform: translateX(100%); transition: transform .22s ease-out; }
.drawer.open { transform: none; }
.dr-head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.dr-head > div { flex: 1; } .dr-head small { font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--muted); } .dr-head h2 { font-size: 1.1rem; }
.dr-status { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.dr-sec { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.dr-sec label, .vw-info label { display: block; font: 700 .58rem var(--mono); letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; }
.dr-sec dl, .vw-info dl { margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: .78rem; }
.dr-sec dl > div, .vw-info dl > div { display: flex; justify-content: space-between; gap: 12px; } .dr-sec dt, .vw-info dt { color: var(--muted); } .dr-sec dd, .vw-info dd { margin: 0; text-align: end; color: var(--text-2); word-break: break-word; }
.dm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: .78rem; } .dm-row[hidden] { display: none; }
.dm-row > span { color: var(--muted); } .dm-row .input { flex: 1; max-width: 250px; height: 32px; font: .74rem var(--mono); } .dm-row .select { width: 140px; }
.dm #dm-note { margin: 2px 0 10px; line-height: 1.45; } .dm-acts { display: flex; justify-content: flex-end; }
.perf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.perf > div { border: 1px solid var(--line); border-radius: 8px; padding: 9px; } .perf b { display: block; font: 600 .9rem var(--mono); } .perf small { font-size: .62rem; color: var(--muted); }
.dr-run { display: flex; align-items: center; gap: 8px; padding: 7px 0; color: var(--text-2); font-size: .76rem; border-bottom: 1px solid var(--line-soft); }
.dr-run span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dr-run small { font-family: var(--mono); color: var(--muted); }
.dr-ev { list-style: none; margin: 0; padding: 0; font-size: .74rem; color: var(--text-2); } .dr-ev li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 5px 0; } .dr-ev time { font: .66rem var(--mono); color: var(--muted); } .dr-ev b { color: var(--text); }

/* ---------------------------------------------------------------- assets */
.asset-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.asset-stats > div { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px 14px; }
.asset-stats span { font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--muted); } .asset-stats b { display: block; font: 600 1.2rem var(--mono); margin-top: 3px; }
.asset-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 520px; overflow: hidden; }
.asset-side { border-inline-end: 1px solid var(--line-soft); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.asset-side strong { font: 700 .58rem var(--mono); letter-spacing: .14em; color: var(--muted-2); padding: 10px 8px 6px; }
.asset-side button { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 7px 8px; border-radius: 7px; color: var(--muted); font-size: .76rem; text-align: start; }
.asset-side button span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .asset-side button em { font: normal .64rem var(--mono); }
.asset-side button:hover { color: var(--text); background: rgba(var(--l-rgb), .06); }
.asset-side button[aria-pressed="true"] { color: var(--text); background: rgba(var(--a-rgb), .14); } .asset-side button[aria-pressed="true"] .i { color: var(--cyan); }
.asset-side .i { width: 15px; height: 15px; }
.asset-main { min-width: 0; display: flex; flex-direction: column; }
#as-body { padding: 14px 16px; overflow: auto; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.asset-card { border: 1px solid var(--line); background: rgba(var(--well-rgb), .5); border-radius: 10px; padding: 0; overflow: hidden; text-align: start; color: var(--text); transition: border-color .2s, transform .2s; }
.asset-card:hover { border-color: rgba(var(--a-rgb), .5); transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 30% 20%, rgba(var(--a-rgb), .18), transparent 60%), linear-gradient(145deg, rgba(var(--s3-rgb), .9), rgba(var(--s1-rgb), .9)); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play { position: absolute; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; }
.k-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--cyan); background: rgba(var(--c-rgb), .1); }
.k-lbl { position: absolute; bottom: 8px; inset-inline-end: 8px; font: 700 .58rem var(--mono); letter-spacing: .1em; color: var(--muted); }
.thumb.k-web .k-ico { color: var(--blue); background: rgba(var(--a-rgb), .12); } .thumb.k-audio .k-ico { color: var(--violet); }
.a-info { padding: 9px 10px; } .a-info b { display: block; font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-info span { display: block; font: .64rem var(--mono); color: var(--muted); } .a-info small { display: block; font-size: .64rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.asset-list { display: flex; flex-direction: column; }
.al-row { display: grid; grid-template-columns: 34px minmax(0, 2fr) minmax(0, 1.4fr) 80px 120px; gap: 10px; align-items: center; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: start; font-size: .76rem; }
.al-row:hover { background: rgba(var(--l-rgb), .05); } .al-row b { font-weight: 500; font-family: var(--mono); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .al-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-row .k-ico { width: 30px; height: 30px; }

/* viewer */
.viewer { width: min(1240px, 95vw); height: 90vh; border: 1px solid var(--line-2); border-radius: 12px; padding: 0; background: var(--panel-solid); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.viewer::backdrop, .confirm::backdrop { background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer-head { display: flex; align-items: center; gap: 10px; padding-block: 10px; padding-inline: 16px 12px; border-bottom: 1px solid var(--line); }
.viewer-head strong { flex: 1; min-width: 0; font: .78rem var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-acts { display: flex; gap: 6px; }
.viewer-body { flex: 1; min-height: 0; overflow: hidden; }
.vw-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; height: 100%; }
.vw-stage { min-width: 0; display: grid; place-items: center; background: repeating-conic-gradient(rgba(var(--l-rgb), .05) 0 25%, transparent 0 50%) 0 0 / 22px 22px; overflow: auto; }
.vw-stage img, .vw-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.vw-stage.k-code, .vw-stage.k-web, .vw-stage.k-pdf { place-items: stretch; }
.vw-code { margin: 0; padding: 16px; font: .76rem/1.6 var(--mono); color: var(--text-2); white-space: pre; overflow: auto; background: rgba(var(--well-rgb), .9); }
.vw-doc { padding: 20px 26px; overflow: auto; background: var(--panel-solid); }
.vw-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; } .vw-audio > .i { width: 60px; height: 60px; color: var(--violet); }
.vw-info { border-inline-start: 1px solid var(--line-soft); padding: 16px; overflow: auto; }

/* ---------------------------------------------------------------- analytics */
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart { padding: 12px 16px; } .chart > .empty { margin: 4px 0; }
.bars { width: 100%; height: auto; display: block; }
.bars .grid { stroke: rgba(var(--l-rgb), .1); } .bars .ax { fill: var(--muted); font: 9px var(--mono); }
.bars .b-completed { fill: var(--ok); } .bars .b-failed { fill: var(--bad); } .bars .b-other { fill: var(--muted-2); } .bars .b-cost { fill: var(--amber); }
.bars .hit { fill: transparent; } .bars .hit:hover { fill: rgba(var(--l-rgb), .06); }
.hbars { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 170px minmax(0, 1fr) 50px; gap: 10px; align-items: center; font-size: .76rem; }
.hb-l { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-bar { height: 10px; border-radius: 3px; background: rgba(var(--l-rgb), .08); overflow: hidden; } .hb-bar i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.hb b { font-family: var(--mono); text-align: end; color: var(--text-2); }
.quality { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 16px; }
.donut { width: 140px; transform: rotate(-90deg); } .donut circle { fill: none; stroke-width: 10; } .donut .bg { stroke: rgba(var(--l-rgb), .1); } .donut .fg { stroke: var(--ok); stroke-linecap: round; }
.donut text { transform: rotate(90deg); transform-origin: 60px 60px; } .donut .dv { fill: var(--text); font: 600 20px var(--mono); } .donut .dl { fill: var(--muted); font: 9px var(--sans); }
.dtable { font-size: .76rem; } .dt-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 7px 16px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); }
.dt-head { font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--muted); }
.tip { position: fixed; z-index: 120; pointer-events: none; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: .72rem; color: var(--text-2); box-shadow: var(--shadow); max-width: 320px; }
.tip b { color: var(--text); }

/* logs */
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 12px 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tabs button .i { width: 15px; height: 15px; }
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cyan); }
.log-list { max-height: 68vh; overflow: auto; }
.log-row { display: grid; grid-template-columns: 130px 28px minmax(0, 1fr) minmax(0, 240px); gap: 10px; align-items: center; padding: 7px 16px; border-bottom: 1px solid var(--line-soft); font-size: .76rem; color: var(--text-2); }
.log-row:hover { background: rgba(var(--l-rgb), .04); }
.log-row time { font: .66rem var(--mono); color: var(--muted); } .log-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .log-txt b { color: var(--text); }
.log-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .68rem; }
.log-row .tag { justify-self: start; }

/* settings */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: 0; } .set-row b { display: block; font-size: .8rem; font-weight: 600; } .set-row small { color: var(--muted); font-size: .7rem; }
.set-grid .mini-dl { padding: 12px 16px; } .set-acts { display: flex; gap: 8px; padding: 0 16px 16px; }

/* ---------------------------------------------------------------- palette, menu, toast, dialogs */
.palette-layer { position: fixed; inset: 0; z-index: 100; background: rgba(2, 4, 10, .55); backdrop-filter: blur(4px); display: flex; justify-content: center; padding-top: 12vh; }
.palette { width: min(620px, 92vw); max-height: 64vh; display: flex; flex-direction: column; border: 1px solid var(--line-2); background: var(--panel-solid); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(var(--a-rgb), .1); overflow: hidden; animation: rise .18s ease-out; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0; background: none; outline: none; font-size: .95rem; color: var(--text); }
.palette-list { overflow: auto; padding: 6px; }
.pal-group { display: block; font: 700 .56rem var(--mono); letter-spacing: .14em; color: var(--muted-2); padding: 10px 10px 4px; }
.pal-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: start; color: var(--text-2); font-size: .82rem; }
.pal-item .pi { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(var(--a-rgb), .1); color: var(--blue); flex: none; } .pal-item .pi .i { width: 15px; height: 15px; }
.pal-item .pl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item em { font: normal .64rem var(--mono); color: var(--muted); }
.pal-item.on { background: rgba(var(--a-rgb), .14); color: var(--text); }
.pal-empty { padding: 20px; color: var(--muted); text-align: center; font-size: .8rem; }
.menu { position: fixed; z-index: 110; min-width: 210px; padding: 5px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; background: none; color: var(--text); padding: 8px 10px; border-radius: 7px; font-size: .78rem; text-align: start; }
.menu button .i { width: 15px; height: 15px; color: var(--muted); }
.menu button:hover, .menu button:focus-visible { background: var(--panel-2); outline: none; }
.menu button.danger, .menu button.danger .i { color: var(--bad); }
.menu button:disabled { opacity: .4; cursor: default; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 130; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--panel-solid); border: 1px solid var(--line-2); color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: .8rem; box-shadow: 0 14px 34px rgba(0,0,0,.45); max-width: min(560px, 90vw); animation: rise .2s ease-out; transition: opacity .3s, transform .3s; }
.toast .i { width: 16px; height: 16px; color: var(--blue); } .toast.t-ok .i { color: var(--ok); } .toast.t-bad { border-color: rgba(var(--bad-rgb), .45); } .toast.t-bad .i { color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }
.confirm { width: min(440px, 92vw); border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-solid); color: var(--text); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.confirm h3 { margin: 0 0 8px; font-size: 1rem; } .confirm p { margin: 0 0 16px; color: var(--text-2); font-size: .82rem; line-height: 1.55; }
.confirm .input { margin-bottom: 16px; }
.confirm-acts { display: flex; justify-content: flex-end; gap: 8px; }
.revise { width: min(580px, 94vw); } .revise textarea { width: 100%; min-height: 130px; resize: vertical; padding: 10px 12px; margin-bottom: 10px; font-size: .84rem; } .revise .attach-row { margin-bottom: 8px; }

/* ---------------------------------------------------------------- run page */
.run-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--muted); width: 100%; } .back:hover { color: var(--text); } .back .i { width: 15px; height: 15px; }
.rh-main { flex: 1; min-width: 280px; }
.rh-meta { display: flex; align-items: center; gap: 8px; font-size: .74rem; flex-wrap: wrap; }
.run-head h1 { font-size: 1.3rem; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.k-l { display: flex; align-items: center; gap: 7px; font: 700 .58rem var(--mono); letter-spacing: .12em; color: var(--muted); } .k-l .i { width: 14px; height: 14px; color: var(--blue); }
.k-v { font: 600 1.25rem var(--mono); letter-spacing: -.03em; white-space: nowrap; } .k-v small { font-size: .78rem; color: var(--muted); }
.k-s { font-size: .68rem; color: var(--muted); }
.ring-kpi { flex-direction: row; align-items: center; justify-content: space-between; } .ring-kpi > div { display: flex; flex-direction: column; gap: 6px; }
.ring { width: 52px; height: 52px; transform: rotate(-90deg); flex: none; } .ring circle { fill: none; stroke-width: 5; } .ring .bg { stroke: rgba(var(--l-rgb), .12); } .ring .fg { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .5s; } .ring .fg.hot { stroke: var(--bad); }
.run-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
.flow-panel { display: flex; flex-direction: column; overflow: hidden; }
.flow-host { position: relative; flex: 1; min-height: 0; }
.flow-host.compact-h { height: 500px; flex: none; }
.feed-panel { display: flex; flex-direction: column; max-height: 558px; }
.feed { list-style: none; margin: 0; padding: 6px 10px 10px; overflow: auto; display: flex; flex-direction: column; font-size: .74rem; }
.feed li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.feed li .st-ico { width: 24px; height: 24px; } .feed li b { color: var(--text); } .feed time { font: .62rem var(--mono); color: var(--muted); padding-top: 4px; }
.tab-body { padding: 18px; min-height: 180px; }
.md { max-width: 86ch; color: var(--text-2); font-size: .86rem; line-height: 1.65; }
.md h1, .md h2, .md h3 { color: var(--text); } .md h1 { font-size: 1.3rem; margin: 4px 0 12px; } .md h2 { font-size: 1.05rem; margin: 22px 0 8px; } .md h3 { font-size: .92rem; margin: 16px 0 6px; }
.md p, .md ul, .md ol { margin: 0 0 10px; } .md li { margin: 3px 0; } .md strong { color: var(--text); }
.md pre { background: rgba(var(--well-rgb), .8); border: 1px solid var(--line); padding: 12px 14px; border-radius: 9px; overflow: auto; font-size: .78rem; } .md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; margin: 8px 0 14px; font-size: .8rem; display: block; overflow-x: auto; } .md th, .md td { border: 1px solid var(--line-2); padding: 7px 10px; text-align: start; vertical-align: top; } .md th { background: var(--panel-2); color: var(--text); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; } .md blockquote { margin: 0 0 10px; padding-inline-start: 12px; border-inline-start: 3px solid var(--line-2); color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.timeline li { display: grid; grid-template-columns: 70px 28px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.timeline time { font: .7rem var(--mono); color: var(--muted); } .timeline b { color: var(--text); }
/* live code */
.livecode { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; min-height: 440px; }
.live-list { display: flex; flex-direction: column; gap: 3px; max-height: 580px; overflow: auto; }
.live-item { display: flex; gap: 9px; align-items: flex-start; text-align: start; border: 1px solid transparent; background: none; padding: 8px 9px; border-radius: 8px; color: var(--text-2); }
.live-item:hover { background: var(--panel-2); } .live-item[aria-current="true"] { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
.live-item b { display: block; font-size: .76rem; } .live-item small { display: block; font-size: .66rem; color: var(--muted); } .live-item.writing small { color: var(--cyan); }
.live-main { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(var(--well-rgb), .7); }
.live-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.live-head .who { color: var(--text); font-weight: 600; } .live-head .sp { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; white-space: nowrap; } .live-head label { display: flex; gap: 5px; align-items: center; cursor: pointer; } .live-head input { accent-color: var(--blue); }
.ftabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ftabs button { border: 1px solid transparent; border-bottom: 0; background: none; color: var(--muted); font: .72rem var(--mono); padding: 6px 11px; border-radius: 7px 7px 0 0; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ftabs button[aria-selected="true"] { color: var(--text); background: rgba(var(--well-rgb), .95); border-color: var(--line); margin-bottom: -1px; }
.ftabs .st { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); } .ftabs .st.w { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); animation: pulse 1s infinite; }
.code-wrap { flex: 1; display: flex; overflow: auto; max-height: 560px; min-height: 360px; font: .76rem/1.6 var(--mono); }
.code-wrap .gut { flex: none; padding: 12px 10px 12px 14px; text-align: right; color: rgba(var(--l-rgb), .3); user-select: none; white-space: pre; border-right: 1px solid var(--line); position: sticky; left: 0; background: rgba(var(--well-rgb), .98); }
.code-wrap pre { margin: 0; padding: 12px 16px; white-space: pre; color: var(--text-2); flex: 1; min-width: 0; tab-size: 2; }
.code-wrap.prose pre { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: .82rem; }
.caret { display: inline-block; width: 7px; height: 1.1em; vertical-align: -3px; background: var(--cyan); margin-inline-start: 1px; animation: pulse .9s steps(1) infinite; }
.live-empty { flex: 1; display: grid; place-items: center; color: var(--muted); font-size: .8rem; padding: 30px; text-align: center; }
.tk-c { color: #6c7a96; font-style: italic; } .tk-s { color: #7ee0a8; } .tk-n { color: #f8b26a; } .tk-k { color: #c792ea; } .tk-t { color: #6cb6ff; } .tk-a { color: #ffcb6b; } .tk-p { color: #89ddff; } .tk-h { color: var(--text); font-weight: 700; }
[data-theme="light"] .tk-c { color: #8a94a8; } [data-theme="light"] .tk-s { color: #16803c; } [data-theme="light"] .tk-n { color: #b45309; } [data-theme="light"] .tk-k { color: #7c3aed; } [data-theme="light"] .tk-t { color: #1d4ed8; } [data-theme="light"] .tk-a { color: #a16207; } [data-theme="light"] .tk-p { color: #0e7490; }
/* files */
.files { display: grid; gap: 22px; }
.file-group h3 { font: 700 .6rem var(--mono); letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.pv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; } .pv-head h3 { margin-block: 0; margin-inline: 0 auto; }
.pv-wrap { position: relative; width: 100%; height: min(70vh, 660px); overflow: hidden; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(var(--well-rgb), .8); }
.pv-wrap .preview-frame { position: absolute; top: 0; left: 0; border: 0; background: #fff; transform-origin: 0 0; }
.shot-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.shot { flex: none; width: 250px; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: rgba(var(--well-rgb), .6); color: var(--muted); font-size: .7rem; } .shot.m { width: 118px; }
.shot img { display: block; width: 100%; max-height: 340px; object-fit: cover; object-position: top; } .shot span { display: block; padding: 5px 8px; font-family: var(--mono); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.media-card { overflow: hidden; background: rgba(var(--well-rgb), .6); border: 1px solid var(--line); border-radius: 10px; }
.media-card button { display: block; width: 100%; padding: 0; border: 0; background: none; }
.media-card img, .media-card video { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; background: var(--bg); } .media-card audio { width: 100%; padding: 12px; }
.media-card .cap { font-size: .72rem; padding: 8px 10px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.list-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line-soft); font: .74rem var(--mono); color: var(--text-2); }
.file-row:last-child { border-bottom: 0; } .file-row > span:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file-row .i { width: 15px; height: 15px; color: var(--muted); }
.file-row small { color: var(--muted); } .file-row .acts { display: flex; gap: 4px; font-family: var(--sans); }
/* tasks */
.task-split { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.task-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; }
.task-btn { display: flex; gap: 10px; align-items: flex-start; text-align: start; border: 1px solid var(--line); background: rgba(var(--s2-rgb), .4); border-radius: 9px; padding: 9px 11px; }
.task-btn:hover { border-color: var(--line-2); } .task-btn[aria-current="true"] { border-color: rgba(var(--a-rgb), .6); background: rgba(var(--a-rgb), .1); }
.task-btn small { display: block; font-size: .66rem; color: var(--muted); } .task-btn b { display: block; font-size: .78rem; font-weight: 600; }
.task-body { padding: 16px 18px; min-width: 0; background: rgba(var(--well-rgb), .5); border: 1px solid var(--line); border-radius: 10px; }
.task-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.sub-h { font: 700 .6rem var(--mono); letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.qa { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; margin-bottom: 10px; background: rgba(var(--s2-rgb), .4); }
.qa h4 { margin: 0 0 6px; font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.issue { font-size: .78rem; margin: 6px 0; color: var(--text-2); }
.sev { font: 700 .58rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; margin-inline-end: 6px; }
.sev.high { background: rgba(var(--bad-rgb), .12); color: var(--bad); } .sev.medium { background: rgba(var(--warn-rgb), .12); color: var(--warn); } .sev.low { background: var(--panel-2); color: var(--muted); }

/* ---------------------------------------------------------------- workflow page */
.wf { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.wf-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(var(--bg-rgb), .6); flex-wrap: wrap; }
.wf-pick .select { max-width: 340px; height: 34px; font-weight: 600; }
.wf-stat { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; flex-wrap: wrap; }
.wf-prog { display: flex; align-items: center; gap: 8px; } .wf-prog .bar { width: 120px; } .wf-prog small { font: .66rem var(--mono); color: var(--muted); }
.wf-m { display: inline-flex; align-items: center; gap: 5px; font: .72rem var(--mono); color: var(--text-2); } .wf-m .i { width: 14px; height: 14px; color: var(--muted); }
.wf-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wf-body { position: relative; min-height: 0; }
.wf-body .flow-host { position: absolute; inset: 0; }
.wf-search { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 6px; align-items: center; }
.wf-search .filter { background: rgba(var(--s1-rgb), .9); backdrop-filter: blur(10px); min-width: 240px; }
.wf-search .btn { background: rgba(var(--s1-rgb), .9); backdrop-filter: blur(10px); height: 34px; }
.wf-time { display: grid; grid-template-columns: auto minmax(180px, 320px) minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); background: rgba(var(--bg-rgb), .75); backdrop-filter: blur(12px); }
.wf-time > .icon-btn { width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--text); }
.rp-info { min-width: 0; } .rp-info b { display: block; font: 700 .62rem var(--mono); letter-spacing: .14em; color: var(--muted); } .rp-info b.live { color: var(--ok); } .rp-info b.replay { color: var(--violet); }
.rp-info span { display: block; font-size: .72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rp-info span b { display: inline; font: inherit; letter-spacing: 0; color: var(--text); }
.rp-track { position: relative; padding-top: 8px; }
.rp-ticks { position: absolute; left: 7px; right: 7px; top: 0; height: 8px; }
.rp-ticks i { position: absolute; top: 0; width: 3px; height: 8px; border-radius: 2px; background: var(--tc); transform: translateX(-50%); opacity: .85; }
.rp-track input { width: 100%; accent-color: var(--cyan); margin: 4px 0 0; }
.rp-times { display: flex; justify-content: space-between; font: .6rem var(--mono); color: var(--muted); }
.wf-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--muted); padding: 30px; }
.wf-empty > .i { width: 44px; height: 44px; color: var(--cyan); } .wf-empty h2 { color: var(--text); font-size: 1.2rem; } .wf-empty p { max-width: 46ch; font-size: .84rem; }

/* ================================================================ FLOW (n8n-style canvas) */
.flow { position: relative; overflow: hidden; background-color: rgba(var(--well-rgb), .35); background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.2px); background-size: 22px 22px; user-select: none; }
.flow-vp { position: absolute; inset: 0; cursor: grab; outline: none; touch-action: none; }
.flow-vp.grabbing { cursor: grabbing; }
.flow-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.flow-world.anim { transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.flow-edges { position: absolute; left: 0; top: 0; overflow: visible; }
.flow-labels, .flow-nodes { position: absolute; inset: 0; }
/* edges */
.e path { fill: none; }
.e .e-line { stroke-width: 2; stroke: rgba(var(--l-rgb), .3); transition: stroke .3s, opacity .3s; }
.e .e-glow { stroke-width: 9; stroke: transparent; stroke-linecap: round; transition: stroke .3s; }
.e .e-hit { stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.e.st-complete .e-line { stroke: rgba(var(--ok-rgb), .55); }
.e.st-active .e-line { stroke: var(--cyan); stroke-dasharray: 7 6; animation: edgeflow .7s linear infinite; }
.e.st-active .e-glow { stroke: rgba(var(--c-rgb), .14); }
.e.st-loop .e-line { stroke: var(--violet); stroke-dasharray: 6 6; animation: edgeflow .9s linear infinite reverse; }
.e.st-loop .e-glow { stroke: rgba(var(--v-rgb), .14); }
.e.st-ready .e-line { stroke: rgba(var(--a-rgb), .55); stroke-dasharray: 4 5; }
.e.st-potential .e-line { stroke: rgba(var(--l-rgb), .24); stroke-dasharray: 3 6; }
.e.st-failed .e-line { stroke: rgba(var(--bad-rgb), .7); stroke-dasharray: 5 5; }
.e.hl .e-line { stroke-width: 2.6; } .e.hl .e-glow, .e.sel .e-glow { stroke: rgba(var(--a-rgb), .18); }
.e.sel .e-line { stroke-width: 3; }
.e.dim { opacity: .18; }
@keyframes edgeflow { to { stroke-dashoffset: -26; } }
.flow-edges marker path { stroke: none; }
.mk-complete path { fill: rgba(var(--ok-rgb), .8); } .mk-active path { fill: var(--cyan); } .mk-loop path { fill: var(--violet); } .mk-ready path { fill: rgba(var(--a-rgb), .7); } .mk-potential path { fill: rgba(var(--l-rgb), .35); } .mk-failed path { fill: var(--bad); }
.e-dot { fill: var(--cyan); filter: drop-shadow(0 0 5px var(--cyan)); } .e-dot.rev { fill: var(--violet); filter: drop-shadow(0 0 5px var(--violet)); }
/* edge labels */
.flow-label { position: absolute; transform: translate(-50%, -50%); font: 700 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; z-index: 1; }
.show-labels .flow-label, .flow-label.on, .flow-label.hl { opacity: 1; pointer-events: auto; cursor: pointer; }
.flow-label.st-active { color: var(--cyan); border-color: rgba(var(--c-rgb), .45); } .flow-label.st-loop { color: var(--violet); border-color: rgba(var(--v-rgb), .45); } .flow-label.st-complete { color: var(--ok); }
.flow-label.dim { opacity: 0 !important; }
/* nodes */
.fn { position: absolute; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(var(--s3-rgb), .97), rgba(var(--s1-rgb), .97)); box-shadow: 0 10px 28px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.04); cursor: pointer; transition: border-color .3s, box-shadow .3s, opacity .3s, transform .2s; outline: none; color: var(--text); }
[data-theme="light"] .fn { background: #fff; box-shadow: 0 4px 16px rgba(15, 23, 42, .08); }
[data-theme="brand"] .fn { border: 1px solid transparent; background: linear-gradient(180deg, rgba(14, 12, 28, .98), rgba(7, 6, 15, .98)) padding-box, linear-gradient(145deg, rgba(0,210,255,.35), rgba(189,0,255,.3)) border-box; }
.fn::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: rgb(var(--tone-rgb)); opacity: .8; }
.fn:hover { transform: translateY(-2px); border-color: rgba(var(--tone-rgb), .6); }
.fn:focus-visible { box-shadow: 0 0 0 2px var(--cyan); }
.fn.sel { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 0 0 6px rgba(var(--a-rgb), .14), 0 14px 34px rgba(0,0,0,.35); }
.fn-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 12px 0 14px; }
.fn-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: rgb(var(--tone-rgb)); background: radial-gradient(circle at 30% 25%, rgba(var(--tone-rgb), .3), rgba(var(--tone-rgb), .08)); border: 1px solid rgba(var(--tone-rgb), .35); position: relative; }
.fn-ico .i { width: 20px; height: 20px; }
.fn-txt { min-width: 0; display: flex; flex-direction: column; }
.fn-txt small { font: 700 9px var(--mono); letter-spacing: .12em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; font-family: var(--display); }
.fn-txt span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.fn-st { display: inline-flex; align-items: center; gap: 4px; font: 700 8.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); background: rgba(var(--well-rgb), .6); white-space: nowrap; }
.fn-st .i { width: 11px; height: 11px; stroke-width: 2.4; }
.fn-st em { font-style: normal; }
.fn-foot { margin-top: auto; display: flex; align-items: center; gap: 5px; padding: 0 12px 0 14px; height: 32px; border-top: 1px solid var(--line-soft); overflow: hidden; }
.ch { display: inline-flex; align-items: center; gap: 4px; font: 10px var(--mono); color: var(--text-2); white-space: nowrap; padding: 2px 6px; border-radius: 5px; background: rgba(var(--l-rgb), .06); }
.ch .i { width: 11px; height: 11px; color: var(--muted); } .ch.t-warn { color: var(--warn); } .ch.t-teal { color: var(--teal); }
.rounds { margin-left: auto; display: inline-flex; gap: 3px; } .rounds i { width: 8px; height: 8px; border-radius: 2px; } .rounds i.p { background: var(--ok); } .rounds i.f { background: var(--bad); }
.fn-live { margin-top: auto; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 14px; border-top: 1px solid rgba(var(--c-rgb), .2); font: 10.5px var(--mono); color: var(--cyan); background: linear-gradient(90deg, rgba(var(--c-rgb), .08), transparent); border-radius: 0 0 14px 14px; overflow: hidden; }
.fn-live span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fn-live .i { width: 12px; height: 12px; flex: none; }
.fn-live.note { color: var(--warn); border-top-color: rgba(var(--warn-rgb), .2); background: linear-gradient(90deg, rgba(var(--warn-rgb), .08), transparent); }
.fn-bar { position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; }
.fn-bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.port { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--panel-solid); border: 2px solid rgba(var(--l-rgb), .45); z-index: 2; transition: border-color .3s, background .3s; }
.flow[data-dir="LR"] .port.in, .flow:not([data-dir]) .port.in { left: -6px; top: calc(50% - 5.5px); } .flow[data-dir="LR"] .port.out, .flow:not([data-dir]) .port.out { right: -6px; top: calc(50% - 5.5px); }
.flow[data-dir="TB"] .port.in { top: -6px; left: calc(50% - 5.5px); } .flow[data-dir="TB"] .port.out { bottom: -6px; left: calc(50% - 5.5px); }
.fn.k-trigger .port.in, .fn.k-output .port.out { display: none; }
.fn.k-trigger { border-radius: 26px 14px 14px 26px; } .fn.k-trigger .fn-ico { border-radius: 50%; }
.fn.k-output { border-radius: 14px 26px 26px 14px; }
.fn.k-gate .fn-ico { transform: rotate(45deg); border-radius: 9px; } .fn.k-gate .fn-ico .i { transform: rotate(-45deg); }
.fn.k-placeholder { border-style: dashed; }
/* node states */
.fn.s-completed .fn-st { color: var(--ok); border-color: rgba(var(--ok-rgb), .35); background: rgba(var(--ok-rgb), .1); }
.fn.s-completed .port { border-color: rgba(var(--ok-rgb), .7); background: rgba(var(--ok-rgb), .25); }
.fn.s-running { border-color: rgba(var(--c-rgb), .5); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .25), 0 0 36px rgba(var(--c-rgb), .22), 0 12px 30px rgba(0,0,0,.35); }
.fn.s-running::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--ang), transparent 0 55%, rgba(var(--c-rgb), .2) 65%, var(--cyan) 80%, var(--blue) 90%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 2.2s linear infinite; pointer-events: none; }
.fn.s-running .fn-st { color: var(--cyan); border-color: rgba(var(--c-rgb), .45); background: rgba(var(--c-rgb), .1); }
.fn.s-running .fn-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1s infinite; }
.fn.s-running .fn-ico::after { content: ""; position: absolute; inset: -5px; border-radius: 14px; border: 1px solid var(--cyan); animation: ping 1.6s ease-out infinite; }
.fn.s-running .fn-bar { opacity: 1; }
.fn.s-running .port { border-color: var(--cyan); background: rgba(var(--c-rgb), .3); box-shadow: 0 0 8px var(--cyan); }
.fn.s-waiting { border-color: rgba(var(--warn-rgb), .55); animation: waitglow 2s ease-in-out infinite; }
.fn.s-waiting .fn-st { color: var(--warn); border-color: rgba(var(--warn-rgb), .45); background: rgba(var(--warn-rgb), .1); }
.fn.s-waiting .port.in { border-color: var(--warn); }
@keyframes waitglow { 50% { box-shadow: 0 0 0 1px rgba(var(--warn-rgb), .3), 0 0 30px rgba(var(--warn-rgb), .22), 0 12px 30px rgba(0,0,0,.3); } }
.fn.s-warn { border-color: rgba(var(--warn-rgb), .45); } .fn.s-warn .fn-st { color: var(--warn); border-color: rgba(var(--warn-rgb), .4); background: rgba(var(--warn-rgb), .08); }
.fn.s-failed, .fn.s-rejected { border-color: rgba(var(--bad-rgb), .5); } .fn.s-failed .fn-st, .fn.s-rejected .fn-st { color: var(--bad); border-color: rgba(var(--bad-rgb), .4); background: rgba(var(--bad-rgb), .08); }
.fn.s-queued { border-style: dashed; opacity: .72; } .fn.s-queued .fn-ico { filter: saturate(.4); }
.fn.s-skipped, .fn.s-cancelled { opacity: .42; border-style: dashed; } .fn.s-skipped .fn-ico, .fn.s-cancelled .fn-ico { filter: grayscale(1); }
.fn.dim { opacity: .14 !important; }
.fn.match { box-shadow: 0 0 0 2px var(--amber), 0 0 24px rgba(var(--warn-rgb), .3); }
.flow.hovering .fn:not(:hover):not(.nb):not(.sel) { opacity: .62; }
.flow.hovering .fn.s-skipped:not(:hover):not(.nb) { opacity: .3; }
/* overlays */
.flow-ctrl { position: absolute; left: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(var(--s1-rgb), .9); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.flow-ctrl button { height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--muted); border-radius: 7px; padding: 0 7px; font-size: .7rem; font-weight: 600; }
.flow-ctrl button .i { width: 16px; height: 16px; }
.flow-ctrl button:hover { color: var(--text); background: rgba(var(--l-rgb), .08); }
.flow-ctrl button[aria-pressed="true"] { color: var(--cyan); background: rgba(var(--c-rgb), .1); }
.flow-zoom { font: .66rem var(--mono); color: var(--muted); min-width: 40px; text-align: center; }
.flow-ctrl .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.flow-mini { position: absolute; right: 14px; bottom: 14px; z-index: 5; width: 190px; height: 118px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(var(--s1-rgb), .9); backdrop-filter: blur(10px); overflow: hidden; cursor: crosshair; box-shadow: var(--shadow); }
.flow-mini svg { position: absolute; inset: 6px 6px 16px; width: calc(100% - 12px); height: calc(100% - 22px); }
.flow-mini path { fill: none; stroke: rgba(var(--l-rgb), .35); stroke-width: 6; }
.flow-mini rect { fill: rgba(var(--l-rgb), .25); } .flow-mini rect.s-completed { fill: rgba(var(--ok-rgb), .7); } .flow-mini rect.s-running { fill: var(--cyan); } .flow-mini rect.s-waiting, .flow-mini rect.s-warn { fill: var(--warn); } .flow-mini rect.s-failed, .flow-mini rect.s-rejected { fill: var(--bad); }
.flow-mini rect.mv { fill: rgba(var(--a-rgb), .08); stroke: var(--blue); stroke-width: 10; }
.flow-mini span { position: absolute; left: 8px; bottom: 3px; font: 700 .52rem var(--mono); letter-spacing: .14em; color: var(--muted-2); }
.flow-legend { position: absolute; left: 14px; top: 14px; z-index: 5; display: flex; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(var(--s1-rgb), .85); backdrop-filter: blur(10px); font-size: .64rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .lg i { width: 8px; height: 8px; border-radius: 2px; background: var(--muted-2); }
.lg.s-running i { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); } .lg.s-waiting i, .lg.s-warn i { background: var(--warn); } .lg.s-completed i { background: var(--ok); } .lg.s-failed i { background: var(--bad); } .lg.s-queued i { background: none; border: 1px dashed var(--muted); }
.flow-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(var(--s1-rgb), .85); font-size: .7rem; color: var(--muted); pointer-events: none; white-space: nowrap; }
.flow-hint .i { width: 14px; height: 14px; }
.flow-insp { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 350px; z-index: 7; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(var(--s1-rgb), .96); backdrop-filter: blur(16px); box-shadow: -10px 0 40px rgba(0,0,0,.35); animation: slidein .22s ease-out; overflow: hidden; }
[data-theme="light"] .flow-insp { background: rgba(255,255,255,.97); }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } }
.flow-insp header { display: flex; align-items: center; gap: 10px; padding-block: 12px; padding-inline: 14px 12px; border-bottom: 1px solid var(--line-soft); }
.flow-insp header > div { flex: 1; min-width: 0; } .flow-insp header small { display: block; font: 700 .56rem var(--mono); letter-spacing: .12em; color: var(--muted); } .flow-insp header b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: rgb(var(--tone-rgb)); background: rgba(var(--tone-rgb), .14); flex: none; }
.insp-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: .78rem; color: var(--text-2); user-select: text; }
.insp-body label { font: 700 .56rem var(--mono); letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.insp-body dl { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(var(--well-rgb), .5); }
.insp-body dl > div { display: flex; justify-content: space-between; gap: 10px; } .insp-body dt { color: var(--muted); } .insp-body dd { margin: 0; text-align: end; color: var(--text); font-family: var(--mono); font-size: .72rem; }
.insp-state { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); font: 700 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.insp-state i { display: none; } .insp-state span { font: .74rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); }
.insp-state.s-running { color: var(--cyan); border-color: rgba(var(--c-rgb), .35); background: rgba(var(--c-rgb), .06); } .insp-state.s-completed { color: var(--ok); border-color: rgba(var(--ok-rgb), .3); background: rgba(var(--ok-rgb), .05); }
.insp-state.s-waiting, .insp-state.s-warn { color: var(--warn); border-color: rgba(var(--warn-rgb), .35); background: rgba(var(--warn-rgb), .06); } .insp-state.s-failed, .insp-state.s-rejected { color: var(--bad); border-color: rgba(var(--bad-rgb), .3); background: rgba(var(--bad-rgb), .05); }
.insp-text { padding: 10px; border-radius: 8px; background: rgba(var(--well-rgb), .6); border: 1px solid var(--line-soft); white-space: pre-wrap; max-height: 200px; overflow: auto; color: var(--text); line-height: 1.5; }
.insp-live { margin: 0; padding: 10px; border-radius: 8px; background: rgba(var(--well-rgb), .9); border: 1px solid rgba(var(--c-rgb), .3); font: .68rem/1.5 var(--mono); color: var(--tint); white-space: pre-wrap; word-break: break-word; max-height: 190px; overflow: auto; }
.insp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .insp-list li { display: flex; gap: 8px; align-items: flex-start; } .insp-list .i { width: 14px; height: 14px; color: var(--ok); margin-top: 2px; } .insp-list b { color: var(--text); }
.insp-rounds { display: flex; flex-direction: column; gap: 6px; } .insp-rounds > div { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); align-items: center; }
.insp-rounds .p { border-color: rgba(var(--ok-rgb), .35); } .insp-rounds .p span { color: var(--ok); } .insp-rounds .f span { color: var(--warn); } .insp-rounds small { color: var(--muted); font-size: .64rem; }
.insp-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .insp-shots img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); display: block; }
.insp-file { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text-2); font: .7rem var(--mono); grid-column: 1 / -1; } .insp-file .i { width: 14px; height: 14px; }
.insp-path { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--text); } .insp-path span { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; } .insp-path .i { width: 14px; height: 14px; color: var(--muted); }
.insp-approval { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 8px; color: var(--warn); background: rgba(var(--warn-rgb), .1); border: 1px solid rgba(var(--warn-rgb), .35); } .insp-approval b { color: var(--text); }
.insp-acts { display: flex; gap: 6px; justify-content: flex-end; } .insp-acts.wrap { flex-wrap: wrap; justify-content: flex-start; } .insp-acts.col { flex-direction: column; } .insp-acts.col .btn { justify-content: flex-start; }
.insp-ev { list-style: none; margin: 0; padding: 0; font-size: .72rem; } .insp-ev li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); } .insp-ev time { font: .64rem var(--mono); color: var(--muted); } .insp-ev b { color: var(--text); }
/* compact canvas (run detail) */
.flow.compact .flow-legend { display: none; }
.flow.compact .flow-mini { width: 150px; height: 92px; }
.flow.compact .flow-insp { width: 320px; }

/* ================================================================ voice assistant */
body.voice-mode .main { overflow: hidden; display: flex; }
.voice-view { flex: 1; display: flex; min-height: 0; height: 100%; }
.stage { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 42%, rgba(var(--s3-rgb), .55), transparent 65%), var(--bg); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.voice-hud { position: absolute; top: 18px; inset-inline-start: 18px; z-index: 3; width: min(340px, calc(100% - 36px)); }
.hud-card { border: 1px solid var(--line); background: rgba(var(--s1-rgb), .72); backdrop-filter: blur(12px); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.hud-card > small { font: 700 .56rem var(--mono); letter-spacing: .14em; color: var(--muted); }
.hud-run { display: flex; gap: 10px; align-items: flex-start; color: var(--text); } .hud-run b { display: block; font-size: .78rem; } .hud-run em { font-style: normal; font-size: .68rem; color: var(--cyan); }
.pulse { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.2s infinite; flex: none; }
.hud-warn { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: .74rem; font-weight: 600; } .hud-warn .i { width: 15px; height: 15px; }
.hud-card ul { list-style: none; margin: 0; padding: 6px 0 0; border-top: 1px solid var(--line-soft); font-size: .7rem; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.hud-card li { display: grid; grid-template-columns: 56px 1fr; gap: 6px; } .hud-card li time { font: .62rem var(--mono); color: var(--muted); } .hud-card li b { color: var(--text); font-weight: 600; }
.stage-bottom { position: relative; z-index: 2; width: min(780px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 14px; padding-bottom: 26px; text-align: center; }
.voice-state { font-family: var(--display); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); min-height: 1.2em; }
.stage[data-state="listening"] .voice-state { color: var(--blue); }
.stage[data-state="speaking"] .voice-state, .stage[data-state="thinking"] .voice-state, .stage[data-state="transcribing"] .voice-state { color: var(--cyan); }
.subs { min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.sub-user { font-size: .86rem; color: var(--muted); font-style: italic; } .sub-user:not(:empty)::before { content: attr(data-you); font-style: normal; opacity: .7; }
.sub-user.dim { opacity: .45; } .sub-user.dim::after { content: attr(data-dim); font-size: .74rem; }
.sub-bot { font-family: var(--display); font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.45; color: var(--text); text-wrap: balance; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
[data-theme="light"] .sub-bot { text-shadow: none; }
.voice-controls { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(var(--s2-rgb), .7); color: var(--text-2); position: relative; backdrop-filter: blur(8px); transition: transform .15s, background .2s, box-shadow .2s, border-color .2s; }
.round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; }
.round:hover:not(:disabled) { color: var(--text); border-color: rgba(var(--a-rgb), .5); transform: translateY(-1px); }
.round:disabled { opacity: .35; cursor: default; }
.round .slash { display: none; } #v-mute[aria-pressed="true"] { color: var(--bad); border-color: rgba(var(--bad-rgb), .5); } #v-mute[aria-pressed="true"] .slash { display: inline; }
.round.big { width: 76px; height: 76px; border: 0; background: var(--btn-grad); color: var(--btn-ink); box-shadow: 0 8px 30px rgba(var(--a-rgb), .45), inset 0 1px 0 rgba(255,255,255,.25); }
.round.big svg { width: 28px; height: 28px; } .round.big .i-stop { display: none; } .round.big[aria-pressed="true"] .i-stop { display: block; } .round.big[aria-pressed="true"] .i-mic { display: none; }
.round.big .lvl { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(var(--a-rgb), .55); transform: scale(calc(1 + var(--lvl, 0) * .35)); opacity: calc(.15 + var(--lvl, 0)); transition: transform .08s linear, opacity .08s linear; pointer-events: none; }
.round.big[aria-pressed="false"] .lvl { opacity: 0; }
.voice-opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sel { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding-block: 4px; padding-inline: 12px 6px; background: rgba(var(--s1-rgb), .6); backdrop-filter: blur(8px); }
.sel select { background: transparent; border: 0; color: var(--text-2); font-size: .74rem; padding: 3px 4px; outline: none; max-width: 220px; text-overflow: ellipsis; }
.sel select option { background: var(--panel-solid); color: var(--text); }
.sel.dev { padding-inline-start: 10px; } .sel.dev svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.voice-notice { font-size: .76rem; color: var(--warn); min-height: 1em; max-width: 60ch; }
.attach-tray { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.thumb-v, .attach-tray .thumb { position: relative; width: 92px; height: 60px; aspect-ratio: auto; border-radius: 10px; overflow: hidden; border: 1px solid rgba(var(--a-rgb), .5); background: var(--bg); }
.attach-tray .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-tray .thumb button { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; line-height: 20px; padding: 0; }
.attach-tray .thumb.sending { opacity: .5; }
.drop-hint { position: absolute; inset: 16px; border: 2px dashed rgba(var(--a-rgb), .7); border-radius: 22px; display: grid; place-items: center; font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--text); background: rgba(var(--well-rgb), .55); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 4; }
.stage.dragging .drop-hint { opacity: 1; }
.op-chip { display: inline-flex; align-items: center; gap: 10px; max-width: min(640px, 100%); padding-block: 6px; padding-inline: 14px 6px; border-radius: 999px; border: 1px solid rgba(var(--c-rgb), .45); background: rgba(var(--s1-rgb), .75); backdrop-filter: blur(8px); font-size: .8rem; color: var(--text-2); }
.op-chip #op-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.2s infinite; flex: none; }
.op-chip.done { border-color: rgba(var(--ok-rgb), .45); padding-inline-end: 14px; } .op-chip.done .op-dot { background: var(--ok); box-shadow: none; animation: none; } .op-chip.done #op-text { white-space: normal; }
.persona-name { margin: 0 0 -6px; font-family: var(--display); font-weight: 600; font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; color: var(--text); opacity: .9; }
.stage[data-persona="diva"] .persona-name { color: #f472d0; text-shadow: 0 0 14px rgba(236,72,200,.55); } .stage[data-persona="diva"] .voice-state { color: #f9a8e3; }
.stage[data-persona="diva"] .round.big { background: linear-gradient(135deg, #f472d0, #a855f7); box-shadow: 0 8px 30px rgba(236,72,200,.45), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; }
body.voice-mode .top-voice { display: none; }

/* ================================================================ desktop app (Electron) */
body.desktop .topbar { -webkit-app-region: drag; }
body.desktop.os-win32 .topbar, body.desktop.os-linux .topbar { padding-right: 150px; }
body.desktop.os-darwin .brand { padding-left: 80px; }
body.desktop .topbar button, body.desktop .topbar a, body.desktop .topbar select, body.desktop .theme-switch, body.desktop .runtime, body.desktop .conn, body.desktop .pop { -webkit-app-region: no-drag; }
body.desktop .brand { -webkit-app-region: drag; } body.desktop .brand button { -webkit-app-region: no-drag; }

/* ================================================================ calm mode (reduce motion) */
.calm *, .calm *::before, .calm *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
.calm .e-dot { display: none; }
@media (prefers-reduced-motion: reduce) { .e-dot { display: none; } .fn.s-running::after { animation: none; } }

/* ================================================================ responsive */
@media (max-width: 1400px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .clock { display: none; } }
@media (max-width: 1200px) {
  .dash-grid, .run-grid, .new-grid, .ap-grid { grid-template-columns: minmax(0, 1fr); }
  .feed-panel { max-height: 360px; }
  .an-grid, .set-grid { grid-template-columns: minmax(0, 1fr); }
  .search-box { flex-basis: 260px; } .runtime span { display: none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .22s; }
  body.mobile-nav .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  body.mobile-nav .nav-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(2,4,10,.5); }
  .nav-collapsed .brand-txt, .nav-collapsed .nav-label, .nav-collapsed .nav-item span, .nav-collapsed .nav-item b, .nav-collapsed .side-foot { display: revert; }
  .nav-toggle { display: none; }
  .mobile-menu { display: inline-grid; }
  .theme-switch, .crumbs { display: none; }
  .page-host { padding: 18px 16px 50px; }
  .asset-shell { grid-template-columns: minmax(0, 1fr); } .asset-side { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line-soft); } .asset-side strong { display: none; } .asset-side button { flex: none; }
  .asset-stats { grid-template-columns: repeat(2, 1fr); }
  .vw-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .vw-info { border-inline-start: 0; border-top: 1px solid var(--line-soft); max-height: 30vh; }
  .flow-insp { left: 12px; width: auto; top: auto; height: 55%; }
  .wf-time { grid-template-columns: auto minmax(0, 1fr) auto; } .rp-info { display: none; } #rp-speed { display: none; }
  .livecode, .task-split { grid-template-columns: minmax(0, 1fr); } .live-list { flex-direction: row; overflow-x: auto; max-height: none; } .live-item { min-width: 180px; } .task-nav { position: static; }
  .log-row { grid-template-columns: 100px 28px minmax(0, 1fr); } .log-row small { display: none; }
  .flow-legend { display: none; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-box span, .search-box kbd { display: none; } .search-box { flex: 0 0 36px; min-width: 36px; justify-content: center; padding: 0; }
  .top-voice span { display: none; }
  .quick .q-meta, .quick #quick-more { display: none; }
  .flow-mini { display: none; }
  .hb { grid-template-columns: 110px minmax(0, 1fr) 40px; }
}

/* settings: data & storage */
.set-wide { grid-column: 1 / -1; }
.dt-act { display: flex; align-items: center; gap: 12px; flex: none; }
.dt-act em { font-style: normal; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.set-row.sub { padding-top: 0; justify-content: flex-end; border-bottom: 1px solid var(--line-soft); margin-top: -6px; }
.set-row small b { display: inline; color: var(--bad); }
@media (max-width: 760px) { .set-row { flex-direction: column; align-items: flex-start; } }

/* ---------------------------------------------------------------- RTL (Arabic) + script fallbacks
   Layout above uses logical properties, so it mirrors by itself; this block covers what they can't. */
/* directional icons (arrow / back / send) point the other way */
[dir="rtl"] .i-arrow, [dir="rtl"] .i-back, [dir="rtl"] .i-send,
[dir="rtl"] svg.i:has(> path[d="m9 18 6-6-6-6"]), [dir="rtl"] svg.i:has(> path[d="m15 18-6-6 6-6"]), [dir="rtl"] svg.i:has(> path[d="M5 12h14M13 6l6 6-6 6"]) { transform: scaleX(-1); }
/* off-canvas panels slide in from the inline-end / inline-start edge */
[dir="rtl"] .drawer { box-shadow: 20px 0 60px rgba(0,0,0,.4); transform: translateX(-100%); }
[dir="rtl"] .drawer.open { transform: none; }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-14px); }
[dir="rtl"] .nav-item.active { background: linear-gradient(270deg, rgba(var(--a-rgb), .17), rgba(var(--a-rgb), .02)); }
@media (max-width: 980px) {
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  [dir="rtl"] body.mobile-nav .sidebar { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
}
/* the workflow graph is a left→right flow diagram: canvas + replay timeline stay LTR */
.flow-vp, .rp-track { direction: ltr; }
/* code stays LTR */
code, pre, kbd, .code-wrap { direction: ltr; unicode-bidi: isolate; }
.code-wrap.prose, .code-wrap.prose pre { direction: inherit; unicode-bidi: plaintext; }
/* fonts: Arabic needs a script-capable stack and no letter-spacing (it breaks cursive joining) */
:root:lang(ar) { --sans: "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; --display: var(--sans); }
:root:lang(ar) body, :root:lang(ar) body * { letter-spacing: normal !important; }
:root:lang(zh) { --sans: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif; --display: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:root[data-theme="brand"]:lang(zh) { --sans: "Saira SemiExpanded", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; --display: var(--sans); }
:root:lang(vi) { --sans: "Segoe UI Variable Text", "Segoe UI", "Noto Sans", system-ui, -apple-system, sans-serif; }
:root[data-theme="brand"]:lang(vi) { --sans: "Saira SemiExpanded", "Segoe UI", "Noto Sans", system-ui, sans-serif; --display: var(--sans); }

/* ============================================================ business: lead inbox */
.biz-metrics { margin-block-end: 14px; }
.biz-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.biz-list .seg { flex-wrap: wrap; }
.biz-list .seg small { color: var(--muted-2); font: 600 .62rem var(--mono); }
.biz-rows { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.biz-row { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-2); text-align: start; cursor: pointer; }
.biz-row:hover { background: rgba(var(--s2-rgb), .45); }
.biz-row.on { border-color: rgba(var(--a-rgb), .4); background: rgba(var(--a-rgb), .08); }
.biz-row.unseen b { color: var(--text); }
.biz-who { display: grid; min-width: 0; }
.biz-who b { font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-who small { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-row time { color: var(--muted-2); font: .66rem var(--mono); white-space: nowrap; }
.biz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.biz-dot.p1 { background: var(--bad); box-shadow: 0 0 8px rgba(var(--bad-rgb), .6); } .biz-dot.p2 { background: var(--warn); } .biz-dot.p3 { background: var(--muted-2); }
.biz-row.unseen .biz-who b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--blue); vertical-align: middle; }
.biz-detail { position: sticky; inset-block-start: 12px; }
.biz-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.biz-body h3 { margin: 10px 0 0; font: 700 .62rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.biz-facts { margin: 0; display: grid; gap: 6px; }
.biz-facts div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; font-size: .78rem; }
.biz-facts dt { color: var(--muted); } .biz-facts dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.biz-msg { margin: 0; padding: 10px 12px; border-inline-start: 2px solid rgba(var(--a-rgb), .5); background: rgba(var(--well-rgb), .6); border-radius: 6px; font-size: .8rem; color: var(--text-2); white-space: pre-wrap; }
.biz-chat { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line-soft); border-radius: 8px; }
.biz-chat p { margin: 0; padding: 7px 10px; border-radius: 8px; font-size: .76rem; max-width: 85%; white-space: pre-wrap; }
.biz-chat .u { justify-self: end; background: rgba(var(--a-rgb), .14); color: var(--text); }
.biz-chat .a { justify-self: start; background: rgba(var(--s2-rgb), .6); color: var(--text-2); }
.biz-stage-set { flex-wrap: wrap; }
.biz-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.biz-notes li { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; font-size: .78rem; }
.biz-notes time { display: block; color: var(--muted-2); font: .62rem var(--mono); margin-block-end: 2px; }
.biz-notes .md p { margin: 0; }
.biz-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1100px) { .biz-grid { grid-template-columns: 1fr; } .biz-detail { position: static; } }
.biz-metrics .metric { min-height: 0; }

/* ============================================================ assistant: typed chat */
.v-log { width: 100%; max-height: min(34vh, 340px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; text-align: start; scrollbar-width: thin; }
.v-log p { margin: 0; max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.v-log .u { align-self: flex-end; background: rgba(var(--a-rgb), .18); color: var(--text); border-end-end-radius: 4px; }
.v-log .a { align-self: flex-start; background: rgba(var(--s2-rgb), .7); color: var(--text); border: 1px solid var(--line-soft); border-end-start-radius: 4px; }
.v-log .a.typing::after { content: "▍"; animation: pulse 1s infinite; margin-inline-start: 2px; color: var(--blue); }
.v-log .err { align-self: center; background: none; color: var(--warn); font-size: .76rem; }
.voice-view.chatting .subs { display: none; }
.v-compose { width: min(620px, 100%); display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; padding-inline: 14px 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(var(--well-rgb), .78); backdrop-filter: blur(8px); }
.v-compose:focus-within { border-color: rgba(var(--a-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .12); }
.v-compose textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: .88rem; line-height: 1.45; max-height: 140px; padding: 6px 0; text-align: start; }
.v-send { flex: none; width: 36px; height: 36px; border-radius: 11px; border: 0; display: grid; place-items: center; background: var(--blue); color: #fff; cursor: pointer; }
.v-clear { flex: none; width: 36px; height: 36px; border-radius: 11px; border: 0; display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer; }
.v-clear:hover { color: var(--bad); background: rgba(var(--bad-rgb), .1); }
.v-clear[hidden] { display: none; }
.v-clear svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.v-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v-send:disabled { opacity: .45; cursor: default; }
[dir="rtl"] .v-send svg { transform: scaleX(-1); }

/* ============================================================ dropdowns: rounded, translucent picker
   Chromium's customizable <select> (Electron 44+). Older engines keep the native list. */
@supports (appearance: base-select) {
  select, select::picker(select) { appearance: base-select; }
  select { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
  select::picker-icon { color: var(--muted); font-size: .7em; transition: rotate .15s; }
  select:open::picker-icon { rotate: 180deg; }
  select::picker(select) {
    margin-block: 6px; padding: 5px; min-width: anchor-size(width);
    border: 1px solid rgba(var(--a-rgb), .22); border-radius: 12px;
    background: rgba(var(--well-rgb), .82); backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .4); color: var(--text);
    opacity: 1; transition: opacity .12s, translate .12s, overlay .12s allow-discrete, display .12s allow-discrete;
  }
  @starting-style { select:open::picker(select) { opacity: 0; translate: 0 -4px; } }
  select option { background: none !important; padding: 7px 12px; border-radius: 8px; font-size: .8rem; color: var(--text-2); white-space: nowrap; }
  select option:hover, select option:focus-visible { background: rgba(var(--a-rgb), .14) !important; color: var(--text); outline: none; }
  select option:checked { background: rgba(var(--a-rgb), .22) !important; color: var(--text); font-weight: 600; }
  select option::checkmark { display: none; }
}

/* ============================================================ business: social queue */
.so-compose { margin-block-end: 14px; }
.so-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; padding: 16px; }
.so-left, .so-right { display: grid; gap: 12px; align-content: start; }
.so-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); cursor: pointer; text-align: center; padding: 14px; font-size: .78rem; }
.so-drop:hover { border-color: rgba(var(--a-rgb), .5); color: var(--text-2); }
.so-drop .i { width: 26px; height: 26px; }
.so-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.so-thumbs figure { position: relative; margin: 0; width: 96px; }
.so-thumbs img, .so-thumbs video { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: #05070d; }
.so-thumbs button { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer; }
.so-thumbs figcaption { font-size: .62rem; color: var(--muted); margin-block-start: 3px; }
.so-check { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-2); }
.so-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; padding: 14px; }
.so-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--s1-rgb), .35); }
.so-media { position: relative; width: 132px; aspect-ratio: 4 / 5; border-radius: 9px; overflow: hidden; background: #05070d; border: 1px solid var(--line-soft); }
.so-media img, .so-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-text { display: grid; place-items: center; height: 100%; color: var(--muted); }
.so-count { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; font: 600 .6rem var(--mono); background: rgba(0,0,0,.65); color: #fff; padding: 2px 6px; border-radius: 10px; }
.so-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.so-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-plat { font: 600 .62rem var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.so-cap { margin: 0; font-size: .8rem; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.so-warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.so-warn li { display: flex; gap: 6px; align-items: center; font-size: .7rem; color: var(--warn); }
.so-warn .i { width: 13px; height: 13px; flex: none; }
.so-err { margin: 0; font-size: .72rem; color: var(--bad); overflow-wrap: anywhere; }
.so-stats { display: grid; gap: 2px; font-size: .7rem; color: var(--text-2); }
.so-body .so-acts { justify-content: flex-start; margin-block-start: 4px; }
@media (max-width: 1100px) { .so-form { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .so-card { grid-template-columns: 1fr; } .so-media { width: 100%; } }
.so-import { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.so-import .i { width: 16px; height: 16px; }
.so-import .select { max-width: 240px; }
.so-form .field { display: grid; gap: 6px; align-items: start; }
.so-form .field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .76rem; color: var(--text-2); }
.so-form .field > small { font-size: .68rem; }
.so-form textarea.input { width: 100%; min-height: 190px; resize: vertical; line-height: 1.5; padding: 10px 12px; }
.so-form #so-capfb { min-height: 130px; }
.so-form input[type="date"].input { width: 200px; }
button.so-media { padding: 0; cursor: zoom-in; }
.so-zoom { position: absolute; inset-block-end: 6px; inset-inline-end: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(0,0,0,.6); color: #fff; opacity: 0; transition: opacity .15s; }
.so-zoom .i { width: 14px; height: 14px; }
button.so-media:hover .so-zoom, button.so-media:focus-visible .so-zoom { opacity: 1; }
.so-prev { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 1fr); height: 100%; }
.so-stage { position: relative; display: grid; place-items: center; background: #04060b; padding: 18px; min-height: 0; }
.so-stage img, .so-stage video { max-width: 100%; max-height: calc(90vh - 120px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.so-stage .so-text { display: grid; gap: 8px; justify-items: center; color: var(--muted); }
.so-nav { position: absolute; inset-block-start: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(10,14,24,.75); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.so-nav:disabled { opacity: .25; cursor: default; }
.so-nav.prev { inset-inline-start: 14px; } .so-nav.next { inset-inline-end: 14px; }
[dir="rtl"] .so-nav { scale: -1 1; }
.so-dots { position: absolute; inset-block-end: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.so-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.3); cursor: pointer; }
.so-dots button[aria-current="true"] { background: var(--blue); }
.so-caps { overflow-y: auto; padding: 18px 20px; display: grid; gap: 10px; align-content: start; border-inline-start: 1px solid var(--line); }
.so-caps h3 { margin: 6px 0 0; font: 700 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.so-captext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .84rem; line-height: 1.55; color: var(--text); background: rgba(var(--well-rgb), .5); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
@media (max-width: 860px) { .so-prev { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .so-caps { border-inline-start: 0; border-block-start: 1px solid var(--line); } }
.so-dmbar { margin-block-end: 14px; align-items: center; } .so-dmbar .switch { margin-inline-start: auto; }
.so-switches { margin-inline-start: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.so-comments { list-style: none; margin: 0; padding: 10px 14px 14px; display: grid; gap: 8px; }
.so-comments li { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(var(--s1-rgb), .3); display: grid; gap: 6px; }
.so-ctop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.so-ctop time { margin-inline-start: auto; color: var(--muted-2); font: .64rem var(--mono); }
.so-ctext { margin: 0; font-size: .82rem; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.so-creply { margin: 0; font-size: .78rem; color: var(--text-2); padding-inline-start: 10px; border-inline-start: 2px solid rgba(var(--a-rgb), .45); white-space: pre-wrap; overflow-wrap: anywhere; }
.so-creply small { display: block; font: 700 .58rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.so-stats, .so-stats span, .so-err, .so-top { overflow-wrap: anywhere; min-width: 0; } .so-stats span { display: block; } .so-card { overflow: hidden; }
.lg-cleared { margin: 10px 16px 0; align-items: center; } .lg-cleared .btn { margin-inline-start: auto; }

/* API keys (Settings) */
.key-field { display: grid; gap: 4px; justify-items: end; min-width: min(320px, 100%); }
.key-field .input { width: 100%; font-family: var(--mono, monospace); }
#st-keys .set-acts { align-items: center; }
