/*
 * Imagora design system
 * ---------------------------------------------------------------------------
 * A single source of truth for colour, type, spacing, radius and elevation.
 * Loaded after style.css so it can normalise the base components that were
 * written ad hoc across 50+ pages, without touching any layout dimension.
 *
 * Rules kept deliberately strict:
 *   1. One accent colour. Semantic colours are only used for state.
 *   2. No glow, no scan lines, no decorative gradients on surfaces.
 *   3. Borders do the separating, shadows stay under 8% opacity.
 *   4. Spacing is a 4px scale, type is a 2px scale.
 */

:root {
    /* Surfaces */
    --ds-bg: #04060b;
    --ds-surface: #0a0e16;
    --ds-surface-raised: #101724;
    --ds-surface-hover: #151d2c;
    --ds-overlay: #131a26;

    /* Lines */
    --ds-line: rgba(255, 255, 255, .08);
    --ds-line-strong: rgba(120, 220, 255, .20);

    /* Text */
    --ds-text: #e8f4fa;
    --ds-text-soft: #93a7bd;
    --ds-text-dim: #5f7186;
    --ds-text-inverse: #0a0c11;

    /* Brand */
    --ds-accent: #22d3ee;
    --ds-accent-hover: #5ce1f5;
    --ds-accent-soft: rgba(34, 211, 238, .12);
    --ds-accent-line: rgba(34, 211, 238, .32);

    /* Brand — logo 专用，保留紫色识别，不跟交互色走 */
    --ds-brand: #6d5cff;
    --ds-brand-soft: rgba(109, 92, 255, .16);

    /* State */
    --ds-ok: #35d399;
    --ds-ok-soft: rgba(53, 211, 153, .12);
    --ds-warn: #e8b13c;
    --ds-warn-soft: rgba(232, 177, 60, .12);
    --ds-danger: #f0685f;
    --ds-danger-soft: rgba(240, 104, 95, .12);
    --ds-info: #4aa8ff;
    --ds-info-soft: rgba(74, 168, 255, .12);

    /* Radius */
    --ds-r-xs: 6px;
    --ds-r-sm: 8px;
    --ds-r-md: 10px;
    --ds-r-lg: 14px;
    --ds-r-xl: 18px;
    --ds-r-pill: 999px;

    /* Elevation */
    --ds-shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
    --ds-shadow-md: 0 6px 20px rgba(0, 0, 0, .28);
    --ds-shadow-lg: 0 18px 48px rgba(0, 0, 0, .36);

    /* Type */
    --ds-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    --ds-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Layout */
    --ds-page-max: 1360px;
    --ds-gutter: 24px;
}

/* ---------------------------------------------------------------- base ---- */
body {
    background-color: var(--ds-bg);
    background-image:
        linear-gradient(rgba(120, 200, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 200, 255, .035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--ds-text);
    font-family: var(--ds-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--ds-accent);
    color: #04181e;
}

/* A focus ring that is visible on every surface and never clipped. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
    border-radius: var(--ds-r-sm);
}

/* ------------------------------------------------------------- buttons ---- */
/* Colour and weight only. Height and width stay owned by style.css so the
   existing form layouts do not shift. */
.btn {
    border-radius: var(--ds-r-md);
    font-weight: 600;
    letter-spacing: .01em;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

/* No hover lift: the 1px translate made dense button rows jitter. */
.btn:hover,
.btn:active {
    transform: none;
}

.btn-primary {
    background: var(--ds-accent);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .30), 0 6px 18px rgba(34, 211, 238, .16);
    color: #04181e;
}

.btn-primary:hover {
    background: var(--ds-accent-hover);
}

.btn-primary:disabled,
.btn-primary[disabled] {
    background: var(--ds-surface-hover);
    color: var(--ds-text-dim);
    cursor: not-allowed;
}

.btn-ghost {
    border: 1px solid var(--ds-line-strong);
    background: transparent;
    color: var(--ds-text-soft);
}

.btn-ghost:hover {
    background: var(--ds-surface-hover);
    color: var(--ds-text);
}

.btn-danger {
    background: var(--ds-danger);
    color: #fff;
}

.btn-ok {
    background: var(--ds-ok);
    color: var(--ds-text-inverse);
}

/* ---------------------------------------------------------------- cards ---- */
/*
 * Every page builds its panels from .card / .card-header / .card-body, so this
 * is the single place that decides how a panel looks. The legacy rules painted
 * a gradient plus a 24px radius and a 60px drop shadow, which read as "demo
 * dashboard" rather than a tool. Flat surface, hairline border, one radius.
 */
.card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-shadow-sm);
}

