/* Ecliptic Automation Tool: one dark design for every page. Colours come from the logo. */
:root {
  --bg: #08090f;
  --panel: #11131e;
  --panel-2: #171a28;
  --line: #22263a;
  --line-2: #2f3450;
  --text: #eceef6;
  --muted: #8a90a8;
  --label: #c5c9dc;
  --accent: #5b4cf0;
  --accent-soft: #b4abff;
  --accent-2: #0ea5fd;
  --accent-text: #ffffff;
  --ok: #34d399;
  --run: #60a5fa;
  --fail: #f87171;
  --warn: #fbbf24;
  --orange: #fb923c;
  --pending: #6b7089;
  --radius: 16px;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar: 236px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #a99cff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 30px; font-weight: 750; margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; }
/* Section labels: small caps label on the left, a hint on the right (as in the new-production design). */
.section-head h2, .card > h2 { font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--label); }
h3 { font-size: 13px; font-weight: 650; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* --- Shell: sidebar + content --- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 12px;
  background: var(--panel); border-right: 1px solid var(--line);
  transition: transform .2s;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-weight: 700; line-height: 1.15; font-size: 14px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: var(--muted); font-weight: 550;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: #fff; }
.nav a.active svg { color: #a99cff; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 0; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 700; color: #fff;
}
.who strong { display: block; font-size: 13px; }
.who span { font-size: 12px; color: var(--muted); }
.content { flex: 1; min-width: 0; margin-left: var(--sidebar); }
.topbar { display: none; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 28px 60px; }
main.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 8px 0 0; font-size: 15px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-soft); font-size: 12.5px; font-weight: 600;
}
.eyebrow svg { width: 14px; height: 14px; }
.eyebrow + h1 { display: block; }
h1#title { font-size: 25px; }
td.num { font-family: var(--mono); font-size: 13px; }
.scrim { display: none; }

/* --- Cards, sections --- */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 70%, var(--panel)), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
a.card { display: block; color: var(--text); }
a.card:hover { text-decoration: none; border-color: var(--line-2); background: var(--panel-2); }
a.card.running-card { display: grid; }
form .actions { margin-top: 22px; }
code { font: 12.5px ui-monospace, Consolas, monospace; background: var(--panel-2); padding: 1px 5px; border-radius: 5px; }
.queue { margin-bottom: 14px; padding: 11px 18px; }
.card + .card, .section + .section { margin-top: 18px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; align-items: start; }
.grid > .card + .card { margin-top: 0; }
.grid.stats { align-items: stretch; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.stat .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat.ok .value { color: var(--ok); }
.stat.run .value { color: var(--run); }
.stat.fail .value { color: var(--fail); }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.meter > div { height: 100%; background: var(--accent-2); width: 0; }
.meter.low > div { background: var(--warn); }
/* Disk used (dashboard): green under 70%, orange 70–90%, red above 90%. */
.meter.used.roomy > div { background: var(--ok); }
.meter.used.filling > div { background: var(--orange); }
.meter.used.full > div { background: var(--fail); }

/* --- Forms --- */
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 13.5px; }
input, select, textarea {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px;
}
/* Fields the browser filled in keep the panel's colours (not the browser's blue-grey). */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 40px var(--bg) inset; transition: background-color 9999s;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choices label {
  display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 550;
  padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; background: var(--bg);
}
.choices label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.choices input { width: auto; accent-color: var(--accent); }
.key-row { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.key-row .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-row input { flex: 1 1 260px; min-width: 0; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px; font-weight: 450; cursor: pointer; }
.check-row input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.ai-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); }
.ai-chip strong { color: var(--text); font-weight: 650; }
.field-error { color: var(--fail); font-size: 13px; margin-top: 6px; }
.field-error:empty { display: none; }
button svg, .button svg { width: 16px; height: 16px; flex: none; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }

/* --- Buttons --- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  color: var(--accent-text); background: var(--accent); border: 1px solid transparent; border-radius: 9px;
}
button:hover, .button:hover { filter: brightness(1.1); text-decoration: none; }
button.secondary, .button.secondary { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
button.danger, .button.danger { background: transparent; color: var(--fail); border-color: color-mix(in srgb, var(--fail) 45%, transparent); }
button.danger:hover { background: color-mix(in srgb, var(--fail) 12%, transparent); }
button.small, .button.small { padding: 5px 10px; font-size: 12.5px; }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 8px; }
button:disabled { opacity: .5; cursor: default; filter: none; }
.message { margin-top: 14px; padding: 10px 12px; border-radius: 9px; display: none; }
.message.show { display: block; }
.message.error { background: color-mix(in srgb, var(--fail) 12%, transparent); color: var(--fail); }
.load-error { border-color: color-mix(in srgb, var(--fail) 45%, transparent); }
.load-error h2 { color: var(--fail); }
.load-error .mono { word-break: break-word; }
.message.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.secret { font-family: ui-monospace, Consolas, monospace; user-select: all; font-weight: 700; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tr.link { cursor: pointer; }
tr.link:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
tr.total td { font-weight: 700; border-top: 2px solid var(--line-2); }
td.num, th.num { text-align: right; white-space: nowrap; }
.cell-title { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.cell-title img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }
.cell-title div { min-width: 0; }
.cell-title strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }

/* --- Badges, dots, progress --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: color-mix(in srgb, var(--pending) 22%, transparent); color: #b7bbcc; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.running { background: color-mix(in srgb, var(--run) 15%, transparent); color: var(--run); }
.badge.failed { background: color-mix(in srgb, var(--fail) 15%, transparent); color: var(--fail); }
.badge.queued { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .4s; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .progress { margin-top: 6px; height: 5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pending); margin-top: 5px; justify-self: center; }
.dot.done { background: var(--ok); }
.dot.running { background: var(--run); animation: pulse 1.2s infinite; }
.dot.failed { background: var(--fail); }
@keyframes pulse { 50% { opacity: .35; } }
.steps .detail { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.steps .error { color: var(--fail); font-size: 12.5px; overflow-wrap: anywhere; }

/* --- Facts, media --- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.thumb { width: 100%; border-radius: 9px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); display: block; }
video.player { display: block; width: 100%; border-radius: 9px; background: #000; aspect-ratio: 16 / 9; }
audio.player { display: block; width: 100%; margin-bottom: 14px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.compare figure { margin: 0; }
.compare figcaption { color: var(--muted); font-size: 12.5px; margin-top: 7px; text-align: center; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.meta-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.meta-block:first-child { padding-top: 0; }
.meta-block:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-title { font-size: 17px; font-weight: 650; margin: 8px 0 0; }
.meta-text { white-space: pre-wrap; margin: 8px 0 0; color: #cfd2e0; }
.script-text { max-height: 60vh; overflow-y: auto; padding-right: 10px; font-size: 15.5px; line-height: 1.7; color: #d6d9e6; }
.script-text p { margin: 0 0 1em; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-height: 7.5em; overflow: hidden; color: var(--muted); }
.description.open { max-height: none; }
.link-button { background: none; border: 0; color: #a99cff; padding: 6px 0 0; font-weight: 600; }
details.tech > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
details.tech > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.tech[open] > summary::before { transform: rotate(90deg); }
details.tech .tech-body { margin-top: 16px; display: grid; gap: 18px; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
pre.names, .prompt-text { white-space: pre-wrap; font: 12.5px/1.55 ui-monospace, Consolas, monospace; color: var(--muted); margin: 8px 0 0; max-height: 420px; overflow: auto; }
ul.checks { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12.5px; }
ul.checks li { padding: 3px 0; }
ul.checks li.pass { color: var(--muted); }
ul.checks li.fail { color: var(--fail); font-weight: 600; }

/* --- Dashboard --- */
.running-card { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.running-card .progress { margin: 10px 0 6px; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); display: block; }
.tile .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile .title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.tile .actions { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.estimate { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.estimate .facts { gap: 5px 16px; }
.key-ok { color: var(--ok); font-weight: 600; }
.key-missing { color: var(--warn); font-weight: 600; }

/* --- Form design (new production; reused by the other pages) --- */
.form-card { padding: 26px 28px 22px; border-radius: 18px; }
.field + .field { margin-top: 26px; }
.field-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.field-head .caps, .caps { margin: 0; font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--label); }
.field-head .aside { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.input-wrap {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px;
}
.input-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.input-wrap input { border: 0; background: transparent; padding: 8px 0; font-size: 15px; outline: none; min-width: 0; }
.input-wrap input:focus { outline: none; }
.input-wrap .suffix { font: 13px var(--mono); color: var(--muted); padding-right: 10px; }
.input-wrap input[type=number] { font-family: var(--mono); }
.input-wrap button { flex: none; }
.preview {
  display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.preview img { width: 80px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.preview .info { min-width: 0; flex: 1; }
.preview strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.preview .ready { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; }
.preview .ready svg { width: 14px; height: 14px; }
.preview.error { border-color: color-mix(in srgb, var(--fail) 45%, transparent); background: color-mix(in srgb, var(--fail) 8%, transparent); color: var(--fail); }
.preview.loading { color: var(--muted); }
.toggle-group.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .toggle-group.four { grid-template-columns: 1fr 1fr; } }
.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.toggle {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 14px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px;
}
.toggle input[type=radio], .toggle input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.toggle:hover { color: var(--text); }
.toggle:has(input:checked) { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: color-mix(in srgb, var(--accent) 75%, transparent); color: #fff; }
.toggle:has(input:focus-visible) { outline: 2px solid var(--accent-soft); }
.toggle.center { justify-content: center; }
.toggle svg { width: 17px; height: 17px; }
.toggle .code { font-size: 12px; font-weight: 750; color: var(--muted); }
.toggle .box { margin-left: auto; font-size: 11.5px; font-weight: 750; padding: 3px 7px; border-radius: 6px; background: var(--line); color: var(--muted); }
.toggle:has(input:checked) .box { background: color-mix(in srgb, var(--accent) 40%, transparent); color: #ddd8ff; }
.toggle.disabled { opacity: .5; cursor: not-allowed; }
.toggle .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.pill.free { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.soon { background: var(--line); color: var(--muted); }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.chip {
  padding: 5px 12px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--label); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--accent); filter: none; }
.chip.active { border-color: color-mix(in srgb, var(--accent) 80%, transparent); background: color-mix(in srgb, var(--accent) 18%, transparent); color: #d8d2ff; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-dot.online { color: var(--ok); }
.status-dot.busy { color: var(--run); }
.status-dot.offline { color: var(--orange); }
.field .hint { margin-top: 9px; }
.estimate-card { margin-top: 26px; padding: 18px 20px; border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 60%, var(--bg)); border: 1px solid var(--line); }
.estimate-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.estimate-head svg { width: 16px; height: 16px; color: var(--accent-soft); }
.estimate-head .aside { margin-left: auto; color: var(--muted); font-size: 12px; }
.est-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--label); font-size: 13.5px; }
.est-row svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.est-row .v { margin-left: auto; font: 13.5px var(--mono); color: var(--text); text-align: right; }
.est-row .v.strong { font-family: inherit; font-weight: 700; }
.est-row .v.free { font-family: inherit; color: var(--ok); font-weight: 600; }
.est-row .v.warn { font-family: inherit; color: var(--orange); font-weight: 600; }
.est-total { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.est-total small { display: block; color: var(--muted); font-size: 11.5px; }
.est-total .sum { margin-left: auto; font: 700 16px var(--mono); white-space: nowrap; }
.est-total .usd { color: var(--accent-soft); }
.est-total .cr { color: var(--warn); }
.est-total .plus { color: var(--muted); font-weight: 400; }
.btn-xl { width: 100%; margin-top: 26px; padding: 14px; font-size: 16px; border-radius: 12px; box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-xl svg { width: 19px; height: 19px; }
.foot-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.foot-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pending); }

/* --- Sidebar details --- */
.brand-name { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.version { font: 600 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; color: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.nav a { padding: 10px 12px; border: 1px solid transparent; }
.nav a.active { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.nav-count { margin-left: auto; font: 600 12px var(--mono); color: var(--muted); }
.nav-count:empty { display: none; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 11px; font-size: 15px; }
.avatar .online { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.who strong { font-size: 14px; }
.who span { font-family: var(--mono); font-size: 11.5px; }
button.logout { width: 100%; padding: 9px; border-radius: 10px; background: transparent; }

/* --- Dashboard --- */
.dash-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head .title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-head p { margin: 6px 0 0; color: var(--muted); }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.status-badge.warn { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, transparent); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.status-badge.error { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 40%, transparent); background: color-mix(in srgb, var(--fail) 10%, transparent); }
.search-box { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); padding: 0 12px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search-box input { border: 0; background: transparent; padding: 9px 0; }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.glow { box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 40%, transparent); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat .label.plain { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--label); font-weight: 600; }
.icon-sq { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.icon-sq svg { width: 16px; height: 16px; }
.tint-accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-soft); }
.tint-amber { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.tint-blue { background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: #7cc8ff; }
.tint-green { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tint-red { background: color-mix(in srgb, var(--fail) 15%, transparent); color: var(--fail); }
.stat .value { font-family: var(--mono); font-size: 30px; margin-top: 12px; }
.stat .value small { font: 600 12px inherit; color: var(--muted); margin-left: 4px; }
.stat .sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stat .sub svg { width: 13px; height: 13px; }
.stat .sub .hl { color: var(--accent-soft); font-weight: 700; font-family: var(--mono); }
.stat .sub.good { color: var(--ok); }
.stat .sub .split { margin-left: auto; }
.stat .meter { margin-top: 14px; }
.section-head .ico { display: inline-grid; color: var(--accent-soft); }
.section-head a { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.section-head a svg { width: 14px; height: 14px; }
.search-box > span { display: inline-grid; }
.section-head .ico svg { width: 15px; height: 15px; }
.section-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 34px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.empty-state .icon-sq { width: 48px; height: 48px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.empty-state .icon-sq svg { width: 24px; height: 24px; }
.empty-state strong { font-size: 15px; margin-top: 6px; }
.empty-state p { margin: 0; color: var(--muted); max-width: 380px; }
.empty-state .button { margin-top: 8px; }
.run-card { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.run-card .progress { margin: 12px 0 8px; }
.cost-card .value { font-size: 26px; }
.tag-pill { font: 700 10.5px var(--mono); padding: 2px 7px; border-radius: 5px; }
.cost-card.total { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cost-card.total .value { color: var(--accent-soft); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.seg button.on { background: color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.pcard:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); }
.pcard .media { position: relative; }
.pcard .media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--line); }
.pcard .over { position: absolute; inset: 10px 10px auto 10px; display: flex; gap: 6px; align-items: center; }
.pcard .over .date { margin-left: auto; font: 600 11px var(--mono); padding: 3px 7px; border-radius: 6px; background: rgb(0 0 0 / .65); color: #e4e6f0; }
.pcard .over .badge { background: rgb(8 9 15 / .78); }
.lang { font: 700 11px var(--mono); padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 55%, rgb(8 9 15 / .7)); color: #fff; }
.lang.de { background: color-mix(in srgb, var(--warn) 50%, rgb(8 9 15 / .7)); }
.lang.es { background: color-mix(in srgb, var(--orange) 55%, rgb(8 9 15 / .7)); }
.lang.en { background: color-mix(in srgb, var(--run) 50%, rgb(8 9 15 / .7)); }
.pcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { color: var(--muted); font-size: 12.5px; }

/* --- Users & Permissions --- */
main.wide { max-width: 1400px; }
.mono { font-family: var(--mono); }
.strong { font-weight: 700; }
.nowrap { flex-wrap: nowrap; }
.row.end { justify-content: flex-end; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumb-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; color: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.crumb-pill svg { width: 13px; height: 13px; }
.dash-head p strong { color: var(--label); }
.grid.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat .value.green { color: var(--ok); }
.stat .value.purple { color: var(--accent-soft); }
.stat .value.text { font-family: inherit; font-size: 24px; }
.stat .value.blue { color: #6cc4ff; }
.stat .value.orange { color: var(--orange); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.warn { color: #fdd59b; background: color-mix(in srgb, var(--orange) 10%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); }
.notice.info { color: #cfe3ff; background: color-mix(in srgb, var(--run) 9%, transparent); border: 1px solid color-mix(in srgb, var(--run) 35%, transparent); }
.team-grid { display: grid; grid-template-columns: minmax(340px, 2fr) 3fr; gap: 20px; align-items: start; margin-top: 20px; }
.team-grid > .card { margin-top: 0; }
.card-head + .field { margin-top: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.card-head .icon-sq { width: 38px; height: 38px; border-radius: 11px; }
.card-head .icon-sq svg { width: 19px; height: 19px; }
.caps-plain { margin: 0; font-weight: 650; font-size: 13.5px; color: var(--text); }
.req { color: var(--fail); }
.input-wrap .ico svg, .input-wrap > span svg { width: 16px; height: 16px; color: var(--muted); }
.input-wrap .ico { display: inline-grid; }
.hint.bad { color: var(--fail); }
.hint.good { color: var(--ok); }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 14px 40px 14px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; font-weight: 500; }
.role-card input { position: absolute; top: 15px; right: 14px; width: 16px; height: 16px; accent-color: var(--accent); }
.role-card:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 80%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.role-title { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--accent-soft); }
.role-title svg { width: 16px; height: 16px; }
.role-text { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.cred-box { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.cred-box svg { width: 16px; height: 16px; color: var(--accent-soft); }
.cred-box p { margin: 8px 0 0; }
.btn-xl.gradient { background: linear-gradient(90deg, var(--accent), #8b5cf6); }
.password-box { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); display: grid; gap: 10px; }
.password-box code { font-size: 16px; color: var(--ok); background: transparent; padding: 0; }
.count-pill { font: 700 11.5px var(--mono); padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--label); }
.card-head .search-box { width: min(260px, 100%); }
.team-table th { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.team-table td { padding: 12px 10px; }
.team-table tr.dim td { opacity: .55; }
.avatar-sq { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; flex: none; }
.role-badge { display: inline-flex; align-items: center; gap: 5px; font: 700 11.5px var(--mono); padding: 3px 9px; border-radius: 7px; }
.role-badge svg { width: 12px; height: 12px; }
.role-badge.admin { color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.role-badge.user { color: #7cc8ff; background: color-mix(in srgb, var(--accent-2) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent); }
.icon-btn { padding: 6px 8px; }
.icon-btn svg { width: 15px; height: 15px; }
.team-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.team-foot svg { width: 15px; height: 15px; }
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: 1fr; }
  .grid.stats.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .role-cards { grid-template-columns: 1fr; } }

/* --- Account & render PC --- */
.tiny { font-size: 11px; }
.green { color: var(--ok); }
.blue { color: #6cc4ff; }
.warn-text { color: var(--orange); }
.block { display: block; }
.status-badge.busy { color: var(--run); border-color: color-mix(in srgb, var(--run) 40%, transparent); background: color-mix(in srgb, var(--run) 10%, transparent); }
.head-status { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.head-status .muted { display: inline-flex; align-items: center; gap: 6px; }
.head-status svg { width: 14px; height: 14px; color: var(--accent-soft); }
.account-grid { display: grid; grid-template-columns: minmax(360px, 2fr) 3fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.stack > .card + .card, .account-grid > div > .card { margin-top: 0; }
.avatar.big { width: 52px; height: 52px; border-radius: 14px; font-size: 21px; margin-right: 4px; color: #fff; }
.profile-name { font-size: 17px; }
.tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.info-tile { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; }
.info-tile svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--accent-soft); }
.eye { color: var(--muted); }
.eye.on { color: var(--accent-soft); }
.strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.strength-bars span { height: 4px; border-radius: 4px; background: var(--line-2); }
.strength-bars span.on.level-1, .strength-bars span.on.level-0 { background: var(--fail); }
.strength-bars span.on.level-2 { background: var(--orange); }
.strength-bars span.on.level-3 { background: var(--warn); }
.strength-bars span.on.level-4 { background: var(--ok); }
.aside.level-1 { color: var(--fail); } .aside.level-2 { color: var(--orange); } .aside.level-3 { color: var(--warn); } .aside.level-4 { color: var(--ok); }
.rules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rules li::before { content: "○"; margin-right: 7px; }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { content: "●"; }
#pw-note { margin: 22px 0 0; color: var(--label); }
#pw-note svg { color: var(--warn); }
.sessions-head { margin-bottom: 12px; }
.logout-others { width: 100%; margin-bottom: 10px; }
.ico-inline { display: inline-grid; color: var(--accent-soft); }
.ico-inline svg { width: 16px; height: 16px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.session-row + .session-row { margin-top: 8px; }
.render-pc .card-head h2 { font-size: 15px; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.spec-card { padding: 16px; border-radius: 13px; background: color-mix(in srgb, var(--panel-2) 50%, var(--bg)); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.spec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.spec-title svg { width: 16px; height: 16px; color: var(--accent-soft); }
.spec-main { font-weight: 700; font-size: 13.5px; }
.spec-sub { font-size: 11.5px; color: var(--muted); }
.spec-meter { margin-top: 10px; }
.spec-meter .meter { margin-top: 6px; }
.meter.cpu > div { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.meter.vram > div { background: linear-gradient(90deg, var(--warn), var(--ok)); }
.meter.ram > div { background: linear-gradient(90deg, var(--accent-2), #6366f1); }
.meter.disk > div { background: linear-gradient(90deg, #6366f1, #a855f7); }
.spec-section { margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.runtime-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.runtime-card { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.runtime-card > div { overflow-wrap: anywhere; }
.drives-head { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.drive-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.drive-row + .drive-row { margin-top: 8px; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; background: var(--pending); }
.dot-s.on { background: var(--ok); }
code.command { flex: 1; min-width: 0; font-size: 12.5px; color: var(--label); background: var(--bg); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.user-cell { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: var(--text); font-weight: 400; text-align: left; white-space: normal; }
.user-cell:hover .mono { color: var(--accent-soft); text-decoration: underline; }
.worker-state { font-size: 12.5px; color: var(--muted); }
.worker-state.online { color: var(--ok); font-weight: 600; }
.worker-state.offline { color: var(--orange); }
dialog.worker-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 18px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); }
dialog.worker-dialog::backdrop { background: rgb(0 0 0 / .6); }
.dialog-head { margin-bottom: 12px; }
@media (max-width: 1100px) {
  .account-grid { grid-template-columns: 1fr; }
  .runtime-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .spec-grid, .tile-row, .rules { grid-template-columns: 1fr; }
  .head-status { align-items: flex-start; }
}

/* --- Production page --- */
.production-page h1 { font-size: 24px; margin: 8px 0 20px; }
.yt-title { display: block; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.prod-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.prod-top .crumbs { margin: 0; font-size: 14px; }
.prod-top .crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-soft); }
.prod-top .crumbs svg { width: 15px; height: 15px; }
.id-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--label); }
.id-pill svg { width: 13px; height: 13px; }
.badges { gap: 10px; }
.badges .lang { font-size: 12px; padding: 3px 10px; }
.grid.stats.five { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat.mini { padding: 14px 16px; }
.stat.mini .label { font-size: 12.5px; }
.stat.mini .value { font-size: 15px; margin-top: 6px; }
.stat.mini .sub { margin-top: 4px; }
.stat.mini.accent { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.stat.mini.green .value { color: var(--ok); }
.stat.mini.warn .value { color: var(--orange); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; border: 1px solid transparent; color: var(--label); font-weight: 600; padding: 9px 14px; border-radius: 11px; }
.tabs button.on { color: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tabs .num, .num-pill { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 11px var(--mono); background: var(--line-2); color: var(--label); }
.tabs button.on .num, .num-pill { background: color-mix(in srgb, var(--accent) 35%, transparent); color: #ddd8ff; }
.num-pill { border-radius: 6px; }
.tab-panel { padding: 26px 28px; border-radius: 18px; }
.time-box { padding: 10px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.time-box strong { color: var(--ok); font-size: 16px; }
.time-box .tiny { color: var(--accent-soft); letter-spacing: .06em; }
.completion { margin: 20px 0 8px; }
.progress.gradient { height: 7px; }
.progress.gradient > div { background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--ok)); }
.progress.thin { height: 4px; margin-top: 6px; max-width: 420px; }
.step-list { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.step-row { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: 0; }
.step-row .dot { margin: 0; }
.step-row.failed { background: color-mix(in srgb, var(--fail) 7%, transparent); }
.step-body { display: grid; gap: 4px; min-width: 0; }
.step-body > div { overflow-wrap: anywhere; }
.step-body button { justify-self: start; margin-top: 4px; }
.step-error { display: flex; gap: 6px; align-items: flex-start; color: var(--fail); font-size: 13px; }
.step-error svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.tab-panel details.tech { margin-top: 18px; }
.meta-field { margin-top: 18px; }
.meta-box { margin-top: 8px; padding: 13px 16px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.meta-box.title { font-weight: 700; font-size: 15px; }
.meta-box.desc p { margin: 0 0 10px; color: #cfd2e0; }
.meta-box.desc p:last-child { margin: 0; }
.meta-box.tags, .meta-box.desc .meta-tags { font: 13px var(--mono); color: #8fb6ff; }
.meta-field > .row { flex-wrap: wrap; gap: 8px; }
.meta-original { margin-top: 6px; }
.meta-original > div { margin-top: 4px; padding: 8px 12px; border-left: 2px solid var(--line-2); }
.meta-original p { margin: 0 0 6px; }
.sub-head { margin: 22px 0 10px; gap: 10px; }
.sub-head .caps { font-size: 13px; }
.script-box { max-height: 340px; overflow-y: auto; padding: 18px 22px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font: 15.5px/1.65 Georgia, "Times New Roman", serif; color: #dfe2ee; }
.script-box p { margin: 0 0 1em; }
.voice-section { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.player-card { padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 40%, var(--bg)); display: grid; gap: 14px; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 8px 10px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.wave span { flex: 1; min-width: 2px; border-radius: 3px; background: var(--line-2); }
.wave span.played { background: linear-gradient(180deg, #8b7dff, var(--accent)); }
.player-controls { gap: 10px; }
.play-btn { width: 46px; height: 46px; border-radius: 12px; padding: 0; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.play-btn svg { width: 20px; height: 20px; }
.player-controls .ghost svg { width: 18px; height: 18px; }
.volume-box { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--line-2); }
.volume-box svg { width: 16px; height: 16px; color: var(--muted); }
.volume { width: 90px; padding: 0; accent-color: var(--accent); }
.downloads .button { gap: 6px; }
.muted-in { color: rgb(255 255 255 / .55); font-weight: 500; }
.labeled { position: relative; }
.img-label { position: absolute; top: 10px; left: 10px; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgb(0 0 0 / .72); }
.img-label.amber, .ico-inline.amber { color: var(--warn); }
.img-label.green { color: var(--ok); }
.prompt-card { margin-top: 18px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.prompt-card .prompt-text { margin-top: 12px; padding: 12px 16px; border-left: 3px solid var(--warn); border-radius: 8px; background: var(--panel); color: var(--label); max-height: 320px; }
@media (max-width: 1200px) { .grid.stats.five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .grid.stats.five { grid-template-columns: 1fr 1fr; }
  .step-row { grid-template-columns: 14px 1fr; }
  .step-row > .mono, .step-row > .badge { grid-column: 2; justify-self: start; }
  .tab-panel { padding: 18px 16px; }
}

/* --- Batch (new production) --- */
main#main:not(.narrow) { max-width: 1400px; }
.batch-table { margin-top: 16px; }
.batch-table th { white-space: nowrap; }
.batch-table td { vertical-align: top; padding: 10px 6px; }
.batch-table input, .batch-table select { padding: 7px 9px; font-size: 13.5px; }
.batch-table td:nth-child(2) { min-width: 150px; }
.batch-table td.link-cell { min-width: 280px; width: 34%; }
.batch-table td:nth-child(5) input { width: 110px; }
.batch-table tr.bad input.mono, .batch-table input.bad { border-color: var(--fail); }
.row-preview { margin-top: 6px; min-height: 20px; }
.mini-preview { display: flex; align-items: center; gap: 8px; }
.mini-preview img { width: 56px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; flex: none; }
.mini-preview span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.when-group .toggle { gap: 8px; flex-wrap: wrap; }
.when-group .toggle svg { width: 16px; height: 16px; }
.when-at { width: 210px; padding: 5px 8px; font-size: 13px; color-scheme: dark; }
.when-at:disabled { opacity: .45; }
.paste-dialog { width: min(640px, calc(100vw - 32px)); }
.paste-dialog textarea { width: 100%; resize: vertical; font-size: 13px; }

/* --- Queue page --- */
.lane { display: grid; gap: 12px; align-content: start; }
.lane-title { display: flex; align-items: baseline; gap: 10px; }
.lane-body { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.lane-body > div { display: grid; gap: 8px; min-width: 0; }
.lane-name { display: block; overflow-wrap: anywhere; }
.lane-msg { overflow-wrap: anywhere; }
.empty-lane p { margin: 0; }
.queue-list { list-style: none; margin: 0; padding: 0; }
.queue-row { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-bottom: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.queue-row:last-child { border-bottom: 0; }
.queue-row[draggable="true"] { cursor: grab; }
.queue-row.moving { opacity: .5; outline: 2px dashed var(--accent); }
.grip { width: 18px; color: var(--muted); display: inline-grid; flex: none; }
.grip svg { width: 18px; height: 18px; }
.pos { width: 34px; color: var(--muted); flex: none; }
.q-thumb { width: 84px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }
.q-main { flex: 1; min-width: 180px; }
.q-name { font-weight: 650; color: var(--text); }
.q-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.q-len { width: 92px; text-align: right; flex: none; }
.q-user { width: 80px; flex: none; color: var(--label); }
.q-start { width: 150px; flex: none; }
.q-actions { gap: 6px; flex: none; }
.hidden-row { color: var(--muted); }
@media (max-width: 1000px) {
  .queue-row { flex-wrap: wrap; }
  .q-len, .q-user, .q-start { width: auto; }
  .lane-body { grid-template-columns: 1fr; }
}

/* --- Toasts --- */
/* Notifications (notify.js): four types, each with its colour and icon. */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(390px, calc(100vw - 36px)); }
.toast {
  --tone: var(--run);
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--line-2)); border-left: 4px solid var(--tone);
  box-shadow: 0 10px 30px rgb(0 0 0 / .45); animation: toast-in .2s ease-out;
}
.toast.success, .bell-item.success { --tone: var(--ok); }
.toast.error, .bell-item.error { --tone: var(--fail); }
.toast.warning, .bell-item.warning { --tone: var(--orange); }
.toast.info, .bell-item.info { --tone: var(--run); }
.toast-icon { flex: none; width: 22px; height: 22px; color: var(--tone); }
.toast-icon svg { width: 22px; height: 22px; }
.toast-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.toast-body strong { color: var(--text); }
.toast-text { color: var(--label); font-size: 13px; overflow-wrap: anywhere; }
.toast-link { font-weight: 600; font-size: 13px; color: var(--tone); }
.toast-close { flex: none; background: none; border: 0; color: var(--muted); padding: 2px 4px; cursor: pointer; font-size: 13px; }
.toast-close:hover { color: var(--text); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.bell { position: relative; padding: 7px; margin-top: 2px; border-radius: 10px; color: var(--label); }
.bell svg { width: 20px; height: 20px; display: block; }
.bell-badge { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--fail); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
.bell-badge[hidden] { display: none; }
.bell-panel { position: fixed; z-index: 70; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 640px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 40px rgb(0 0 0 / .5); }
.bell-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.bell-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.bell-item button { white-space: normal; width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; background: none; border: 0; border-radius: 10px; padding: 9px 10px; color: var(--text); cursor: pointer; font: inherit; }
.bell-item button:hover { background: var(--panel-2); }
.bell-item.unread button { background: color-mix(in srgb, var(--tone) 9%, transparent); }
.bell-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.bell-text span { color: var(--label); overflow-wrap: anywhere; }
.bell-text small { color: var(--muted); font-size: 11.5px; }
.bell-item:not(.unread) .bell-text strong { font-weight: 550; color: var(--label); }
.unread-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--tone); }
.bell-empty { padding: 18px 14px; margin: 0; }

/* --- Login --- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1000px 500px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.login { width: 100%; max-width: 380px; }
.login .logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; text-align: center; }
.login .logo img { width: 72px; height: 72px; }
.login .logo h1 { font-size: 20px; }
.login button[type=submit] { width: 100%; padding: 10px; justify-content: center; }
.login-page { position: relative; padding-bottom: 64px; }
.login-card label:first-child { margin-top: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-field .eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--muted); }
.password-field .eye:hover { color: var(--text); background: var(--panel-2); filter: none; }
.password-field .eye svg { width: 18px; height: 18px; }
.password-field .eye .eye-off { display: none; }
.password-field .eye.on .eye-off { display: inline; }
.caps-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }
.caps-hint::before { content: "⇪ "; }
.login .actions { margin-top: 20px; }
.login .create-account { width: 100%; margin-top: 10px; padding: 10px; justify-content: center; }
.login button .spinner { display: none; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.login button.loading .spinner { display: inline-block; }
.login button:disabled { cursor: progress; opacity: .8; }
.login-card.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(4px); } 45%, 55% { transform: translateX(-6px); } }
@media (prefers-reduced-motion: reduce) { .login-card.shake { animation: none; } }
.login-version { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--pending); }
.login-footer { position: absolute; left: 0; right: 0; bottom: 18px; padding: 0 16px; text-align: center; font-size: 12px; color: var(--pending); }
.sidebar-foot .legal { margin: 12px 2px 0; font-size: 10.5px; line-height: 1.45; color: var(--pending); }

/* --- Laptop / phone --- */
@media (max-width: 1100px) {
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .5); }
  .content { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10;
    padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .topbar img { width: 26px; height: 26px; }
  .topbar strong { font-size: 14px; }
  main { padding: 20px 16px 50px; }
  .grid.two, .running-card, .run-card, .compare { grid-template-columns: 1fr; }
  .search-box { width: 100%; }
  .hide-small { display: none; }
  .cell-title { min-width: 0; }
  .cell-title img { width: 64px; }
}
@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .grid.stats { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 21px; }
  .page-head .button, .page-head button { flex: 1; }
}
.step-history { margin-top: 4px; }
.step-history ol { margin: 4px 0 0 18px; padding: 0; display: grid; gap: 2px; }
.step-error details { margin-top: 4px; }
.notify-type { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 2px 10px; border-left: 3px solid var(--tone, var(--line-2)); margin-bottom: 6px; }
.notify-type .check-row { margin: 0; }
.notify-type.success { --tone: var(--ok); } .notify-type.error { --tone: var(--fail); } .notify-type.warning { --tone: var(--orange); } .notify-type.info { --tone: var(--run); }
.parallel-pill { margin-left: 8px; font-size: 11px; font-weight: 600; vertical-align: middle; }
/* Deleting productions: Select / Clean up… above the list, the select-mode toolbar, the row
   checkboxes (select mode only) and the dialogs. */
.list-tools, .select-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.select-bar { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--fail) 5%, transparent); }
th.pick, td.pick { width: 34px; text-align: center; }
td.pick input, th.pick input { width: auto; accent-color: var(--accent); }
tr.picked td { background: color-mix(in srgb, var(--fail) 7%, transparent); }
tr.unpickable { opacity: .55; cursor: not-allowed; }
.delete-dialog { max-width: 540px; width: calc(100vw - 32px); color: var(--text); }
.delete-dialog::backdrop { background: rgb(0 0 0 / .6); }
.delete-list { margin: 8px 0; padding-left: 18px; display: grid; gap: 3px; }
.cleanup-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.cleanup-row label { margin: 0; font-weight: 500; }
.cleanup-row .days { width: 78px; }
.cleanup-row select, .cleanup-row input { width: auto; margin: 0; }
.cleanup-count { margin: 10px 0 4px; }

/* --- Discord integration (Account, Settings) --- */
.discord-conn .facts { font-size: 13px; }
.discord-conn details { margin-top: 4px; }
.discord-conn details .row { display: flex; gap: 8px; flex-wrap: wrap; }
.discord-app { margin: 4px 0 8px; }
.discord-app h3 .small { text-transform: none; letter-spacing: 0; }
.steps-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.redirect-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.redirect-row code { background: var(--soft, rgba(127,127,127,.12)); padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; }

/* Settings and Account: two columns where each card keeps its own height, so a short card moves up
   under the one above it (no empty gaps); the same gap between all cards and the same padding inside.
   One column on narrow screens. */
.masonry { --card-gap: 20px; columns: 2; column-gap: var(--card-gap); }
.masonry > * { break-inside: avoid; margin: 0 0 var(--card-gap); }
.masonry > .card, .masonry > * > .card { padding: 20px 22px; border-radius: var(--radius); }
.masonry > * > .card, .masonry > .card + .card { margin: 0; }
.masonry > .card + .card { margin-bottom: var(--card-gap); }
@media (max-width: 980px) { .masonry { columns: 1; } }
/* API keys: [key] [Save] [Test connection] [Remove] on one line. */
.key-row .row.key-line { flex-wrap: nowrap; }
.key-row .row.key-line input { flex: 1 1 auto; min-width: 120px; }
.key-row .row.key-line button { white-space: nowrap; flex: none; }
@media (max-width: 560px) { .key-row .row.key-line { flex-wrap: wrap; } }

/* Render PCs: the Dashboard alert (offline while productions wait) and the Render PC log (Settings). */
.notice.error { color: #fecaca; background: color-mix(in srgb, var(--fail) 10%, transparent); border: 1px solid color-mix(in srgb, var(--fail) 45%, transparent); }
.worker-alert { display: block; line-height: 1.55; }
.worker-alert a { color: inherit; text-decoration: underline; }
.log-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; }
.log-row { display: grid; grid-template-columns: max-content max-content 1fr; gap: 10px; align-items: baseline; }
.log-row .badge { font-size: 11px; }
.log-pre { max-height: 280px; overflow: auto; white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 8px 0 0; }

/* Needs review (a paid request with an unknown outcome), paid requests, older renders, kept productions. */
.badge.needs-review { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.step-row.needs-review .dot { background: var(--orange); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.request-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.request-row { display: grid; grid-template-columns: max-content 1fr max-content; gap: 10px; align-items: baseline; }
.stale-render { width: 100%; align-items: center; }
.stale-render .small { margin-left: 6px; }
button.kept { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.kept-pill { margin-left: 6px; font-size: 11px; vertical-align: middle; }
.retention-line { line-height: 1.55; }
.dot.needs-review { background: var(--orange); }
.budget-grid { display: grid; grid-template-columns: max-content 1fr 1fr; gap: 8px 10px; align-items: center; margin: 4px 0 8px; }
.budget-grid input { margin: 0; }

/* --- My Rendering Computer (Gemini design, real data) --- */
.icon-only { padding: 8px; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-flex; animation: spin 1.2s linear infinite; }
.spin svg { width: 15px; height: 15px; }
.mc-head { align-items: flex-end; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.crumbs { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs span { margin: 0 6px; opacity: .6; }
.crumbs b { color: var(--accent-soft); font-weight: 500; }
#computer { max-width: 960px; margin: 0 auto; }
.mc-hero { padding: 32px; background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), var(--panel); }
.mc-hero h2 { font-size: 24px; margin: 16px 0 10px; }
.mc-hero p { max-width: 640px; line-height: 1.6; }
.mc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mc-chip svg { width: 14px; height: 14px; }
.mc-hero-actions { margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.mc-req { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.mc-req svg { width: 15px; height: 15px; color: var(--ok); }
.mc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.mc-steps .card { margin-top: 0; }
.mc-step { display: flex; flex-direction: column; gap: 6px; }
.mc-step-n { font-size: 20px; font-weight: 700; color: color-mix(in srgb, var(--accent) 45%, var(--panel)); }
.mc-step p { margin: 0; line-height: 1.55; }
.mc-pair-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mc-pair-text { flex: 1; min-width: 200px; }
.mc-code { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 18px; font-weight: 700; letter-spacing: .14em; color: var(--text); }
.mc-code.expired { color: var(--muted); text-decoration: line-through; }
.mc-pair-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.mc-expiry, .mc-sec { display: inline-flex; align-items: center; gap: 6px; }
.mc-expiry svg, .mc-sec svg { width: 14px; height: 14px; }
.mc-expiry strong { color: var(--text); }
.mc-sec.ok { color: var(--ok); }
.mc-sec.warn { color: var(--orange); }
.mc-device-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.mc-device-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.mc-device-ico svg { width: 22px; height: 22px; }
.mc-device-name h2 { margin: 0; }
.mc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.mc-stat { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-stat strong { overflow-wrap: anywhere; }
.mc-stat-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--label); }
.mc-stat-label svg { width: 15px; height: 15px; color: var(--accent-soft); }
.mc-device .notice { margin: 16px 0 0; }
.mc-render.active { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mc-render h3 { margin: 8px 0 0; font-size: 17px; }
.mc-render h3 a { color: var(--text); }
.mc-id { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.mc-pill { font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.mc-pill.run { color: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mc-pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); font-size: 11.5px; padding: 2px 9px; }
.mc-stage { margin-top: 18px; color: var(--accent-soft); gap: 8px; }
.mc-stage .mono { color: var(--text); }
.mc-bar { height: 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); margin-top: 10px; overflow: hidden; }
.mc-bar > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #a855f7); transition: width .6s ease; }
.mc-render-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mc-times { display: flex; gap: 22px; }
.mc-times > div { display: flex; flex-direction: column; gap: 3px; }
.mc-times > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.mc-recent h2 { margin: 0; }
.mc-rows { margin-top: 14px; }
.mc-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.mc-row-main { flex: 1; min-width: 0; }
.mc-file { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); flex: none; }
.mc-file svg { width: 16px; height: 16px; }
.mc-help { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.mc-help svg { width: 16px; height: 16px; color: var(--accent-soft); flex: none; }
.mc-details { margin-top: 16px; }
.mc-details summary, details.drawer-section summary { cursor: pointer; color: var(--label); font-weight: 600; font-size: 13.5px; }
@media (max-width: 900px) { .mc-stats { grid-template-columns: repeat(2, 1fr); } .mc-steps { grid-template-columns: 1fr; } }

/* --- Admin Fleet Hub --- */
.fleet-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fleet-metric { margin-top: 0; display: flex; flex-direction: column; gap: 4px; }
.fleet-metric strong { font-size: 24px; }
.fleet-table tr.clickable { cursor: pointer; }
.fleet-table tr.clickable:hover, .fleet-table tr.clickable:focus-visible { background: var(--panel-2); outline: none; }
.fleet-table .tag-pill { margin-left: 6px; }
.fleet-table td svg { width: 14px; height: 14px; color: var(--muted); }
.fleet-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.fleet-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fleet-status.run { color: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.fleet-status.run .dot { animation: pulse 1.4s ease-in-out infinite; }
.fleet-status.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.fleet-status.off { color: var(--muted); border-color: var(--line-2); }
.fleet-status.warn { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, transparent); background: color-mix(in srgb, var(--orange) 10%, transparent); margin-top: 4px; }
@keyframes pulse { 50% { opacity: .3; } }
.drawer-scrim { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .6); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; }
.drawer-scrim[hidden] { display: none; }
.drawer { width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line-2); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer h4 { margin: 0 0 10px; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.drawer-box { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; }
.drawer-field > div { margin-top: 2px; overflow-wrap: anywhere; }
.drawer-log { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; }
.drawer-log-row { display: flex; align-items: baseline; gap: 8px; }
.log-state, .log-level { font: 700 9.5px var(--mono); text-transform: uppercase; padding: 1px 5px; border-radius: 4px; flex: none; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.log-state.online, .log-level.success { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.log-state.offline, .log-level.error { color: var(--fail); background: color-mix(in srgb, var(--fail) 15%, transparent); }
.log-state.alert, .log-level.warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.drawer-actions { display: flex; gap: 10px; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
@media (max-width: 900px) { .fleet-metrics { grid-template-columns: repeat(2, 1fr); } }
.card.mc-hero > h2 { font-size: 26px; font-weight: 750; text-transform: none; letter-spacing: -.01em; color: var(--text); }
.mc-pair .icon-sq { width: 40px; height: 40px; }
.mc-pair .icon-sq svg { width: 18px; height: 18px; }
.fleet-metrics > .card { margin-top: 0; }
.fleet-metrics + .card { margin-top: 20px; }
.mc-wait { grid-column: 1 / -1; padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
/* My Computer: one gap (18 px, as .card + .card) between every card, also around the step grid. */
#computer > * + * { margin-top: 18px; }
.mc-steps { gap: 18px; }
.mc-hero-actions { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; margin-top: 20px; }
.mc-download { display: flex; flex-direction: column; gap: 6px; }
.mc-soon { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--accent-soft); border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mc-soon svg { width: 16px; height: 16px; }
.mc-download .tiny { max-width: 360px; }
.mc-req { height: 40px; padding: 0 14px; }
/* Code box, Copy and Refresh: one height, centred. */
.mc-code-row { display: flex; align-items: center; gap: 8px; }
.mc-code-row > * { height: 44px; box-sizing: border-box; margin: 0; }
.mc-code { display: inline-flex; align-items: center; padding: 0 18px; }
.mc-code-row button { display: inline-flex; align-items: center; justify-content: center; }
.mc-code-row .icon-only { width: 44px; padding: 0; }
/* The info row: expiry, works once, connection; even spacing, wraps cleanly. */
.mc-pair-foot { gap: 8px 24px; }
.mc-pair-foot > * { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mc-pair-foot .mc-sec { white-space: normal; }
.mc-once svg { width: 14px; height: 14px; color: var(--ok); }
@media (max-width: 640px) { .mc-code-row { width: 100%; } .mc-code { flex: 1; justify-content: center; } }
/* Settings › Finished videos: one choice per card. */
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; margin-top: 10px; }
.radio-card:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.radio-card input { width: auto; margin: 3px 0 0; accent-color: var(--accent); }
.radio-card > span { display: flex; flex-direction: column; gap: 3px; }
/* My Computer: the link to Install help, and "Installer blocked?" when the PC was not paired after a download. */
.mc-help-link { font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.mc-help-link svg { width: 14px; height: 14px; }
.mc-blocked { display: flex; gap: 12px; align-items: flex-start; border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.mc-blocked svg { width: 20px; height: 20px; color: var(--warn); flex-shrink: 0; margin-top: 2px; }
.mc-blocked p { margin: 4px 0 0; }

/* Install help (/help/install): simple steps, drawings of the Windows windows, the app's real screenshots. */
.help { max-width: 920px; }
.help .crumbs a { color: inherit; }
.help .card + .card { margin-top: 18px; }
.help h2 { display: flex; gap: 10px; align-items: center; font-size: 18px; margin: 0 0 10px; }
.help h3 { font-size: 15px; margin: 0 0 6px; }
.help p, .help li { line-height: 1.6; }
.help ol, .help ul { padding-left: 22px; }
.help-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-soft); font-size: 14px; flex-shrink: 0; }
.help-toc { columns: 2; column-gap: 28px; margin: 12px 0 0; }
.help-toc li { break-inside: avoid; }
.help-path { font-weight: 600; color: var(--label); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.help kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel-2); }
.help-results { list-style: none; padding: 0; }
.help-results li + li { margin-top: 6px; }
.pill-ok, .pill-warn, .pill-bad { display: inline-block; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill-bad { background: color-mix(in srgb, var(--fail) 18%, transparent); color: var(--fail); }
.help-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.help-fig { margin: 14px 0; }
.help-fig img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.help-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.help-option { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: var(--panel-2); }
.help-option.recommended { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.help-option p { margin: 6px 0 0; }
.help-danger { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--fail) 60%, transparent); background: color-mix(in srgb, var(--fail) 12%, transparent); color: #fecaca; }
.help-danger strong { color: var(--fail); }
/* Drawings of Windows windows (light, like Windows), labelled as drawings. */
.win { font-family: "Segoe UI", system-ui, sans-serif; border-radius: 8px; box-shadow: 0 10px 30px rgb(0 0 0 / .45); max-width: 440px; position: relative; }
.win p { margin: 8px 0; }
.win-settings { background: #f3f3f3; color: #1b1b1b; border: 1px solid #d0d0d0; }
.win-title { font-size: 12px; padding: 8px 12px; border-bottom: 1px solid #e3e3e3; color: #444; }
.win-body { padding: 12px 16px 16px; }
.win-h { font-size: 16px; font-weight: 600; }
.win-p { font-size: 13px; color: #555; }
.win-radio { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-top: 10px; color: #333; line-height: 1.4; }
.win-radio .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #777; flex-shrink: 0; margin-top: 2px; }
.win-smartscreen { background: #1f5fa8; color: #fff; padding: 18px 20px 14px; font-size: 13px; min-height: 190px; }
.ss-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.ss-link { text-decoration: underline; }
.ss-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; align-items: center; }
.ss-btn { border: 1px solid rgb(255 255 255 / .7); padding: 5px 16px; font-size: 13px; }
.win-sac .ss-btn { border-color: #888; color: #1b1b1b; background: #fdfdfd; }
.marked { outline: 3px solid #fbbf24; outline-offset: 3px; border-radius: 2px; }
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fbbf24; color: #111; font-weight: 700; font-size: 12px; margin-left: 10px; }
.win-sac { background: #fff; color: #1b1b1b; border: 1px solid #d0d0d0; padding: 16px 18px; display: flex; gap: 14px; }
.sac-icon { width: 32px; height: 32px; border-radius: 50%; background: #c42b1c; color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
@media (max-width: 760px) { .help-two { grid-template-columns: 1fr; } .help-toc { columns: 1; } }
/* My Computer: the website address to enter in the app. */
.mc-site { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.mc-site code { color: var(--label); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
/* Settings › Voices: one row per language. */
.voice-row { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.voice-head { display: flex; gap: 8px; align-items: center; }
.voice-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.voice-controls input { flex: 1; min-width: 240px; font-family: var(--mono); font-size: 13px; }
.voice-row audio { width: 100%; max-width: 420px; height: 36px; }
/* New production: a language without a voice yet (Settings › Voices). */
.toggle.no-voice { opacity: .45; cursor: not-allowed; }

/* Settings › Prompts */
.prompt-row { padding: 10px 0; border-top: 1px solid var(--line); }
.prompt-row summary { cursor: pointer; display: flex; gap: 8px; align-items: center; }
.prompt-row[open] summary { margin-bottom: 10px; }
.prompt-text { width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; resize: vertical; margin-bottom: 8px; }

/* A step opened from a Discord link (…#step-voice). */
.step-row.linked { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; transition: outline-color .6s; }
/* Settings › Discord: which channel receives what, the delivery log. */
.discord-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.discord-routes > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.discord-routes ul { margin: 6px 0 0 16px; padding: 0; }
@media (max-width: 700px) { .discord-routes { grid-template-columns: 1fr; } }
.delivery-log { width: 100%; font-size: 12.5px; }
.delivery-log td { padding: 4px 6px; vertical-align: top; }
