/* nvx-studio-console.css — the studio's own surface.
 *
 * The old look was a startup landing page wearing a workspace: red gradient
 * buttons that lift when you point at them, blue glow behind everything, a
 * spinning ring. It reads as an advertisement for a tool rather than the tool.
 *
 * A studio should feel like the room, not the poster for it. So: an ink ground
 * with hairline rules, one brass accent used once per screen — the gold of
 * manuscript illumination, which is where this audience's eye already lives —
 * and controls that stay quiet until you touch them. Nothing glows. Nothing
 * lifts. The work is the only bright thing on the page.
 *
 * Loaded after the page's own CSS, so it deliberately overrides it.
 */

:root{
  /* ground: ink, not navy — navy reads as "tech product", ink as "workspace" */
  --s-bg:#0A0B0E;
  --s-pane:#101217;
  --s-pane2:#14171D;
  --s-sunk:#07080B;
  /* hairlines. Two weights only: one you read past, one you read. */
  --s-line:rgba(233,238,248,.075);
  --s-line2:rgba(233,238,248,.16);
  --s-ink:#EEF1F7;
  --s-ink2:#B7C0CE;
  --s-mute:#8A94A6;
  --s-dim:#646D7E;
  /* brass — the one accent. Used on the single most important thing on a
     screen and nowhere else, which is what makes it read as important. */
  --s-brass:#C9A227;
  --s-brass-soft:rgba(201,162,39,.13);
  --s-brass-line:rgba(201,162,39,.34);
  --s-steel:#7E8CA0;
  --s-ok:#5FB89A;
  --s-warn:#D9A441;
  --s-bad:#D2564B;
  --s-r:10px;
  --s-r-lg:14px;
  --s-mono:'DM Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

/* The page had a photograph and a grid behind everything at once. Both were
   fighting the work. One very quiet vignette is enough to keep the ground from
   reading as flat black. */
body.studio-console::before{
  background:radial-gradient(ellipse at 78% -8%,rgba(201,162,39,.055),transparent 46%),
             radial-gradient(ellipse at 6% 104%,rgba(126,140,160,.05),transparent 44%);
  opacity:1;filter:none;
}
body.studio-console::after{content:none}
body.studio-console{background:var(--s-bg);color:var(--s-ink)}

/* Persian digits line up in columns of credits and durations. */
body.studio-console{font-variant-numeric:tabular-nums}

/* ── rail ─────────────────────────────────────────────────────────────── */
.studio-console .rail{background:rgba(9,10,13,.92);border-inline-end:1px solid var(--s-line);padding:20px 12px}
.studio-console .brand strong{font:500 12px var(--s-mono);letter-spacing:.16em}
.studio-console .brand small{color:var(--s-dim);letter-spacing:.1em}
.studio-console .nav-label{
  color:var(--s-dim);font:9.5px var(--s-mono);letter-spacing:.18em;
  padding:0 12px 9px;margin-top:6px;
}
.studio-console .nav button{
  color:var(--s-mute);border-radius:8px;padding:9px 12px;font-size:13.5px;
  transition:background .16s,color .16s;position:relative;
}
.studio-console .nav button i{color:var(--s-dim);font-size:14px;transition:color .16s}
.studio-console .nav button:hover{background:rgba(233,238,248,.045);color:var(--s-ink2)}
.studio-console .nav button:hover i{color:var(--s-steel)}
/* The active item is marked by a brass rule on the inline edge — a mark, not a
   wash. A filled gradient row makes the menu shout over the work beside it. */
.studio-console .nav button.active{
  background:rgba(233,238,248,.055);color:var(--s-ink);box-shadow:none;
}
.studio-console .nav button.active::before{
  content:"";position:absolute;inset-inline-end:0;top:8px;bottom:8px;
  width:2px;border-radius:2px;background:var(--s-brass);
}
.studio-console .nav button.active i{color:var(--s-brass)}
.studio-console .rail-foot{border-top:1px solid var(--s-line);color:var(--s-dim);font-size:11.5px}
.studio-console .credit b{color:var(--s-brass);font:600 18px var(--s-mono)}

/* ── controls ─────────────────────────────────────────────────────────── */
/* Quiet by default, brass only where it is the one thing to press. */
.studio-console .primary,.studio-console .btn,.s-btn{
  border:1px solid var(--s-line2);background:rgba(233,238,248,.05);color:var(--s-ink);
  border-radius:var(--s-r);padding:0 16px;height:38px;font:600 13px Estedad,system-ui,sans-serif;
  box-shadow:none;transition:background .16s,border-color .16s,color .16s;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;
}
.studio-console .primary:hover,.studio-console .btn:hover,.s-btn:hover{
  background:rgba(233,238,248,.09);border-color:rgba(233,238,248,.26);transform:none;filter:none;
}
.s-btn--go,.studio-console .primary{
  background:var(--s-brass-soft);border-color:var(--s-brass-line);color:#F2DFA4;
}
.s-btn--go:hover,.studio-console .primary:hover{
  background:rgba(201,162,39,.2);border-color:rgba(201,162,39,.55);color:#FBEEC4;
}
.s-btn--sm{height:30px;padding:0 11px;font-size:12px;border-radius:8px}
.s-btn--quiet{background:transparent;border-color:var(--s-line)}
.s-btn:disabled{opacity:.42;cursor:not-allowed}
.s-btn:focus-visible,.studio-console .nav button:focus-visible,
.s-in:focus-visible,.s-chip:focus-visible{
  outline:2px solid var(--s-brass-line);outline-offset:2px;
}

.s-in,.studio-console .search,.studio-console select,.studio-console input,
.studio-console textarea{
  background:var(--s-sunk);border:1px solid var(--s-line);color:var(--s-ink);
  border-radius:9px;padding:9px 11px;font:inherit;font-size:13px;width:100%;
  outline:0;transition:border-color .16s;
}
.s-in:focus,.studio-console select:focus,.studio-console input:focus,
.studio-console textarea:focus{border-color:var(--s-line2)}
.s-in::placeholder{color:var(--s-dim)}
.s-in--mono{font-family:var(--s-mono);font-size:12px;direction:ltr;text-align:left;line-height:1.85}

.s-label{
  display:block;color:var(--s-dim);font:9.5px var(--s-mono);
  letter-spacing:.16em;margin:0 0 7px;
}
.s-help{color:var(--s-mute);font-size:11.5px;line-height:1.85;margin:6px 0 0}

/* ── the console shell ────────────────────────────────────────────────── */
.s-console{display:grid;grid-template-columns:300px minmax(0,1fr) 330px;gap:14px;align-items:start}
.s-col{display:flex;flex-direction:column;gap:12px;min-width:0}
.s-card{
  border:1px solid var(--s-line);border-radius:var(--s-r-lg);
  background:var(--s-pane);padding:16px;min-width:0;
}
.s-card--sunk{background:var(--s-sunk)}
.s-card__head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 13px}
.s-card__head h3{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.01em}
.s-card__head span{color:var(--s-dim);font:9.5px var(--s-mono);letter-spacing:.14em}