.card-header {
    border-bottom: 1px solid var(--ds-line);
}

.card-header h2,
.card-header h3,
.card-header h4 {
    letter-spacing: -.01em;
    font-weight: 650;
    color: var(--ds-text);
}

.card-header p,
.card-subtitle {
    color: var(--ds-text-dim);
}

/* --------------------------------------------------------------- forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ds-text-soft);
    font-size: 12.5px;
    font-weight: 600;
}

.form-hint,
.field-hint {
    margin-top: 6px;
    color: var(--ds-text-dim);
    font-size: 12px;
    line-height: 1.6;
}

/* -------------------------------------------------------------- inputs ---- */
.input,
.select,
.textarea {
    background: var(--ds-surface-raised);
    border: 1px solid var(--ds-line-strong);
    border-radius: var(--ds-r-md);
    color: var(--ds-text);
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--ds-text-dim);
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: rgba(255, 255, 255, .2);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--ds-accent);
    background: var(--ds-surface-hover);
    box-shadow: 0 0 0 3px var(--ds-accent-soft);
    outline: none;
}

/* -------------------------------------------------------------- notices ---- */
.notice {
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-md);
    color: var(--ds-text-soft);
    font-size: 13px;
    line-height: 1.65;
    background: var(--ds-surface-raised);
}

.notice.error,
.notice.danger {
    border-color: rgba(240, 104, 95, .28);
    background: var(--ds-danger-soft);
    color: #ffb4ae;
}

.notice.success,
.notice.good {
    border-color: rgba(53, 211, 153, .26);
    background: var(--ds-ok-soft);
    color: #9df0cb;
}

.notice.warn,
.notice.warning {
    border-color: rgba(232, 177, 60, .26);
    background: var(--ds-warn-soft);
    color: #f0cf92;
}

.notice.info {
    border-color: rgba(74, 168, 255, .26);
    background: var(--ds-info-soft);
    color: #a8d4ff;
}

