/* Heartbeat — dark creative studio UI. No external fonts or scripts (strict CSP). */
:root {
  --bg: #09090b; --bg-2: #0f0f12; --panel: #141417; --panel-2: #1b1b1f; --raise: #232328; --hover: #2a2a30;
  --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.12); --line-3: rgba(255,255,255,.2);
  --text: #f5f5f6; --text-2: #d4d4d8; --muted: #a1a1aa; --faint: #71717a;
  --accent: #ff4f79; --accent-2: #ff6f8f; --accent-ink: #ffffff; --accent-soft: rgba(255,79,121,.12); --accent-ring: rgba(255,79,121,.42);
  --grad: linear-gradient(135deg, #ff3d71 0%, #ff5f66 50%, #ff8a4c 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,61,113,.16), rgba(255,138,76,.08));
  --ok: #4ade80; --ok-soft: rgba(74,222,128,.12); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.12);
  --bad: #f87171; --bad-soft: rgba(248,113,113,.12); --info: #60a5fa; --info-soft: rgba(96,165,250,.12);
  --r: 16px; --r-sm: 11px; --r-xs: 8px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 50px rgba(0,0,0,.45);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --font: "Inter", "SF Pro Text", -apple-system, "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --side: 248px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: rgba(255,79,121,.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h2 { letter-spacing: -.02em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); } .pos { color: var(--ok); } .spacer { flex: 1; }
.eyebrow { font-size: 11px; letter-spacing: .12em; color: var(--muted); font-weight: 650; text-transform: uppercase; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.unstyled { all: unset; cursor: pointer; display: block; }
.unstyled:focus-visible { outline: 2px solid var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.18); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- brand */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo-word { font-weight: 700; font-size: 18px; letter-spacing: -.03em; }
.logo.big .logo-word { font-size: 26px; }
.logo-mark { display: block; flex: none; filter: drop-shadow(0 6px 18px rgba(255,61,113,.35)); }
.logo-pulse { stroke-dasharray: 100; stroke-dashoffset: 0; }
.logo:hover .logo-pulse, .boot .logo-pulse, .login-art .logo-pulse { animation: beat 1.6s var(--ease) infinite; }
@keyframes beat { 0% { stroke-dashoffset: 100; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
/* legacy wordmark class (still used by a few templates) */
.brand { font-weight: 800; letter-spacing: -.04em; font-size: 22px; }

/* ---------- buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease), filter .15s; white-space: nowrap; user-select: none; }
.btn:hover { background: var(--raise); border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -6px rgba(255,61,113,.6), 0 1px 0 rgba(255,255,255,.18) inset; }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px -8px rgba(255,61,113,.75), 0 1px 0 rgba(255,255,255,.2) inset; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover, .btn.ghost.on { background: var(--panel-2); border-color: var(--line-3); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--text); background: var(--panel-2); }
.btn.danger { background: var(--bad-soft); border-color: rgba(248,113,113,.3); color: var(--bad); }
.btn.danger:hover { background: rgba(248,113,113,.2); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.block { width: 100%; }
.btn.big { min-height: 52px; font-size: 15.5px; border-radius: 14px; padding: 0 22px; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; filter: none; }
.btn .icon { width: 17px; height: 17px; }
.btn.sm .icon { width: 15px; height: 15px; }
.btn > span { display: inline-flex; align-items: center; gap: 8px; }
.btn .btn-price { padding: 2px 9px; border-radius: 99px; background: rgba(0,0,0,.2); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: .15s var(--ease); }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm .icon { width: 15px; height: 15px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 550; transition: .15s var(--ease); }
.chip:hover { border-color: var(--line-3); color: var(--text); background: var(--panel-2); }
.chip.on { background: var(--text); border-color: var(--text); color: #0a0a0b; }
.chip .icon { width: 15px; height: 15px; }
.chip-n { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.on .chip-n { color: #52525b; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-2); font-size: 13px; font-weight: 550; }
.link:hover { color: #ff93a8; }
.link .icon { width: 14px; height: 14px; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--muted); background: var(--panel-2); }

/* ---------- inputs */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-height: 42px; padding: 10px 13px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
input:not([type=checkbox]):hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled { opacity: .5; }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--line-3); border-radius: var(--r-sm); background: var(--bg-2); color: var(--muted); font-size: 13px; cursor: pointer; }
input[type=file]::file-selector-button { margin-inline-end: 12px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text); font-weight: 600; cursor: pointer; }
textarea { resize: vertical; line-height: 1.7; }
select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=checkbox] { accent-color: var(--accent); }
/* Native dropdown lists: dark like the rest of the UI (browsers draw these outside the page). */
select { color-scheme: dark; }
select option, select optgroup { background-color: #1b1b1f; color: var(--text); }
select option:checked { background-color: #3a1d27; color: #fff; }
select option:disabled { color: var(--faint); }
.field { display: grid; gap: 8px; align-content: start; }
.field-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.inline { display: flex; align-items: center; gap: 12px; }
.inline-gap { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.seed { max-width: 220px; }

/* segmented choices: big, readable, easy to hit */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; max-width: 100%; }
.seg-opt { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 550; transition: .15s var(--ease); }
.seg-opt:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,.04); }
.seg-opt.on { background: var(--raise); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-2) inset; }
.seg-opt:disabled { opacity: .4; cursor: not-allowed; }
.seg-sub { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.seg-opt.on .seg-sub { color: var(--muted); }
.seg.tall { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; padding: 0; background: none; border: 0; }
.seg.tall .seg-opt { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2); }
.seg.tall .seg-opt .icon { grid-row: span 2; align-self: center; width: 22px; height: 22px; }
.seg.tall .seg-opt.on { background: var(--grad-soft); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.seg.tall .seg-opt.on .icon { color: var(--accent-2); }
.seg.tall .seg-label { font-weight: 650; color: var(--text); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; width: max-content; background: var(--bg-2); }
.stepper button { width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; font-size: 19px; color: var(--text-2); transition: .12s; }
.stepper button:hover { color: var(--text); background: var(--panel-2); }
.stepper button:active { background: var(--raise); }
.stepper-value { min-width: 48px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); user-select: none; min-height: 34px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 40px; height: 23px; border-radius: 99px; background: var(--raise); box-shadow: 0 0 0 1px var(--line-2) inset; position: relative; transition: .2s; flex: none; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #d4d4d8; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: .22s var(--ease); }
.toggle input:checked + .toggle-track { background: var(--grad); box-shadow: none; }
.toggle input:checked + .toggle-track::after { transform: translateX(17px); background: #fff; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge.run { background: var(--info-soft); color: var(--info); }
.badge.wait { background: var(--warn-soft); color: var(--warn); }
.badge.done { background: var(--ok-soft); color: var(--ok); }
.badge.fail { background: var(--bad-soft); color: var(--bad); }
.badge.run::before, .badge.wait::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.tag { border: 1px solid var(--accent-ring); background: var(--accent-soft); color: var(--accent-2); border-radius: 6px; padding: 1px 7px; font: 12px var(--mono); cursor: pointer; }
.tag:hover { border-color: var(--accent); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { color: var(--warn); } .err { color: var(--bad); } .warn { color: var(--warn); font-size: 13px; }
.fine { font-size: 12px; color: var(--faint); line-height: 1.6; }

/* ---------- login */
.login-page { min-height: 100vh; }
.login-wrap { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: center; padding: 7vw; border-right: 1px solid var(--line);
  background: radial-gradient(900px 520px at 15% 20%, rgba(255,61,113,.22), transparent 60%), radial-gradient(700px 500px at 85% 85%, rgba(255,138,76,.16), transparent 60%), var(--bg-2); }
.login-art::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 50%, #000 20%, transparent 75%); pointer-events: none; }
.login-art-inner { position: relative; z-index: 1; max-width: 560px; }
.login-pulse { position: absolute; left: 0; right: 0; bottom: 7%; width: 100%; height: 140px; opacity: .5; z-index: 0; }
.login-pulse path { fill: none; stroke: url(#lp); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; animation: beat 3.2s var(--ease) infinite; }
.login-art h1 { font-size: clamp(34px, 3.8vw, 58px); font-weight: 700; line-height: 1.12; letter-spacing: -.035em; margin: 28px 0 28px; }
.login-art h1 .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--text-2); font-size: 15px; }
.login-points li { display: flex; align-items: center; gap: 12px; }
.login-points li::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 5px var(--accent-soft); margin-inline: 4px 4px; }
.login-side { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(400px, 100%); display: grid; gap: 18px; }
.login-card h2 { font-size: 28px; font-weight: 700; margin-top: 18px; }
.login-card .fine { text-align: center; }
@media (min-width: 981px) { .login-card > .logo { display: none; } .login-card h2 { margin-top: 0; } }
.login-form { display: grid; gap: 16px; }
.login-form .btn { margin-top: 4px; min-height: 48px; font-size: 15px; }
.form-error { color: var(--bad); min-height: 20px; font-size: 13px; }
.login-lang { position: absolute; top: 20px; inset-inline-end: 24px; z-index: 2; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 14px; border-right: 1px solid var(--line); background: #0b0b0e; }
.sidebar > .logo { padding: 2px 10px 22px; }
.nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 11px; color: var(--muted); font-weight: 600; transition: .15s var(--ease); }
.nav-item:hover { color: var(--text); background: var(--panel); }
.nav-item.on { color: var(--text); background: var(--panel-2); box-shadow: 0 0 0 1px var(--line) inset; }
.nav-item.on .icon { color: var(--accent-2); }
.nav-count { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.wallet-card { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--grad-soft), var(--panel); border: 1px solid rgba(255,79,121,.22); }
.wallet-card .eyebrow { font-size: 10.5px; }
.wallet-amount { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wallet-card.low .wallet-amount { color: var(--bad); }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
.nav-user-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.nav-user-text strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-text small { color: var(--muted); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; flex: none; font-size: 14px; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 32px;
  background: rgba(9,9,11,.78); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.topbar .logo { display: none; }
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; color: var(--muted); cursor: help; border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.balance { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; font-variant-numeric: tabular-nums; transition: .15s; }
.balance:hover { border-color: var(--line-3); background: var(--panel-2); }
.balance .icon { color: var(--accent-2); width: 16px; height: 16px; }
.balance.low { border-color: rgba(248,113,113,.5); color: var(--bad); }
.view { padding: 28px 32px 72px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- panels, kpis, tables */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 16px; align-content: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 16px; }
.panel-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.two-col > *, .stack > *, .panel > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.kpi.accent { background: var(--grad-soft), var(--panel); border-color: rgba(255,79,121,.28); }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
.kpi-top .icon { width: 16px; height: 16px; }
.kpi.accent .kpi-top .icon { color: var(--accent-2); }
.kpi-value { font-size: 28px; font-weight: 700; margin: 8px 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.kpi-sub { font-size: 12px; color: var(--faint); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--faint); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255,255,255,.018); }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 10px 12px; }
.table.compact td:first-child, .table td.num { white-space: nowrap; }
.table th.num, .table td.num { text-align: right; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 18px; }
.table-scroll { overflow-x: auto; }
tr.inactive { opacity: .5; }
.who { display: flex; align-items: center; gap: 10px; }
.who > div { display: grid; line-height: 1.35; gap: 2px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { margin-left: 6px; }
.perm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.perm-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); color: var(--faint); text-decoration: line-through; }
.perm-item.on { color: var(--text-2); text-decoration: none; }
.perm-item .icon { width: 12px; height: 12px; }
.perm-item.on .icon { color: var(--ok); }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }
.chart { display: grid; gap: 8px; }
.bars { display: flex; align-items: flex-end; gap: 3px; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: linear-gradient(180deg, #ff6a6a, rgba(255,61,113,.35)); border-radius: 4px 4px 1px 1px; min-height: 1px; opacity: .85; transition: opacity .15s; }
.bar:hover .bar-fill { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.tabs-line { margin-bottom: 22px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.action-list { display: grid; gap: 8px; }
.action { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; transition: .15s; }
.action:hover { border-color: var(--line-3); background: var(--raise); }
.action > .icon { color: var(--accent-2); }
.action div { display: grid; }
.action.danger, .action.danger > .icon { color: var(--bad); }
.stack { display: grid; gap: 20px; align-content: start; }
.stack-sm { display: grid; gap: 14px; }

/* ---------- empty, skeleton, toast, modal */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 64px 20px; color: var(--muted); grid-column: 1 / -1; border: 1px dashed var(--line-2); border-radius: var(--r); background: radial-gradient(400px 200px at 50% 0, rgba(255,79,121,.07), transparent 70%); }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-2); border: 1px solid rgba(255,79,121,.2); margin-bottom: 4px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h3 { color: var(--text); font-size: 17px; }
.empty p { max-width: 360px; font-size: 13.5px; }
.empty .btn { margin-top: 8px; }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton.asset { aspect-ratio: 3/4; } .skeleton.thumb { aspect-ratio: 1; } .skeleton.row { height: 100px; margin-bottom: 10px; } .skeleton.card { height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 14px; background: rgba(32,32,37,.96); backdrop-filter: blur(10px); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform: translateY(10px) scale(.98); opacity: 0; transition: .28s var(--ease); font-size: 13.5px; }
.toast.in { transform: none; opacity: 1; }
.toast .icon { margin-top: 2px; color: var(--accent-2); }
.toast.success .icon { color: var(--ok); } .toast.error { border-color: rgba(248,113,113,.4); } .toast.error .icon { color: var(--bad); }
dialog.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog.modal[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog.modal.wide { width: min(1080px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px 24px; }
.modal-head h3 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 4px 24px 22px; display: grid; gap: 16px; overflow: auto; max-height: calc(100vh - 200px); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); background: rgba(0,0,0,.18); border-radius: 0 0 20px 20px; }
.viewer { display: grid; place-items: center; background: #050506; border-radius: 14px; min-height: 300px; overflow: hidden; }
.viewer-media { max-width: 100%; max-height: calc(100vh - 270px); display: block; }
.viewer-audio { width: 100%; margin: 40px; }
.viewer-note { margin: 8px 2px 0; font-size: 12px; color: var(--muted, #8b8b93); text-align: center; }

/* ---------- studio */
.mode-bar { margin-bottom: 22px; }
.seg.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 10px; padding: 0; background: none; border: 0; }
.seg.modes .seg-opt { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; text-align: left; align-items: center; min-width: 0; white-space: normal; padding: 14px 16px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.seg.modes .seg-opt:hover { background: var(--panel-2); border-color: var(--line-2); }
.seg.modes .seg-opt .icon { grid-row: span 2; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--panel-2); color: var(--text-2); box-sizing: border-box; }
.seg.modes .seg-label { font-weight: 650; font-size: 14.5px; line-height: 1.3; color: var(--text); }
.seg.modes .seg-sub { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seg.modes .seg-opt.on { background: var(--grad-soft), var(--panel); border-color: transparent; box-shadow: 0 0 0 1.5px var(--accent) inset; }
.seg.modes .seg-opt.on .icon { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(255,61,113,.7); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 24px; align-items: start; }
.composer { display: grid; gap: 16px; min-width: 0; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 18px; scroll-margin-top: 90px; transition: box-shadow .3s; }
.step.flash { box-shadow: 0 0 0 2px var(--accent); }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-head h3 { font-size: 16px; }
.step-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--raise); color: var(--text-2); }
.step.done .step-n { background: var(--grad); color: #fff; }
.prompt-wrap { border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2); transition: border-color .15s, box-shadow .15s; }
.prompt-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.prompt { border: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; min-height: 150px; font-size: 15px; padding: 16px 18px !important; }
.prompt-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 12px 10px 16px; }
.count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.more { border-top: 1px solid var(--line); padding-top: 14px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 30px; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--text); }
.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; }
.more[open] summary::before { content: '−'; }
.more-body { display: grid; gap: 18px; margin-top: 14px; }
.tip { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.tip strong { color: var(--accent-2); margin: 0 3px; }

.slot { position: relative; border: 1.5px dashed var(--line-3); border-radius: 16px; background: var(--bg-2); min-height: 230px; display: grid; transition: .18s var(--ease); overflow: hidden; min-width: 0; cursor: default; }
.slot:hover, .slot.drag { border-color: var(--accent); background: radial-gradient(300px 160px at 50% 30%, rgba(255,79,121,.08), transparent 70%), var(--bg-2); }
.slot.drag { box-shadow: 0 0 0 4px var(--accent-soft); }
.slot.filled { border-style: solid; border-color: var(--line-2); grid-template-columns: 200px 1fr; min-height: 0; }
.slot-empty { display: grid; justify-items: center; align-content: center; gap: 8px; padding: 28px 16px; text-align: center; }
.slot-empty strong { font-size: 15px; }
.slot-empty em { color: var(--faint); font-style: normal; font-weight: 500; }
.slot-empty small { color: var(--muted); max-width: 300px; line-height: 1.5; }
.slot-plus { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-2); border: 1px solid rgba(255,79,121,.22); margin-bottom: 2px; }
.slot-buttons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.slot-media { background: #050506; display: grid; place-items: center; }
.slot-media .thumb { width: 100%; height: 250px; object-fit: contain; }
.slot-meta { display: grid; align-content: start; gap: 4px; padding: 18px; min-width: 0; }
.slot-label { font-size: 12px; color: var(--accent-2); font-weight: 650; }
.slot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.slot-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; align-items: center; }
.slot-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.slot-pair .slot.filled { grid-template-columns: 1fr; }
.slot-pair .slot.filled .slot-media .thumb { height: 230px; }
.slot-pair .slot.filled .slot-meta { padding: 12px 14px 56px; }
.pair-arrow { align-self: center; color: var(--faint); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--panel-2); }
.pair-arrow .icon { width: 16px; height: 16px; }