/* the make-a-thing switch: a segmented control, not four buttons */
.s-kinds{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px;
  background:var(--s-sunk);border:1px solid var(--s-line);border-radius:11px}
.s-kinds button{
  border:0;background:transparent;color:var(--s-mute);border-radius:8px;
  padding:9px 6px;font:600 13px Estedad,system-ui,sans-serif;transition:.16s;
}
.s-kinds button:hover{color:var(--s-ink2)}
.s-kinds button.on{background:rgba(233,238,248,.07);color:var(--s-ink);box-shadow:inset 0 0 0 1px var(--s-line)}

/* ── model list ───────────────────────────────────────────────────────── */
.s-models{max-height:330px;overflow:auto;margin:10px -4px 0;padding:0 4px;scrollbar-width:thin}
.s-mgroup{color:var(--s-dim);font:9.5px var(--s-mono);letter-spacing:.14em;
  padding:12px 6px 6px;position:sticky;top:0;background:var(--s-pane);z-index:1}
.s-model{
  display:block;width:100%;text-align:start;border:1px solid transparent;
  background:transparent;color:var(--s-ink2);border-radius:9px;padding:9px 10px;
  transition:background .14s,border-color .14s;
}
.s-model:hover{background:rgba(233,238,248,.05)}
.s-model.on{background:rgba(233,238,248,.07);border-color:var(--s-line2);color:var(--s-ink)}
.s-model b{display:block;font-size:12.5px;font-weight:600;line-height:1.65}
.s-model small{display:block;color:var(--s-dim);font:9.5px var(--s-mono);letter-spacing:.06em;
  direction:ltr;text-align:left;margin-top:3px}
