/* Reelpilot — dark mission-control theme.
   Design rule: no borders, outlines-as-decoration, hr or divider lines.
   Separation comes from fill, spacing and soft shadow only. */

:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-2: #0c0e14;
  --s1: #12151d;
  --s2: #181c26;
  --s3: #202532;
  --s4: #2a3040;
  --fg: #eef1f7;
  --fg-2: #b4bccd;
  --muted: #7d879b;
  --faint: #4b5366;
  --accent: #7cf5c4;
  --accent-2: #4fd9a6;
  --accent-ink: #04140e;
  --green: #5ee6a0;
  --amber: #ffc857;
  --red: #ff5c7a;
  --blue: #6aa8ff;
  --violet: #b18cff;
  --r-s: 10px;
  --r: 16px;
  --r-l: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-l: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --ring: 0 0 0 3px rgba(124, 245, 196, 0.35);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --side: 232px;
}

*, *::before, *::after { box-sizing: border-box; border: 0 none; }
hr { display: none; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 245, 196, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(106, 168, 255, 0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--fg);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; border: none; outline: none; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: rgba(124, 245, 196, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 10px; border: 0; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- utility ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tone-green { color: var(--green); }
.tone-red { color: var(--red); }
.tone-amber { color: var(--amber); }
.tone-accent { color: var(--accent); font-weight: 600; }
.tone-fg { color: var(--fg); }
.mono { font-family: var(--mono); font-size: 13px; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; margin-top: 4px; }
.wrap { flex-wrap: wrap; }
.gap-s { gap: 8px; }
.grow { flex: 1; }
.stack { display: grid; gap: 12px; }
.stack-tight { display: grid; gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { color: #a8ffdc; }
.icon { flex: none; display: block; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: rgba(12, 14, 20, 0.85); backdrop-filter: blur(14px);
  box-shadow: 1px 0 40px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; padding: 22px 14px; gap: 22px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font: 800 18px/1 var(--display); letter-spacing: -0.03em; padding: 4px 10px; }
.brand-lg { font-size: 26px; padding: 0; gap: 12px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #48c9ff); color: var(--accent-ink);
  box-shadow: 0 6px 20px -6px rgba(124, 245, 196, 0.6);
}
.brand-lg .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--fg-2); font-weight: 500; transition: background 0.15s, color 0.15s; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--s1); color: var(--fg); }
.nav-item.on { background: var(--s2); color: var(--fg); box-shadow: var(--shadow); }
.nav-item.on .icon { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding: 0 2px; }
.side-foot > .small { padding: 0 12px; }
.main { flex: 1; min-width: 0; margin-left: var(--side); }
.page { max-width: 1240px; margin: 0 auto; padding: 34px 40px 80px; animation: fadeUp 0.25s ease-out; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.sub { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head.tight { margin: 8px 0 4px; }
.section-head h3 { font-size: 14px; font-weight: 700; color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font); }
.eyebrow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--s1); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card.pad { padding: 22px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 11px; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s, opacity 0.15s; flex: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; }
.btn.is-busy { opacity: 0.8; }
.btn-lg { height: 48px; font-size: 15px; border-radius: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px rgba(124, 245, 196, 0.7); }
.btn-primary:hover:not(:disabled) { background: #9bfad4; }
.btn-soft { background: var(--s3); color: var(--fg); }
.btn-soft:hover:not(:disabled) { background: var(--s4); }
.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover:not(:disabled) { background: var(--s2); color: var(--fg); }
.btn-danger-soft { background: rgba(255, 92, 122, 0.12); color: var(--red); }
.btn-danger-soft:hover:not(:disabled) { background: rgba(255, 92, 122, 0.2); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--fg-2);
  background: transparent; transition: background 0.15s, color 0.15s; flex: none;
}
.icon-btn:hover { background: var(--s3); color: var(--fg); }
.icon-btn-danger:hover { background: rgba(255, 92, 122, 0.14); color: var(--red); }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: conic-gradient(currentColor 0 25%, transparent 25% 100%);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  animation: spin 0.7s linear infinite;
}

/* ---------- inputs ---------- */
.input {
  width: 100%; min-width: 0; background: var(--bg-2); border-radius: 11px; padding: 10px 13px; height: 40px;
  color: var(--fg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); transition: background 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; resize: vertical; line-height: 1.55; }
.input::placeholder { color: var(--faint); }
.input:hover { background: #0e1118; }
.input:focus, .input:focus-visible { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), var(--ring); background: #0e1118; }
.input-lg { height: 50px; font-size: 15px; border-radius: 14px; padding: 0 16px; }
input[type='time'].input { color-scheme: dark; }
.select-wrap { position: relative; min-width: 0; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background: var(--s2); box-shadow: var(--shadow); }
.select:hover { background: var(--s3); }
.select-caret {
  position: absolute; right: 13px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  background: linear-gradient(135deg, transparent 50%, var(--muted) 50%); transform: rotate(45deg); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.page-actions .select-wrap { min-width: 180px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; align-content: start; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.field-hint { font-size: 12px; color: var(--muted); }
.big-n { font: 800 20px/1 var(--display); color: var(--accent); }
.big-n small { font-size: 12px; color: var(--muted); font-weight: 600; }
.form-error { color: var(--red); font-size: 13px; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--s3) var(--p, 0%)); }
.range::-moz-range-track { height: 8px; border-radius: 8px; background: var(--s3); }
.range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; margin-top: -7px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); border: 0; }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.range:focus-visible { box-shadow: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }

/* ---------- switch ---------- */
.switch { position: relative; width: 44px; height: 26px; border-radius: 26px; background: var(--s4); transition: background 0.2s; flex: none; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #d7dce6; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); transition: transform 0.22s cubic-bezier(.3, 1.4, .6, 1), background 0.2s; }
.switch.on { background: var(--accent); }
.switch.on .knob { transform: translateX(18px); background: #fff; }
.switch.is-busy { opacity: 0.6; }

/* ---------- segmented ---------- */
.segmented { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 4px; gap: 4px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.seg { padding: 7px 18px; border-radius: 9px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg:hover { color: var(--fg); }
.seg.on { background: var(--s3); color: var(--fg); box-shadow: var(--shadow); }
.seg.on.seg-green { background: rgba(94, 230, 160, 0.16); color: var(--green); }

/* ---------- chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em; text-transform: lowercase; white-space: nowrap;
  background: rgba(125, 135, 155, 0.16); color: var(--fg-2);
}
.chip-green { background: rgba(94, 230, 160, 0.14); color: var(--green); }
.chip-amber { background: rgba(255, 200, 87, 0.14); color: var(--amber); }
.chip-red { background: rgba(255, 92, 122, 0.15); color: var(--red); }
.chip-blue { background: rgba(106, 168, 255, 0.15); color: var(--blue); }
.chip-violet { background: rgba(177, 140, 255, 0.16); color: var(--violet); }
.chip-muted { background: rgba(125, 135, 155, 0.14); color: var(--muted); }
.chip-pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--s3); color: var(--fg-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.tag-quiet { background: var(--s2); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- avatar ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--s2), 0 6px 16px -6px rgba(0, 0, 0, 0.6); }
.avatar-fallback { display: inline-grid; place-items: center; font: 800 16px/1 var(--display); color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 50) 70% 42%)); }

/* ---------- empty / skeleton / banners ---------- */
.empty { background: var(--s1); border-radius: var(--r); padding: 44px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; box-shadow: var(--shadow); }
.empty-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--s3); color: var(--accent); margin-bottom: 6px; }
.empty-title { font: 700 16px/1.3 var(--display); }
.empty-body { color: var(--muted); max-width: 420px; }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--s1) 0%, var(--s2) 50%, var(--s1) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; margin-bottom: 18px; }
.banner > span { flex: 1; min-width: 0; }
.banner-green { background: rgba(94, 230, 160, 0.12); color: #bff5d8; }
.banner-green > .icon { color: var(--green); }
.banner-red { background: rgba(255, 92, 122, 0.12); color: #ffc2cd; }
.inline-alert { display: flex; gap: 10px; align-items: center; background: rgba(255, 92, 122, 0.08); padding: 9px 12px; border-radius: 10px; min-width: 0; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--s3); color: var(--fg); padding: 12px 16px; border-radius: 13px; box-shadow: var(--shadow-l); animation: fadeUp 0.2s ease-out; font-weight: 500; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.toast-success .toast-dot { background: var(--green); }
.toast-warn .toast-dot { background: var(--amber); }
.toast-error .toast-dot { background: var(--red); }
.toast-error { background: #3a1a24; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; background: rgba(3, 4, 7, 0.68); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 24px; animation: fade 0.15s ease-out; overflow-y: auto; }
.overlay-drawer { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; overflow: hidden; }
.modal { position: relative; width: min(560px, 100%); background: var(--s1); border-radius: var(--r-l); box-shadow: var(--shadow-l); padding: 26px; animation: pop 0.2s ease-out; margin: auto; }
.modal-wide { width: min(980px, 100%); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--s2); }
.modal-loading { display: grid; place-items: center; min-height: 200px; }
.drawer { width: min(460px, 100vw); height: 100vh; height: 100dvh; background: var(--s1); box-shadow: var(--shadow-l); display: flex; flex-direction: column; animation: slideIn 0.24s cubic-bezier(.2, .9, .3, 1); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 8px; }
.drawer-head h2 { font-size: 19px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 22px 22px; }
.drawer-foot { display: flex; gap: 8px; align-items: center; padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); background: var(--s2); }
.drawer-id { display: flex; gap: 14px; align-items: center; background: var(--s2); padding: 14px; border-radius: 14px; margin-bottom: 20px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-glow { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 245, 196, 0.16), transparent 65%); top: 50%; left: 50%; transform: translate(-50%, -60%); pointer-events: none; }
.login-card { position: relative; width: min(400px, 100%); background: var(--s1); border-radius: 24px; padding: 34px 30px; box-shadow: var(--shadow-l); display: grid; gap: 16px; }
.login-card .sub { margin: 0 0 8px; }

