/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — staging
   Selettori: [data-theme="dark"] e @media (prefers-color-scheme: dark)
   Palette: sfondo #0C0D14 → #1D2030, accenti viola #8572FF
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. TOKEN GLOBALI ────────────────────────────────────────────────────── */

/* Spostati in tokens.css (unica fonte, light + dark). */

/* ── 2. BASE & BODY ──────────────────────────────────────────────────────── */

:where(:root[data-theme="dark"],
       html.theme-dark-early:not([data-theme="light"])) body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
}

/* ── Helper mixin macro (repete per entrambi i selettori) ── */
/* Usiamo :is() per deduplicare */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])),
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {} }

/* Per semplicità, tutto il blocco principale è scritto una sola volta
   con il selettore :is(), poi un @media lo ripete. */

/* ── 3. SCREENS ──────────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .screen.active,
  #screen-queue.active,
  #screen-generated.active,
  #screen-published.active,
  #screen-profile.active,
  #screen-channels.active,
  #screen-scene.active,
  #screen-details.active,
  #screen-text.active
) {
  background: var(--bg) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sticky-zone,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .q-header {
  background: var(--bg) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .q-header h1,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .q-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .q-subtitle {
  color: var(--hint) !important;
}

/* ── 4. TOP BAR ──────────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #app-top-header {
  background: rgba(12, 13, 20, 0.88) !important;
  border-bottom-color: var(--border) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .app-top-brand {
  color: var(--text) !important;
}

/* Logo invert */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .app-top-brand img,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .desktop-sidebar-brand img.brand-logo-img {
  filter: brightness(0) invert(1);
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #app-top-avatar {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .desktop-global-search input {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .desktop-global-search input::placeholder {
  color: var(--hint) !important;
}