.s-dot{width:6px;height:6px;border-radius:50%;display:inline-block;margin-inline-start:6px;vertical-align:middle}
.s-dot--on{background:var(--s-ok)}
.s-dot--off{background:var(--s-dim)}

/* ── per-model options ────────────────────────────────────────────────── */
.s-opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:11px}
.s-opt{min-width:0}
.s-opt label{display:block;color:var(--s-mute);font-size:11.5px;margin:0 0 5px}
.s-opt--bool{display:flex;align-items:center;gap:9px}
.s-opt--bool input{width:17px;height:17px;accent-color:var(--s-brass);flex:none}
.s-opt--bool label{margin:0}

/* ── the prompt bench ─────────────────────────────────────────────────── */
/* The point of the whole screen: a prompt you can take apart. Each clause is
   a thing you can switch off, remove, or drag — so a style's light can be kept
   while its background is dropped. */
.s-bench{display:flex;flex-wrap:wrap;gap:7px;min-height:54px;
  padding:11px;border:1px dashed var(--s-line2);border-radius:11px;background:var(--s-sunk)}
.s-bench:empty::after{content:"سبکی انتخاب کن تا اجزای پرامپتش این‌جا بیاید.";
  color:var(--s-dim);font-size:12px;align-self:center}
.s-chip{
  display:inline-flex;align-items:center;gap:7px;max-width:100%;
  border:1px solid var(--s-line2);border-radius:8px;background:rgba(233,238,248,.045);
  color:var(--s-ink2);padding:6px 9px;font:12px var(--s-mono);direction:ltr;
  cursor:grab;transition:background .14s,opacity .14s,border-color .14s;
}
.s-chip:hover{background:rgba(233,238,248,.085)}
.s-chip.off{opacity:.36;text-decoration:line-through;text-decoration-color:var(--s-dim)}
.s-chip.dragging{opacity:.5;cursor:grabbing}
/* The clause carrying the subject is the one that cannot go — mark it rather
   than let someone delete it and wonder why nothing appears. */
.s-chip--subject{border-color:var(--s-brass-line);background:var(--s-brass-soft);color:#EBD79E}
.s-chip__t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:34ch}
.s-chip__x{border:0;background:transparent;color:var(--s-dim);font-size:15px;
  line-height:1;padding:0 1px;cursor:pointer}
.s-chip__x:hover{color:var(--s-bad)}
.s-chip__axis{font:8.5px var(--s-mono);letter-spacing:.1em;color:var(--s-dim);
  border:1px solid var(--s-line);border-radius:4px;padding:2px 4px;direction:rtl;flex:none}
.s-chip--add{border-style:dashed;color:var(--s-mute);cursor:pointer}
.s-chip--add:hover{color:var(--s-brass);border-color:var(--s-brass-line)}

.s-final{
  margin-top:11px;padding:12px 13px;border:1px solid var(--s-line);border-radius:10px;
  background:var(--s-sunk);font:12px var(--s-mono);line-height:1.95;color:var(--s-ink2);
  direction:ltr;text-align:left;max-height:172px;overflow:auto;white-space:pre-wrap;
  word-break:break-word;
}
.s-neg{color:var(--s-bad);opacity:.78}