/* --------------------------------------------------------------- tables ---- */
.table th {
    color: var(--ds-text-dim);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.table td {
    color: var(--ds-text-soft);
    font-size: 13px;
}

.table th,
.table td {
    border-bottom: 1px solid var(--ds-line);
}

.table tbody tr:hover td {
    background: var(--ds-surface-hover);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

/* --------------------------------------------------------------- status ---- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: var(--ds-r-pill);
    border: 1px solid var(--ds-line-strong);
    background: var(--ds-surface-raised);
    color: var(--ds-text-soft);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
}

.status-pill.success,
.status-pill.good {
    border-color: rgba(53, 211, 153, .26);
    background: var(--ds-ok-soft);
    color: #8fe9c4;
}

.status-pill.error,
.status-pill.danger {
    border-color: rgba(240, 104, 95, .26);
    background: var(--ds-danger-soft);
    color: #ffb0aa;
}

.status-pill.warn,
.status-pill.pending,
.status-pill.processing {
    border-color: rgba(232, 177, 60, .26);
    background: var(--ds-warn-soft);
    color: #f2d093;
}

/* ----------------------------------------------------------------- stat ---- */
.stat {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-md);
    text-align: left;
}

.stat strong {
    color: var(--ds-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.stat span {
    color: var(--ds-text-dim);
}

/* --------------------------------------------------------------- upload ---- */
.upload-box {
    border: 1.5px dashed var(--ds-line-strong);
    background: var(--ds-surface-raised);
    border-radius: var(--ds-r-md);
    transition: border-color .16s ease, background-color .16s ease;
}

.upload-box:hover,
.upload-box.dragover {
    border-color: var(--ds-accent-line);
    background: var(--ds-surface-hover);
}

/* ----------------------------------------------------------------- hero ---- */
.hero h1 {
    letter-spacing: -.02em;
    font-weight: 700;
    color: var(--ds-text);
}

.hero p {
    color: var(--ds-text-soft);
}

/* ---------------------------------------------------------------- misc ---- */
/*
 * Wide-screen tuning. The operator runs this at ~3400 CSS px, where the old
 * 1500px studio cap left roughly 800px of empty space on each side and the
 * generator page looked like a phone layout floating in a desktop window.
 */
.studio-shell {
    max-width: min(2080px, 100%);
}

@media (min-width: 1800px) {
    .content {
        padding: 32px 44px 56px;
    }

    .topbar {
        padding: 0 44px;
    }
}

@media (min-width: 2400px) {
    .content {
        padding: 36px 56px 64px;
    }
}

a {
    text-underline-offset: 2px;
}

button:disabled,
.btn:disabled,
.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

img {
    max-width: 100%;
}

/* ---------------------------------------------------------------- chips ---- */
.ds-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: var(--ds-r-pill);
    border: 1px solid var(--ds-line-strong);
    background: var(--ds-surface-raised);
    color: var(--ds-text-soft);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ds-chip.is-accent {
    border-color: var(--ds-accent-line);
    background: var(--ds-accent-soft);
    color: #b9c2ff;
}

.ds-chip.is-ok {
    border-color: rgba(53, 211, 153, .3);
    background: var(--ds-ok-soft);
    color: var(--ds-ok);
}

.ds-chip.is-warn {
    border-color: rgba(232, 177, 60, .3);
    background: var(--ds-warn-soft);
    color: var(--ds-warn);
}

.ds-chip.is-danger {
    border-color: rgba(240, 104, 95, .3);
    background: var(--ds-danger-soft);
    color: var(--ds-danger);
}

/* ------------------------------------------------------------- sections ---- */
.ds-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ds-text-dim);
}

.ds-section-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -.015em;
    font-weight: 680;
    color: var(--ds-text);
}

.ds-section-desc {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ds-text-soft);
}

.ds-divider {
    height: 1px;
    background: var(--ds-line);
    border: 0;
    margin: 20px 0;
}

/* ------------------------------------------------------------------ nav ---- */
/* The sidebar keeps its geometry; only the palette is normalised. */
.sidebar {
    background: var(--ds-surface);
    border-right: 1px solid var(--ds-line);
    padding: 18px 12px 14px;
    display: flex;
    flex-direction: column;
}

.brand {
    margin: 0 4px 16px;
    padding: 4px 6px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--ds-r-md);
}

.brand:hover {
    text-decoration: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-text strong {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ds-text);
    line-height: 1.2;
}

.brand-text em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--ds-text-dim);
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--ds-r-md);
    background: var(--ds-brand);
    box-shadow: 0 0 0 1px rgba(109, 92, 255, .35) inset;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -2px;
    padding: 0 6px;
}

.nav-section {
    margin: 0 0 14px;
}

.nav-title {
    margin: 0 0 4px;
    padding: 0 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ds-text-dim);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    margin: 1px 0;
    padding: 0 10px;
    border-radius: var(--ds-r-sm);
    color: var(--ds-text-soft);
    font-size: 13.5px;
    font-weight: 550;
    text-decoration: none;
    transition: background-color .14s ease, color .14s ease;
}

.nav-link:hover {
    background: var(--ds-surface-hover);
    color: var(--ds-text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--ds-accent-soft);
    color: var(--ds-accent-hover);
    font-weight: 600;
}

/* A 2px rail marks the current page; the tint alone is easy to miss. */
.nav-link.active:before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--ds-accent);
}

.nav-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: inherit;
    opacity: .82;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    opacity: 1;
}

.ds-icon {
    display: block;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-footer {
    margin: 10px 4px 0;
    padding: 10px 8px 2px;
    border-top: 1px solid var(--ds-line);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ds-text-dim);
    font-size: 11.5px;
    line-height: 1.6;
}

.sidebar-footer a {
    color: var(--ds-text-soft);
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: var(--ds-text);
    text-decoration: underline;
}

.sidebar-footer-dot {
    opacity: .5;
}

