/* THEME001 — one shared theme for public + admin. */

html[data-theme="light"] .sd-brand-copy strong,
html[data-theme="light"] .consumer-drama-card,
html[data-theme="light"] .consumer-continue-card,
html[data-theme="light"] .consumer-history-compact > a,
html[data-theme="light"] .consumer-ranking-row,
html[data-theme="light"] .recommendation-card,
html[data-theme="light"] .continue-grid > a,
html[data-theme="light"] .favorite-grid a,
html[data-theme="light"] .history-list a,
html[data-theme="light"] .detail-shell,
html[data-theme="light"] .detail-state,
html[data-theme="light"] .detail-episode-list a,
html[data-theme="light"] .intel-shell,
html[data-theme="light"] .intel-ranking a,
html[data-theme="light"] .ready-shell,
html[data-theme="light"] .ops-shell {
  color: var(--sd-text);
}

html[data-theme="light"] .consumer-search input,
html[data-theme="light"] .consumer-filter-search input,
html[data-theme="light"] .consumer-filter-grid select,
html[data-theme="light"] .consumer-auth-form input,
html[data-theme="light"] .cf-search input {
  color: var(--sd-text);
  background-color: transparent;
}

html[data-theme="light"] .consumer-search input::placeholder,
html[data-theme="light"] .consumer-filter-search input::placeholder,
html[data-theme="light"] .consumer-auth-form input::placeholder,
html[data-theme="light"] .cf-search input::placeholder {
  color: var(--sd-muted);
}

html[data-theme="light"] .consumer-hero,
html[data-theme="light"] .consumer-hero-compact,
html[data-theme="light"] .consumer-profile-header,
html[data-theme="light"] .consumer-filter-panel,
html[data-theme="light"] .consumer-filter-panel-compact,
html[data-theme="light"] .consumer-auth-card,
html[data-theme="light"] .consumer-ranking-row,
html[data-theme="light"] .consumer-state,
html[data-theme="light"] .consumer-error,
html[data-theme="light"] .library-state,
html[data-theme="light"] .library-empty,
html[data-theme="light"] .continue-grid > a,
html[data-theme="light"] .history-list a,
html[data-theme="light"] .detail-episode-list a,
html[data-theme="light"] .admin-overview-hero,
html[data-theme="light"] .admin-panel,
html[data-theme="light"] .admin-source-card,
html[data-theme="light"] .admin-metric-card,
html[data-theme="light"] .admin-provider-card,
html[data-theme="light"] .admin-list-row,
html[data-theme="light"] .admin-stat,
html[data-theme="light"] .intel-health,
html[data-theme="light"] .intel-metric,
html[data-theme="light"] .intel-list article,
html[data-theme="light"] .intel-ranking a,
html[data-theme="light"] .ready-hero,
html[data-theme="light"] .ready-grid article,
html[data-theme="light"] .ops-stats article,
html[data-theme="light"] .current-card,
html[data-theme="light"] .recent-card,
html[data-theme="light"] .phase-row,
html[data-theme="light"] .last-error,
html[data-theme="light"] .cf-card,
html[data-theme="light"] .cf-queue-list article,
html[data-theme="light"] .cf-provider-trigger,
html[data-theme="light"] .cf-mode-tabs,
html[data-theme="light"] .cf-search {
  border-color: var(--sd-line);
  background-color: var(--sd-panel);
}

html[data-theme="light"] .consumer-drama-poster,
html[data-theme="light"] .recommendation-poster,
html[data-theme="light"] .consumer-continue-card > div,
html[data-theme="light"] .consumer-ranking-cover,
html[data-theme="light"] .continue-poster,
html[data-theme="light"] .favorite-grid a > div,
html[data-theme="light"] .detail-poster,
html[data-theme="light"] .cf-poster,
html[data-theme="light"] .cf-detail-poster {
  border-color: var(--sd-line);
  background-color: var(--sd-surface-2);
}