/* ---------- overview ---------- */
.ov-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.kill {
  display: flex; align-items: center; gap: 22px; text-align: left; padding: 26px; border-radius: var(--r-l); min-width: 0;
  transition: background 0.3s, box-shadow 0.3s; box-shadow: var(--shadow);
}
.kill-on { background: linear-gradient(135deg, rgba(124, 245, 196, 0.16), rgba(72, 201, 255, 0.06) 70%), var(--s1); }
.kill-off { background: linear-gradient(135deg, rgba(255, 92, 122, 0.24), rgba(255, 92, 122, 0.05) 70%), var(--s1); }
.kill:hover { box-shadow: var(--shadow-l); }
.kill.is-busy { opacity: 0.7; }
.kill-ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative; }
.kill-on .kill-ring { background: rgba(124, 245, 196, 0.12); box-shadow: 0 0 0 10px rgba(124, 245, 196, 0.05); animation: breathe 2.6s ease-in-out infinite; }
.kill-off .kill-ring { background: rgba(255, 92, 122, 0.14); box-shadow: 0 0 0 10px rgba(255, 92, 122, 0.06); }
.kill-core { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; transition: background 0.3s; }
.kill-on .kill-core { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -6px rgba(124, 245, 196, 0.7); }
.kill-off .kill-core { background: var(--red); color: #2a0610; box-shadow: 0 10px 30px -6px rgba(255, 92, 122, 0.7); }
.kill-text { display: grid; gap: 6px; min-width: 0; }
.kill-label { font: 800 24px/1.1 var(--display); letter-spacing: -0.03em; }
.kill-on .kill-label { color: var(--accent); }
.kill-off .kill-label { color: var(--red); }
.kill-sub { color: var(--fg-2); font-size: 13.5px; }

.heartbeat { padding: 22px; display: grid; gap: 16px; border-radius: var(--r-l); }
.hb-top { display: flex; align-items: center; gap: 10px; }
.hb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-grid > div { background: var(--s2); border-radius: 13px; padding: 12px 14px; min-width: 0; }
.hb-k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.hb-v { font: 800 24px/1.25 var(--display); letter-spacing: -0.02em; margin-top: 2px; }
.hb-s { font-size: 12px; color: var(--muted); }
.hb-bar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.hb-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 1s linear; }
.hb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(94, 230, 160, 0.6); animation: ping 2s ease-out infinite; flex: none; display: inline-block; }
.pulse-fast { background: var(--amber); animation-duration: 0.8s; }
.pulse-off { background: var(--faint); animation: none; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--s1); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat-v { font: 800 26px/1.1 var(--display); letter-spacing: -0.03em; }
.stat-k { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-s { color: var(--accent); font-size: 12px; margin-top: 2px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.acct-card { padding: 20px; display: grid; gap: 16px; transition: opacity 0.2s; }
.acct-card.is-paused { background: linear-gradient(0deg, rgba(8, 9, 13, 0.25), rgba(8, 9, 13, 0.25)), var(--s1); }
.acct-card.is-paused .acct-head .avatar { filter: grayscale(0.7); }
.acct-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.acct-id { flex: 1; min-width: 0; }
.acct-name { font: 700 16px/1.3 var(--display); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-toggle { display: flex; align-items: center; gap: 8px; flex: none; }
.quota { background: var(--s2); border-radius: 13px; padding: 12px 14px; display: grid; gap: 9px; }
.quota-row { display: flex; justify-content: space-between; align-items: baseline; }
.quota-n { color: var(--muted); }
.quota-n b { font: 800 18px/1 var(--display); color: var(--fg); }
.quota-pips { display: flex; gap: 5px; }
.pip { flex: 1; height: 6px; border-radius: 6px; background: var(--s4); }
.pip.on { background: var(--accent); box-shadow: 0 0 10px rgba(124, 245, 196, 0.45); }
.acct-meta { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.v { font-weight: 600; margin-top: 2px; }

/* ---------- accounts ---------- */
.acct-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; transition: background 0.15s; }
.acct-row:hover { background: var(--s2); }
.acct-row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.acct-row-facts { display: grid; grid-template-columns: 80px 64px 100px 70px; gap: 4px 20px; }
.acct-row-facts .v { white-space: nowrap; }

/* ---------- inspiration ---------- */
.composer { padding: 8px; }
.composer-text { background: var(--bg-2); min-height: 180px; padding: 16px 18px; font-size: 14.5px; border-radius: 13px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px 6px 10px; flex-wrap: wrap; }
.composer-actions .select-wrap { min-width: 220px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters-scroll { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; scrollbar-width: none; }
.filters-scroll::-webkit-scrollbar { display: none; }
.filter { height: 32px; padding: 0 13px; border-radius: 10px; background: var(--s1); color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: capitalize; flex: none; transition: background 0.15s, color 0.15s; }
.filter:hover { color: var(--fg); background: var(--s2); }
.filter.on { background: var(--s3); color: var(--fg); box-shadow: var(--shadow); }
.filter-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--s4); font-size: 11px; margin-left: 4px; }
.filter-warn.on { color: var(--amber); }
.filter-error.on { color: var(--red); }
.filter-info.on { color: var(--blue); }
.ref-row { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.ref-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ref-reel { background: rgba(124, 245, 196, 0.12); color: var(--accent); }
.ref-acct { background: rgba(177, 140, 255, 0.14); color: var(--violet); }
.ref-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.ref-title { font-weight: 600; max-width: 100%; }
.ref-actions { display: flex; gap: 2px; flex: none; }
.recipe-sum { display: grid; gap: 7px; background: var(--s2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.recipe-name { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--fg); }
.recipe-name .icon { color: var(--accent); }
.quote { font: 700 15px/1.35 var(--display); color: var(--fg); }

/* ---------- playbook ---------- */
.recipe-row { transition: background 0.2s, box-shadow 0.3s, opacity 0.2s; overflow: hidden; }
.recipe-row.is-off { opacity: 0.55; }
.recipe-row.flash { box-shadow: 0 0 0 2px var(--violet), var(--shadow-l); }
.recipe-row.is-open { background: var(--s2); }
.recipe-line { display: grid; grid-template-columns: 38px minmax(0, 1fr) 220px auto; gap: 18px; align-items: center; padding: 14px 18px; cursor: pointer; }
.rank { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); font: 800 15px/1 var(--display); color: var(--muted); }
.rank-top { background: rgba(124, 245, 196, 0.14); color: var(--accent); }
.recipe-main { min-width: 0; display: grid; gap: 4px; }
.recipe-title { font: 700 15.5px/1.3 var(--display); }
.lineage { color: var(--violet); font-size: 12.5px; font-weight: 500; padding: 0; }
.lineage:hover { text-decoration: underline; }
.score { display: grid; gap: 6px; }
.score-bar { height: 8px; border-radius: 8px; background: var(--s3); overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #3fb8ff, var(--accent)); }
.score-n { display: flex; justify-content: space-between; font-size: 12.5px; }
.score-n b { font: 800 15px/1 var(--display); }
.recipe-ctl { display: flex; align-items: center; gap: 12px; }
.recipe-detail { padding: 0 18px 18px 74px; display: grid; gap: 12px; animation: fade 0.2s; }
.recipe-detail .recipe-sum { background: var(--s3); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.beats { display: flex; flex-wrap: wrap; gap: 6px; }
.beat { background: var(--s3); border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--muted); }
.beat b { color: var(--fg); font-weight: 600; }

/* ---------- reels ---------- */
.reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }
.reel-tile { text-align: left; display: grid; gap: 10px; border-radius: var(--r); padding: 0; min-width: 0; transition: transform 0.15s; }
.reel-tile:hover { transform: translateY(-2px); }
.reel-tile:hover .reel-thumb { box-shadow: var(--shadow-l); }
.reel-thumb { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--s2); box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.reel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reel-thumb::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); pointer-events: none; }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); background: repeating-linear-gradient(135deg, var(--s2) 0 14px, var(--s1) 14px 28px); }
.reel-chip { position: absolute; top: 10px; left: 10px; z-index: 1; }
.reel-chip .chip { backdrop-filter: blur(8px); background-color: rgba(8, 9, 13, 0.62); }
.reel-views { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; }
.reel-skel { aspect-ratio: 9 / 16; }
.reel-cap { display: grid; gap: 2px; padding: 0 2px; min-width: 0; }
.reel-t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.reel-modal { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 26px; }
.reel-player { aspect-ratio: 9 / 16; background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); align-self: start; }
.reel-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-empty { position: relative; width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.player-empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.player-empty span { position: relative; font-weight: 600; background: rgba(0, 0, 0, 0.55); padding: 8px 14px; border-radius: 10px; }
.reel-info { display: grid; gap: 14px; align-content: start; min-width: 0; padding-right: 30px; }
.reel-title { font-size: 22px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; }
.caption { background: var(--s2); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; color: var(--fg-2); font-size: 13.5px; max-height: 160px; overflow-y: auto; overflow-wrap: anywhere; }
.spark { display: block; }
.spark-empty { font-size: 12px; color: var(--faint); }
.table-wrap { overflow-x: auto; border-radius: 12px; background: var(--s2); }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.table th, .table td { border: 0; padding: 8px 10px; text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--s3); }
.table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }
.modal-actions { margin-top: 4px; }

