/* Dark mode, refreshed (2026-11-26). Neutral charcoal with a slight cool tint instead of navy, clear depth
   steps (page < panel < card), solid brand-blue primary buttons with white text and a solid green Publish.
   Light mode is unchanged: every rule here starts with html[data-theme=dark]. Loaded after the other
   stylesheets (mobile.css stays last). */
html[data-theme=dark]{
 --studio-bg:#0d1117; --studio-panel:#151b23; --studio-soft:#1c2430; --studio-ink:#e6edf3;
 --studio-muted:#9da7b3; --studio-line:#2b3440; --studio-accent:#8ab4ff;
 --balanced-blue:#3b82f6; --balanced-wash:#1a2a44; --balanced-shadow:0 1px 0 #ffffff06 inset,0 10px 30px #00000055;
 --dark-input:#0f141b; --dark-hover:#232c39; --dark-green:#16a34a; --dark-green-hover:#15803d; --dark-blue-hover:#2f6fe0;
 color-scheme:dark;
}
html[data-theme=dark] body.balanced-studio{background:var(--studio-bg);color:var(--studio-ink)}
html[data-theme=dark] body.balanced-studio ::selection{background:#3b82f655}

/* Header, side menu, panels */
html[data-theme=dark] body.balanced-studio :is(.editor-head,.app-header,header){border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio .panel{background:var(--studio-panel);border:1px solid var(--studio-line);box-shadow:var(--balanced-shadow)}
html[data-theme=dark] body.balanced-studio .studio-toolbar{background:transparent;border:0;box-shadow:none}
html[data-theme=dark] body.balanced-studio .studio-section-tabs>button{color:var(--studio-muted)}
html[data-theme=dark] body.balanced-studio .studio-section-tabs>button:hover{background:var(--dark-hover);color:var(--studio-ink)}
html[data-theme=dark] body.balanced-studio .studio-section-tabs>button[aria-pressed=true]{background:var(--balanced-wash);color:#cfe0ff;box-shadow:inset 3px 0 0 var(--balanced-blue)}

/* Form fields: a step darker than the panel, blue focus ring */
html[data-theme=dark] body.balanced-studio :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--dark-input);border-color:var(--studio-line);color:var(--studio-ink);box-shadow:none}
html[data-theme=dark] body.balanced-studio :is(input,select,textarea):focus-visible{outline:2px solid #3b82f6aa;outline-offset:1px;border-color:var(--balanced-blue)}
html[data-theme=dark] body.balanced-studio input[type=checkbox]{accent-color:var(--balanced-blue)}

/* Buttons */
html[data-theme=dark] body.balanced-studio :is(.primary,.small-primary){background:var(--balanced-blue);border-color:var(--balanced-blue);color:#fff}
html[data-theme=dark] body.balanced-studio :is(.primary,.small-primary):hover:not(:disabled){background:var(--dark-blue-hover);border-color:var(--dark-blue-hover)}
html[data-theme=dark] body.balanced-studio :is(.quiet,.text-button){background:transparent;color:var(--studio-ink);border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio :is(.quiet,.text-button):hover:not(:disabled){background:var(--dark-hover)}
html[data-theme=dark] body.balanced-studio button:disabled{opacity:.45}
html[data-theme=dark] body.balanced-studio :is(.danger,.delete-uploaded-file){color:#ff9ba5;border-color:#6b2f37;background:transparent}
/* Bottom bar and card bars: Save = blue outline, Review changes = solid blue, Publish live = solid green. */
html[data-theme=dark] body.balanced-studio .editor-publish-actions{background:#11161dcc;backdrop-filter:blur(10px);border-top-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio :is(.editor-publish-actions>.primary,.editor-publish-actions #review-publish,.carousel-card-actions>button.primary){background:transparent;color:#a9c8ff;border:1px solid var(--balanced-blue)}
html[data-theme=dark] body.balanced-studio :is(.editor-publish-actions #review-publish,.carousel-card-actions>button.primary:nth-child(2)){background:var(--dark-green);color:#fff;border-color:var(--dark-green)}
html[data-theme=dark] body.balanced-studio .carousel-card-actions>button.primary:nth-child(2):hover:not(:disabled){background:var(--dark-green-hover)}
html[data-theme=dark] body.balanced-studio .editor-publish-actions .review-changes-open{background:var(--balanced-blue);color:#fff;border-color:var(--balanced-blue)}
html[data-theme=dark] body.balanced-studio .review-changes-count{background:#fff;color:#1d4ed8}

/* Cards and lists inside panels */
html[data-theme=dark] body.balanced-studio :is(.va-card,.va-row,.review-item,.offers-list-item,.qs-thumb,.category-order-row,.managed-poster-item,.media-field){background:var(--studio-soft);border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio :is(.va-card-head,.qs-thumb):hover{background:var(--dark-hover)}
html[data-theme=dark] body.balanced-studio .va-card-image,html[data-theme=dark] body.balanced-studio .media-thumb{background:var(--dark-input)}
html[data-theme=dark] body.balanced-studio :is(.muted,.studio-section-help,.editor-button-help){color:var(--studio-muted)}

/* Older hard-coded dark colours, brought onto the same palette */
html[data-theme=dark] body.balanced-studio :is(.content-workflow,.coupon-tools,.preview-panel,.publish-dialog,.media-picker){background:var(--studio-panel);color:var(--studio-ink)}
html[data-theme=dark] body.balanced-studio .bulk-panel{background:var(--studio-panel)}
html[data-theme=dark] body.balanced-studio .bulk-list{background:var(--dark-input);border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio .bulk-row{border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio .bulk-top strong{color:var(--studio-accent)}
html[data-theme=dark] body.balanced-studio :is(.content-workflow .eyebrow,.preview-head .eyebrow,.image-guide>strong){color:#7dd3c0}
html[data-theme=dark] :is(.review-changes,.csg-confirm){background:var(--studio-panel);border-color:var(--studio-line);color:var(--studio-ink)}
html[data-theme=dark] :is(.review-changes,.csg-confirm)::backdrop{background:#00000099}
html[data-theme=dark] .review-unsaved{background:#3a2a10;color:#fcd34d}
/* Explore: carousel switcher, cards, empty image frames and borders in dark mode. */
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-jump{border-color:var(--studio-line);background:var(--studio-panel)}
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-jump-button[aria-pressed=true]{background:var(--balanced-wash);color:#cfe0ff}
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-thumb[aria-pressed=true]{border-color:var(--balanced-blue);box-shadow:0 0 0 2px #3b82f633}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]{border-color:var(--studio-line);background:var(--studio-panel)}
html[data-theme=dark] body.balanced-studio #carousel-studio>section.qs-open{border-color:var(--balanced-blue);background:linear-gradient(110deg,var(--studio-soft),var(--studio-panel) 70%)}
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-thumb-image,
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-image-frame{background:var(--dark-input);border-color:var(--studio-line);color:var(--studio-muted)}
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-image-placeholder{color:var(--studio-muted)}
html[data-theme=dark] body.balanced-studio #carousel-studio .carousel-thumbnail{border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-placement,
html[data-theme=dark] body.balanced-studio #carousel-studio .carousel-own-details,
html[data-theme=dark] body.balanced-studio #carousel-studio .qs-advanced{border-color:var(--studio-line);background:var(--studio-panel)}
html[data-theme=dark] body.balanced-studio #carousel-studio .carousel-card-actions{border-top-color:var(--studio-line);background:var(--studio-panel)}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]>.qs-row-summary{background:#17253b;border-color:#2b4570;color:#dbeafe}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]>.qs-row-summary .va-row-summary-text{color:#eff6ff}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]>.qs-row-summary .va-row-pill{background:#232c39;color:#cbd5e1}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]>.qs-row-summary .va-row-pill.is-live{background:#14532d;color:#86efac}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel]>.qs-row-summary .va-row-pill.is-live::before{background:#4ade80}
html[data-theme=dark] body.balanced-studio #carousel-studio>section[data-channel=popular]>.explore-popular-title-box{background:var(--studio-soft);border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio .explore-title-live{background:#0f291e;border-color:#1e5c3e;color:#d1fae5}
html[data-theme=dark] body.balanced-studio .explore-title-live .va-live-label{background:#14532d;color:#86efac}
html[data-theme=dark] body.balanced-studio .explore-title-live .va-live-label::before{background:#4ade80}
html[data-theme=dark] body.balanced-studio .explore-title-live .va-live-rows{color:#ecfdf5}
html[data-theme=dark] body.balanced-studio .explore-title-live .va-row-pill.is-warn{background:#451a03;color:#fde68a}
/* View all: readable danger text on dark row cards. */
html[data-theme=dark] body.balanced-studio #view-all-studio .va-row .danger-text,
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor,#offers-list) .va-card-status.error,
html[data-theme=dark] body.balanced-studio #view-all-studio .va-status.error{color:#fda29b}
html[data-theme=dark] body.balanced-studio #view-all-studio .va-live{background:#0f291e;border-color:#1e5c3e;color:#d1fae5}
html[data-theme=dark] body.balanced-studio #view-all-studio .va-live-label{background:#14532d;color:#86efac}
html[data-theme=dark] body.balanced-studio #view-all-studio .va-live-label::before{background:#4ade80}
html[data-theme=dark] body.balanced-studio #view-all-studio .va-live-rows{color:#ecfdf5}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-summary{background:#17253b;border-color:#2b4570;color:#dbeafe}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-summary-text{color:#eff6ff}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-pill{background:#232c39;color:#cbd5e1}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-pill.is-live{background:#14532d;color:#86efac}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-pill.is-live::before{background:#4ade80}
html[data-theme=dark] body.balanced-studio :is(#view-all-studio,.va-sponsor) .va-row-pill.is-warn{background:#451a03;color:#fde68a}
html[data-theme=dark] body.balanced-studio #app-display-form .cat-live{background:#0f291e;border-color:#1e5c3e;color:#d1fae5}
html[data-theme=dark] body.balanced-studio #app-display-form .va-live-label{background:#14532d;color:#86efac}
html[data-theme=dark] body.balanced-studio #app-display-form .va-live-label::before{background:#4ade80}
html[data-theme=dark] body.balanced-studio #app-display-form .va-live-rows{color:#ecfdf5}
html[data-theme=dark] body.balanced-studio #app-display-form .cat-live-hidden{color:#a7f3d0}
html[data-theme=dark] body.balanced-studio #app-display-form .cat-steps{color:var(--studio-muted)}
html[data-theme=dark] body.balanced-studio #app-display-form .cat-steps strong{color:var(--studio-ink)}
html[data-theme=dark] body.balanced-studio .category-order-row.is-hidden{background:var(--dark-input);border-color:var(--studio-line)}
html[data-theme=dark] body.balanced-studio .category-order-row.cat-dragging{border-color:var(--balanced-blue);box-shadow:0 10px 24px #00000066}
html[data-theme=dark] body.balanced-studio .cat-grip{background:var(--dark-input);border-right-color:var(--studio-line);color:var(--studio-muted)}
html[data-theme=dark] body.balanced-studio .category-order-row.cat-dragging .cat-grip{background:var(--balanced-wash)}
html[data-theme=dark] body.balanced-studio .cat-place{color:var(--studio-ink)}
html[data-theme=dark] body.balanced-studio .cat-hidden-badge{background:#431407;color:#fdba74;border-color:#9a3412}
html[data-theme=dark] body.balanced-studio .csg-cat-chip{box-shadow:0 3px 6px rgba(0,0,0,.35)}
html[data-theme=dark] body.balanced-studio #app-display-form .launch-status{color:#9fc6ff}
html[data-theme=dark] body.balanced-studio #app-display-form .launch-status.error{color:#fda29b}
/* Manage uploaded images inside the business logo card: only a top divider, no box. */
html[data-theme=dark] body.balanced-studio .media-field .balanced-media-manager{border:0;border-top:1px solid var(--studio-line);border-radius:0;background:transparent;box-shadow:none}