.topbar {
    border-bottom: 1px solid var(--ds-line);
    background: rgba(8, 9, 12, .82);
    backdrop-filter: blur(12px);
}

.page-title h2 {
    letter-spacing: -.01em;
    font-weight: 650;
}

.page-title span {
    color: var(--ds-text-dim);
}

.help-link {
    color: var(--ds-text-soft);
    border: 1px solid var(--ds-line-strong);
    background: transparent;
    text-decoration: none;
    transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}

.help-link:hover {
    background: var(--ds-surface-hover);
    color: var(--ds-text);
    text-decoration: none;
}


/* ------------------------------------------------------------ utilities ---- */
.ds-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ds-spacer {
    flex: 1;
}

.ds-muted {
    color: var(--ds-text-soft);
}

.ds-dim {
    color: var(--ds-text-dim);
}

.ds-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------- scrollbars ----- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .16) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: var(--ds-r-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .24);
    background-clip: content-box;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ============================================================ primitives === */
/*
 * Shared page primitives. Everything here is a normalisation layer on top of
 * style.css: it does not introduce layout, it only replaces the ad-hoc colours
 * and weights that were copy-pasted between pages.
 */

/* The top bar already prints the page title, so pages open with a lead line
   instead of a second <h1>. */
.page-lead {
    margin: 0;
    max-width: 860px;
    color: var(--ds-text-soft);
    font-size: 13.5px;
    line-height: 1.72;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border: 1px solid var(--ds-accent-line);
    border-radius: var(--ds-r-pill);
    background: var(--ds-accent-soft);
    color: var(--ds-accent-hover);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Segmented choice groups. Pages used to ship 44px, 800-weight, cyan-tinted
   buttons here, which read as primary calls to action competing with the real
   submit button. One shared look keeps the wizard calm. */
[data-choice-group] {
    display: grid;
    gap: 8px;
}

[data-choice-group] button {
    min-height: 38px !important;
    padding: 0 12px !important;
    border: 1px solid var(--ds-line-strong) !important;
    border-radius: var(--ds-r-sm) !important;
    background: var(--ds-surface) !important;
    color: var(--ds-text-soft) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}

[data-choice-group] button:hover {
    border-color: var(--ds-line-strong) !important;
    background: var(--ds-surface-hover) !important;
    color: var(--ds-text) !important;
}

[data-choice-group] button.active {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-accent-soft) !important;
    color: var(--ds-accent-hover) !important;
    font-weight: 650 !important;
}

[data-choice-group].is-disabled button {
    opacity: .62;
    cursor: not-allowed;
}

/* A group can be inert (the colour chips only matter once a multi-piece set is
   selected). Keep the chosen value readable but visibly inactive, instead of
   flagging it in warning yellow, which read as an error the user had to fix. */
[data-choice-group].is-disabled button.active {
    border-color: var(--ds-line-strong) !important;
    background: var(--ds-surface-hover) !important;
    color: var(--ds-text-soft) !important;
}

/* Toasts: style.css painted errors as a saturated red gradient block. State is
   carried by the icon-free border and a 14% tint, not by a wall of red. */
.page-toast {
    min-width: 240px !important;
    padding: 12px 16px !important;
    border-radius: var(--ds-r-md) !important;
    border: 1px solid var(--ds-line-strong) !important;
    background: var(--ds-overlay) !important;
    box-shadow: var(--ds-shadow-lg) !important;
    color: var(--ds-text) !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 550 !important;
    line-height: 1.55 !important;
}

.page-toast.error {
    border-color: rgba(240, 104, 95, .38) !important;
    background: var(--ds-overlay) !important;
    box-shadow: var(--ds-shadow-lg) !important;
    color: #ffc4c0 !important;
}

.page-toast.success {
    border-color: rgba(53, 211, 153, .36) !important;
    background: var(--ds-overlay) !important;
    color: #b6f0d6 !important;
}

/* Wide data tables: scroll inside their card instead of pushing the page. */
.ds-table-scroll {
    overflow-x: auto;
    margin-inline: -2px;
    padding-inline: 2px;
}