html[data-theme="light"] .consumer-poster-fallback,
html[data-theme="light"] .consumer-hero-fallback,
html[data-theme="light"] .detail-poster-fallback,
html[data-theme="light"] .cf-artwork-fallback {
  color: var(--sd-text);
  background:
    radial-gradient(circle at 50% 28%, rgb(var(--sd-accent-rgb) / 0.16), transparent 34%),
    linear-gradient(150deg, var(--sd-surface-2), var(--sd-bg-elevated));
}

html[data-theme="light"] .consumer-drama-card:hover .consumer-drama-poster {
  border-color: var(--sd-line-strong);
}

html[data-theme="light"] .consumer-section-heading > a,
html[data-theme="light"] .consumer-section-heading small,
html[data-theme="light"] .consumer-drama-card > small,
html[data-theme="light"] .recommendation-card > span,
html[data-theme="light"] .continue-copy span,
html[data-theme="light"] .continue-copy small,
html[data-theme="light"] .consumer-history-compact span,
html[data-theme="light"] .consumer-history-compact small,
html[data-theme="light"] .library-title p,
html[data-theme="light"] .library-header a,
html[data-theme="light"] .history-list span,
html[data-theme="light"] .history-list small,
html[data-theme="light"] .detail-copy p,
html[data-theme="light"] .detail-meta span,
html[data-theme="light"] .detail-section-heading small,
html[data-theme="light"] .detail-episode-list small,
html[data-theme="light"] .detail-sources small,
html[data-theme="light"] .intel-health > span,
html[data-theme="light"] .intel-metric span,
html[data-theme="light"] .intel-list article p,
html[data-theme="light"] .intel-list article small,
html[data-theme="light"] .ready-hero > span,
html[data-theme="light"] .ready-hero > p,
html[data-theme="light"] .ready-grid article span,
html[data-theme="light"] .ready-grid article p,
html[data-theme="light"] .ready-footer {
  color: var(--sd-muted);
}

html[data-theme="light"] .detail-sources small,
html[data-theme="light"] .cf-provider-menu,
html[data-theme="light"] .cf-detail-drawer,
html[data-theme="light"] .sd-admin-drawer {
  background: var(--sd-bg-elevated);
  color: var(--sd-text);
}

html[data-theme="light"] .cf-provider-menu > button:hover,
html[data-theme="light"] .cf-provider-menu > button.is-selected,
html[data-theme="light"] .sd-admin-nav-group a:hover,
html[data-theme="light"] .sd-admin-nav-group a.is-active {
  background: var(--sd-panel-hover);
}

html[data-theme="light"] .cf-mode-tabs button.is-active,
html[data-theme="light"] .consumer-pagination button.is-active,
html[data-theme="light"] .consumer-ranking-tabs button.is-active,
html[data-theme="light"] .detail-range-tabs button.is-active {
  color: var(--sd-accent);
}

html[data-theme="light"] .sd-button:not(.is-primary),
html[data-theme="light"] .sd-icon-button,
html[data-theme="light"] .intel-header a,
html[data-theme="light"] .intel-header button,
html[data-theme="light"] .ready-actions a,
html[data-theme="light"] .ready-actions button,
html[data-theme="light"] .detail-favorite {
  color: var(--sd-text);
  background: var(--sd-panel);
  border-color: var(--sd-line-strong);
}

html[data-theme="light"] .sd-button.is-primary,
html[data-theme="light"] .consumer-search button,
html[data-theme="light"] .detail-watch,
html[data-theme="light"] .start-button {
  color: var(--sd-on-accent);
}

html[data-theme="light"] .sd-consumer-sidebar,
html[data-theme="light"] .sd-admin-sidebar,
html[data-theme="light"] .sd-admin-desktop-topbar,
html[data-theme="light"] .sd-admin-mobile-header {
  border-color: var(--sd-line);
  background: var(--sd-glass-bg);
}

html[data-theme="light"] .sd-consumer-nav a,
html[data-theme="light"] .sd-admin-nav-group a,
html[data-theme="light"] .sd-admin-sidebar-foot a,
html[data-theme="light"] .sd-admin-topbar-links a {
  color: var(--sd-muted-strong);
}