/* ── style library column ─────────────────────────────────────────────── */
.s-styles{max-height:288px;overflow:auto;margin:10px -4px 0;padding:0 4px;scrollbar-width:thin}
.s-style{
  display:flex;align-items:center;gap:9px;width:100%;text-align:start;
  border:1px solid transparent;background:transparent;color:var(--s-ink2);
  border-radius:9px;padding:7px 8px;transition:background .14s;
}
.s-style:hover{background:rgba(233,238,248,.05)}
.s-style.on{background:rgba(233,238,248,.07);border-color:var(--s-line2);color:var(--s-ink)}
.s-style b{font-size:12.5px;font-weight:600;display:block;line-height:1.6}
.s-style small{color:var(--s-dim);font:9.5px var(--s-mono);direction:ltr;display:block}
/* three colours off the style's own plate — the fastest way to recognise a
   style you have used before without reading its name */
.s-swatch{display:flex;flex:none;border-radius:5px;overflow:hidden;
  box-shadow:0 0 0 1px var(--s-line)}
.s-swatch i{width:9px;height:26px;display:block}

/* the DNA card: what the style is actually made of, in its own words */
.s-dna{display:grid;gap:0;margin-top:4px}
.s-dna div{display:grid;grid-template-columns:74px minmax(0,1fr);gap:10px;
  padding:8px 0;border-bottom:1px solid var(--s-line)}
.s-dna div:last-child{border-bottom:0}
.s-dna dt,.s-dna b{color:var(--s-dim);font:9.5px var(--s-mono);letter-spacing:.12em;padding-top:3px}
.s-dna span{color:var(--s-ink2);font-size:12px;line-height:1.85}

/* ── cost, queue, results ─────────────────────────────────────────────── */
.s-cost{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 13px;border:1px solid var(--s-line);border-radius:10px;background:var(--s-sunk)}
.s-cost b{color:var(--s-brass);font:600 15px var(--s-mono)}
.s-cost small{display:block;color:var(--s-dim);font-size:11px;margin-top:2px}
.s-cost--warn{border-color:rgba(217,164,65,.34);background:rgba(217,164,65,.07)}
.s-cost--warn b{color:var(--s-warn)}