/* ---------- activity ---------- */
.act-bar { margin-bottom: 14px; }
.log { padding: 6px; display: grid; gap: 2px; font-size: 13px; }
.log-row { display: grid; grid-template-columns: 74px 54px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: 10px; }
.log-row:hover { background: var(--s2); }
.log-new { animation: flashIn 1.4s ease-out; }
.log-time { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.log-lvl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 0; border-radius: 6px; text-align: center; }
.lvl-info .log-lvl { color: var(--blue); background: rgba(106, 168, 255, 0.12); }
.lvl-warn { background: rgba(255, 200, 87, 0.05); }
.lvl-warn .log-lvl { color: var(--amber); background: rgba(255, 200, 87, 0.14); }
.lvl-warn .log-msg { color: #ffe3a6; }
.lvl-error { background: rgba(255, 92, 122, 0.07); }
.lvl-error .log-lvl { color: var(--red); background: rgba(255, 92, 122, 0.16); }
.lvl-error .log-msg { color: #ffc2cd; }
.log-body { display: flex; gap: 10px; min-width: 0; align-items: baseline; }
.log-meta { display: flex; gap: 6px; flex: none; }
.log-acct { font-weight: 600; color: var(--fg-2); }
.log-kind { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--s3); padding: 0 6px; border-radius: 5px; }
.log-msg { color: var(--fg); overflow-wrap: anywhere; min-width: 0; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.secret { display: grid; gap: 8px; background: var(--s2); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.secret .input { background: var(--bg-2); }
.set-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; font-size: 12px; background: rgba(94, 230, 160, 0.12); padding: 2px 9px; border-radius: 20px; }
.unset-badge { color: var(--amber); font-weight: 600; font-size: 12px; background: rgba(255, 200, 87, 0.12); padding: 2px 9px; border-radius: 20px; }
.checklist { position: sticky; top: 24px; background: linear-gradient(160deg, rgba(124, 245, 196, 0.07), transparent 50%), var(--s1); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 42px; color: var(--fg-2); line-height: 1.55; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--s3); color: var(--accent); display: grid; place-items: center; font: 800 13px/1 var(--display); }
.steps b { color: var(--fg); }
.code-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; background: var(--bg-2); padding: 6px 10px; border-radius: 9px; font-family: var(--mono); font-size: 12px; color: var(--accent); max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.code-pill:hover { background: var(--s3); }
.step-state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mini { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: rgba(255, 200, 87, 0.12); color: var(--amber); }
.mini::before { content: '○ '; }
.mini-on { background: rgba(94, 230, 160, 0.12); color: var(--green); }
.mini-on::before { content: '✓ '; }


/* ---------- robustness: health pill, reconnect, spend, guardrails ---------- */
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.health { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 20px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--s2); color: var(--muted); }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.health-green { background: rgba(94, 230, 160, 0.12); color: var(--green); }
.health-green .health-dot { animation: ping 2s ease-out infinite; }
.health-amber { background: rgba(255, 200, 87, 0.14); color: var(--amber); }
.health-red { background: rgba(255, 92, 122, 0.16); color: var(--red); }
.health-red .health-dot { animation: pulse 1s ease-in-out infinite; }
.banner-strong { background: linear-gradient(90deg, rgba(255, 92, 122, 0.22), rgba(255, 92, 122, 0.1)); color: #ffd6dd; box-shadow: var(--shadow); flex-wrap: wrap; }
.banner-strong > .icon { color: var(--red); }
.banner-strong b { color: #fff; }
.btn-danger { background: var(--red); color: #2a0610; box-shadow: 0 8px 24px -10px rgba(255, 92, 122, 0.7); }
.btn-danger:hover:not(:disabled) { background: #ff7b93; }
.stat-wide { grid-column: span 2; display: grid; gap: 2px; align-content: start; }
.stat-of { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.spend-bar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; margin-top: 8px; }
.spend-bar span { display: block; height: 100%; border-radius: 6px; background: var(--green); transition: width 0.6s; }
.spend-amber span { background: var(--amber); }
.spend-red span { background: var(--red); }
.inline-amber { background: rgba(255, 200, 87, 0.08); color: #ffe3a6; }
.acct-sub { min-width: 0; margin: 3px 0 2px; }
.ov-top + .banner-strong { margin: 16px 0 0; }
.card-title-gap { margin-top: 26px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.input-affix { position: relative; }
.input-affix > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-affix .input { padding-left: 26px; }
input[type='number'].input { -moz-appearance: textfield; }
input[type='number'].input::-webkit-inner-spin-button { opacity: 0.4; }
@media (max-width: 1180px) { .stat-wide { grid-column: span 2; } }
@media (max-width: 760px) {
  .stat-wide { grid-column: 1 / -1; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .banner-strong .btn { width: 100%; }
}

/* ---------- animation ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(94, 230, 160, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(94, 230, 160, 0); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 8px rgba(124, 245, 196, 0.05); } 50% { box-shadow: 0 0 0 16px rgba(124, 245, 196, 0.02); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(8px); } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes flashIn { from { background: rgba(124, 245, 196, 0.12); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .recipe-line { grid-template-columns: 38px minmax(0, 1fr) 180px; }
  .recipe-ctl { grid-column: 2 / -1; justify-content: flex-end; }
  .acct-row { flex-wrap: wrap; }
  .acct-row-main { flex-basis: calc(100% - 80px); }
  .acct-row-facts { flex: 1; }
}
@media (max-width: 960px) {
  .ov-top, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .checklist { position: static; }
  .reel-modal { grid-template-columns: minmax(0, 1fr); }
  .reel-player { max-width: 320px; width: 100%; justify-self: center; }
  .reel-info { padding-right: 0; }
}
@media (max-width: 760px) {
  :root { --side: 0px; }
  .shell { flex-direction: column; }
  .side {
    position: sticky; top: 0; inset: auto; width: 100%; flex-direction: row; align-items: center; gap: 4px;
    padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(10, 12, 17, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
  .brand { padding: 4px 6px; font-size: 0; gap: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .nav { display: flex; overflow-x: auto; gap: 2px; flex: 1; min-width: 0; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: none; padding: 9px 12px; gap: 7px; font-size: 13.5px; }
  .nav .nav-item:not(.on) .icon { display: none; }
  .side-foot { margin: 0; padding: 0; flex: none; display: flex; }
  .side-foot > .small { display: none; }
  .nav-logout { padding: 9px; width: auto; }
  .nav-logout span { display: none; }
  .main { margin-left: 0; }
  .page { padding: 22px 16px 80px; }
  .page-head h1 { font-size: 27px; }
  .page-head { margin-bottom: 18px; }
  .page-actions { width: 100%; }
  .page-actions .select-wrap { flex: 1; min-width: 0; }
  .kill { padding: 20px; gap: 16px; }
  .kill-ring { width: 72px; height: 72px; }
  .kill-core { width: 52px; height: 52px; }
  .kill-label { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px; }
  .stat-v { font-size: 22px; }
  .grid-cards { grid-template-columns: minmax(0, 1fr); }
  .acct-row { padding: 14px; gap: 12px; }
  .acct-row-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; flex-basis: 100%; background: var(--s2); padding: 12px; border-radius: 12px; }
  .acct-row > .btn { width: 100%; }
  .composer-actions { width: 100%; }
  .composer-actions .select-wrap { flex: 1; min-width: 0; }
  .ref-row { flex-wrap: wrap; padding: 14px; gap: 12px; }
  .ref-main { flex-basis: calc(100% - 54px); }
  .ref-actions { width: 100%; justify-content: flex-end; margin-top: -6px; }
  .recipe-line { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .score { grid-column: 1 / -1; }
  .recipe-ctl { grid-column: 1 / -1; justify-content: space-between; }
  .recipe-detail { padding: 0 14px 16px; }
  .reel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .overlay { padding: 12px; place-items: start center; }
  .overlay-drawer { padding: 0; }
  .modal { padding: 18px; border-radius: 18px; }
  .log-row { grid-template-columns: 60px minmax(0, 1fr); gap: 4px 10px; padding: 8px 10px; }
  .log-lvl { justify-self: start; padding: 2px 6px; }
  .log-body { grid-column: 1 / -1; flex-direction: column; gap: 3px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ---------------------------------------------------------------- Clay page (layout; colours come from the theme below) */
.drawer.drawer-wide { width: min(720px, 100vw); }
.clay-box { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.clay-box .card-title { margin-bottom: 0; }
.clay-box-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 14px; }
.clay-box-grid > div { background: var(--s2); border-radius: var(--r-s); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.clay-cur .v { font-weight: 650; }
.clay-cap .input { max-width: 160px; }
.clay-composer { margin-top: 16px; }
.clay-composer .composer-text { min-height: 130px; }
.clay-auto { margin-top: 12px; padding: 14px 18px; }
.clay-auto-grid { display: grid; grid-template-columns: 160px 200px 1fr; gap: 16px; align-items: start; }
.clay-voice { margin-top: 12px; padding: 14px 18px; }
.clay-voice-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 16px; align-items: end; }
.clay-voice .v { font-weight: 650; margin: 2px 0; }
.clay-voice .clay-voice-speed { width: 76px; flex: none; }
.clay-bl { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; min-width: 0; }
.clay-bl .grow { min-width: 0; }
.clay-empty-line { padding: 4px 2px 8px; }
.clay-job { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: center; padding: 14px 18px; cursor: pointer;
  transition: background 0.15s, transform 0.15s; }
.clay-job:hover { background: var(--s2); }
.clay-job:focus-visible { box-shadow: var(--ring); outline: none; }
.clay-job-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ctrack-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctrack { display: flex; gap: 3px; flex: 1; min-width: 0; }
.ctrack i { flex: 1; height: 8px; border-radius: 4px; background: var(--s3); }
.ctrack i.ct-box { flex: 1.4; }
.ctrack i.ct-done { background: linear-gradient(90deg, #3fb8ff, var(--accent)); }
.ctrack i.ct-active { background: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.ctrack i.ct-failed { background: var(--red); }
.ctrack-pct { font: 650 12px/1 var(--mono); color: var(--fg-2); min-width: 36px; text-align: right; }
.clay-h { font-size: 14px; margin: 6px 0 8px; color: var(--fg-2); letter-spacing: 0; }
.clay-final { display: flex; flex-direction: column; gap: 10px; }
.clay-video { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: var(--r); background: #000; box-shadow: var(--shadow); }
.clay-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.clay-hook { display: flex; gap: 14px; align-items: center; background: var(--s2); border-radius: var(--r-s); padding: 12px 14px; }
.clay-hook .big-n { font-size: 26px; }
.clay-script { background: var(--s2); border-radius: var(--r-s); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.clay-src { background: var(--s2); border-radius: var(--r-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.clay-src .link { word-break: break-all; }
.clay-quote { font-style: italic; }
.clay-char { background: var(--s2); border-radius: var(--r-s); padding: 10px 12px; }
.clay-shots { display: flex; flex-direction: column; gap: 6px; }
.clay-shot { display: flex; gap: 12px; background: var(--s2); border-radius: var(--r-s); padding: 10px 12px; min-width: 0; }
.clay-shot.is-failed { background: rgba(255, 200, 87, 0.10); }
.clay-sid { color: var(--accent); font-size: 12px; padding-top: 2px; }
.clay-shot-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 960px) {
  .clay-box-grid { grid-template-columns: 1fr 1fr; }
  .clay-cap { grid-column: span 2; }
  .clay-job { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .clay-box-grid, .clay-auto-grid, .clay-voice-grid { grid-template-columns: minmax(0, 1fr); }
  .clay-cap { grid-column: auto; }
}

/* ==========================================================================
   Monochrome theme (owner request, 2026-10-19):
   - primary colour white; secondary black, used ONLY as lines and text
   - square corners everywhere, no rounded rectangles
   - no shadows, no gradients
   Overrides everything above. Keep it last.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #ffffff;
  --s1: #ffffff; --s2: #ffffff; --s3: #ffffff; --s4: #ffffff;
  --fg: #000000; --fg-2: #1a1a1a; --muted: #555555; --faint: #8a8a8a;
  --accent: #000000; --accent-2: #000000; --accent-ink: #ffffff;
  --green: #000000; --amber: #000000; --blue: #000000; --violet: #000000; --red: #c40000;
  --line: 1px solid #000000;
  --r-s: 0; --r: 0; --r-l: 0;
  --shadow: none; --shadow-l: none;
  --ring: 0 0 0 2px #000000;
}
*, *::before, *::after { border-radius: 0 !important; box-shadow: none !important; text-shadow: none !important; }
:focus-visible { box-shadow: 0 0 0 2px #000 !important; }
.avatar, .avatar-fallback { border-radius: 50% !important; }
body { background: #fff !important; background-image: none !important; color: #000; }
::selection { background: #000; color: #fff; }
::-webkit-scrollbar-thumb { background: #000; }

/* surfaces: white fill, black hairline */
.card, .stat, .empty, .modal, .drawer, .login-card, .toast, .kill, .quota, .hb-grid > div, .recipe-sum,
.caption, .table-wrap, .secret, .checklist, .drawer-id, .reel-thumb, .reel-player, .tag, .beat, .log-kind,
.input, .select, textarea, .code-pill, .filter, .seg, .btn-soft, .btn-ghost, .icon-btn, .rank, .empty-icon,
.steps li::before, .filter-n, .banner, .banner-strong, .skeleton {
  background: #fff !important; background-image: none !important; border: var(--line) !important; color: #000;
}
.kill-on, .kill-off, .acct-card.is-paused, .checklist, .banner-strong { background: #fff !important; }
.side, .sidebar, nav.side { background: #fff !important; border-right: var(--line) !important; }
.drawer-foot { background: #fff !important; border-top: var(--line) !important; }
.table th { background: #fff !important; border-bottom: var(--line) !important; color: #000; }
.table td { border-bottom: 1px solid #000; }
.thumb-ph { background: #fff !important; color: #000; }
.reel-thumb::after { background: none !important; }
.login-glow { display: none !important; }
.skeleton { animation: none !important; border-style: dashed !important; }

/* primary button: white with a heavy black line; hover inverts */
.btn-primary, .btn.primary, button.btn-accent {
  background: #fff !important; background-image: none !important; color: #000 !important; border: 2px solid #000 !important;
}
.btn-primary:hover:not(:disabled), .btn-soft:hover:not(:disabled), .btn-ghost:hover:not(:disabled), .icon-btn:hover,
.filter:hover, .code-pill:hover, .select:hover { background: #fff !important; text-decoration: underline; text-underline-offset: 3px; }

/* active / selected states are marked with a black line, not a fill */
.nav-item { border-left: 2px solid transparent !important; }
.nav-item:hover { background: #fff !important; border-left-color: #000 !important; }
.nav-item.on { background: #fff !important; border-left: 2px solid #000 !important; font-weight: 700; }
.filter.on, .seg.on { background: #fff !important; border: 2px solid #000 !important; font-weight: 700; }
.recipe-row.is-open, .acct-row:hover, .log-row:hover { background: #fff !important; outline: 1px solid #000; outline-offset: -1px; }

/* chips: outlined labels */
.chip, [class*="chip-"] { background: #fff !important; border: 1px solid #000 !important; color: #000 !important; }
.chip::before { background: #000 !important; }

/* toggles: square, outlined; knob is a black square when on */
.switch { background: #fff !important; border: 1px solid #000 !important; }
.switch::after, .switch .knob, .switch span { background: #000 !important; }
.switch.on, .switch[aria-checked="true"] { background: #fff !important; }

/* bars and meters: black line on white */
.score-bar, .hb-bar, .pip { background: #fff !important; border: 1px solid #000 !important; }
.score-bar span, .hb-bar span, .pip.on, .pip.fill, .pip.is-on { background: #000 !important; background-image: none !important; }
.range::-webkit-slider-runnable-track { background: linear-gradient(90deg, #000 var(--p, 0%), #fff var(--p, 0%)) !important; border: 1px solid #000; height: 6px; }
.range::-moz-range-track { background: #fff !important; border: 1px solid #000; }
.range::-webkit-slider-thumb { background: #fff !important; border: 2px solid #000 !important; }
.range::-moz-range-thumb { background: #fff !important; border: 2px solid #000 !important; }

/* tone helpers → black (errors stay red for safety) */
.tone-green, .tone-amber, .tone-accent, .tone-fg { color: #000 !important; }
.tone-red { color: #c40000 !important; }

/* layout fixes from the owner's screenshot: nothing may spill out of its card */
.card, .acct-card, .stat { overflow: hidden; }
.acct-card > *, .quota { max-width: 100%; min-width: 0; }
.acct-card .row-between, .acct-head { flex-wrap: wrap; }
.kv .k, .acct-card .k { white-space: nowrap; }
.switch .knob { background: #fff !important; border: 1px solid #000 !important; }
.switch.on .knob { background: #000 !important; }
.btn-danger, .btn-danger-soft { background: #fff !important; color: #c40000 !important; border: 1px solid #c40000 !important; }
/* leftovers: tints, light-on-dark text, gradient marks */
.brand-mark { background: #000 !important; background-image: none !important; color: #fff !important; }
.health, .health-green, .health-amber, .health-red { background: #fff !important; border: 1px solid #000 !important; color: #000 !important; }
.health-red { color: #c40000 !important; border-color: #c40000 !important; }
.health-dot { background: currentColor !important; border-radius: 0 !important; animation: none !important; }
.kill-ring, .kill-on .kill-ring, .kill-off .kill-ring { background: #fff !important; animation: none !important; }
.kill-on .kill-core { background: #000 !important; color: #fff !important; }
.kill-off .kill-core { background: #fff !important; color: #c40000 !important; border: 2px solid #c40000 !important; }
.avatar-fallback { background: #fff !important; background-image: none !important; color: #000 !important; border: 1px solid #000 !important; }
.avatar { border: 1px solid #000; }
.banner, .banner-green, .banner-red, .banner-strong, .inline-amber { background: #fff !important; background-image: none !important; color: #000 !important; border: 1px solid #000 !important; }
.banner-red, .banner-strong { border-color: #c40000 !important; }
.banner-strong b, .banner b { color: #000 !important; }
.banner > .icon, .banner-green > .icon { color: #000 !important; }
.banner-red > .icon, .banner-strong > .icon { color: #c40000 !important; }
.lvl-warn .log-msg { color: #000 !important; font-weight: 600; }
.lvl-error .log-msg { color: #c40000 !important; }

/* Clay page in the monochrome theme: white surfaces with black hairlines, black meters, no gradients */
.clay-box-grid > div, .clay-hook, .clay-script, .clay-src, .clay-char, .clay-shot { background: #fff !important; border: var(--line) !important; }
.clay-shot.is-failed { border-color: #c40000 !important; }
.clay-job:hover { background: #fff !important; outline: 1px solid #000; outline-offset: -1px; }
.ctrack i { background: #fff !important; border: 1px solid #000 !important; background-image: none !important; }
.ctrack i.ct-done { background: #000 !important; }
.ctrack i.ct-active { background: repeating-linear-gradient(90deg, #000 0 2px, #fff 2px 4px) !important; animation: none !important; }
.ctrack i.ct-failed { background: #c40000 !important; border-color: #c40000 !important; }
.clay-spend .spend-bar { background: #fff !important; border: 1px solid #000 !important; }
.clay-spend .spend-bar span { background: #000 !important; }
.clay-spend .spend-red span { background: #c40000 !important; }
.clay-sid, .clay-hook .big-n { color: #000 !important; }
.clay-video { background: #000 !important; border: var(--line) !important; }

/* current-reel progress (green by owner request) */
.cur-reel { margin-top: 14px; padding: 12px 14px; border: 1px solid #1a7f37; background: #fff; display: grid; gap: 8px; min-width: 0; }
.cur-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cur-label { color: #1a7f37; font-weight: 700; font-size: 13px; }
.cur-pct { color: #1a7f37; font: 800 15px/1 var(--display); }
.cur-bar { height: 8px; border: 1px solid #1a7f37; background: #fff; }
.cur-bar span { display: block; height: 100%; background: #1a7f37; transition: width 1.2s linear; }
.cur-sub { color: #1a7f37; font-size: 12px; }
.acct-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; min-width: 0; }
.acct-meta > div { min-width: 0; }
.acct-meta .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* transcript queue (per account + Clay page): white, black hairlines, square; green for in-production progress */
.acct-block { display: grid; gap: 6px; min-width: 0; }
.tq { padding: 0; }
.tq-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 16px; background: #fff; border: 0; color: #000;
  font: inherit; text-align: left; cursor: pointer; }
.tq-head:hover .tq-title { text-decoration: underline; text-underline-offset: 3px; }
.tq-title { font-weight: 700; font-size: 14px; }
.tq-body { display: grid; gap: 10px; padding: 12px 16px 16px; border-top: var(--line); min-width: 0; }
.tq-text { min-height: 120px; }
.tq-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tq-warn { color: #000; font-weight: 700; }
.tq-list { display: grid; gap: 6px; }
.tq-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: #fff; border: var(--line); min-width: 0; }
.tq-item.is-live { border-color: #1a7f37; }
.tq-n { width: 18px; padding-top: 3px; font-size: 12px; text-align: right; flex: none; }
.tq-main { display: grid; gap: 4px; flex: 1; min-width: 0; }
.tq-name { font-weight: 600; }
.tq-bar-p { height: 6px; border: 1px solid #1a7f37; background: #fff; }
.tq-bar-p span { display: block; height: 100%; background: #1a7f37; transition: width 1.2s linear; }
.tq-ctl { display: flex; gap: 4px; flex: none; }
.tq-ctl .icon-btn:disabled { opacity: 0.35; cursor: default; text-decoration: none; }
@media (max-width: 760px) {
  .tq-item { flex-wrap: wrap; }
  .tq-ctl { width: 100%; justify-content: flex-end; }
}

/* ideas bank: the screen-number stat gets its own text column (it is a phrase like "42 PEOPLE → 200 PEOPLE", not a rank) */
.recipe-line.idea-line { grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto; align-items: start; gap: 18px; }
.idea-stat { min-width: 0; padding-top: 1px; font: 800 14px/1.3 var(--display); letter-spacing: 0.01em; color: #000;
  overflow-wrap: anywhere; word-break: normal; }
.idea-line .recipe-main, .idea-line .recipe-ctl { min-width: 0; }
.idea-line .recipe-title { overflow-wrap: anywhere; }
.idea-line .recipe-ctl { grid-column: auto; justify-content: flex-end; }
.recipe-detail.idea-detail { padding-left: 216px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .recipe-line.idea-line { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .idea-line .recipe-ctl { grid-column: 1 / -1; justify-content: flex-start; }
  .idea-stat { padding-top: 0; }
  .recipe-detail.idea-detail { padding: 0 14px 16px; }
}

/* overflow pass (2026-10-19): long names/titles may never push content out of a card, at any width */
.acct-row-main, .recipe-main, .tq-main { grid-template-columns: minmax(0, 1fr); }
.acct-row-main .row > .acct-name { min-width: 0; max-width: 100%; }
.tq-name { min-width: 0; max-width: 100%; }
.tq-ctl:empty { display: none; }
.tq-head { flex-wrap: wrap; row-gap: 2px; min-width: 0; }
.tq-head .tq-title { min-width: 0; max-width: calc(100% - 30px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-meta { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.log-acct { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-msg { overflow-wrap: anywhere; }
/* tinted badges left over from the dark theme → outlined */
.set-badge, .unset-badge, .mini, .mini-on, .log-lvl, .lvl-info .log-lvl, .lvl-warn .log-lvl, .lvl-error .log-lvl {
  background: #fff !important; border: 1px solid #000; color: #000 !important; }
.lvl-error .log-lvl { color: #c40000 !important; border-color: #c40000; }
.lvl-warn, .lvl-error { background: #fff !important; }

/* up next (Clay page + clay account cards): white, black 1px lines, square; green only for the reel rendering now */
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.uq-card { padding: 14px 16px 16px; display: grid; gap: 10px; min-width: 0; }
.uq-main-card { margin-bottom: 18px; }
.uq-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.uq-head h2 { font-size: 18px; font-weight: 700; }
.uq { display: grid; gap: 6px; min-width: 0; }
.uq-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: #fff; border: var(--line); min-width: 0; }
.uq-item.is-live { border-color: #1a7f37; }
.uq-n { width: 22px; padding-top: 2px; font-size: 12px; text-align: right; flex: none; }
.uq-main { display: grid; gap: 5px; flex: 1; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.uq-top { min-width: 0; }
.uq-title { font-weight: 600; min-width: 0; max-width: 100%; }
.uq-meta { min-width: 0; row-gap: 4px; }
.uq-meta > * { min-width: 0; max-width: 100%; }
.uq-status { font-weight: 600; color: #000; }
.uq-live { color: #1a7f37; font-weight: 700; }
.uq-bar { height: 6px; border: 1px solid #1a7f37; background: #fff; }
.uq-bar span { display: block; height: 100%; background: #1a7f37; transition: width 1.2s linear; }
.uq-ctl { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.uq-ask { font-weight: 700; }
.uq-all { justify-self: start; padding-top: 2px; color: #000 !important; text-decoration: underline; text-underline-offset: 3px; }
.uq-empty { padding: 4px 0; }
.uq-compact .uq-item { padding: 8px 10px; }
@media (max-width: 760px) {
  .uq-item { flex-wrap: wrap; }
  .uq-ctl { width: 100%; padding-left: 34px; justify-content: flex-start; }
}

/* voices (Clay page panel, per-job / per-transcript voice, re-voice, A/B): white, black 1px lines, square, no shadows;
   green only for success, red only for errors; nothing may overflow at 390 px */
.vl { margin-top: 12px; padding: 14px 16px 16px; display: grid; gap: 10px; min-width: 0; }
.vl-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.vl-head h2 { font-size: 18px; font-weight: 700; }
.vl-list { display: grid; gap: 6px; min-width: 0; }
.vl-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: #fff; border: var(--line); min-width: 0; }
.vl-item.is-default { border-width: 2px; padding: 9px 11px; }
.vl-radio { position: relative; flex: none; width: 18px; height: 18px; margin-top: 2px; cursor: pointer; }
.vl-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.vl-dot { display: block; width: 18px; height: 18px; border: 1px solid #000; background: #fff; }
.vl-radio input:checked + .vl-dot { background: #000; box-shadow: inset 0 0 0 3px #fff !important; }
.vl-radio input:focus-visible + .vl-dot { outline: 2px solid #000; outline-offset: 2px; }
.vl-main { display: grid; gap: 4px; flex: 1; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.vl-title { font-weight: 600; min-width: 0; }
.vl-audio { width: 100%; max-width: 360px; height: 34px; }
.vl-ctl { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.vl-mode { display: inline-flex; border: 1px solid #000; }
.vl-mode-b { height: 30px; padding: 0 10px; font-size: 12.5px; background: #fff; color: #000; }
.vl-mode-b + .vl-mode-b { border-left: 1px solid #000; }
.vl-mode-b.on { background: #000; color: #fff; font-weight: 700; }
.vl-mode-b:hover:not(.on) { text-decoration: underline; text-underline-offset: 3px; }
.vl-fixed { padding: 0 6px; }
.vl-add { display: flex; gap: 8px; min-width: 0; }
.vl-add .input { flex: 1; min-width: 0; }
.vl-foot { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; min-width: 0; }
.vsel { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.vsel-k { font-size: 12px; color: #555; flex: none; }
.vsel-in { height: 30px; min-width: 0; max-width: 240px; padding: 0 8px; font-size: 12.5px; background: #fff; color: #000;
  border: 1px solid #000 !important; appearance: auto; }
.vsel-compact .vsel-in { max-width: 200px; }
.uq-voice { min-width: 0; }
.tq-add { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.rv { display: grid; gap: 8px; padding-top: 10px; border-top: var(--line); min-width: 0; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rv-note { color: #000; font-weight: 600; }
.rv-ok { color: #1a7f37; font-weight: 600; }
.rv-list { display: grid; gap: 4px; }
.rv-item { display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rv-item > * { min-width: 0; overflow-wrap: anywhere; }
.rv-info { padding: 8px 10px; border: var(--line); background: #fff; overflow-wrap: anywhere; }
.rv-warn { margin-top: 4px; color: #000; font-weight: 600; }
.ab { display: flex; border: 1px solid #000; margin-bottom: 8px; min-width: 0; }
.ab-b { flex: 1; min-width: 0; padding: 6px 8px; background: #fff; color: #000; font-size: 12.5px; font-weight: 600; text-align: left;
  display: grid; overflow: hidden; }
.ab-b + .ab-b { border-left: 1px solid #000; }
.ab-b.on { background: #000; color: #fff; }
.ab-v { font-weight: 400; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .vl-item { flex-wrap: wrap; }
  .vl-ctl { width: 100%; padding-left: 30px; justify-content: flex-start; }
  .vl-add { flex-wrap: wrap; }
  .vl-add .input { flex-basis: 100%; }
  .vsel { width: 100%; }
  .vsel-in, .vsel-compact .vsel-in { flex: 1; max-width: none; }
}
/* a long voice name sets a <select>'s min-content width: never let it widen a grid track */
.tq-body, .tq-list, .rv, .vl, .vl-list { grid-template-columns: minmax(0, 1fr); }
.vsel-in { min-width: 0; width: auto; }
.tq-bar > * { min-width: 0; max-width: 100%; }