/* --------------------------------------------------------------- top bar --- */
/* The page subtitle sits under the title in a two-row grid. Long subtitles
   used to wrap to a second line and collide with the title; one line keeps the
   bar a fixed height. */
.topbar .page-title span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar { min-height: 60px; }
.top-actions { flex: 0 0 auto; gap: 8px; }

@media (max-width: 1180px) {
    .topbar .page-title span { display: none; }
}

/* ------------------------------------------------------- studio surfaces --- */
/*
 * style.css still carries the original decorative layer: a purple radial glow
 * behind the compose card, a magenta gradient on the help button, a
 * blue-to-pink gradient on submit, and a green accent for every selected chip.
 * Those four things are why the product read as a generic AI demo. Everything
 * below replaces the decoration with the surface/line/accent scale; sizes and
 * positions are untouched.
 */
.studio-card {
    border-radius: var(--ds-r-lg) !important;
    background: var(--ds-surface) !important;
    border: 1px solid var(--ds-line) !important;
    box-shadow: none !important;
}

.studio-card:before {
    display: none !important;
}

.studio-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px !important;
    border: 1px solid var(--ds-line-strong) !important;
    border-radius: var(--ds-r-sm) !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ds-text-soft) !important;
    font-size: 12.5px !important;
    line-height: 1;
    white-space: nowrap;
}

.studio-help:hover {
    background: var(--ds-surface-hover) !important;
    border-color: var(--ds-line-strong) !important;
    color: var(--ds-text) !important;
}

.studio-help .ds-icon {
    flex: 0 0 auto;
}

.studio-submit {
    border-radius: var(--ds-r-md) !important;
    background: var(--ds-accent) !important;
    box-shadow: none !important;
}

.studio-submit:hover {
    background: var(--ds-accent-hover) !important;
}

.studio-submit span {
    color: rgba(4, 24, 30, .82) !important;
}

.studio-tabs .tab.active {
    background: var(--ds-accent-soft) !important;
    box-shadow: none !important;
    color: var(--ds-accent-hover) !important;
}

.studio-mode.active {
    background: var(--ds-accent-soft) !important;
    border-color: var(--ds-accent-line) !important;
    box-shadow: none !important;
}

.studio-mode i {
    background: var(--ds-accent) !important;
    box-shadow: none !important;
}

.studio-mode-icon {
    background: var(--ds-accent-soft) !important;
    color: #a9b4ff !important;
}

.studio-ratio-card:hover,
.studio-language-card:hover,
.studio-section-card:hover {
    border-color: var(--ds-line-strong) !important;
    background: var(--ds-surface-hover) !important;
}

.studio-ratio-card.active {
    background: var(--ds-accent-soft) !important;
    border-color: var(--ds-accent-line) !important;
    color: var(--ds-accent-hover) !important;
}

.studio-language-card.active,
.studio-section-card.active {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-accent-soft) !important;
    color: var(--ds-accent-hover) !important;
}

.studio-language-card.active span {
    color: var(--ds-text-soft) !important;
}

.studio-preview-panel {
    border-radius: var(--ds-r-lg) !important;
    background: var(--ds-surface) !important;
    border: 1px solid var(--ds-line) !important;
    box-shadow: none !important;
}

.studio-preview-empty {
    border-radius: var(--ds-r-md) !important;
    border: 1px dashed var(--ds-line-strong) !important;
    background: transparent !important;
    color: var(--ds-text-dim) !important;
}

.studio-preview-icon,
.studio-upload-icon {
    background: var(--ds-surface-raised) !important;
    border-radius: var(--ds-r-md) !important;
    color: var(--ds-text-soft) !important;
}

.studio-upload {
    border: 1px dashed var(--ds-line-strong) !important;
    border-radius: var(--ds-r-md) !important;
    background: rgba(255, 255, 255, .02) !important;
}

.studio-upload:hover {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-accent-soft) !important;
}

.studio-model-trigger {
    height: 44px !important;
    border: 1px solid var(--ds-line-strong) !important;
    border-radius: var(--ds-r-sm) !important;
    background: var(--ds-surface-raised) !important;
    box-shadow: none !important;
    color: var(--ds-text) !important;
    font-weight: 600 !important;
}