.s-note{padding:10px 12px;border-radius:9px;font-size:12px;line-height:1.9}
.s-note--warn{border:1px solid rgba(217,164,65,.3);background:rgba(217,164,65,.07);color:#E7C685}
.s-note--bad{border:1px solid rgba(210,86,75,.32);background:rgba(210,86,75,.08);color:#EDA79F}

.s-shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:11px;margin-top:13px}
.s-shot{border:1px solid var(--s-line);border-radius:11px;overflow:hidden;background:var(--s-sunk)}
.s-shot__f{aspect-ratio:16/10;background:#06070A;display:grid;place-items:center;overflow:hidden}
.s-shot__f img,.s-shot__f video{width:100%;height:100%;object-fit:cover;display:block}
.s-shot__f audio{width:92%}
.s-shot__b{padding:10px 11px}
.s-shot__b b{display:block;font-size:12px;font-weight:600;margin-bottom:4px}
.s-shot__b p{margin:0;color:var(--s-mute);font-size:11px;line-height:1.8;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.s-shot__m{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.s-tag{font:9px var(--s-mono);letter-spacing:.06em;color:var(--s-dim);
  border:1px solid var(--s-line);border-radius:5px;padding:3px 5px;direction:ltr}
.s-spin{width:22px;height:22px;border:2px solid var(--s-line2);border-top-color:var(--s-brass);
  border-radius:50%;animation:s-spin 900ms linear infinite}
@keyframes s-spin{to{transform:rotate(360deg)}}

/* ── command palette ──────────────────────────────────────────────────── */
.s-cmdk{position:fixed;inset:0;z-index:80;display:grid;place-items:start center;
  padding-top:12vh;background:rgba(5,6,9,.7);backdrop-filter:blur(6px)}
.s-cmdk__box{width:min(620px,92vw);border:1px solid var(--s-line2);border-radius:14px;
  background:var(--s-pane);box-shadow:0 40px 100px rgba(0,0,0,.6);overflow:hidden}
.s-cmdk__in{border:0;border-bottom:1px solid var(--s-line);border-radius:0;
  background:transparent;padding:16px 18px;font-size:15px}
.s-cmdk__list{max-height:52vh;overflow:auto;padding:6px}
.s-cmdk__row{display:flex;align-items:center;gap:11px;width:100%;text-align:start;
  border:0;background:transparent;color:var(--s-ink2);border-radius:9px;padding:10px 12px}
.s-cmdk__row.on{background:rgba(233,238,248,.07);color:var(--s-ink)}
.s-cmdk__row i{font-style:normal;color:var(--s-dim);width:18px;text-align:center;flex:none}
.s-cmdk__row small{margin-inline-start:auto;color:var(--s-dim);font:9.5px var(--s-mono);
  letter-spacing:.1em;direction:ltr;flex:none}
.s-cmdk__empty{padding:22px;text-align:center;color:var(--s-dim);font-size:13px}
.s-kbd{font:10px var(--s-mono);border:1px solid var(--s-line2);border-radius:5px;
  padding:2px 5px;color:var(--s-dim);direction:ltr}

/* ── job dock ─────────────────────────────────────────────────────────── */
/* Work in progress belongs where it can be watched without staying on the
   page that started it. */
.s-dock{position:fixed;inset-inline-end:18px;bottom:18px;z-index:60;width:min(320px,88vw);
  border:1px solid var(--s-line2);border-radius:13px;background:rgba(16,18,23,.97);
  box-shadow:0 26px 70px rgba(0,0,0,.55);overflow:hidden}
.s-dock__h{display:flex;align-items:center;justify-content:space-between;gap:9px;
  padding:11px 13px;border-bottom:1px solid var(--s-line);font-size:12.5px;font-weight:600}
.s-dock__l{max-height:250px;overflow:auto}
.s-dock__i{display:flex;align-items:center;gap:10px;padding:10px 13px;border-bottom:1px solid var(--s-line)}
.s-dock__i:last-child{border-bottom:0}
.s-dock__i b{font-size:11.5px;font-weight:600;display:block}
.s-dock__i small{color:var(--s-dim);font-size:10.5px;display:block;margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px}

@media(max-width:1250px){
  .s-console{grid-template-columns:270px minmax(0,1fr)}
  .s-console .s-col--styles{grid-column:1/-1;
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media(max-width:900px){
  .s-console{grid-template-columns:1fr}
  .s-console .s-col--styles{grid-template-columns:1fr}
  .s-dock{inset-inline:12px;bottom:78px;width:auto}
}
@media(prefers-reduced-motion:reduce){
  .s-spin{animation:none}
}

/* A style row does two different things, so it is two controls: take the
   style, or borrow from it. Fusing could not live under the DNA card — by the
   time you have selected a style to read it, its recipe has already replaced
   what you would have fused with. */
.s-styleRow{display:flex;align-items:stretch;gap:4px}
.s-styleRow .s-style{flex:1;min-width:0}
.s-style__plus{
  flex:none;width:30px;border:1px solid transparent;background:transparent;
  color:var(--s-dim);border-radius:8px;font:600 15px var(--s-mono);line-height:1;
  transition:color .14s,border-color .14s,background .14s;
}
.s-styleRow:hover .s-style__plus{color:var(--s-mute);border-color:var(--s-line)}
.s-style__plus:hover{color:var(--s-brass);border-color:var(--s-brass-line);background:var(--s-brass-soft)}

/* The generate button was being squeezed by the cost text beside it until its
   own label clipped. The price can wrap; the button someone came here to press
   cannot shrink. */
.s-cost>div:first-child{min-width:0;flex:1 1 auto}
.s-cost .s-btn{flex:0 0 auto}
@media(max-width:420px){
  .s-cost{flex-wrap:wrap}
  .s-cost .s-btn{width:100%}
}

/* The launch notice sat above everything at full contrast, which made the
   first thing anyone read a paragraph about paperwork. It is still true and
   still needs saying — just not louder than the studio. */
.studio-console .service-notice{
  border-color:rgba(201,162,39,.2);background:rgba(201,162,39,.05);
  color:var(--s-mute);font-size:11.5px;margin:-10px 0 20px;
}
.studio-console .service-notice strong{color:var(--s-brass)}

/* Same reason as .ahelp--ltr in the panel: a provider's English sentence needs
   its own direction, or the RTL page moves its punctuation. */
.s-help--ltr{direction:ltr;text-align:left;unicode-bidi:isolate}