/* ── 5. BOTTOM BAR / MOBILE NAV ──────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main {
  background: rgba(12, 13, 20, 0.92) !important;
  border-top-color: var(--border) !important;
  border-right-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab:not(.active) {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab:not(.active) .nav-tab-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab:not(.active):hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab.active {
  background: rgba(133, 114, 255, 0.18) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab-badge {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ── 6. SEARCH & FILTER PILLS ────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .search-input {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .search-input::placeholder {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .search-icon {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tab-pill:not(.active) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tab-pill.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .queue-status-filter {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .queue-status-filter.has-filter {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.5) !important;
  color: var(--primary-light) !important;
}

/* ── 7. PRODUCT CARDS ────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .product-card,
  #cards-container-published .product-card,
  #cards-container-generated .generated-card
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-card) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .product-card:hover,
  #cards-container-published .product-card:hover
) {
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-md) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #cards-container .product-card.selected,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #cards-container-published .product-card.selected {
  background: rgba(133, 114, 255, 0.10) !important;
  border-color: var(--primary) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #cards-container .product-card.is-incomplete {
  background: rgba(133, 114, 255, 0.08) !important;
  border-color: rgba(165, 149, 255, 0.35) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .card-title,
  #cards-container .card-price,
  #cards-container-published .card-title,
  #cards-container-published .card-price
) {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .card-sub,
  #cards-container-published .card-sub
) {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .card-action-btn:not(.action-regenerate),
  #cards-container-published .card-action-btn:not(.action-regenerate)
) {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #cards-container .card-action-btn:not(.action-regenerate):hover,
  #cards-container-published .card-action-btn:not(.action-regenerate):hover
) {
  background: var(--surface3) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .card-3dot,
  #cards-container .card-3dot,
  #cards-container-published .card-3dot
) {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .card-3dot:hover,
  #cards-container .card-3dot:hover,
  #cards-container-published .card-3dot:hover
) {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

/* Card review badge */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .card-review-badge {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .card-review-badge.is-ready {
  background: var(--green-soft) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: var(--green) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .card-review-badge.is-progress {
  background: var(--orange-soft) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: var(--orange) !important;
}

/* ── 8. SELECTION BAR & TOOLBAR ──────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sel-bar {
  background: rgba(21, 23, 34, 0.96) !important;
  border-color: var(--border) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sel-all-btn {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sel-count {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar .select-toggle-new {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar #select-toggle-btn[aria-pressed="true"] {
  background: var(--surface2) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .multi-bar-inner {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-md) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 9. PROMO BANNER ─────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .queue-promo-banner {
  background: linear-gradient(135deg, #181A28 0%, #1B1E30 100%) !important;
  border-color: rgba(133, 114, 255, 0.28) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .qpb-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .qpb-desc {
  color: var(--hint) !important;
}

/* ── 10. FILTER / SORT SHEET ─────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sheet-backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .filter-preset-option {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .filter-preset-option:hover {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .filter-preset-option.selected {
  background: var(--primary-soft) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

/* Theme picker options */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .filter-preset-option[data-theme-value] {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 11. SCENE WIZARD ────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene.active {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-heading-copy h1 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-heading-copy .scene-intro {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-back-btn {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-scene .scene-card,
  #screen-scene .scene-preview
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header h3 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header p:not(.sr-only) {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading strong {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading strong svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading > span {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.3) !important;
  color: var(--primary-light) !important;
}

/* Scene choice items */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-item {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-item:hover {
  background: var(--surface2) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-item.active,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-item[aria-pressed="true"] {
  background: var(--primary-soft) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-label {
  color: inherit !important;
}

/* Generate button */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-generate-btn {
  background: var(--gradient-cta) !important;
  color: #fff !important;
  box-shadow: var(--shadow-cta) !important;
}

/* ── 12. DETAILS / EDITOR ────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-details .details-hero,
  #screen-details .edit-section-card,
  #screen-details .details-top-bar
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-details .details-page-heading {
  color: var(--text) !important;
}

/* Publication sheet on details */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-track {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-gallery.is-empty {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-caption {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-caption span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-arrow {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-arrow:hover:not(:disabled) {
  background: var(--surface3) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-dot::before {
  background: var(--border-strong) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-carousel-dot[aria-current="true"]::before {
  background: var(--primary) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-text {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-text-header h2 {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-copy {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-copy:hover {
  background: var(--surface3) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-text p {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-specs {
  border-block-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-specs dt {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-specs dd {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-edit {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-download {
  background: var(--gradient-cta) !important;
  box-shadow: var(--shadow-cta) !important;
}

/* Draft photo buttons */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .draft-photo-automatic,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .draft-photo-add {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .draft-photo-side-choice {
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(30, 32, 50, 0.85) !important;
}

/* Photo refund dialog */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .photo-refund-dialog textarea {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 13. GENERATION REVIEW ───────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review {
  --muted:         var(--hint);
  --text:          #F3F4F9;
  --border:        #252840;
  --surface:       transparent;
  --surface2:      #1D2030;
  --primary:       #8572FF;
  --primary-soft:  rgba(133,114,255,.16);
  --primary-dark:  #A495FF;
  border-top-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-title,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-side-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-intro {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .generation-review-mode,
  .generation-review-selected-count,
  .generation-review-candidate-pill
) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-selected-pill {
  background: var(--primary-soft) !important;
  border-color: rgba(133,114,255,.4) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-accepted-pill {
  background: var(--green-soft) !important;
  border-color: rgba(52,211,153,.3) !important;
  color: var(--green) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-credit-note {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-controls button {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .generation-review-controls button:not(:disabled):hover {
  border-color: var(--primary) !important;
}

/* ── 14. PROFILE SCREEN ──────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-profile .profile-card,
  #screen-profile .profile-bento-card
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-card) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-profile .profile-setting-item
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-item:hover {
  background: var(--surface2) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-sub {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-icon.is-neutral {
  color: var(--hint) !important;
}

/* Referral card */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-card {
  background: linear-gradient(135deg, #181B2A 0%, #1C1F31 100%) !important;
  border-color: rgba(133, 114, 255, 0.2) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-copy h2 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-copy > span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-icon {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-bonus-pill {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-status {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-field-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-row {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-icon {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-input {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-copy-button {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.4) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-copy-button:hover {
  background: var(--primary-mid) !important;
}

/* Tutorial row in profile */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row {
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row button {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row button:hover {
  background: var(--surface3) !important;
}

/* ── 15. ACCOUNT / PLAN SCREEN ───────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-card,
  .account-delete-card,
  .account-dialog
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-card) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-card-heading h2,
  .account-identity-name,
  .account-plan-name,
  .plan-card-title
) {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-identity-subtitle,
  .account-plan-description,
  .account-manage-note,
  .copy-title-icon
) {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-icon-button,
  .account-secondary-btn
) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-login-row,
  .account-setting-row,
  .account-security-row,
  .account-billing-row
) {
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-login-row strong,
  .account-setting-value strong,
  .account-billing-row strong,
  .account-security-copy strong
) {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .account-provider {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .account-card-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

/* Plan page */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan {
  color-scheme: dark !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan body {
  color: var(--text) !important;
  background: var(--bg) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan h2,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-app-header h1 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-app-header p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan .back-link {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-plan .page-status {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

/* ── 16. MODALS & BOTTOM SHEETS ──────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) dialog.resella-modal:not(.resella-modal--immersive):not(.resella-modal--page),
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) [role="dialog"].resella-modal:not(.resella-modal--immersive):not(.resella-modal--page) {
  color-scheme: dark !important;
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-lg) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) dialog.resella-modal::backdrop {
  background: var(--resella-modal-backdrop) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .bottom-sheet.resella-modal {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) dialog.resella-modal:is(.resella-modal--sheet, .resella-modal--center)::before {
  background: var(--border-strong) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .sheet-title {
  color: var(--text) !important;
}

/* Modal inputs */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  dialog.resella-modal,
  [role="dialog"].resella-modal,
  .account-dialog
) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  dialog.resella-modal,
  [role="dialog"].resella-modal,
  .account-dialog
) :is(input, select, textarea)::placeholder {
  color: var(--hint) !important;
}

/* Modal buttons - secondary */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-dialog-actions button:not([type="submit"]),
  #account-edit-cancel,
  #account-delete-cancel
) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Modal buttons - primary submit */
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  .account-dialog-actions button[type="submit"]:not(:disabled)
) {
  background: var(--gradient-cta) !important;
  color: #fff !important;
}

/* ── 17. TUTORIAL DIALOG ─────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-step-counter {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-desc {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-step-nav {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-start-primary {
  background: linear-gradient(115deg, #745FF5, #5B45E8) !important;
  color: #fff !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-start-secondary {
  background: transparent !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .tutorial-start-secondary:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

/* ── 18. PUBLICATION PREVIEW (share page) ────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-dialog {
  background: #0D0F1A !important;
  color: var(--text) !important;
  scrollbar-color: rgba(133, 114, 255, 0.4) transparent !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-page {
  background:
    radial-gradient(ellipse at 82% 15%, rgba(100, 80, 200, 0.18), transparent 34%),
    linear-gradient(180deg, #1A1430 0, #0E1020 36%, #0C0D14 68%, #090A10 100%) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-brand {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-top-note {
  background: rgba(133, 114, 255, 0.12) !important;
  border-color: rgba(133, 114, 255, 0.28) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-close {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-close:hover {
  background: var(--surface3) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-hero {
  background:
    radial-gradient(ellipse at 79% 42%, rgba(133, 114, 255, 0.18), transparent 37%),
    linear-gradient(120deg, rgba(21, 23, 34, 0.98), rgba(25, 20, 48, 0.94)) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-hero h1 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-eyebrow {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-intro {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-marketplace {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-marketplace-logo {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-marketplace-name {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-marketplace-status {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-feature {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-feature h3 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-feature p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-section-heading h2 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .publication-preview-section-heading p {
  color: var(--hint) !important;
}

/* ── 19. DESKTOP DASHBOARD OVERRIDES ─────────────────────────────────────── */

@media (min-width: 1024px) {
  :is(:root[data-theme="dark"],
      html.theme-dark-early:not([data-theme="light"])) :is(:root) {
    --bg:          #0C0D14;
    --text:        #F3F4F9;
    --hint:        #9499B3;
    --border:      #252840;
    --primary:     #8572FF;
    --primary-soft: rgba(133, 114, 255, 0.16);
    --primary-mid:  rgba(133, 114, 255, 0.28);
  }

  :is(:root[data-theme="dark"],
      html.theme-dark-early:not([data-theme="light"])) body {
    background: var(--bg) !important;
  }

  /* Sidebar on desktop - already dark by design; tune for consistency */
  :is(:root[data-theme="dark"],
      html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main {
    background: radial-gradient(ellipse 180px 375px at 0% 100%, rgba(133, 114, 255, 0.22), rgba(74, 49, 157, 0.09) 55%, transparent 100%), #0E0F17 !important;
    border-right-color: var(--border) !important;
  }

  /* Desktop content area */
  :is(:root[data-theme="dark"],
      html.theme-dark-early:not([data-theme="light"])) #app-top-header {
    background: rgba(12, 13, 20, 0.92) !important;
    border-bottom-color: var(--border) !important;
  }

  /* Product card on desktop */
  :is(:root[data-theme="dark"],
      html.theme-dark-early:not([data-theme="light"])) #cards-container .product-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow-card) !important;
  }
}

/* ── 20. CHANNELS SCREEN ─────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-channels .section,
  #screen-channels .channel-card
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-channels .channel-name,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-channels h2,
:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-channels h3 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-channels .channel-sub {
  color: var(--hint) !important;
}

/* ── 21. TEXT EDITOR SCREEN ──────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-text .section
) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-text input,
  #screen-text textarea,
  #screen-text select
) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-text input::placeholder,
  #screen-text textarea::placeholder
) {
  color: var(--hint) !important;
}

/* ── 22. GENERIC INPUTS & FORMS ──────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :is(
  #screen-details input:not([type="checkbox"]):not([type="radio"]),
  #screen-details textarea,
  #screen-details select,
  #screen-channels input:not([type="checkbox"]):not([type="radio"]),
  #screen-channels textarea
) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 23. TRUSTPILOT REVIEW ───────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .trustpilot-review-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .trustpilot-reviewer-name {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .trustpilot-review-text {
  color: var(--hint) !important;
}

/* ── 24. PHOTO VIEW PICKER ───────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .photo-view-picker {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .photo-view-option {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .photo-view-option.active {
  background: var(--primary-soft) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

/* ── 25. PRODUCT CAMERA ──────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .camera-controls {
  background: rgba(12, 13, 20, 0.90) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .camera-controls button {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 26. AFFILIATE DASHBOARD ─────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) #screen-profile .affiliate-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── 27. MOTION / ANIMATION ──────────────────────────────────────────────── */
/* Nothing specific — transitions use current color tokens automatically */

/* ── 28. QUEUE EMPTY STATE ───────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .queue-empty-icon {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) .queue-empty-add {
  background: var(--gradient-cta) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--shadow-cta) !important;
}

/* ── 29. FOCUS RINGS ─────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) :focus-visible {
  outline-color: var(--primary) !important;
}

/* ── 30. SCROLLBARS ──────────────────────────────────────────────────────── */

:is(:root[data-theme="dark"],
    html.theme-dark-early:not([data-theme="light"])) * {
  scrollbar-color: var(--border-strong) transparent;
}

/* ── 31. SYSTEM-PREF REPEAT ──────────────────────────────────────────────── */
/* Duplicate the same component overrides for auto/system dark-pref */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(
    .screen.active,
    #screen-queue.active,
    #screen-generated.active,
    #screen-published.active,
    #screen-profile.active,
    #screen-channels.active,
    #screen-scene.active,
    #screen-details.active,
    #screen-text.active
  ) {
    background: var(--bg) !important;
  }

  :root:not([data-theme="light"]) .sticky-zone,
  :root:not([data-theme="light"]) .q-header {
    background: var(--bg) !important;
  }

  :root:not([data-theme="light"]) #app-top-header {
    background: rgba(12, 13, 20, 0.88) !important;
    border-bottom-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) .app-top-brand img,
  :root:not([data-theme="light"]) .desktop-sidebar-brand img.brand-logo-img {
    filter: brightness(0) invert(1);
  }

  :root:not([data-theme="light"]) #app-top-avatar {
    background: var(--surface2) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #bottom-bar-main {
    background: rgba(12, 13, 20, 0.92) !important;
    border-top-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) .search-input {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .tab-pill:not(.active) {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .tab-pill.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
  }

  :root:not([data-theme="light"]) :is(
    #cards-container .product-card,
    #cards-container-published .product-card,
    #cards-container-generated .generated-card,
    #screen-profile .profile-card,
    #screen-scene .scene-card,
    #screen-details .details-hero,
    #screen-details .edit-section-card,
    #screen-text .section,
    #screen-channels .section,
    .account-card,
    .account-delete-card,
    .account-dialog,
    .bottom-sheet
  ) {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) :is(
    #cards-container .card-title,
    #cards-container .card-price,
    #cards-container-published .card-title,
    #cards-container-published .card-price,
    .account-card-heading h2,
    .account-identity-name,
    .account-plan-name,
    .plan-card-title,
    .sheet-title
  ) {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) :is(
    #cards-container .card-sub,
    #cards-container-published .card-sub,
    .account-identity-subtitle,
    .account-plan-description,
    .account-manage-note,
    .copy-title-icon
  ) {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #cards-container .product-card.is-incomplete {
    background: rgba(133, 114, 255, 0.08) !important;
    border-color: rgba(165, 149, 255, 0.35) !important;
  }

  :root:not([data-theme="light"]) #cards-container .card-action-btn:not(.action-regenerate) {
    background: var(--surface2) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .card-3dot:hover,
  :root:not([data-theme="light"]) #cards-container .card-3dot:hover {
    background: var(--surface2) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #app-top-header {
    background: rgba(12, 13, 20, 0.85) !important;
    border-bottom-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) .queue-promo-banner {
    background: linear-gradient(135deg, #181A28 0%, #1B1E30 100%) !important;
    border-color: rgba(133, 114, 255, 0.25) !important;
  }

  :root:not([data-theme="light"]) .filter-preset-option {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) dialog.resella-modal:not(.resella-modal--immersive):not(.resella-modal--page) {
    color-scheme: dark !important;
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-setting-item {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) :is(
    .account-icon-button,
    .account-secondary-btn
  ) {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .account-card-icon {
    background: var(--surface2) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .queue-empty-add {
    background: var(--gradient-cta) !important;
    border-color: transparent !important;
    color: #fff !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — REFINED OVERRIDES & FIXES (TUTTI I COMPONENTI)
   ══════════════════════════════════════════════════════════════════════════════ */

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])),
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {} }

/* ── 32. TOP BAR & SEARCH INPUT ────────────────────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-global-search,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .search-wrap,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .search-input {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #credits-floating-pill {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #credits-floating-pill:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #app-top-notifications {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #app-top-notifications:hover {
  background: var(--surface3) !important;
}

/* ── 33. DESKTOP FILTER TABS (Tutti / Da completare / Pronti / Da pubblicare / Pubblicati) ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-filter-tabs .tab-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .tab-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(#screen-generated, #screen-published) .desktop-filter-tabs .tab-pill {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: var(--hint) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-filter-tabs .tab-pill:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .tab-pill:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(#screen-generated, #screen-published) .desktop-filter-tabs .tab-pill:hover {
  background: transparent !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-filter-tabs .tab-pill.active,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .tab-pill.active,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(#screen-generated, #screen-published) .desktop-filter-tabs .tab-pill.active {
  background: transparent !important;
  border-bottom: 2px solid var(--primary) !important;
  color: var(--primary-light) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tab-badge,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tab-pill .tab-badge {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tab-pill.active .tab-badge {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

/* ── 34. TOOLBAR BUTTONS (Ordina, Data, Seleziona) ────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .filter-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .queue-sort-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .queue-date-filter-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .select-toggle-new,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar .select-toggle-new {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .filter-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .queue-sort-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .queue-date-filter-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .select-toggle-new:hover {
  background: var(--surface2) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .filter-btn-tag {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-count {
  color: var(--hint) !important;
}

/* ── 35. SMART BANNER (Invita un amico / Promo) ───────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .queue-promo-banner {
  background: linear-gradient(135deg, #161826 0%, #1A1D2E 100%) !important;
  border: 1px solid rgba(133, 114, 255, 0.28) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-icon-wrap {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-tag {
  background: rgba(133, 114, 255, 0.18) !important;
  color: #C4B8FF !important;
  border: 1px solid rgba(133, 114, 255, 0.3) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-desc {
  color: #A3A8C2 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-pill-note {
  background: rgba(52, 211, 153, 0.15) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #6EE7B7 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-cta {
  background: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-cta:hover {
  background: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-close {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .qpb-close:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

/* ── 36. SCHEDA PRODOTTO GENERATA (Generated Cards) ───────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-field-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-field-label > span {
  color: var(--hint) !important;
  text-transform: uppercase;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-description-preview {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-copy-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-copy-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-copy-btn:hover:not(:disabled),
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-copy-btn:hover:not(:disabled) {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-download-button,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-download-button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-download-button:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-download-button:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-photo-tag,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-photo-label {
  background: rgba(12, 13, 20, 0.82) !important;
  color: #F3F4F9 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ── 37. AREA PROFILO & BENTO CARDS ───────────────────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row {
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-replay,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-replay:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-tutorial-row button:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-card:hover {
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-avatar {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile.is-plan,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile.is-credits {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile > strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-credit-value > strong {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile-heading {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile.is-plan .profile-plan-tile-heading {
  color: var(--orange) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile-heading svg {
  background: rgba(133, 114, 255, 0.16) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile.is-plan .profile-plan-tile-heading svg {
  background: rgba(251, 191, 36, 0.16) !important;
  color: var(--orange) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-active-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-credit-value > span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-scene-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-scene-copy h4 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-scene-copy p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-scene-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-scene-btn:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-access-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-access-copy h2 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-access-copy p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-access-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-crm-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .admin-crm-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-legal-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-legal-item {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-legal-item:hover {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

/* ── 38. CONFIGURATORE SCENA (Scene Wizard Choices) ───────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice:hover:not([disabled]),
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice:hover:not([disabled]) {
  background: var(--surface3) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice[aria-pressed="true"] {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 2px solid var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-color-grid .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-color-grid .scene-choice {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-color-grid .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-color-grid .scene-choice[aria-pressed="true"] {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 2px solid var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-color-grid .scene-choice[disabled],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-color-grid .scene-choice[disabled] {
  background: rgba(25, 27, 40, 0.6) !important;
  border-color: rgba(37, 40, 64, 0.6) !important;
  color: var(--hint) !important;
  opacity: 0.65 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-color-grid .scene-choice[aria-pressed="true"] .scene-color-swatch {
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading > span {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

/* ── 39. SYSTEM PREF REPEAT FOR ALL NEW RULES ────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .desktop-global-search,
  :root:not([data-theme="light"]) .search-wrap,
  :root:not([data-theme="light"]) #screen-queue .search-input {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #credits-floating-pill {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #app-top-notifications {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .desktop-filter-tabs .tab-pill,
  :root:not([data-theme="light"]) #screen-queue .tab-pill,
  :root:not([data-theme="light"]) :is(#screen-generated, #screen-published) .desktop-filter-tabs .tab-pill {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: var(--hint) !important;
    box-shadow: none !important;
  }

  :root:not([data-theme="light"]) .desktop-filter-tabs .tab-pill.active,
  :root:not([data-theme="light"]) #screen-queue .tab-pill.active,
  :root:not([data-theme="light"]) :is(#screen-generated, #screen-published) .desktop-filter-tabs .tab-pill.active {
    background: transparent !important;
    border-bottom: 2px solid var(--primary) !important;
    color: var(--primary-light) !important;
    box-shadow: none !important;
  }

  :root:not([data-theme="light"]) .filter-btn,
  :root:not([data-theme="light"]) .queue-sort-btn,
  :root:not([data-theme="light"]) .queue-date-filter-btn,
  :root:not([data-theme="light"]) .select-toggle-new,
  :root:not([data-theme="light"]) #screen-queue .product-toolbar .select-toggle-new {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .filter-btn-tag {
    background: var(--primary-soft) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .queue-promo-banner {
    background: linear-gradient(135deg, #161826 0%, #1A1D2E 100%) !important;
    border: 1px solid rgba(133, 114, 255, 0.28) !important;
  }

  :root:not([data-theme="light"]) .qpb-icon-wrap {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .qpb-tag {
    background: rgba(133, 114, 255, 0.18) !important;
    color: #C4B8FF !important;
    border: 1px solid rgba(133, 114, 255, 0.3) !important;
  }

  :root:not([data-theme="light"]) .qpb-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .qpb-desc {
    color: #A3A8C2 !important;
  }

  :root:not([data-theme="light"]) .qpb-pill-note {
    background: rgba(52, 211, 153, 0.15) !important;
    border: 1px solid rgba(52, 211, 153, 0.35) !important;
    color: #6EE7B7 !important;
  }

  :root:not([data-theme="light"]) #cards-container-generated .generated-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) #cards-container-generated .generated-field-label,
  :root:not([data-theme="light"]) #cards-container-generated .generated-field-label > span {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #cards-container-generated .generated-description-preview {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #cards-container-generated .generated-copy-btn,
  :root:not([data-theme="light"]) .generated-copy-btn {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #cards-container-generated .generated-download-button,
  :root:not([data-theme="light"]) .generated-download-button {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .profile-tutorial-replay,
  :root:not([data-theme="light"]) .profile-tutorial-row button {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-user-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile,
  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile.is-plan,
  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile.is-credits {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile > strong,
  :root:not([data-theme="light"]) #screen-profile .profile-plan-credit-value > strong {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile-heading {
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-plan-tile.is-plan .profile-plan-tile-heading {
    color: var(--orange) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-plan-active-label,
  :root:not([data-theme="light"]) #screen-profile .profile-plan-credit-value > span {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-scene-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-scene-copy h4 {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-scene-copy p {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .profile-scene-btn {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .admin-access-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .admin-access-copy h2 {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .admin-access-copy p {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .admin-access-icon {
    background: var(--surface2) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #screen-profile .admin-crm-btn {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #screen-scene .scene-choice,
  :root:not([data-theme="light"]) .scene-choice {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-scene .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) .scene-choice[aria-pressed="true"] {
    background: rgba(133, 114, 255, 0.16) !important;
    border: 2px solid var(--primary) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .scene-color-grid .scene-choice,
  :root:not([data-theme="light"]) #screen-scene .scene-color-grid .scene-choice {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .scene-color-grid .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) #screen-scene .scene-color-grid .scene-choice[aria-pressed="true"] {
    background: rgba(133, 114, 255, 0.16) !important;
    border: 2px solid var(--primary) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .scene-color-grid .scene-choice[disabled],
  :root:not([data-theme="light"]) #screen-scene .scene-color-grid .scene-choice[disabled] {
    background: rgba(25, 27, 40, 0.6) !important;
    border-color: rgba(37, 40, 64, 0.6) !important;
    color: var(--hint) !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — BATCH 3: DETTAGLI PRODOTTO, MODALI, NOTIFICHE E RIGENERA
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 40. SCHERMO DETTAGLI PRODOTTO (EDIT ROWS & FORM) ────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-right,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-description-body {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row > .edit-row-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-value {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .details-field-icon,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-arrow {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-right,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-description-body {
  background: var(--surface2) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-missing-hint,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-value,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-arrow {
  color: #FCD34D !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-advanced {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-advanced summary {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #details-save-wrap {
  background: linear-gradient(180deg, transparent 0%, rgba(12, 13, 20, 0.95) 45%, #0C0D14 100%) !important;
}

/* ── 41. PULSANTE RIGENERA SU CARD PRODOTTO (Home / Queue) ────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container .action-regenerate,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .card-action-btn.action-regenerate,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .action-regenerate {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container .action-regenerate:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .action-regenerate:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container .action-regenerate .regenerate-cost,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .action-regenerate .regenerate-cost {
  color: var(--hint) !important;
}

/* ── 42. MODALE RIGENERAZIONE FOTO (Quali foto vuoi rigenerare?) ───────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-dialog {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-dialog h2 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-dialog p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-choice-options button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-choice-options button span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-choice-options button:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-choice-cancel {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .photo-regeneration-choice-cancel:hover {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-close {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-close:hover {
  background: var(--surface3) !important;
  color: var(--text) !important;
}

/* ── 43. PANNELLO NOTIFICHE (Dropdown Notifiche) ─────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-panel {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-panel-head {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-panel-title {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-mark-read {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-push-control {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-push-control[hidden] {
  display: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #push-notifications-toggle {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #push-notifications-toggle:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #push-notifications-status {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item {
  border-bottom-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item:hover {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item strong {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-desc,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-time,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-item-icon {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

/* ── 44. SYSTEM PREF REPEAT PER BATCH 3 ─────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-right,
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-description-body {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-label,
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row > .edit-row-label {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-value {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-fields .details-field-icon,
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-arrow {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-right,
  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-description-body {
    background: var(--surface2) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-label,
  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-missing-hint,
  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-value,
  :root:not([data-theme="light"]) #screen-details .details-fields > .edit-row.is-empty:not(.is-missing) .edit-row-arrow {
    color: #FCD34D !important;
  }

  :root:not([data-theme="light"]) #screen-details .details-advanced {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #details-save-wrap {
    background: linear-gradient(180deg, transparent 0%, rgba(12, 13, 20, 0.95) 45%, #0C0D14 100%) !important;
  }

  :root:not([data-theme="light"]) #cards-container .action-regenerate,
  :root:not([data-theme="light"]) .card-action-btn.action-regenerate,
  :root:not([data-theme="light"]) .action-regenerate {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .photo-regeneration-dialog {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .photo-regeneration-choice-options button {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .photo-regeneration-choice-options button span {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) #notifications-panel {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #push-notifications-toggle {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .notification-title,
  :root:not([data-theme="light"]) .notifications-item strong {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .notification-desc,
  :root:not([data-theme="light"]) .notifications-item span,
  :root:not([data-theme="light"]) .notifications-item p {
    color: var(--hint) !important;
  }
}

/* ── 45. MODALE PAYWALL / CREDITI INSUFFICIENTI ───────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-dialog {
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: 0 -14px 60px rgba(0, 0, 0, 0.75) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-handle {
  background: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-ended-badge {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-content h2 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-copy {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-current-plan {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-current-plan strong {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-teaser {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-teaser:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-teaser img {
  background: rgba(255, 255, 255, 0.05) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-name {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-price {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-price small {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-credits {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-action {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-benefits li {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-benefit-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-secondary {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-secondary:hover {
  background: var(--surface3) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-manage {
  border-top-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-manage strong {
  color: var(--primary-light) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .credits-paywall-dialog {
    background: var(--surface) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .credits-paywall-handle {
    background: var(--border-strong) !important;
  }
  :root:not([data-theme="light"]) .credits-ended-badge {
    background: rgba(133, 114, 255, 0.16) !important;
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) .credits-current-plan {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) .credits-current-plan strong {
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) .paywall-plan-teaser {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .paywall-plan-name,
  :root:not([data-theme="light"]) .paywall-plan-price {
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .credits-paywall-secondary {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) .credits-paywall-manage strong {
    color: var(--primary-light) !important;
  }
}
/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — BATCH 4: DEEP AUDIT DI TUTTE LE SCHERMATE E TIPOGRAFIA
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 46. AREA PERSONALE (PROFILE TYPOGRAPHY & CARDS) ─────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-page-heading h1 {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-page-heading p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-name {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-handle {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-manage {
  border-top-color: var(--border) !important;
  border-left-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-manage span {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-manage svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-user-manage-arrow {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .affiliate-title-wrap h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #affiliate-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .affiliate-short-desc {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .affiliate-active-pill {
  background: rgba(52, 211, 153, 0.16) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #34D399 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .affiliate-open-arrow {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-section-heading {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integrations-head h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integrations-head p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integrations-badge {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-marketplace-coming.profile-integrations,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integration-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integration-meta strong {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-integration-meta small {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-setting-arrow {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-cta-plus {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

/* ── 47. SCHERMO ACCOUNT PERSONALE (#screen-account) ─────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account.active {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-logout-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-logout-btn:hover {
  background: var(--surface3) !important;
  color: var(--red) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-eyebrow {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-heading h1 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-heading p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-identity-name {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-identity-subtitle {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-avatar {
  background: linear-gradient(135deg, #372B70, #5B45E8) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-icon-button {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-login-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-setting-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-security-row {
  border-top-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-login-row > span:first-child,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-setting-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-security-copy span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-provider {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-delete-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-delete-card h2 {
  color: var(--red) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-delete-card p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-delete-button {
  background: rgba(248, 113, 113, 0.16) !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
  color: var(--red) !important;
}

/* ── 48. SCHERMO PIANI E ABBONAMENTI (#screen-plans & #screen-plan) ───────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans.active,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan.active {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-back-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-credit-pill {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-switch {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-option {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-option.active {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-discount {
  background: rgba(52, 211, 153, 0.2) !important;
  color: #34D399 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-heading h1 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-heading p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-beta-banner {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--primary-light) !important;
}

/* Piani: card trasparenti, senza riquadro né alone (come in light mode). */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-card.is-featured {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-card-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-card-desc {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-card-price {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-choose-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-card.is-featured .plan-choose-btn {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-notes {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

/* ── 49. SCHERMO CANALI DI VENDITA (#screen-channels) ─────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels.active {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #channels-back-btn {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #channels-back-btn:hover {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels .q-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels .q-subtitle {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels .channel-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels .section {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels .channel-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-channels h3 {
  color: #FFFFFF !important;
}

/* ── 50. SYSTEM PREF REPEAT PER BATCH 4 ─────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #screen-profile .profile-title {
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-user-name {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-user-handle {
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-user-manage {
    border-top-color: var(--border) !important;
    border-left-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-user-manage span {
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .affiliate-title-wrap h2,
  :root:not([data-theme="light"]) #screen-profile #affiliate-title {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-profile .affiliate-short-desc {
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) #screen-account,
  :root:not([data-theme="light"]) #screen-account.active {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .account-heading h1,
  :root:not([data-theme="light"]) .account-identity-name {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-plans,
  :root:not([data-theme="light"]) #screen-plans.active,
  :root:not([data-theme="light"]) #screen-plan,
  :root:not([data-theme="light"]) #screen-plan.active {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .plans-heading h1,
  :root:not([data-theme="light"]) .plan-card-title {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-channels .q-title {
    color: #FFFFFF !important;
  }
}
/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — BATCH 5: SCHEDA PRODOTTO, PREVIEW, REFERRAL & SCENE WIZARD
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 51. SCHEDA PRODOTTO: HERO, THUMBNAIL, TESTI E BADGE ───────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-page-heading .q-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #details-screen-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-page-heading .q-subtitle,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #details-subtitle {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero-thumb {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero-thumb img {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row > .edit-row-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-value {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-value.is-empty {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .details-field-icon,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-arrow {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-right,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-description-body {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-fields .edit-row-description-body {
  color: var(--text) !important;
}

/* ── 52. SCHEDA PRODOTTO: EDITOR FOTO ORIGINALI & AVANZATE ───────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #details-form > .draft-photo-editor {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-editor .edit-section-header {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-count {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-editor-hint,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-view-status {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-source-photo {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-automatic {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .draft-photo-add {
  background: rgba(133, 114, 255, 0.16) !important;
  border-color: rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-advanced {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-advanced > summary {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .model-selector-card {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .model-selector-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .model-selector-hint {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option img {
  background: rgba(133, 114, 255, 0.1) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option.is-selected {
  background: rgba(133, 114, 255, 0.16) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-hint {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

/* ── 53. SCHEDA PRODOTTO: PUBLICATION SHEET (CAROSELLO, TESTI, SPECS) ───────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-track {
  background: var(--surface2) !important;
  border: 0 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-caption {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-caption strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-caption span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-arrow {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text-header h2 {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-copy {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-copy:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-description {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-specs {
  border-block-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-specs dt {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-specs dd {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-edit {
  color: var(--primary-light) !important;
}

/* ── 54. AREA PERSONALE: CARD INVITA UN AMICO & LINK CONDIVISIONE ───────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card {
  background: linear-gradient(135deg, #151828 0%, #1A1D30 100%) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card::before {
  background: radial-gradient(circle, rgba(133, 114, 255, 0.12) 0%, rgba(133, 114, 255, 0) 72%) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #referral-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-copy h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card .referral-heading-copy h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-copy > span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card .referral-heading-copy > span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-heading-icon,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card .referral-heading-icon {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-bonus-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-role-column > .referral-card .referral-bonus-pill {
  background: rgba(133, 114, 255, 0.16) !important;
  border-color: rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-field-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-status {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-share-row {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-icon {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-link-input {
  color: #FFFFFF !important;
  background: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-copy-button {
  background: rgba(133, 114, 255, 0.22) !important;
  border: 1px solid rgba(133, 114, 255, 0.4) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-share-copy-button:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-info-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .referral-info-tooltip strong {
  color: var(--primary-light) !important;
}

/* ── 55. WIZARD SCENA: BOTTONI SUPERFICIE, TRAMA, COLORI & MODALI ───────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-surfaces .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-textures .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-color-grid .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-color-choice {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice:hover:not([disabled]) {
  background: var(--surface3) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-surfaces .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-textures .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-color-grid .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-color-choice[aria-pressed="true"] {
  background: rgba(133, 114, 255, 0.18) !important;
  border: 2px solid var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice.is-locked {
  background: rgba(22, 25, 38, 0.7) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-lock {
  background: rgba(12, 13, 20, 0.85) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-color-choice .scene-color-swatch {
  border-color: var(--border) !important;
  background: var(--surface3) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog-card {
  background: var(--surface) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog-head h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-custom-dialog-close {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-custom-dialog-hint {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog :is(input, textarea) {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog-actions #scene-custom-dialog-cancel {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-dialog-actions #scene-custom-dialog-save {
  background: var(--gradient-cta) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
}

/* ── 56. SYSTEM PREF REPEAT PER BATCH 5 ──────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #screen-details {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-page-heading .q-title,
  :root:not([data-theme="light"]) #screen-details #details-screen-title,
  :root:not([data-theme="light"]) #screen-details .details-hero-title {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-hero,
  :root:not([data-theme="light"]) #screen-details #details-form > .draft-photo-editor {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-hero-thumb {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-value {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-value.is-empty {
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-right,
  :root:not([data-theme="light"]) #screen-details .details-fields .edit-row-description-body {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .publication-carousel-track {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
  }
  :root:not([data-theme="light"]) .publication-carousel-caption,
  :root:not([data-theme="light"]) .publication-title,
  :root:not([data-theme="light"]) .publication-specs dd {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .publication-copy {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .referral-card,
  :root:not([data-theme="light"]) #screen-profile .profile-bento-role-column > .referral-card {
    background: linear-gradient(135deg, #151828 0%, #1A1D30 100%) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-profile #referral-title,
  :root:not([data-theme="light"]) #screen-profile .referral-heading-copy h2,
  :root:not([data-theme="light"]) #screen-profile .profile-bento-role-column > .referral-card .referral-heading-copy h2,
  :root:not([data-theme="light"]) #screen-profile .profile-share-link-input {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-share-link-row,
  :root:not([data-theme="light"]) #screen-profile .referral-share-row {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
  }
  :root:not([data-theme="light"]) #screen-profile .profile-share-copy-button {
    background: rgba(133, 114, 255, 0.22) !important;
    border-color: rgba(133, 114, 255, 0.4) !important;
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) #screen-scene .scene-choice,
  :root:not([data-theme="light"]) #screen-scene #scene-surfaces .scene-choice,
  :root:not([data-theme="light"]) #screen-scene #scene-textures .scene-choice,
  :root:not([data-theme="light"]) #screen-scene .scene-color-grid .scene-choice,
  :root:not([data-theme="light"]) #screen-scene .scene-custom-color-choice {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-scene .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) #screen-scene #scene-surfaces .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) #screen-scene #scene-textures .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) #screen-scene .scene-color-grid .scene-choice[aria-pressed="true"],
  :root:not([data-theme="light"]) #screen-scene .scene-custom-color-choice[aria-pressed="true"] {
    background: rgba(133, 114, 255, 0.18) !important;
    border: 2px solid var(--primary) !important;
    color: #FFFFFF !important;
  }
}
/* ── 57. FIX TITOLO PRODOTTO IN SCHEDA MODIFICA & SEO ──────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-hero-info .details-hero-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .details-hero-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(#screen-details, #screen-queue, #screen-generated, #screen-published) .page-section-header .q-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(#screen-details, #screen-queue, #screen-generated, #screen-published) .q-header .q-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #details-screen-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #edit-row-seo-title .edit-row-value,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #edit-row-seo-title .edit-row-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .edit-section-header,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .edit-section-header span {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details #edit-row-seo-title .edit-row-label {
  color: var(--hint) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #screen-details .details-hero-title,
  :root:not([data-theme="light"]) #screen-details .details-hero-info .details-hero-title,
  :root:not([data-theme="light"]) .details-hero-title,
  :root:not([data-theme="light"]) :is(#screen-details, #screen-queue, #screen-generated, #screen-published) .page-section-header .q-title,
  :root:not([data-theme="light"]) :is(#screen-details, #screen-queue, #screen-generated, #screen-published) .q-header .q-title,
  :root:not([data-theme="light"]) #details-screen-title,
  :root:not([data-theme="light"]) #screen-details #edit-row-seo-title .edit-row-value,
  :root:not([data-theme="light"]) #screen-details .edit-section-header,
  :root:not([data-theme="light"]) #screen-details .edit-section-header span {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) #screen-details #edit-row-seo-title .edit-row-label {
    color: var(--hint) !important;
  }
}
/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — BATCH 6: TOTAL COMPREHENSIVE AUDIT & FULL OVERRIDES
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 58. SCHERMATA PIANO E CREDITI (#screen-plan / plan.css / plan-view.html) ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan.active,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .page-shell {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .surface,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-summary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-summary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-summary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-section {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-manage-btn {
  background: rgba(133, 114, 255, 0.12) !important;
  border: 1px solid rgba(133, 114, 255, 0.45) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-manage-btn:hover {
  background: rgba(133, 114, 255, 0.22) !important;
  border-color: rgba(133, 114, 255, 0.7) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-summary::after,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-summary::after,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-section::after {
  display: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan h1,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan #active-plan-heading,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-summary h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-summary h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-section h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .muted-copy,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .eyebrow,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-subtitle,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .renewal-caption,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .consumer-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-summary h2 small {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .section-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .status-pill {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-meter {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-panel {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail {
  border-bottom-color: var(--border) !important;
  border-right-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy > span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-header .account-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-header .plan-screen-logout {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .page-status {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* ── 59. DASHBOARD AFFILIATO ESTESA (affiliate-dashboard.css) ───────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .affiliate-page,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #affiliate-dashboard {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .dashboard-header,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .metric-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .chart-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .conversion-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .balance-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .insights-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .telegram-community-panel {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .page-title-block h1,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .panel-heading h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .metric-value,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-copy strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .balance-lines strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table th,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table td,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table td strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .insight-copy strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .telegram-community-copy h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .page-eyebrow,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .page-title-block p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .panel-heading p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .metric-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-copy small,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .trend-copy,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .conversion-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .insight-copy small,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .telegram-community-copy p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .back-to-app,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-chip,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .panel-filter select,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .refresh-button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table-scroll {
  border-top-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table thead {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .requests-table td {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .insight-row {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .payout-dialog {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .payout-dialog input {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: #FFFFFF !important;
}

/* ── 60. TUTORIAL, ONBOARDING & POPUP INTRO.JS (tutorial.css) ───────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-operation-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-fallback-bubble,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .introjs-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-close {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-close:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-eyebrow {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble__title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-fallback-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-copy,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble__text,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble__step {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option:hover {
  border-color: var(--primary) !important;
  background: var(--surface3) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option.is-demo {
  background: rgba(133, 114, 255, 0.14) !important;
  border-color: rgba(133, 114, 255, 0.36) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-route-option.is-demo:hover {
  background: rgba(133, 114, 255, 0.22) !important;
  border-color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-skip {
  color: var(--hint) !important;
  background: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-dialog-skip:hover {
  background: var(--surface2) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-operation-balance {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-start-secondary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble__back,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .tutorial-operation-actions button:not(.is-primary) {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .rt-bubble__arrow {
  border-color: var(--surface) !important;
}

/* ── 61. TUTTI I BOTTOM SHEET, MODALI DI SELEZIONE E FILTRI (index.html) ─────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .bottom-sheet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .resella-modal--sheet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .resella-modal--center,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #date-filter-sheet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #sort-sheet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #theme-sheet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #sheet-quick-edit,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #sheet-inline-edit,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #sheet-ai-edit,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #sheet-ai-preview,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-edit-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-delete-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #profile-support-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-contact-dialog {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sheet-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sheet-header h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-dialog h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-contact-head h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sheet-handle,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .credits-paywall-handle {
  background: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sheet-close-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .dialog-close,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-dialog-close {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(.bottom-sheet, dialog.resella-modal) .field input,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(.bottom-sheet, dialog.resella-modal) .field select,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(.bottom-sheet, dialog.resella-modal) .field textarea,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(.bottom-sheet, dialog.resella-modal) .form-input {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) :is(.bottom-sheet, dialog.resella-modal) .field label {
  color: var(--hint) !important;
}

/* ── 62. SCHERMATE DI AUTENTICAZIONE E LOGIN (login.css) ────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-shell,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-intro h1 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-intro p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .form-copy {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .google-button,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .telegram-button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-form > input,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .input-shell {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-form label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-divider {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-divider::before,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .auth-divider::after {
  background: var(--border) !important;
}

/* ── 63. SYSTEM PREF REPEAT PER BATCH 6 ──────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #screen-plan,
  :root:not([data-theme="light"]) #screen-plan.active,
  :root:not([data-theme="light"]) #screen-plan .page-shell {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-plan .surface,
  :root:not([data-theme="light"]) #screen-plan .plan-summary,
  :root:not([data-theme="light"]) #screen-plan .credit-summary,
  :root:not([data-theme="light"]) #screen-plan .billing-summary,
  :root:not([data-theme="light"]) #screen-plan .legal-section {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) #screen-plan .plan-manage-btn {
    background: rgba(133, 114, 255, 0.12) !important;
    border: 1px solid rgba(133, 114, 255, 0.45) !important;
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) #screen-plan .plan-manage-btn:hover {
    background: rgba(133, 114, 255, 0.22) !important;
    border-color: rgba(133, 114, 255, 0.7) !important;
  }
  :root:not([data-theme="light"]) #screen-plan h1,
  :root:not([data-theme="light"]) #screen-plan h2,
  :root:not([data-theme="light"]) #screen-plan #active-plan-heading,
  :root:not([data-theme="light"]) #screen-plan .credit-summary h2,
  :root:not([data-theme="light"]) #screen-plan .billing-summary h2,
  :root:not([data-theme="light"]) #screen-plan .billing-detail-copy strong {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .affiliate-page,
  :root:not([data-theme="light"]) #affiliate-dashboard {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .panel,
  :root:not([data-theme="light"]) .metric-card,
  :root:not([data-theme="light"]) .chart-panel,
  :root:not([data-theme="light"]) .conversion-panel,
  :root:not([data-theme="light"]) .balance-panel,
  :root:not([data-theme="light"]) .requests-panel,
  :root:not([data-theme="light"]) .insights-panel,
  :root:not([data-theme="light"]) .telegram-community-panel {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .page-title-block h1,
  :root:not([data-theme="light"]) .panel-heading h2,
  :root:not([data-theme="light"]) .metric-value,
  :root:not([data-theme="light"]) .requests-table td strong {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .bottom-sheet,
  :root:not([data-theme="light"]) .resella-modal--sheet,
  :root:not([data-theme="light"]) #date-filter-sheet,
  :root:not([data-theme="light"]) #sort-sheet,
  :root:not([data-theme="light"]) #theme-sheet,
  :root:not([data-theme="light"]) #sheet-quick-edit,
  :root:not([data-theme="light"]) #sheet-inline-edit,
  :root:not([data-theme="light"]) #sheet-ai-edit,
  :root:not([data-theme="light"]) #sheet-ai-preview,
  :root:not([data-theme="light"]) #account-edit-dialog,
  :root:not([data-theme="light"]) #account-delete-dialog,
  :root:not([data-theme="light"]) #profile-support-dialog {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog,
  :root:not([data-theme="light"]) .tutorial-operation-dialog,
  :root:not([data-theme="light"]) .rt-bubble,
  :root:not([data-theme="light"]) .tutorial-fallback-bubble,
  :root:not([data-theme="light"]) .introjs-tooltip {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-close {
    background: var(--surface2) !important;
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-close:hover {
    background: var(--surface3) !important;
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-eyebrow {
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog h2,
  :root:not([data-theme="light"]) .rt-bubble__title,
  :root:not([data-theme="light"]) .tutorial-fallback-title {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-copy,
  :root:not([data-theme="light"]) .rt-bubble__text,
  :root:not([data-theme="light"]) .rt-bubble__step {
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option strong {
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option span {
    color: var(--hint) !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option:hover {
    border-color: var(--primary) !important;
    background: var(--surface3) !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option.is-demo {
    background: rgba(133, 114, 255, 0.14) !important;
    border-color: rgba(133, 114, 255, 0.36) !important;
  }
  :root:not([data-theme="light"]) .tutorial-route-option.is-demo:hover {
    background: rgba(133, 114, 255, 0.22) !important;
    border-color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-skip {
    color: var(--hint) !important;
    background: transparent !important;
  }
  :root:not([data-theme="light"]) .tutorial-dialog-skip:hover {
    background: var(--surface2) !important;
    color: #FFFFFF !important;
  }
  :root:not([data-theme="light"]) .tutorial-operation-balance {
    background: var(--surface2) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .tutorial-start-secondary,
  :root:not([data-theme="light"]) .rt-bubble__back,
  :root:not([data-theme="light"]) .tutorial-operation-actions button:not(.is-primary) {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .rt-bubble__arrow {
    border-color: var(--surface) !important;
  }
}
/* ══════════════════════════════════════════════════════════════════════════════
   RESELLA DARK THEME — BATCH 7: HIGH SPECIFICITY FIXES FOR ALL WHITE SECTIONS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 64. NOTIFICHE DROPDOWN & ELEMENTI INTERNI ─────────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-panel {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-panel .notifications-panel-head {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-panel .notifications-panel-head h2 {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-list {
  background: var(--surface) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item:hover {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item time {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-push-banner {
  background: var(--surface2) !important;
  border-bottom: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #notifications-push-banner p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #push-notifications-toggle {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

/* ── 65. BANNER PWA INSTALLA SU MOBILE & DESKTOP ────────────────────────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-banner {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-copy strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-copy small {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-dismiss {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-action {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-install-badge {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-install-copy strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .desktop-install-copy small {
  color: var(--hint) !important;
}

/* ── 66. SCELTA TIPO DI FOTO (MODALI GENERAZIONE: STYLE, GENDER, BACKGROUND) ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-background-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-style-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-gender-dialog,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-background-dialog {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-dialog h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-dialog h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-dialog p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-dialog p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-background-options button,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .generation-mode-option {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option:hover {
  background: var(--surface3) !important;
  border-color: var(--border-strong) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option.is-selected,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option.is-selected {
  background: rgba(133, 114, 255, 0.16) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-mode-option img,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-gender-option img {
  background: rgba(133, 114, 255, 0.1) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-hint {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-hint svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-close {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-product-summary {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-product-summary strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-product-summary span {
  color: var(--hint) !important;
}

/* ── 67. SCHERMO SCENA: OGGETTI POPUP, TRAMA PERSONALIZZATA E CONTENITORI ──── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-object-picker,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-object-picker {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-object-picker .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-object-picker .scene-choice.has-image {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-object-picker .scene-choice-image {
  background: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-custom-texture-choice {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-textures .scene-custom-texture-choice::before {
  background: var(--surface3) !important;
  border: 1px dashed var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice-item {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* ── 68. SCHERMATA PIANI (#screen-plans) SWITCH MENSILE/ANNUALE & TOP ROW ───── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-back-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-back-btn:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-credit-pill {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-switch {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-option {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-option.active {
  background: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-discount {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
}

/* ── 69. SCHERMATA PIANO E CREDITI (#screen-plan) DETTAGLI STRIPE & HEADER ──── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-header .account-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .account-back-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-header .plan-screen-logout,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-logout {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .plan-screen-header .plan-screen-logout:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-panel {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-payment-detail {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy > span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-section {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link:hover {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

/* ── 70. AREA PERSONALE: CARD PIANO & CREDITI (DISPONIBILI) & BOTTONE ESCI ──── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-tile,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-credits-tile,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-bento-plan-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-status-badge,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .plan-current-tag,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-card-tag {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-credits-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-credits-pill {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-credits-row strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-plan-credits-pill strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-logout-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #account-logout-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile .profile-logout-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #account-logout-btn:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

/* ── 71. SYSTEM PREF REPEAT PER BATCH 7 ──────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #notifications-panel,
  :root:not([data-theme="light"]) .mobile-install-banner,
  :root:not([data-theme="light"]) .generation-choice-dialog,
  :root:not([data-theme="light"]) .generation-gender-dialog,
  :root:not([data-theme="light"]) .generation-background-dialog,
  :root:not([data-theme="light"]) .scene-object-picker {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .generation-mode-option,
  :root:not([data-theme="light"]) .generation-gender-option,
  :root:not([data-theme="light"]) .generation-background-options button,
  :root:not([data-theme="light"]) #screen-details .generation-mode-option,
  :root:not([data-theme="light"]) #screen-plans .plans-billing-switch,
  :root:not([data-theme="light"]) #screen-plan .billing-panel,
  :root:not([data-theme="light"]) #screen-plan .billing-detail,
  :root:not([data-theme="light"]) #screen-plan .legal-links a {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  :root:not([data-theme="light"]) .generation-mode-option strong,
  :root:not([data-theme="light"]) .generation-gender-option strong,
  :root:not([data-theme="light"]) #screen-plan .billing-detail-copy strong,
  :root:not([data-theme="light"]) .notification-item strong {
    color: #FFFFFF !important;
  }
}

/* ── 72. BATCH 8: ACCOUNT, PIANI, ANTEPRIMA SCENA, MODALI, ERRORI E CONTROLLI SCURI ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-screen-logout,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-logout-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-secondary-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) [data-plan-loading-back],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) [data-plan-loading-logout],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #plan-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #plan-logout-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-logout-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-screen-logout:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-logout-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-secondary-btn:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn svg,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #plan-back-btn svg,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-back-btn svg {
  color: var(--primary-light) !important;
  stroke: currentColor !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-status,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-status.is-muted,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-status.is-warning,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-plan-status,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .status-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .status-pill.is-muted,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .status-pill.is-warning,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #plan-status,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-current-tag {
  background: rgba(133, 114, 255, 0.16) !important;
  border: 1px solid rgba(133, 114, 255, 0.35) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-plan-credit,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-plan-credit,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-credits-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .profile-plan-status-badge {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-plan-credit strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-plan-credit strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #account-credits {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-logout-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-logout-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-identity-name,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-plan-name,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-provider strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-setting-value strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-security-copy strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-stat strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-provider-icon {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-icon-button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-stat {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-preview {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-preview-heading strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading strong svg,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-preview-heading strong svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-heading > span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-preview-heading > span {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-preview-frame,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-preview-frame {
  background: #000000 !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #scene-mobile-back {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-saved-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-example-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-saved-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-example-option {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-saved-option[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-example-option[aria-pressed="true"] {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(133, 114, 255, 0.35) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-saved-option strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-example-option strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-plan-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-plan-note {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-examples,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-mobile-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-mobile-panel,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-examples .scene-card-header h3,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header h3,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-mobile-panel h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #scene-mobile-intro-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-card-header p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-mobile-panel p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-intro {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-custom-texture-choice,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-object-picker .scene-choice {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice[aria-pressed="true"],
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice[aria-pressed="true"] {
  background: var(--surface3) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-choice.is-locked,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-choice.is-locked {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-object-chip,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-object-chip,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-object-add,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene .scene-more-colors {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-scene #scene-new-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .scene-library-actions button {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-section,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .legal-section,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .legal-links {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .legal-links a,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .legal-links .legal-action-link {
  background: transparent !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links a:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links .legal-action-link:hover {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .legal-links svg {
  color: var(--primary-light) !important;
  stroke: currentColor !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .consumer-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .consumer-note {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-summary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .surface {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-panel {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail {
  border-right-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-icon {
  background: var(--surface3) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan #billing-heading,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan #active-plan-heading,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan #credits-heading {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-subtitle,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-detail-copy > span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .renewal-caption,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .secure-label {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .secure-dot {
  background: rgba(32, 146, 101, 0.2) !important;
  color: #34D399 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .page-footer,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .page-footer {
  color: var(--hint) !important;
  border-top-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .page-footer a,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .page-footer a {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .site-header,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .site-header {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-hint,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-style-dialog .generation-choice-hint,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-gender-dialog .generation-choice-hint,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #generation-background-dialog .generation-choice-hint {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generation-choice-hint svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .card-generation-error {
  color: #FCA5A5 !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .card-generation-error.is-retrying {
  color: #FCD34D !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sticky-zone,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .sticky-zone,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-generated .sticky-zone,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-published .sticky-zone,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .search-wrap {
  background: var(--bg) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .screen-loading-overlay,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-loading-state,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan > .plan-loading-state {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .screen-loader-text,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-loading-state span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-loader-content span {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-banner {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-copy strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-copy small {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-dismiss {
  color: var(--hint) !important;
  background: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-card h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-card strong {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-card p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-card li,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-note {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .mobile-install-guide-note {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #details-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #text-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #scene-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .back-to-app,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .back-link,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #plan-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #withdrawal-close,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-contact-back {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* ── 73. MEDIA PREFERS-COLOR-SCHEME DARK FOR BATCH 8 ────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .account-back-btn,
  :root:not([data-theme="light"]) .plan-screen-logout,
  :root:not([data-theme="light"]) .account-logout-btn,
  :root:not([data-theme="light"]) .account-secondary-btn,
  :root:not([data-theme="light"]) [data-plan-loading-back],
  :root:not([data-theme="light"]) [data-plan-loading-logout],
  :root:not([data-theme="light"]) #plan-back-btn,
  :root:not([data-theme="light"]) #plan-logout-btn,
  :root:not([data-theme="light"]) #account-back-btn,
  :root:not([data-theme="light"]) #account-logout-btn,
  :root:not([data-theme="light"]) #screen-account .account-plan-credit,
  :root:not([data-theme="light"]) .account-plan-credit,
  :root:not([data-theme="light"]) #screen-scene .scene-saved-option,
  :root:not([data-theme="light"]) #screen-scene .scene-example-option,
  :root:not([data-theme="light"]) .scene-saved-option,
  :root:not([data-theme="light"]) .scene-example-option,
  :root:not([data-theme="light"]) #screen-scene .scene-choice,
  :root:not([data-theme="light"]) .scene-choice,
  :root:not([data-theme="light"]) .scene-custom-texture-choice,
  :root:not([data-theme="light"]) #screen-scene .scene-plan-note,
  :root:not([data-theme="light"]) .scene-plan-note,
  :root:not([data-theme="light"]) .generation-choice-hint,
  :root:not([data-theme="light"]) .plans-back-btn,
  :root:not([data-theme="light"]) .product-back-btn,
  :root:not([data-theme="light"]) #details-back-btn,
  :root:not([data-theme="light"]) #text-back-btn,
  :root:not([data-theme="light"]) #scene-back-btn,
  :root:not([data-theme="light"]) .back-to-app,
  :root:not([data-theme="light"]) .back-link,
  :root:not([data-theme="light"]) #withdrawal-close,
  :root:not([data-theme="light"]) .support-contact-back {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-account .account-status,
  :root:not([data-theme="light"]) #account-plan-status,
  :root:not([data-theme="light"]) #screen-plan .status-pill,
  :root:not([data-theme="light"]) #plan-status,
  :root:not([data-theme="light"]) .plan-current-tag {
    background: rgba(133, 114, 255, 0.16) !important;
    border-color: rgba(133, 114, 255, 0.35) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) #screen-scene .scene-preview,
  :root:not([data-theme="light"]) .scene-preview,
  :root:not([data-theme="light"]) #screen-scene .scene-examples,
  :root:not([data-theme="light"]) #screen-scene .scene-mobile-panel,
  :root:not([data-theme="light"]) #screen-scene .scene-card,
  :root:not([data-theme="light"]) #screen-account .account-card,
  :root:not([data-theme="light"]) #screen-plan .legal-section,
  :root:not([data-theme="light"]) .legal-section,
  :root:not([data-theme="light"]) .mobile-install-banner,
  :root:not([data-theme="light"]) .mobile-install-guide-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-plan .legal-links {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) #screen-account .account-plan-credit strong,
  :root:not([data-theme="light"]) .account-plan-credit strong,
  :root:not([data-theme="light"]) #screen-scene .scene-saved-option strong,
  :root:not([data-theme="light"]) #screen-scene .scene-example-option strong,
  :root:not([data-theme="light"]) #screen-scene .scene-examples .scene-card-header h3,
  :root:not([data-theme="light"]) #screen-scene .scene-card-header h3,
  :root:not([data-theme="light"]) #screen-scene .scene-mobile-panel h2,
  :root:not([data-theme="light"]) #scene-mobile-intro-title,
  :root:not([data-theme="light"]) .mobile-install-copy strong,
  :root:not([data-theme="light"]) .mobile-install-guide-card h2,
  :root:not([data-theme="light"]) .mobile-install-guide-card strong {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .card-generation-error {
    color: #FCA5A5 !important;
  }
  :root:not([data-theme="light"]) .card-generation-error.is-retrying {
    color: #FCD34D !important;
  }

  :root:not([data-theme="light"]) #bottom-bar-main .nav-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .sticky-zone,
  :root:not([data-theme="light"]) #screen-queue .sticky-zone,
  :root:not([data-theme="light"]) #screen-generated .sticky-zone,
  :root:not([data-theme="light"]) #screen-published .sticky-zone,
  :root:not([data-theme="light"]) .search-wrap,
  :root:not([data-theme="light"]) .screen-loading-overlay,
  :root:not([data-theme="light"]) .plan-loading-state,
  :root:not([data-theme="light"]) #screen-plan > .plan-loading-state {
    background: var(--bg) !important;
    color: var(--text) !important;
  }
}


/* ── 74. BATCH 9: PLANS NOTES, BILLING OPTIONS, TOOLBAR, MULTI-BAR & PUBLICATION DESCRIPTION ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-notes,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-notes {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-note {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-note-icon,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-note-icon {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-credit-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-credit-pill {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-credit-pill svg,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-credit-pill svg {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-switch,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-switch {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-option,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-option {
  color: var(--hint) !important;
  background: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-option.active,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-billing-option.active {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-billing-option.active .plans-discount {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-choose-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-choose-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-choose-btn:hover:not(:disabled),
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-choose-btn:hover:not(:disabled) {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-card.is-featured .plan-choose-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-card.is-featured .plan-choose-btn {
  background: linear-gradient(105deg, #7055f6, #6046ec) !important;
  border: 1px solid transparent !important;
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-toolbar,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-generated .product-toolbar,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-published .product-toolbar,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue:has(#cards-container.select-mode) .product-toolbar {
  background: var(--bg) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-count,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue:has(#cards-container.select-mode) .product-count {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .select-toggle-new,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar .select-toggle-new,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-queue .product-toolbar #select-toggle-btn[aria-pressed="true"] {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sel-bar {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sel-all-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .sel-count {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .multi-bar-inner,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .bottom-bar-multi .multi-bar-inner {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .multi-bar-btn {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .multi-bar-btn-primary {
  background: linear-gradient(110deg, #7055f6, #6046ec) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .multi-bar-btn-more {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .multi-bar-btn-danger {
  background: rgba(239, 68, 68, 0.16) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #FCA5A5 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-description,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text .publication-description {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text .publication-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-text-header h2 {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-copy {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* ── 75. MEDIA PREFERS-COLOR-SCHEME DARK FOR BATCH 9 ────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plans-notes,
  :root:not([data-theme="light"]) #screen-plans .plans-notes,
  :root:not([data-theme="light"]) .multi-bar-inner,
  :root:not([data-theme="light"]) .bottom-bar-multi .multi-bar-inner,
  :root:not([data-theme="light"]) .sel-bar {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .plans-note,
  :root:not([data-theme="light"]) #screen-plans .plans-note,
  :root:not([data-theme="light"]) .publication-description,
  :root:not([data-theme="light"]) .publication-text p,
  :root:not([data-theme="light"]) .publication-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .plans-credit-pill,
  :root:not([data-theme="light"]) #screen-plans .plans-credit-pill,
  :root:not([data-theme="light"]) .plan-choose-btn,
  :root:not([data-theme="light"]) #screen-plans .plan-choose-btn,
  :root:not([data-theme="light"]) .plans-note-icon,
  :root:not([data-theme="light"]) #screen-plans .plans-note-icon,
  :root:not([data-theme="light"]) .plans-billing-switch,
  :root:not([data-theme="light"]) .select-toggle-new,
  :root:not([data-theme="light"]) .sel-all-btn,
  :root:not([data-theme="light"]) .multi-bar-btn,
  :root:not([data-theme="light"]) .multi-bar-btn-more,
  :root:not([data-theme="light"]) .publication-copy {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .plans-billing-option.active,
  :root:not([data-theme="light"]) #screen-plans .plans-billing-option.active {
    background: var(--primary) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .product-toolbar,
  :root:not([data-theme="light"]) #screen-queue .product-toolbar,
  :root:not([data-theme="light"]) #screen-generated .product-toolbar,
  :root:not([data-theme="light"]) #screen-published .product-toolbar,
  :root:not([data-theme="light"]) #screen-queue:has(#cards-container.select-mode) .product-toolbar {
    background: var(--bg) !important;
    border-color: var(--border) !important;
  }
}


/* ── 76. BATCH 10: GENERATED TITLE TEXT & PROFILE THEME ROW BUTTON ───────────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .generated-title-text,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #cards-container-generated .generated-title-text {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-impostazioni-row,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-support-row {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-impostazioni-row:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-support-row:hover {
  background: var(--surface2) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row .profile-setting-icon {
  background: rgba(133, 114, 255, 0.16) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row .profile-setting-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row .profile-setting-sub {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-profile #profile-theme-row .profile-setting-arrow svg {
  color: var(--hint) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .generated-title-text,
  :root:not([data-theme="light"]) #cards-container-generated .generated-title-text,
  :root:not([data-theme="light"]) #screen-profile #profile-theme-row .profile-setting-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) #screen-profile #profile-theme-row,
  :root:not([data-theme="light"]) #screen-profile #profile-impostazioni-row,
  :root:not([data-theme="light"]) #screen-profile #profile-support-row {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) #screen-profile #profile-theme-row .profile-setting-icon {
    background: rgba(133, 114, 255, 0.16) !important;
    color: var(--primary-light) !important;
  }
}


/* ── 77. BATCH 11: PREZZI PIANI E NOTE SCHERMATA PIANI (#screen-plans) ──────── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-price,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-price-current,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-price,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-price-current,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .paywall-plan-price,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #paywall-plan-price-value {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-price-old,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-price-old {
  color: #F87171 !important;
  opacity: 0.85 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-price small,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-price small,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-annual-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plan-annual-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plans-contact-note,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plans .plans-contact-note {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-feature-table th {
  color: var(--hint) !important;
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-feature-table td {
  color: #FFFFFF !important;
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-feature-details > summary {
  color: var(--text) !important;
  border-top-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .plan-feature-details > summary svg {
  color: var(--primary-light) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plan-price,
  :root:not([data-theme="light"]) .plan-price-current,
  :root:not([data-theme="light"]) #screen-plans .plan-price,
  :root:not([data-theme="light"]) #screen-plans .plan-price-current,
  :root:not([data-theme="light"]) .paywall-plan-price,
  :root:not([data-theme="light"]) #paywall-plan-price-value,
  :root:not([data-theme="light"]) .plan-feature-table td {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .plan-price-old,
  :root:not([data-theme="light"]) #screen-plans .plan-price-old {
    color: #F87171 !important;
  }

  :root:not([data-theme="light"]) .plan-price small,
  :root:not([data-theme="light"]) #screen-plans .plan-price small,
  :root:not([data-theme="light"]) .plan-annual-note,
  :root:not([data-theme="light"]) #screen-plans .plan-annual-note,
  :root:not([data-theme="light"]) .plan-feature-table th {
    color: var(--hint) !important;
  }
}


/* ── 78. BATCH 12: PULSANTE PRODOTTI SENZA SFONDO E NOTIFICATION-ITEM COMPLETO ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #details-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #text-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .details-top-bar .product-back-btn {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
  padding: 6px 4px !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .product-back-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #details-back-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #text-back-btn:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .details-top-bar .product-back-btn:hover {
  background: transparent !important;
  border: 0 !important;
  color: var(--primary-light) !important;
}

/* Notifiche: lista, item, unread, testi, icone e stato vuoto */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item:hover {
  background: var(--surface2) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item.is-unread {
  background: rgba(133, 114, 255, 0.08) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item.is-unread:hover {
  background: rgba(133, 114, 255, 0.14) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item-message {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item-time {
  color: var(--hint) !important;
  opacity: 0.8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item-icon {
  background: var(--surface2) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notification-item-icon.is-credit {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #FBBF24 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .notifications-empty {
  color: var(--hint) !important;
  background: transparent !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .product-back-btn,
  :root:not([data-theme="light"]) #details-back-btn,
  :root:not([data-theme="light"]) #text-back-btn,
  :root:not([data-theme="light"]) .details-top-bar .product-back-btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .product-back-btn:hover,
  :root:not([data-theme="light"]) #details-back-btn:hover,
  :root:not([data-theme="light"]) #text-back-btn:hover,
  :root:not([data-theme="light"]) .details-top-bar .product-back-btn:hover {
    background: transparent !important;
    border: 0 !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .notification-item {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .notification-item:hover {
    background: var(--surface2) !important;
  }

  :root:not([data-theme="light"]) .notification-item.is-unread {
    background: rgba(133, 114, 255, 0.08) !important;
  }

  :root:not([data-theme="light"]) .notification-item.is-unread:hover {
    background: rgba(133, 114, 255, 0.14) !important;
  }

  :root:not([data-theme="light"]) .notification-item-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .notification-item-message,
  :root:not([data-theme="light"]) .notification-item-time,
  :root:not([data-theme="light"]) .notifications-empty {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .notification-item-icon {
    background: var(--surface2) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .notification-item-icon.is-credit {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #FBBF24 !important;
  }
}

/* ── 79. CENTRO ASSISTENZA (#screen-support, #screen-support-thread & #modal-support-new) ── */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #bottom-bar-main .nav-tab-badge.nav-tab-badge--chat {
  background: #ef4444 !important;
  color: #ffffff !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support.active {
  background: var(--bg) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-back-btn {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-back-btn:hover {
  background: var(--surface2) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-subject,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-empty-state h3,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-header h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-card:hover {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-tickets-list {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.08) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row:active {
  background: rgba(133, 114, 255, 0.10) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row.is-unread {
  background: rgba(133, 114, 255, 0.08) !important;
  border-color: transparent !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-online-dot {
  border-color: var(--surface) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-avatar.is-topic {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
  border-color: rgba(133, 114, 255, 0.30) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-welcome-card h3,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-context-title {
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-verified-pill {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-time,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-snippet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-welcome-card p {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-time.is-online {
  color: #4ade80 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-snippet-checks {
  color: #a78bfa !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row.is-unread .support-chat-time {
  color: #a78bfa !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chat-row.is-unread .support-chat-snippet {
  color: #F3F4F9 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-welcome-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-context-card {
  background: rgba(24, 21, 39, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-context-label {
  color: #a78bfa !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-context-remove {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-topic {
  background: var(--primary-soft) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-date,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-ticket-snippet,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-empty-state,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-empty-state p,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-loading,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-sub {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-status-chip.is-open {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-status-chip.is-resolved {
  background: rgba(139, 92, 246, 0.16) !important;
  color: #a78bfa !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-status-chip.is-closed {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

/* Thread chat Dark Mode */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support-thread.active {
  background: radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.16) 0%, transparent 42%),
              radial-gradient(circle at 85% 90%, rgba(109, 40, 217, 0.11) 0%, transparent 50%),
              #0c0b14 !important;
  color: #f8fafc !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-online-dot {
  border-color: #0c0b14 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-back-sq-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-back-sq-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-subject,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-team-name,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-callout-text strong {
  color: #ffffff !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-topic-meta-chip,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-customer .support-msg-sender,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-customer .support-msg-time,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-time {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-topic-meta-chip svg,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-customer .support-msg-checks {
  color: #a78bfa !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-ref {
  color: #64748b !important;
}

@media (max-width: 1023px) {
  :is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) body:has(#screen-support-thread.active) #app-top-header {
    background: #0c0d14 !important;
    border-bottom-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  :is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support-thread .support-thread-header {
    background: #0c0d14 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  :is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-online-dot {
    border-color: #0c0d14 !important;
  }
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-callout-banner.is-resolved {
  background: rgba(124, 58, 237, 0.12) !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
  color: #e2e8f0 !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-callout-banner.is-resolved .support-callout-icon {
  background: rgba(139, 92, 246, 0.25) !important;
  color: #c4b5fd !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-callout-banner.is-closed {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-callout-banner.is-closed .support-callout-icon {
  background: rgba(100, 116, 139, 0.22) !important;
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-thread-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-event-pill,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-day-divider span {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: none !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-bubble {
  background: #181527 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-customer .support-msg-bubble {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.30) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-photo-card {
  background: #221f36 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-attachment-photo-card.is-loading::after {
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.09) 50%, transparent 80%) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-photo-fallback {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-doc-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-doc-card:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-doc-meta,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-attachment-doc-action {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-support-btn {
  background: var(--surface2) !important;
  border-color: rgba(133, 114, 255, 0.34) !important;
  color: var(--primary-light) !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-product-card,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-refund-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-product-card:hover,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-refund-card:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-refund-hint {
  color: #c4b5fd !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-card {
  background: #141221 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-head {
  border-bottom-color: rgba(255, 255, 255, 0.09) !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-eyebrow {
  color: #a78bfa !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-head h2,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-product-title,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-comment-text {
  color: #f8fafc !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-summary,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-comment-box {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.11) !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-meta,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-section-label,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-photo-cap,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-loading {
  color: #94a3b8 !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-photo-btn {
  background: #1c192d !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-photo-btn.is-flagged {
  border-color: #f59e0b !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-photo-frame {
  background: #221f36 !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-refund-modal-empty {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #94a3b8 !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-context-eyebrow,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-refund-eyebrow {
  color: #a78bfa !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-context-meta,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-refund-reason {
  color: #94a3b8 !important;
}
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-context-thumb,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-refund-thumb-btn {
  background: #221f36 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-preview-thumb-img {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #1d1a2e !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-preview-remove {
  border-color: #0c0b14 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support-thread .support-preview-tag {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e2e8f0 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-support-thread .support-preview-tag button {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-input-bar {
  background: #141221 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.38) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-input-bar:focus-within {
  border-color: rgba(139, 92, 246, 0.50) !important;
  box-shadow: var(--shadow-sm) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-attach-btn {
  color: #94a3b8 !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-attach-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-textarea {
  color: #ffffff !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-textarea::placeholder {
  color: #64748b !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-send-btn {
  background: #7c3aed !important;
  color: #ffffff !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-send-btn:hover:not(:disabled) {
  background: #6d28d9 !important;
}

/* Modal Nuova Richiesta Dark Mode */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-header {
  border-bottom-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-close {
  background: var(--surface2) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-close:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-section-label {
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-section-label .is-optional {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chip {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chip:hover {
  border-color: var(--primary) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chip.is-selected,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-chip.is-selected:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-drafts-picker,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-input,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-textarea {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-input::placeholder,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-textarea::placeholder {
  color: var(--hint) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-item {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-draft-item.is-selected {
  background: var(--primary-soft) !important;
  border-color: var(--primary) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-cancel {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal-cancel:hover {
  background: var(--surface3) !important;
  color: #FFFFFF !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .quick-support-btn {
  background: var(--primary-soft) !important;
  border-color: rgba(133, 114, 255, 0.34) !important;
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-modal .support-preview-tag {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #bottom-bar-main .nav-tab-badge.nav-tab-badge--chat {
    background: #ef4444 !important;
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) #screen-support,
  :root:not([data-theme="light"]) #screen-support.active {
    background: var(--bg) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-back-btn {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-back-btn:hover {
    background: var(--surface2) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-title,
  :root:not([data-theme="light"]) .support-ticket-subject,
  :root:not([data-theme="light"]) .support-empty-state h3,
  :root:not([data-theme="light"]) .support-modal-header h2,
  :root:not([data-theme="light"]) .support-draft-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-ticket-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-ticket-card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  :root:not([data-theme="light"]) .support-tickets-list {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28) !important;
  }

  :root:not([data-theme="light"]) .support-chat-row {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-chat-row:not(:last-child)::after {
    background: rgba(255, 255, 255, 0.08) !important;
  }

  :root:not([data-theme="light"]) .support-chat-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none !important;
  }

  :root:not([data-theme="light"]) .support-chat-row:active {
    background: rgba(133, 114, 255, 0.10) !important;
  }

  :root:not([data-theme="light"]) .support-chat-row.is-unread {
    background: rgba(133, 114, 255, 0.08) !important;
    border-color: transparent !important;
  }

  :root:not([data-theme="light"]) .support-chat-online-dot {
    border-color: var(--surface) !important;
  }

  :root:not([data-theme="light"]) .support-chat-avatar.is-topic {
    background: var(--primary-soft) !important;
    color: var(--primary-light) !important;
    border-color: rgba(133, 114, 255, 0.30) !important;
  }

  :root:not([data-theme="light"]) .support-chat-title,
  :root:not([data-theme="light"]) .support-welcome-card h3,
  :root:not([data-theme="light"]) .support-draft-context-title {
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-verified-pill {
    background: var(--primary-soft) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .support-chat-time,
  :root:not([data-theme="light"]) .support-chat-snippet,
  :root:not([data-theme="light"]) .support-welcome-card p {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-chat-time.is-online {
    color: #4ade80 !important;
  }

  :root:not([data-theme="light"]) .support-snippet-checks {
    color: #a78bfa !important;
  }

  :root:not([data-theme="light"]) .support-chat-row.is-unread .support-chat-time {
    color: #a78bfa !important;
  }

  :root:not([data-theme="light"]) .support-chat-row.is-unread .support-chat-snippet {
    color: #F3F4F9 !important;
  }

  :root:not([data-theme="light"]) .support-welcome-card,
  :root:not([data-theme="light"]) .support-draft-context-card {
    background: rgba(24, 21, 39, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
  }

  :root:not([data-theme="light"]) .support-draft-context-label {
    color: #a78bfa !important;
  }

  :root:not([data-theme="light"]) .support-draft-context-remove {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-ticket-topic {
    background: var(--primary-soft) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .support-ticket-date,
  :root:not([data-theme="light"]) .support-ticket-snippet,
  :root:not([data-theme="light"]) .support-empty-state,
  :root:not([data-theme="light"]) .support-empty-state p,
  :root:not([data-theme="light"]) .support-loading,
  :root:not([data-theme="light"]) .support-draft-sub {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-status-chip.is-open {
    background: rgba(34, 197, 94, 0.14) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.28) !important;
  }

  :root:not([data-theme="light"]) .support-status-chip.is-resolved {
    background: rgba(139, 92, 246, 0.16) !important;
    color: #a78bfa !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
  }

  :root:not([data-theme="light"]) .support-status-chip.is-closed {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
  }

  /* Thread chat Auto-Dark */
  :root:not([data-theme="light"]) #screen-support-thread.active {
    background: radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.16) 0%, transparent 42%),
                radial-gradient(circle at 85% 90%, rgba(109, 40, 217, 0.11) 0%, transparent 50%),
                #0c0b14 !important;
    color: #f8fafc !important;
  }

  :root:not([data-theme="light"]) .support-thread-online-dot {
    border-color: #0c0b14 !important;
  }

  :root:not([data-theme="light"]) .support-thread-back-sq-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    box-shadow: none !important;
  }

  :root:not([data-theme="light"]) .support-thread-back-sq-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.20) !important;
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) .support-thread-subject,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-team-name,
  :root:not([data-theme="light"]) .support-callout-text strong {
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) .support-topic-meta-chip,
  :root:not([data-theme="light"]) .support-msg-wrap.is-customer .support-msg-sender,
  :root:not([data-theme="light"]) .support-msg-wrap.is-customer .support-msg-time,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-time {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-topic-meta-chip svg,
  :root:not([data-theme="light"]) .support-msg-wrap.is-customer .support-msg-checks {
    color: #a78bfa !important;
  }

  :root:not([data-theme="light"]) .support-thread-ref {
    color: #64748b !important;
  }

  @media (max-width: 1023px) {
    :root:not([data-theme="light"]) body:has(#screen-support-thread.active) #app-top-header {
      background: #0c0d14 !important;
      border-bottom-color: transparent !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    :root:not([data-theme="light"]) #screen-support-thread .support-thread-header {
      background: #0c0d14 !important;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    :root:not([data-theme="light"]) .support-thread-online-dot {
      border-color: #0c0d14 !important;
    }
  }

  :root:not([data-theme="light"]) .support-callout-banner.is-resolved {
    background: rgba(124, 58, 237, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
    color: #e2e8f0 !important;
    box-shadow: var(--shadow-sm) !important;
  }

  :root:not([data-theme="light"]) .support-callout-banner.is-resolved .support-callout-icon {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #c4b5fd !important;
  }

  :root:not([data-theme="light"]) .support-callout-banner.is-closed {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-callout-banner.is-closed .support-callout-icon {
    background: rgba(100, 116, 139, 0.22) !important;
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-thread-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14) !important;
  }

  :root:not([data-theme="light"]) .support-thread-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24) !important;
  }

  :root:not([data-theme="light"]) .support-event-pill,
  :root:not([data-theme="light"]) .support-day-divider span {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    box-shadow: none !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-bubble {
    background: #181527 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-customer .support-msg-bubble {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.30) !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-photo-card {
    background: #221f36 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }

  :root:not([data-theme="light"]) .support-attachment-photo-card.is-loading::after {
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.09) 50%, transparent 80%) !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-photo-fallback {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-doc-card {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-doc-card:hover {
    background: rgba(255, 255, 255, 0.11) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }

  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-doc-meta,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-attachment-doc-action {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .publication-support-btn {
    background: var(--surface2) !important;
    border-color: rgba(133, 114, 255, 0.34) !important;
    color: var(--primary-light) !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-product-card,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-refund-card {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-product-card:hover,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-refund-card:hover {
    background: rgba(255, 255, 255, 0.11) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-refund-hint {
    color: #c4b5fd !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-card {
    background: #141221 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-head {
    border-bottom-color: rgba(255, 255, 255, 0.09) !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-eyebrow {
    color: #a78bfa !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-head h2,
  :root:not([data-theme="light"]) .support-refund-modal-product-title,
  :root:not([data-theme="light"]) .support-refund-modal-comment-text {
    color: #f8fafc !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-summary,
  :root:not([data-theme="light"]) .support-refund-modal-comment-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-meta,
  :root:not([data-theme="light"]) .support-refund-modal-section-label,
  :root:not([data-theme="light"]) .support-refund-modal-photo-cap,
  :root:not([data-theme="light"]) .support-refund-modal-loading {
    color: #94a3b8 !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-photo-btn {
    background: #1c192d !important;
    border-color: rgba(255, 255, 255, 0.13) !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-photo-btn.is-flagged {
    border-color: #f59e0b !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-photo-frame {
    background: #221f36 !important;
  }
  :root:not([data-theme="light"]) .support-refund-modal-empty {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #94a3b8 !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-context-eyebrow,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-refund-eyebrow {
    color: #a78bfa !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-context-meta,
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-refund-reason {
    color: #94a3b8 !important;
  }
  :root:not([data-theme="light"]) .support-msg-context-thumb,
  :root:not([data-theme="light"]) .support-msg-refund-thumb-btn {
    background: #221f36 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
  }

  :root:not([data-theme="light"]) .support-preview-thumb-img {
    border-color: rgba(255, 255, 255, 0.18) !important;
    background: #1d1a2e !important;
  }

  :root:not([data-theme="light"]) .support-preview-remove {
    border-color: #0c0b14 !important;
  }

  :root:not([data-theme="light"]) #screen-support-thread .support-preview-tag {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #e2e8f0 !important;
  }

  :root:not([data-theme="light"]) #screen-support-thread .support-preview-tag button {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-input-bar {
    background: #141221 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.38) !important;
  }

  :root:not([data-theme="light"]) .support-input-bar:focus-within {
    border-color: rgba(139, 92, 246, 0.50) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  :root:not([data-theme="light"]) .support-attach-btn {
    color: #94a3b8 !important;
  }

  :root:not([data-theme="light"]) .support-attach-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  :root:not([data-theme="light"]) .support-textarea {
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) .support-textarea::placeholder {
    color: #64748b !important;
  }

  :root:not([data-theme="light"]) .support-send-btn {
    background: #7c3aed !important;
    color: #ffffff !important;
  }

  :root:not([data-theme="light"]) .support-send-btn:hover:not(:disabled) {
    background: #6d28d9 !important;
  }

  :root:not([data-theme="light"]) .support-modal {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-modal-header {
    border-bottom-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) .support-modal-close {
    background: var(--surface2) !important;
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-modal-close:hover {
    background: var(--surface3) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-modal-section-label {
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-modal-section-label .is-optional {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-chip {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-chip:hover {
    border-color: var(--primary) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .support-chip.is-selected,
  :root:not([data-theme="light"]) .support-chip.is-selected:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-drafts-picker,
  :root:not([data-theme="light"]) .support-modal-input,
  :root:not([data-theme="light"]) .support-modal-textarea {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .support-modal-input::placeholder,
  :root:not([data-theme="light"]) .support-modal-textarea::placeholder {
    color: var(--hint) !important;
  }

  :root:not([data-theme="light"]) .support-draft-item {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }

  :root:not([data-theme="light"]) .support-draft-item.is-selected {
    background: var(--primary-soft) !important;
    border-color: var(--primary) !important;
  }

  :root:not([data-theme="light"]) .support-modal-cancel {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

  :root:not([data-theme="light"]) .support-modal-cancel:hover {
    background: var(--surface3) !important;
    color: #FFFFFF !important;
  }

  :root:not([data-theme="light"]) .quick-support-btn {
    background: var(--primary-soft) !important;
    border-color: rgba(133, 114, 255, 0.34) !important;
    color: var(--primary-light) !important;
  }

  :root:not([data-theme="light"]) .support-modal .support-preview-tag {
    background: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
}

/* Canale Promo Resella & Formattazione Chat (Dark Theme) */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-promo-mini-badge {
  background: rgba(192, 38, 211, 0.22) !important;
  border-color: rgba(232, 121, 249, 0.38) !important;
  color: #f5d0fe !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-status-chip.is-promo {
  background: rgba(192, 38, 211, 0.2) !important;
  border-color: rgba(232, 121, 249, 0.35) !important;
  color: #f0abfc !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-link {
  color: #c4b5fd !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-action-link {
  background: rgba(139, 92, 246, 0.22) !important;
  border-color: rgba(167, 139, 250, 0.42) !important;
  color: #ede9fe !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-action-link:hover {
  background: rgba(139, 92, 246, 0.34) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-code {
  background: rgba(255, 255, 255, 0.12) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-pre {
  background: rgba(0, 0, 0, 0.28) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .support-msg-wrap.is-team .support-msg-quote {
  border-left-color: #a78bfa !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .support-promo-mini-badge {
    background: rgba(192, 38, 211, 0.22) !important;
    border-color: rgba(232, 121, 249, 0.38) !important;
    color: #f5d0fe !important;
  }
  :root:not([data-theme="light"]) .support-status-chip.is-promo {
    background: rgba(192, 38, 211, 0.2) !important;
    border-color: rgba(232, 121, 249, 0.35) !important;
    color: #f0abfc !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-link {
    color: #c4b5fd !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-action-link {
    background: rgba(139, 92, 246, 0.22) !important;
    border-color: rgba(167, 139, 250, 0.42) !important;
    color: #ede9fe !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-action-link:hover {
    background: rgba(139, 92, 246, 0.34) !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-code {
    background: rgba(255, 255, 255, 0.12) !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-pre {
    background: rgba(0, 0, 0, 0.28) !important;
  }
  :root:not([data-theme="light"]) .support-msg-wrap.is-team .support-msg-quote {
    border-left-color: #a78bfa !important;
  }
}

/* Tabs, invoices and credit numbers must stay readable in dark theme */
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-invoice-row { border-top-color: var(--border) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-invoice-meta strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-invoice-amount { color: var(--text) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-invoice-meta span,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .account-invoice-empty { color: var(--hint) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-row { border-top-color: var(--border) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-row dt { color: var(--hint) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-row dd,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .billing-subtitle-title { color: var(--text) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats span { color: var(--hint) !important; }
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats strong,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-plan .credit-stats span strong { color: #FFFFFF !important; }

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-account .account-inline-btn {
  color: var(--primary-light) !important;
}

:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-top-bar,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) #screen-details .details-top-bar .product-back-btn,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-carousel-track,
:is(:root[data-theme="dark"], html.theme-dark-early:not([data-theme="light"])) .publication-photo {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
}