html[data-theme="light"] .sd-consumer-nav a:hover,
html[data-theme="light"] .sd-consumer-nav a.is-active,
html[data-theme="light"] .sd-admin-nav-group a:hover,
html[data-theme="light"] .sd-admin-nav-group a.is-active {
  color: var(--sd-text);
}

html[data-theme="light"] .sd-consumer-bottom-nav {
  background: var(--sd-nav-bg);
  border-top-color: var(--sd-line);
  box-shadow: 0 -10px 30px rgba(29, 43, 68, 0.06);
}

html[data-theme="light"] .sd-consumer-bottom-nav a {
  color: var(--sd-muted);
}

html[data-theme="light"] .sd-consumer-bottom-nav a.is-active {
  color: var(--sd-accent);
}

/* Video surfaces remain dark even if the app chrome is light. */
html[data-theme="light"] .sd-consumer-shell.is-immersive {
  --sd-text: #f8f8fa;
  --sd-text-soft: #d4d4da;
  --sd-muted: #8b8b96;
  --sd-muted-strong: #a7a7b0;
  --sd-contrast-rgb: 255 255 255;
  --sd-line: rgb(255 255 255 / 0.08);
  --sd-line-strong: rgb(255 255 255 / 0.14);
  --sd-nav-bg: rgba(7, 7, 10, 0.94);
}

html[data-theme="light"] .sd-consumer-shell.is-immersive .sd-consumer-bottom-nav a {
  color: #777780;
}

html[data-theme="light"] .sd-consumer-shell.is-immersive .sd-consumer-bottom-nav a.is-active {
  color: #ffffff;
}

@media (max-width: 899px) {
  /* With the duplicated mobile header gone, content starts close to the safe area. */
  .consumer-home-page,
  .consumer-compact-page {
    padding-top: 8px;
  }
}

html[data-theme="light"] .admin-provider-trigger,
html[data-theme="light"] .admin-provider-menu,
html[data-theme="light"] .admin-provider-menu button,
html[data-theme="light"] .cf-provider-menu,
html[data-theme="light"] .cf-detail-drawer {
  color: var(--sd-text);
}

html[data-theme="light"] .admin-provider-trigger,
html[data-theme="light"] .admin-provider-menu {
  background: var(--sd-bg-elevated);
  border-color: var(--sd-line);
}

html[data-theme="light"] .admin-provider-menu button:hover,
html[data-theme="light"] .admin-provider-menu button.is-selected {
  background: var(--sd-panel-hover);
}

html[data-theme="light"] .cf-selection-bar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgb(var(--sd-accent-rgb) / 0.2);
  box-shadow: 0 12px 34px rgba(29, 43, 68, 0.08);
}

html[data-theme="light"] .ops-shell,
html[data-theme="light"] .intel-shell,
html[data-theme="light"] .ready-shell,
html[data-theme="light"] .library-shell,
html[data-theme="light"] .detail-shell,
html[data-theme="light"] .detail-state {
  background-color: transparent;
}

html[data-theme="light"] .stop-button,
html[data-theme="light"] .admin-provider-trigger,
html[data-theme="light"] .admin-provider-menu {
  color: var(--sd-text);
}

html[data-theme="light"] .stop-button {
  background: var(--sd-panel);
  border-color: var(--sd-line-strong) !important;
}

html[data-theme="light"] .cf-mode-tabs button.is-active {
  background: var(--sd-accent-soft);
}


/* Stage 11.7 premium mobile navigation — light theme companion. */
@media (max-width: 899px) {
  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav {
    border-top-color: rgba(18,22,32,.08);
    background: rgba(249,250,252,.92);
    box-shadow: 0 -10px 32px rgba(28,38,58,.08);
  }

  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a,
  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a:nth-child(3) {
    color: rgba(37,42,54,.46);
  }

  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a.is-active,
  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a:nth-child(3).is-active {
    color: rgba(14,17,24,.94);
  }

  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a.is-active svg,
  html[data-theme="light"] .sd-consumer-shell:not(.is-immersive) .sd-consumer-bottom-nav a:nth-child(3).is-active svg {
    color: rgba(14,17,24,.96);
  }
}