.ref-group { display: grid; gap: 10px; }
.ref-head { display: flex; justify-content: space-between; align-items: baseline; }
.ref-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ref-item { position: relative; width: 116px; display: grid; gap: 6px; justify-items: start; }
.ref-thumb { width: 116px; height: 116px; border-radius: 12px; overflow: hidden; background: #050506; border: 1px solid var(--line-2); }
.ref-thumb .thumb { width: 100%; height: 100%; object-fit: cover; }
.ref-x { position: absolute; top: 6px; right: 6px; background: rgba(9,9,11,.8); color: var(--text); backdrop-filter: blur(6px); }
.ref-add { width: 116px; height: 116px; border-radius: 12px; border: 1.5px dashed var(--line-3); background: transparent; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; font-weight: 600; transition: .15s; }
.ref-add:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

.studio-side { position: sticky; top: 88px; display: grid; gap: 16px; }
.summary { background: radial-gradient(420px 180px at 100% 0, rgba(255,79,121,.14), transparent 70%), var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.sum-head { display: flex; justify-content: space-between; align-items: center; }
.sum-kind { font-size: 12px; color: var(--text-2); font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.sum-price { font-size: 42px; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.sum-lines { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sum-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.sum-lines b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; text-align: end; }
.sum-lines .neg b { color: var(--bad); }
.todo { list-style: none; margin: 0; padding: 12px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.todo-title { font-size: 12px; font-weight: 650; color: var(--text-2); }
.todo li { display: flex; align-items: center; gap: 8px; }
.todo button { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; color: var(--text-2); }
.todo button:hover { background: var(--panel-2); color: var(--text); }
.todo button:focus-visible { outline: 2px solid var(--accent); }
.todo .icon { width: 15px; height: 15px; color: var(--warn); }
.todo button .go { margin-inline-start: auto; width: 14px; height: 14px; color: var(--faint); }
.sum-shortcut { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--faint); }
.sum-topup { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.recent { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
.recent-head { display: flex; justify-content: space-between; align-items: center; }
.recent-list { display: grid; gap: 10px; max-height: 560px; overflow: auto; margin-right: -6px; padding-right: 6px; }
.job-mini { display: grid; grid-template-columns: 68px 1fr; gap: 12px; padding: 10px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s; }
.job-mini:hover { border-color: var(--line-2); }
.job-mini-thumb { width: 68px; height: 68px; border-radius: 10px; overflow: hidden; background: #050506; display: grid; place-items: center; }
.job-mini-thumb .thumb { width: 68px; height: 68px; object-fit: cover; }
.job-mini-state { color: var(--faint); }
.job-mini-body { min-width: 0; display: grid; gap: 3px; }
.job-mini-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.job-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.job-mini .chip { height: 28px; font-size: 12px; padding: 0 10px; }
/* sticky generate bar for narrow screens */
.gen-dock { display: none; }

/* ---------- picker */
.picker-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; min-height: 160px; }
.picker-item { display: grid; gap: 6px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: pointer; text-align: left; transition: .15s; }
.picker-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.picker-item .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #050506; }
.picker-name { font-size: 12px; padding: 0 9px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.audio-thumb { display: grid; place-items: center; color: var(--accent-2); aspect-ratio: 1; background: var(--panel-2); }

/* ---------- library */
.lib-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.lib-left, .lib-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.space-select { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding-left: 12px; background: var(--panel); }
.space-select .icon { color: var(--accent-2); width: 16px; height: 16px; }
.space-select select { border: 0 !important; background-color: transparent !important; min-height: 36px; box-shadow: none !important; }
.space-select select:focus-visible { outline: none; }
.space-select:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 99px; padding-left: 13px; background: var(--bg-2); transition: .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .icon { color: var(--faint); width: 16px; height: 16px; }
.search input { border: 0 !important; min-height: 36px !important; background: transparent !important; box-shadow: none !important; width: 200px; padding-left: 0 !important; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.view-library.drag .lib-grid { outline: 2px dashed var(--accent); outline-offset: 8px; border-radius: 14px; }
.asset { position: relative; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: .2s var(--ease); }
.asset:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(0,0,0,.7); }
.asset.on { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.asset-media { position: relative; background: #050506; }
.asset-media .thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.asset:hover .asset-media .thumb { transform: scale(1.03); }
.kind-badge { position: absolute; left: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(9,9,11,.72); backdrop-filter: blur(6px); color: var(--text); }
.kind-badge .icon { width: 14px; height: 14px; }
.card-check { position: absolute; top: 10px; left: 10px; width: 28px; height: 28px; border-radius: 9px; border: 1.5px solid rgba(255,255,255,.6); background: rgba(9,9,11,.45); backdrop-filter: blur(6px); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: .15s; color: transparent; }
.asset:hover .card-check, .asset.on .card-check, .card-check:focus-visible { opacity: 1; }
.asset.on .card-check { background: var(--grad); border-color: transparent; color: #fff; }
.card-check .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.asset-quick { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: .18s var(--ease); }
.asset:hover .asset-quick, .asset:focus-within .asset-quick { opacity: 1; transform: none; }
.quick-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; border: 0; background: rgba(9,9,11,.75); backdrop-filter: blur(8px); color: #fff; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.quick-btn:hover { background: var(--accent); }
.quick-btn .icon { width: 15px; height: 15px; }
.quick-btn.only { width: 32px; padding: 0; justify-content: center; }
.asset-meta { display: grid; padding: 11px 13px; gap: 1px; }
.asset-name { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-actions { padding: 0 12px 12px; }
.sel-bar { position: fixed; left: calc(50% + var(--side) / 2); bottom: 26px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px;
  border-radius: 16px; background: rgba(32,32,37,.96); backdrop-filter: blur(12px); border: 1px solid var(--line-2); box-shadow: var(--shadow); min-width: 460px; }

/* ---------- jobs */
.jobs-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.job-stats { display: flex; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.job-stats span { padding: 6px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.job-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.job-day { display: grid; gap: 10px; margin-bottom: 26px; }
.job-day h4 { font-size: 12px; color: var(--faint); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.job-row { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s; }
.job-row:hover { border-color: var(--line-2); }
.job-thumbs { display: flex; gap: 6px; }
.job-thumbs .thumb, .job-ph { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; background: #050506; display: grid; place-items: center; color: var(--faint); }
.job-main { min-width: 0; display: grid; gap: 5px; }
.job-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-prompt-wrap { position: relative; min-width: 0; }
.job-prompt { display: block; max-width: 100%; text-align: start; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: copy; }
.job-prompt:hover { color: var(--text); }
.job-prompt-pop { display: none; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(560px, 80vw); padding: 10px 12px 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-3); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.job-prompt-wrap:hover .job-prompt-pop, .job-prompt-wrap:focus-within .job-prompt-pop { display: block; }
.job-prompt-pop::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }   /* keeps hover while moving into the popover */
.job-prompt-pop-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.job-prompt-pop-head .icon { width: 13px; height: 13px; }
.job-prompt-full { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.55; color: var(--text); user-select: text; }
@media (hover: none) { .job-prompt-wrap:hover .job-prompt-pop { display: none; } }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.pager-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-n { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.pager-n:hover { border-color: var(--line-3); color: var(--text); }
.pager-n.on { background: var(--text); border-color: var(--text); color: #0a0a0b; font-weight: 650; }
.pager-size { display: flex; align-items: center; gap: 8px; }
.pager-size select { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12.5px; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta .icon { width: 13px; height: 13px; }
.job-meta b { color: var(--text); }
.job-actions { display: flex; gap: 8px; }

/* ---------- language picker */
.lang-select { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding-inline-start: 11px; background: var(--bg-2); color: var(--muted); }
.lang-select { transition: border-color .15s, box-shadow .15s; }
.lang-select:hover { border-color: var(--line-3); }
.lang-select:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lang-select select:focus, .lang-select select:focus-visible { outline: none; }
.lang-select .icon { width: 16px; height: 16px; }
.lang-select select { border: 0 !important; min-height: 36px !important; background-color: transparent !important; box-shadow: none !important; color: var(--text); }
.lang-select.compact { width: 100%; }
.lang-select.compact select { min-height: 34px !important; font-size: 13px; }

/* ---------- eligibility: age / region / rules, real-person consent */
.onboard-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 16px; position: relative;
  background: radial-gradient(700px 400px at 50% 0, rgba(255,61,113,.12), transparent 70%); }
.onboard-card { width: min(500px, 100%); display: grid; gap: 14px; padding: 32px 30px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); }
.onboard-card h2 { margin: 2px 0 0; font-size: 22px; font-weight: 700; }
.onboard-card p { margin: 0; line-height: 1.6; }
.onboard-card .btn.ghost.block { margin-top: -4px; }
.onboard-steps { display: flex; gap: 6px; }
.onboard-steps span { height: 6px; width: 34px; border-radius: 99px; background: var(--raise); font-size: 0; color: transparent; }
.onboard-steps span.on { background: var(--grad); }
.onboard-steps span.done { background: var(--accent-ring); }
.onboard-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.onboard-icon.refused { background: var(--bad-soft); color: var(--bad); }
.onboard-icon .icon { width: 26px; height: 26px; }
.rules-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 9px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.rules-list li::marker { color: var(--accent-2); font-weight: 700; }
.onboard-card .rules-list { max-height: 42vh; overflow: auto; padding: 14px 14px 14px 34px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.check-line { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--text); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); transition: .15s; }
.check-line:hover { border-color: var(--line-3); }
.check-line:has(input:checked) { border-color: var(--accent-ring); background: var(--accent-soft); }
.check-line input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.consent-head { display: flex; gap: 12px; align-items: flex-start; }
.consent-head .icon { flex: none; width: 22px; height: 22px; color: var(--accent-2); margin-top: 2px; }
.consent-head p { margin: 0; line-height: 1.6; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 420px; overflow: auto; padding: 2px; }
.region-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13.5px; transition: .15s; }
.region-item:hover { border-color: var(--line-2); }
.region-item.on { border-color: var(--accent-ring); background: var(--accent-soft); }
.region-item input { accent-color: var(--accent); flex: none; }
.region-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-item small { font-family: var(--mono); }

/* ---------- payments */
.steps-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; color: var(--text-2); font-size: 13px; }
.steps-list li::marker { color: var(--accent-2); font-weight: 700; }
.pay-info { display: grid; gap: 12px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; }
.pay-row { display: grid; gap: 4px; }
.pay-address { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 6px 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.pay-address code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13.5px/1.5 var(--mono); color: var(--text); }
.pay-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--warn); line-height: 1.5; }
.pay-warn .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.txid { display: flex; align-items: center; gap: 4px; }
.txid code { font: 12.5px var(--mono); }
.method-rows { display: grid; gap: 10px; }
.method-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.method-row .wide { grid-column: 1 / 3; }
.method-row .icon-btn { grid-row: 1; grid-column: 3; }
.pay-amount { display: flex; align-items: center; gap: 10px; }
.pay-amount b { font: 750 34px/1.1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pay-amount span { color: var(--text-2); font-weight: 650; }
.pay-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.pay-state { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); font-weight: 550; }
.pay-state .icon { width: 18px; height: 18px; }
.pay-state.ok { color: var(--ok); } .pay-state.warn { color: var(--warn); }
.pay-timer { font-variant-numeric: tabular-nums; color: var(--text); }
.net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.net-opt { display: grid; gap: 3px; justify-items: start; text-align: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer; transition: .15s; }
.net-opt:hover { border-color: var(--line-3); background: var(--panel-2); }
.net-opt.on { border-color: transparent; background: var(--grad-soft), var(--bg-2); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.net-opt strong { font-size: 13.5px; }
.net-opt .badge { margin-top: 4px; }

/* ---------- responsive */
@media (max-width: 1240px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .seg.modes .seg-sub { -webkit-line-clamp: 1; }
}
@media (max-width: 1100px) {
  :root { --side: 84px; }
  .sidebar { padding: 18px 10px 12px; align-items: center; }
  .sidebar > .logo { padding: 0 0 18px; }
  .sidebar > .logo .logo-word, .nav-item span:not(.nav-count), .sidebar-foot .lang-select, .wallet-card, .nav-user-text { display: none; }
  .nav-item { justify-content: center; padding: 0; width: 52px; height: 48px; position: relative; }
  .nav-count { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 4px; }
  .nav-user { flex-direction: column; border: 0; padding: 0; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { position: static; }
  .summary .gen-main { display: none; }
  .gen-dock { position: fixed; z-index: 25; left: var(--side); right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
    background: rgba(12,12,15,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); }
  .gen-dock .dock-price { display: grid; line-height: 1.2; }
  .gen-dock .dock-price b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .gen-dock .dock-price small { color: var(--muted); font-size: 12px; }
  .gen-dock .btn { margin-inline-start: auto; min-width: 200px; }
  .view-studio { padding-bottom: 120px; }
  .sel-bar { left: calc(50% + var(--side) / 2); }
}
@media (max-width: 980px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .seg.modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row3 { grid-template-columns: 1fr 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: auto 0 0 0; height: auto; z-index: 30; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); flex-direction: row; border-right: 0; border-top: 1px solid var(--line-2); background: rgba(11,11,14,.96); backdrop-filter: blur(14px); }
  .sidebar > .logo, .sidebar-foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .nav-item { flex-direction: column; gap: 2px; width: auto; height: 54px; font-size: 11px; justify-content: center; text-align: center; }
  .nav-item span:not(.nav-count) { display: block; }
  .nav-item.on { box-shadow: none; background: transparent; color: var(--text); }
  .nav-count { top: 2px; right: auto; inset-inline-start: calc(50% + 6px); }
  .topbar { padding: 10px 16px; min-height: 58px; }
  .topbar .logo { display: inline-flex; }
  .topbar .logo .logo-word { display: none; }
  .topbar .page-title { margin-inline-end: auto; font-size: 17px; }
  .status { display: none; }
  .view { padding: 18px 14px 150px; }
  .row2, .row3, .kpis { grid-template-columns: 1fr; }
  .seg.modes { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .seg.modes::-webkit-scrollbar { display: none; }
  .seg.modes .seg-opt { flex: none; width: 140px; grid-template-columns: 1fr; justify-items: start; row-gap: 8px; padding: 12px; }
  .seg.modes .seg-opt .icon { grid-row: auto; width: 34px; height: 34px; padding: 8px; }
  .seg.modes .seg-label { font-size: 13.5px; }
  .seg.modes .seg-sub { display: none; }
  .step { padding: 18px 16px; border-radius: 16px; }
  .seg.tall { grid-template-columns: 1fr; }
  .slot.filled { grid-template-columns: 1fr; }
  .slot-pair { grid-template-columns: 1fr; }
  .pair-arrow { justify-self: center; transform: rotate(90deg); }
  .gen-dock { left: 0; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 10px 14px; }
  .gen-dock .btn { min-width: 0; flex: 1; max-width: 240px; min-height: 46px; }
  .view-studio { padding-bottom: 200px; }
  .lib-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lib-bar { gap: 10px; }
  .card-check, .asset-quick { opacity: 1; transform: none; }
  .quick-btn span { display: none; }
  .quick-btn { width: 32px; padding: 0; justify-content: center; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .job-row { grid-template-columns: auto 1fr; }
  .job-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .sel-bar { min-width: 0; left: 12px; right: 12px; transform: none; bottom: 84px; flex-wrap: wrap; }
  #toasts { bottom: 86px; right: 12px; left: 12px; max-width: none; }
  .row-actions .btn.ghost { display: none; }
  .panel { padding: 18px 16px; }
  .method-row { grid-template-columns: 1fr auto; }
  .method-row .wide, .method-row input { grid-column: 1; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
}
@media (max-width: 520px) { .onboard-card { padding: 26px 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- right-to-left (Arabic) */
[dir=rtl] .logo, [dir=rtl] .boot-mark { direction: ltr; unicode-bidi: isolate; }
[dir=rtl] body { font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, var(--font); }
[dir=rtl] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
[dir=rtl] .login-art { border-right: 0; border-left: 1px solid var(--line); }
[dir=rtl] .table th, [dir=rtl] .table td { text-align: right; }
[dir=rtl] .table th.num, [dir=rtl] .table td.num { text-align: left; }
[dir=rtl] .table-wrap .table th:first-child, [dir=rtl] .table-wrap .table td:first-child { padding-left: 12px; padding-right: 18px; }
[dir=rtl] select { background-position: 13px 19px, 18px 19px; padding-right: 13px; padding-left: 34px; }
[dir=rtl] .slot-actions { right: auto; left: 12px; }
[dir=rtl] .ref-x { right: auto; left: 6px; }
[dir=rtl] .card-check { left: auto; right: 10px; }
[dir=rtl] .asset-quick { right: auto; left: 10px; }
[dir=rtl] .kind-badge { left: auto; right: 10px; }
[dir=rtl] #toasts { right: auto; left: 22px; }
[dir=rtl] .icon-arrow-flip, [dir=rtl] .link .icon, [dir=rtl] .pair-arrow .icon, [dir=rtl] .todo .go { transform: scaleX(-1); }
[dir=rtl] .seg.tall .seg-opt, [dir=rtl] .seg.modes .seg-opt, [dir=rtl] .action { text-align: right; }
[dir=rtl] .rules { padding-left: 0; padding-right: 18px; }
[dir=rtl] .row-actions { text-align: left; }
[dir=rtl] .row-actions > * { margin-left: 0; margin-right: 6px; }
[dir=rtl] .onboard-card .rules-list { padding: 14px 34px 14px 14px; }
[dir=rtl] .tag, [dir=rtl] input[type=number], [dir=rtl] .sum-price, [dir=rtl] .kpi-value, [dir=rtl] .balance, [dir=rtl] .wallet-amount, [dir=rtl] .dock-price b { direction: ltr; unicode-bidi: isolate; }
[dir=rtl] .sel-bar { left: auto; right: calc(50% + var(--side) / 2); transform: translateX(50%); }
[dir=rtl] .gen-dock { left: 0; right: var(--side); }
@media (max-width: 760px) { [dir=rtl] #toasts { left: 12px; right: 12px; } [dir=rtl] .sidebar { border-left: 0; } [dir=rtl] .gen-dock { right: 0; } [dir=rtl] .sel-bar { left: 12px; right: 12px; transform: none; } }

/* ---------- payer screening */
.risk-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.risk-badges .badge .icon { width: 12px; height: 12px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); }
.alert > .icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.alert p { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.alert.bad { border-color: rgba(248,113,113,.45); background: var(--bad-soft); }
.alert.bad > .icon, .alert.bad strong { color: var(--bad); }

/* ---------- admin reports */
.report-head .panel-head { align-items: flex-start; }
.report-range { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.report-dates { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.report-dates .field { margin: 0; min-width: 150px; }
.report-downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.report-checks { margin: 4px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.alert.warn { border-color: rgba(251,191,36,.4); background: var(--warn-soft); font-size: inherit; color: inherit; }
.alert.warn > .icon, .alert.warn strong { color: var(--warn); }
.alert.good { border-color: rgba(74,222,128,.35); background: var(--ok-soft); }
.alert.good > .icon, .alert.good strong { color: var(--ok); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.tx-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; }
.tx-link:hover { color: var(--accent); }
.tx-link .icon { width: 13px; height: 13px; }
.report-table td { vertical-align: top; }
@media (max-width: 760px) { .report-range { align-items: stretch; } .report-dates .field { min-width: 0; flex: 1; } }

/* ---------- points, batch price, referral programme */
.block { display: block; }
li.pos { color: var(--ok); } li.warn { color: var(--warn); }
.sub-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 8px; }
.addr-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.addr-line code { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; color: var(--text-2); }
.rent-card { margin-bottom: 12px; }
.rent-card .alert { display: block; }
.report-gpu-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.report-gpu-totals > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.report-gpu-totals b { font-size: 18px; font-variant-numeric: tabular-nums; }

.tier-bronze { --tier: #d08a5b; } .tier-silver { --tier: #c4ccd6; } .tier-gold { --tier: #f5c84c; } .tier-diamond { --tier: #8fd3ff; }
.ref-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: center; margin-bottom: 20px;
  background: var(--grad-soft), var(--panel); border-color: rgba(255,79,121,.22); }
.ref-tier { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ref-tier > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ref-tier-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--tier) 16%, transparent); color: var(--tier); border: 1px solid color-mix(in srgb, var(--tier) 40%, transparent); }
.ref-tier-icon .icon { width: 28px; height: 28px; }
.ref-tier-name { font-size: 22px; letter-spacing: -.01em; color: var(--tier); }
.ref-share { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ref-code-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ref-code-row code { font-family: var(--mono); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-xs); padding: 7px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ref-code { font-size: 17px; letter-spacing: .14em; font-weight: 650; }
.ref-link { font-size: 12.5px; }
.ref-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ref-progress { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ref-bar-row { display: flex; flex-direction: column; gap: 6px; }
.ref-bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.ref-bar-label b { color: var(--text); font-variant-numeric: tabular-nums; }
.ref-bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.ref-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .4s var(--ease); }
.ref-tiers tr.on td { background: var(--accent-soft); }
.ref-tiers tr.on td:first-child { font-weight: 650; }
.ref-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tier); margin-inline-end: 8px; vertical-align: middle; }
.ref-tier-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--tier); font-weight: 600; }
.ref-tier-chip .icon { width: 15px; height: 15px; }
.ref-people { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.ref-people li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-xs); }
.ref-people li:hover { background: var(--panel-2); }
@media (max-width: 980px) { .ref-hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .ref-code-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ref-code-row .eyebrow { grid-column: 1 / -1; }
  .report-gpu-totals { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- AI prompt optimizer */
.prompt-box { display: grid; gap: 10px; }
.foot-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.enhance-btn { background: var(--grad-soft); border: 1px solid var(--accent-ring); color: var(--text); gap: 6px; }
.enhance-btn:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.enhance-btn .icon { color: var(--accent-2); }
.enhance-free { margin-left: 2px; padding: 1px 6px; border-radius: 99px; font-size: 10.5px; font-weight: 700; line-height: 1.5; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #f43f5e, #f97316); }
.enhance-card { border: 1px solid var(--accent-ring); border-radius: 14px; background: var(--panel); padding: 12px 14px; display: grid; gap: 10px; }
.enhance-card.loading { border-style: dashed; }
.enhance-card.enhance-error { border-color: var(--bad); background: var(--bad-soft); }
.enhance-error p { color: var(--text); margin: 0; }
.enhance-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.enhance-head > .icon { color: var(--accent-2); flex: none; }
.enhance-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enhance-head .icon-btn { margin-left: auto; }
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shot { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.shot-time { font-family: var(--mono); font-size: 12px; color: var(--accent-2); padding-top: 2px; white-space: nowrap; }
.shot-text { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0; overflow-wrap: anywhere; }
.enhance-notes { margin: 0; padding-left: 18px; color: var(--warn); font-size: 13px; }
.enhance-full summary, .enhance-applied summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.enhance-full pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; font-size: 12px; line-height: 1.5; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0 0; color: var(--text-2); }
.enhance-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.enhance-applied { border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); padding: 6px 10px; }
.enhance-applied summary { display: flex; align-items: center; gap: 8px; list-style: none; color: var(--ok); }
.enhance-applied summary::-webkit-details-marker { display: none; }
.enhance-applied .shots { margin-top: 8px; }
@media (max-width: 560px) {
  .shot { grid-template-columns: 1fr; gap: 2px; }
  .enhance-actions .btn { flex: 1 1 auto; }
}
.tpl-edit { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; min-height: 420px; white-space: pre; overflow: auto; tab-size: 2; }
