:root {
  --bg: #0b0d17;
  --bg2: #11142a;
  --card: rgba(22, 26, 48, .72);
  --card-b: rgba(140, 150, 255, .14);
  --text: #e9ebfa;
  --muted: #9aa0c3;
  --accent: #7c6cff;
  --accent2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --input: rgba(10, 12, 26, .7);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(124, 108, 255, .28), transparent 60%),
    radial-gradient(700px 500px at 110% 10%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(236, 72, 153, .12), transparent 60%);
}
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; margin: -6px 0 0; }
.err { color: var(--bad); min-height: 1em; margin: 0; font-size: 14px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.narrow { max-width: 460px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13.5px; color: #cdd1ee; }
.lh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, textarea {
  width: 100%; background: var(--input); color: var(--text);
  border: 1px solid rgba(140, 150, 255, .2); border-radius: 11px; padding: 11px 13px;
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 108, 255, .25); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

.pw { position: relative; }
.pw input { padding-right: 46px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  color: var(--muted); display: grid; place-items: center;
}
.eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  border: 0; border-radius: 11px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--text); background: rgba(255, 255, 255, .07); transition: transform .08s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #a855f7); box-shadow: 0 8px 24px rgba(124, 108, 255, .35); }
.btn.lg { padding: 14px 18px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.danger { color: var(--bad); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: var(--muted); font-size: 12px; }
.logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 20px rgba(124, 108, 255, .45);
}
.brand.big .logo { width: 44px; height: 44px; font-size: 17px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.code-input { text-align: center; font-size: 30px; letter-spacing: 12px; font-weight: 700; padding: 14px; }

/* app shell */
.app { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.who { color: var(--muted); font-size: 13.5px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--card-b); font-size: 13px; color: var(--muted);
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pill.busy i { background: var(--warn); box-shadow: 0 0 10px var(--warn); animation: pulse 1.2s infinite; }
.pill.off i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }

.tabs { display: flex; gap: 6px; margin: 20px 0; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--card-b); width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted);
  padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tabs button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabs button.active { background: rgba(124, 108, 255, .18); color: var(--text); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.adv summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 4px 0; }
.adv[open] summary { margin-bottom: 12px; }
.seg { display: flex; gap: 4px; background: var(--input); padding: 4px; border-radius: 11px; border: 1px solid rgba(140, 150, 255, .2); }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 7px 8px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button.active { background: var(--accent); color: white; }
#job-seed { width: 140px; }

.drop {
  position: relative; border: 1.5px dashed rgba(140, 150, 255, .35); border-radius: 13px; min-height: 110px;
  display: grid; place-items: center; text-align: center; padding: 14px; cursor: pointer; background: var(--input);
  transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent); background: rgba(124, 108, 255, .1); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-txt { display: flex; flex-direction: column; gap: 3px; font-weight: 400; color: var(--muted); font-size: 13px; }
.drop-txt b { color: var(--text); font-weight: 600; }
.drop img { max-height: 200px; border-radius: 10px; }
.drop-clear { position: absolute; top: 8px; right: 8px; z-index: 2; }

/* jobs */
.joblist { display: flex; flex-direction: column; gap: 10px; }
.job { border: 1px solid var(--card-b); border-radius: 13px; padding: 13px 14px; background: rgba(255, 255, 255, .03); display: flex; flex-direction: column; gap: 9px; }
/* badges and actions wrap on narrow cards: the actions ran out of the card on the right (screenshot 2026-10-20) */
.job-head { display: flex; justify-content: space-between; gap: 8px 10px; align-items: center; flex-wrap: wrap; }
.job-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.queued { background: rgba(154, 160, 195, .16); color: #c7cbe6; }
.badge.running { background: rgba(251, 191, 36, .16); color: var(--warn); }
.badge.done { background: rgba(52, 211, 153, .16); color: var(--ok); }
.badge.error { background: rgba(248, 113, 113, .16); color: var(--bad); }
/* render engine of a job in the history: Wan2GP jobs stand apart from ComfyUI ones (badge + left edge) */
.job-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.eng.comfy { background: rgba(96, 165, 250, .14); color: #93c5fd; }
.badge.eng.wan2gp { background: rgba(192, 132, 252, .18); color: #d8b4fe; }
.badge.model { background: rgba(250, 204, 21, .14); color: #fde68a; }        /* the video model (jobModel) */
.badge.fact.secs { background: rgba(45, 212, 191, .14); color: #99f6e4; }    /* the clip's length */
.badge.fact.res { background: rgba(244, 114, 182, .14); color: #fbcfe8; }    /* size · aspect */
.badge.fact.card { background: rgba(148, 163, 184, .16); color: #e2e8f0; }   /* the card it renders on */
.badge.fact.turbo { background: rgba(251, 146, 60, .16); color: #fed7aa; }   /* rendered with the 8-step turbo LoRA */
.job.eng-wan2gp { border-left: 3px solid #c084fc; }
.job.eng-comfy { border-left: 3px solid #60a5fa; }
.badge.cancelled { background: rgba(154, 160, 195, .1); color: var(--muted); }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: slide 1.4s infinite ease-in-out; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.job video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.job-err { color: var(--bad); font-size: 12.5px; white-space: pre-wrap; max-height: 90px; overflow: auto; }
.job-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }   /* Descarcă looks like the buttons next to it */
.empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 14px; }

/* Videourile mele: the drill-down table (app.js PIVOT) */
.pivot { padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 10px; }
.pivot-path { display: flex; flex-wrap: wrap; gap: 6px; }
.pivot-path .crumb { background: rgba(124, 108, 255, .14); color: var(--text); border: 0; border-radius: 999px; padding: 4px 12px;
  font: inherit; font-size: 13px; cursor: pointer; }
.pivot-path .crumb:disabled { background: var(--accent); color: #fff; cursor: default; }
.pivot-path .crumb:focus-visible, .pivot-table tbody tr:focus-visible { outline: 2px solid var(--accent2); outline-offset: 1px; }
.pivot-scroll { overflow-x: auto; }
.pivot-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.pivot-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--card-b); }
.pivot-table td { padding: 9px 10px; border-bottom: 1px solid var(--card-b); white-space: nowrap; }
.pivot-table .n { text-align: right; }
.pivot-table tbody tr { cursor: pointer; }
.pivot-table tbody tr:hover { background: rgba(124, 108, 255, .08); }
.pivot-table .open { color: var(--accent2); font-weight: 700; }
.pivot-table .ok { color: var(--ok); }
.pivot-table .warn { color: var(--warn); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery .job video { aspect-ratio: 9/16; max-height: none; object-fit: contain; }

.userlist { display: flex; flex-direction: column; gap: 8px; }
.user { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--card-b); background: rgba(255, 255, 255, .03); flex-wrap: wrap; }
.user small { color: var(--muted); display: block; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: #1c2142; border: 1px solid var(--card-b); padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px;
}

@media (max-width: 560px) {
  .card { padding: 17px; }
  .tabs { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .tabs button { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 12px; }
  .who { display: none; }
}

/* comparisons */
.hist-seg { width: fit-content; margin-bottom: 16px; }
.hist-seg button { padding: 8px 16px; white-space: nowrap; }
.cmp-filters { flex: 1; justify-content: flex-end; min-width: 0; }
.cmp-filters select { min-width: 0; max-width: 100%; }
select {
  max-width: 100%;
  background: var(--input); color: var(--text); border: 1px solid rgba(140, 150, 255, .2); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-size: 13.5px;
}
.modal { position: fixed; inset: 0; background: rgba(5, 6, 14, .75); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal-card { width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal video { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv b { color: var(--muted); font-weight: 500; }
.kv span { word-break: break-word; }

.sbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 560px) {
  .sbs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cmp-filters select, .cmp-filters .btn { flex: 1 1 100%; }
  .sbs-body { padding: 8px 9px; }
  .sbs-title { font-size: 12.5px; }
}
.sbs-card { border: 1px solid var(--card-b); border-radius: 13px; background: rgba(255, 255, 255, .03); overflow: hidden; display: flex; flex-direction: column; }
.sbs-media { aspect-ratio: 9 / 16; background: #000; display: grid; place-items: center; }
.sbs-media video { width: 100%; height: 100%; object-fit: contain; }
.sbs-ph { color: var(--muted); font-size: 13px; text-align: center; padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sbs-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.sbs-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.sbs-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.sbs-time { color: var(--text); font-weight: 600; }

/* ---------- ETA loader (pending / running videos) ---------- */
.sbs-wait {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 14px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(124, 108, 255, .10), rgba(34, 211, 238, .05) 60%, rgba(0, 0, 0, 0));
}
.sbs-wait::before {             /* slow shimmer sweeping down the 9:16 frame */
  content: ""; position: absolute; inset: -40% -20%;
  background: linear-gradient(180deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%);
  animation: sweep 3.2s infinite linear;
}
.sbs-wait.live { background: radial-gradient(circle at 50% 42%, rgba(124, 108, 255, .28), rgba(34, 211, 238, .08) 45%, rgba(0, 0, 0, 0) 75%); }
@keyframes sweep { from { transform: translateY(-45%); } to { transform: translateY(45%); } }

.eta { --p: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.eta-ring { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.eta-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.eta-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 3.2; }
.eta-arc {
  fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: calc(119.4 - 119.4 * var(--p) / 100);
  transition: stroke-dashoffset 1s linear;
}
.eta.running .eta-arc { stroke: var(--accent2); }
/* waiting or unknown duration: a short arc that spins */
.eta:not(.running) .eta-arc, .eta.indeterminate .eta-arc { stroke-dasharray: 30 90; stroke-dashoffset: 0; stroke: var(--muted); }
.eta:not(.running) .eta-ring svg, .eta.indeterminate .eta-ring svg { animation: spin 2.4s linear infinite; }
.eta.indeterminate .eta-arc { stroke: var(--accent2); }
@keyframes spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.eta-pct { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.eta.running .eta-ring::after {  /* breathing halo while rendering */
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 70%); animation: pulse 2s infinite ease-in-out;
}
.eta-text { display: flex; flex-direction: column; gap: 3px; }
.eta-main { font-weight: 600; font-size: 13.5px; color: var(--text); }
.eta-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.sbs-time.live { color: var(--accent2); }

.eta.compact { flex-direction: row; text-align: left; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--card-b); }
.eta.compact .eta-ring { width: 48px; height: 48px; flex: none; }
.eta.compact .eta-pct { font-size: 11.5px; }
.eta.compact .eta-ring::after { inset: 6px; }
@media (max-width: 560px) { .eta-ring { width: 72px; height: 72px; } .eta-pct { font-size: 15px; } .eta-main { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .sbs-wait::before, .eta-ring svg, .eta-ring::after { animation: none !important; } }
.sbs-gpu { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(154, 160, 195, .14); color: #c7cbe6; }
.sbs-gpu.opt { background: linear-gradient(90deg, rgba(124, 108, 255, .3), rgba(34, 211, 238, .25)); color: #fff; }
.drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; width: 100%; }
.drop-grid img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; max-height: none; border-radius: 8px; }
#speech-info.err { color: var(--bad); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 45%; text-align: left; }
@media (max-width: 560px) { .seg.wrap button { flex-basis: 100%; } }

/* ETA line under the History tabs: per card, generations left and when the last one ends */
.bench-eta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(124, 108, 255, .10); border: 1px solid rgba(124, 108, 255, .30); font-size: 13px; color: var(--muted); }
.bench-eta b { color: inherit; font-weight: 600; }
.bench-eta .bench-eta-all { color: var(--accent2); font-weight: 600; }
.bench-eta[hidden] { display: none; }

/* "Mai sunt de generat" (Generează): left of the page column on wide screens, above the form on narrow ones */
.todo-panel { margin-bottom: 16px; padding: 14px 16px; }
.todo-panel h3 { margin: 0 0 8px; font-size: 15px; }
.todo-panel h3 span { color: var(--muted); font-weight: 400; }
.todo-card { margin-top: 10px; font-weight: 600; font-size: 13px; color: var(--accent2); }
.todo-eng { margin: 6px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.todo-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; padding: 2px 0; }
.todo-panel p { margin: 0 0 6px; }
.todo-row b { font-variant-numeric: tabular-nums; }
@media (min-width: 1800px) {
  .todo-panel { position: fixed; left: 16px; top: 140px; width: calc((100vw - 1240px) / 2 - 32px); max-height: calc(100vh - 160px); overflow: auto; margin: 0; }
}
.todo-kind { display: inline-block; min-width: 74px; white-space: nowrap; text-align: center; padding: 0 5px; border-radius: 6px; font-size: 11px; }
.todo-kind.audio { background: rgba(34, 211, 238, .16); color: var(--accent2); }
.todo-kind.video { background: rgba(124, 108, 255, .2); color: var(--accent); }
.mood { width: auto; flex: 0 0 auto; }                 /* the voice mood next to each UGC line */
/* the named ElevenLabs voices: one row each (play button, name, description); the picked one is outlined */
.voice-names { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.voice-names .vn { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.voice-names .vn:hover { background: rgba(127, 127, 127, .08); }
.voice-names .vn.active { border-color: var(--accent); }
.voice-names .play { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; flex: 0 0 auto; }
/* the generated UGC photo with its "Folosește pe asta" button under it */
.photo-result { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.photo-result img { max-width: 100%; max-height: 420px; border-radius: 10px; }
/* the photo's progress bar (time left from the model's measured photos) */
.progress { height: 8px; border-radius: 4px; background: rgba(127, 127, 127, .18); overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: #22c55e; transition: width .9s linear; }
/* the studio verifier's report on a job card (studio/run.py repair + worker studio_note); warn = problems left */
.job-note { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(34, 211, 238, .08); border-left: 3px solid var(--accent2); }
.job-note.warn { background: rgba(255, 170, 60, .1); border-left-color: #ffaa3c; }
/* a long verifier note folded to its verdict line (app.js noteBox) */
.job-note.fold summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.job-note.fold summary::-webkit-details-marker { display: none; }
.job-note.fold summary::after { content: "▾"; opacity: .7; transition: transform .15s; }
.job-note.fold[open] summary::after { transform: rotate(180deg); }
.job-note.fold .note-body { margin-top: 6px; opacity: .9; }
/* a running render's steps, one loader each (tickSteps): label, then a green bar with its time inside it */
.steps { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; font-size: 12.5px; }
.steps .step { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 10px; }
.steps .step-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .progress { position: relative; height: 18px; border-radius: 9px; }
.steps .fill { background: #22c55e; transition: width 1s linear; }
.steps .step-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-variant-numeric: tabular-nums; color: #e8ffe9; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.steps .step.todo { opacity: .55; }
.steps .step.todo .step-t { color: var(--muted); text-shadow: none; }
.steps .step.run .step-l { font-weight: 600; }
.steps .step.run .fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
/* a running step past its estimate keeps moving (user 2026-10-22: the Hook bar sat full and read as finished):
   stripes slide across the full bar while it still works */
.steps .step.run.over .fill { background: repeating-linear-gradient(-45deg, #16a34a 0 10px, #22c55e 10px 20px);
  background-size: 28px 28px; animation: step-over 1s linear infinite; }
@keyframes step-over { to { background-position: 28px 0; } }
@media (prefers-reduced-motion: reduce) { .steps .step.run.over .fill { animation: none; } }
/* the live editor: the video, its timeline (scenes by name, the selection, the playhead) and the notes */
.editor-card { max-width: 900px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.editor-card video { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; }
.ed-timeline { position: relative; height: 46px; border-radius: 8px; background: rgba(127, 127, 127, .15); cursor: crosshair;
  user-select: none; touch-action: none; overflow: hidden; }
.ed-scenes { position: absolute; inset: 0; }
.ed-scene { position: absolute; top: 0; bottom: 0; border-right: 2px solid rgba(0, 0, 0, .45); background: rgba(124, 108, 255, .18);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ed-scene:nth-child(even) { background: rgba(34, 211, 238, .14); }
.ed-scene span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; pointer-events: none; }
.ed-sel { position: absolute; top: 0; bottom: 0; background: rgba(255, 170, 60, .35); border: 2px solid #ffaa3c; pointer-events: none; }
.ed-head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; }
.ed-notes { display: flex; flex-direction: column; gap: 8px; max-height: 30vh; overflow-y: auto; }
.ed-note { padding: 8px 10px; border-radius: 8px; background: rgba(127, 127, 127, .08); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
/* Add MAGIC: the section titles of the selectors window, the button on a finished ad */
.magic-sec { grid-column: 1 / -1; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(140, 150, 255, .2); font-weight: 700; font-size: 14px; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; }
.magic-btn { background: linear-gradient(90deg, #8b5cf6, #ec4899); border: 0; }
#modal-settings select, #modal-settings input[type=url] { width: 100%; }
/* the text check before Generează: the line as written (red) and the copy editor's fix (green) */
.txt-bad { color: #ff8080; }
.txt-fix { color: #6ee7a8; margin-top: 2px; }
#job-lang.need { border-color: #ff8080; }   /* no spoken language picked yet */
/* the 5 s sample of the value last picked, on top of the Add MAGIC / captions selectors */
.magic-sample { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 2; background: var(--card, #14151f); padding: 6px 0; }
.magic-sample video { max-height: 280px; max-width: 100%; border-radius: 10px; background: #000; }
#ugc-cap-opts { margin-top: 6px; }
/* Add MAGIC: the selectors with the sample preview on their right (stacked on top on a phone) */
#modal.wide .modal-card { max-width: 1040px; }
#modal-settings:has(.magic-layout), #modal-settings:has(.review-list) { display: block; }
/* Add MAGIC's three tabs (Random / Custom / Fă singur): the tab bar, then one panel at a time */
.magic-tabs { margin-bottom: 14px; }
.magic-tab[data-tab="random"], .magic-tab[data-tab="diy"] { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.magic-tab[hidden] { display: none !important; }
.magic-tab textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border-radius: 10px;
  background: var(--input); color: inherit; border: 1px solid rgba(140, 150, 255, .2); resize: vertical; }
.magic-sum { color: var(--muted); font-size: 13px; }
.magic-sum ul { margin: 6px 0 0; padding-left: 18px; color: inherit; }
.magic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.magic-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.magic-preview video { width: 100%; max-height: 420px; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 12px; background: #000; }
@media (max-width: 720px) {
  .magic-layout { grid-template-columns: minmax(0, 1fr); }
  .magic-preview { order: -1; top: 0; z-index: 2; background: var(--card, #14151f); padding-block: 6px; }
  .magic-preview video { max-height: 220px; width: auto; }
}

/* the photo check under the photo drop: what would make the video sharper */
.drop-warn { margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--bad); color: var(--bad);
  font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; }

/* the review window (openReview): one block per scene the verifier still rejects */
.review-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.review-scene { border-top: 1px solid var(--card-b); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
/* the scene at its own aspect (a 9:16 ad stays tall and narrow, no side bars), at most 60% of the window's height */
.review-scene video { display: block; width: auto; max-width: 100%; max-height: 60vh; margin: 0 auto; background: #000;
  border-radius: var(--radius); }
.review-scene ul { margin: 0; padding-left: 18px; }
.review-scene textarea { width: 100%; box-sizing: border-box; min-height: 64px; }