.studio-model-trigger:hover,
.studio-model-control.open .studio-model-trigger {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-surface-hover) !important;
    box-shadow: none !important;
}

.studio-model-trigger span {
    font-size: 14px !important;
}

.studio-model-menu {
    border: 1px solid var(--ds-line-strong) !important;
    border-radius: var(--ds-r-md) !important;
    background: var(--ds-overlay) !important;
    box-shadow: var(--ds-shadow-lg) !important;
}

.studio-model-option strong {
    font-size: 14px !important;
}

.studio-model-option em {
    color: var(--ds-warn) !important;
    font-size: 12px !important;
}

.studio-field {
    height: 44px !important;
    border-radius: var(--ds-r-sm) !important;
    background: var(--ds-surface-raised) !important;
    border: 1px solid var(--ds-line-strong) !important;
    color: var(--ds-text) !important;
}

.studio-deal {
    border-radius: var(--ds-r-md) !important;
    background: rgba(232, 177, 60, .07) !important;
    border: 1px solid rgba(232, 177, 60, .3) !important;
    box-shadow: none !important;
}

.studio-discount {
    background: var(--ds-warn) !important;
    color: #2b2200 !important;
    box-shadow: none !important;
}

.studio-deal-badge {
    background: var(--ds-warn) !important;
    color: #2b2200 !important;
}

/* -------------------------------------------------- entry promo cards ----- */
/*
 * The two shortcut cards above the compose form were the loudest thing on the
 * page: a blue-green gradient block with a 48px, 900-weight button in a teal
 * accent and dark text on top. They are navigation, not the primary action.
 */
.fast-batch-entry {
    margin: 0 0 18px !important;
    padding: 14px 16px !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-r-lg) !important;
    background: var(--ds-surface-raised) !important;
    box-shadow: none !important;
}

.fast-batch-entry strong {
    color: var(--ds-text) !important;
    font-size: 13.5px !important;
    font-weight: 650 !important;
}

.fast-batch-entry span {
    color: var(--ds-text-soft) !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
}

.fast-batch-entry-action {
    min-height: 34px !important;
    padding: 0 14px !important;
    border: 1px solid var(--ds-line-strong) !important;
    border-radius: var(--ds-r-sm) !important;
    background: var(--ds-surface-hover) !important;
    box-shadow: none !important;
    color: var(--ds-text) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
}

.fast-batch-entry-action:hover {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-accent-soft) !important;
    color: var(--ds-accent-hover) !important;
}

/* ------------------------------------------------------- cs batch pages --- */
/*
 * The Excel/CSV batch pages carried a second decoration set: a violet radial
 * glow behind the uploaders, a green-tinted Excel drop zone, and a primary
 * button stretched across the whole form. Normalised to the surface scale.
 */
.cs-image-uploader,
.cs-excel-uploader {
    border: 1px dashed var(--ds-line-strong) !important;
    border-radius: var(--ds-r-md) !important;
    background: rgba(255, 255, 255, .02) !important;
}

.cs-image-uploader:hover,
.cs-excel-uploader:hover {
    border-color: var(--ds-accent-line) !important;
    background: var(--ds-accent-soft) !important;
}

.cs-upload-glow {
    display: none !important;
}

.cs-upload-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--ds-r-md) !important;
    background: var(--ds-accent-soft) !important;
    box-shadow: none !important;
    color: #a9b4ff !important;
    font-size: 20px !important;
    margin-bottom: 10px !important;
}

.cs-image-uploader strong,
.cs-excel-uploader strong {
    color: var(--ds-text) !important;
    font-size: 13.5px !important;
}

.cs-image-uploader span,
.cs-excel-uploader span {
    color: var(--ds-text-soft) !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
}

.cs-prompt-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.cs-prompt-actions .btn {
    width: auto !important;
    min-width: 168px !important;
}

/* Placeholder box for an image whose file was removed by the retention job. */
.ds-img-missing {
    background: var(--ds-surface-raised) !important;
    object-fit: contain !important;
}

/* Stat strips: style.css pinned three columns, so a four-stat page (task
   detail) dropped its fourth card onto a lonely second row. */
.stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}
