/* Graphite admin theme. Presentation only; load after the legacy and health CSS.
 * Keep visibility, permission gates, calendar geometry and native form semantics
 * in their owning components. No blanket backgrounds or display resets.
 */
#adminView.admin-v2-existing-shell {
  color-scheme: dark;
  --v2-bg: #18191e;
  --v2-surface: #23242b;
  --v2-raised: #2b2d36;
  --v2-ink: #f4f3f6;
  --v2-muted: #b2b4bf;
  --v2-line: #3b3d46;
  --v2-brand: #f18cb7;
  --v2-action: #bc2f70;
  --v2-soft-brand: #392735;
  --v2-green: #8bd5b0;
  --v2-green-bg: #21392d;
  --v2-amber: #edc374;
  --v2-amber-bg: #3c3222;
  --v2-red: #ffadba;
  --v2-red-bg: #432833;
  --v2-blue: #acc7ff;
  --v2-blue-bg: #29364d;
  --v2-shadow: none;
  --v2-font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --v2-font-display: var(--v2-font-ui);
  --ink: var(--v2-ink);
  --muted: var(--v2-muted);
  --line: var(--v2-line);
  --paper: var(--v2-bg);
  --panel: var(--v2-surface);
  --shadow: none;
  grid-template-columns: 216px minmax(0, 1fr);
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}
body:has(#adminView.admin-v2-existing-shell:not(.hidden)) { background: #18191e; }
html:has(#adminView.admin-v2-existing-shell:not(.hidden)) { color-scheme: dark; }
#adminView.admin-v2-existing-shell :where(h1, h2, h3, h4, p, span, strong, b, label, legend, dd, li, summary) { color: inherit; }
#adminView.admin-v2-existing-shell :where(strong, b) { font-weight: 600; }
#adminView.admin-v2-existing-shell .admin-form label { font-weight: 500; }
#adminView.admin-v2-existing-shell.admin-v2-create-client-open #clientFormHome { background: var(--v2-surface); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :where(small, dt, .small-note) { color: var(--v2-muted); font-size: 12px; line-height: 1.5; }
#adminView.admin-v2-existing-shell :where(h1, h2, h3, h4) { font-family: var(--v2-font-ui); font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
#adminView.admin-v2-existing-shell h1 { font-size: 30px; }
#adminView.admin-v2-existing-shell h2 { font-size: 24px; }
#adminView.admin-v2-existing-shell h3 { font-size: 17px; }
#adminView.admin-v2-existing-shell a { color: var(--v2-brand); }
#adminView.admin-v2-existing-shell :where(button, input, select, textarea) { font-family: inherit; letter-spacing: 0; }
#adminView.admin-v2-existing-shell :where(p, dd, legend) { overflow-wrap: anywhere; }

/* Navigation remains the real role-filtered navigation, not a separate demo. */
#adminView.admin-v2-existing-shell .admin-sidebar { background: var(--v2-surface); border-color: var(--v2-line); padding: 26px 14px 18px; gap: 26px; box-shadow: none; backdrop-filter: none; }
#adminView.admin-v2-existing-shell .admin-logo { content: url('/assets/mockingbird-logo-transparent-light.png'); max-width: 178px; }
#adminView.admin-v2-existing-shell .admin-nav { gap: 16px; }
#adminView.admin-v2-existing-shell .admin-v2-nav-group > p { color: var(--v2-muted); font-size: 10px; font-weight: 500; letter-spacing: .12em; }
#adminView.admin-v2-existing-shell .admin-nav a { color: var(--v2-muted); min-height: 44px; padding: 10px 11px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 500; }
#adminView.admin-v2-existing-shell .admin-nav a > span { color: inherit; }
#adminView.admin-v2-existing-shell .admin-nav a:hover { background: var(--v2-raised); }
#adminView.admin-v2-existing-shell .admin-nav a.active { color: var(--v2-brand); background: var(--v2-soft-brand); box-shadow: none; }
#adminView.admin-v2-existing-shell .admin-content { padding: 0 28px 40px; gap: 22px; }
#adminView.admin-v2-existing-shell .admin-v2-existing-topbar { background: var(--v2-surface); border-color: var(--v2-line); min-height: 78px; margin-inline: -28px; padding: 14px 28px; backdrop-filter: none; }
#adminView.admin-v2-existing-shell .admin-v2-existing-topbar-actions > span { color: var(--v2-muted); font-size: 12px; }
#adminView.admin-v2-existing-shell .admin-v2-existing-scope > span { color: var(--v2-muted); background: var(--v2-bg); border: 1px solid var(--v2-line); border-radius: 8px; }
#adminView.admin-v2-existing-shell .admin-v2-client-context-control { width: min(360px, 100%); font-weight: 400; font-size: 11px; }
#adminView.admin-v2-existing-shell .admin-v2-client-module-context { color: var(--v2-ink); background: var(--v2-raised); border-color: var(--v2-line); }

/* Component surfaces. Avoid painting every div: progress fills, QR codes,
 * calendar tones, artwork and load/error states have separate semantics. */
#adminView.admin-v2-existing-shell :is(
  .admin-panel, .admin-stat, .admin-item, .admin-invite-panel, .admin-form,
  .admin-client-summary-card, .admin-v2-dashboard-focus,
  .admin-v2-dashboard-signals, .admin-v2-dashboard-recent,
  .admin-v2-music-collection, .admin-v2-music-upload-wizard,
  .admin-v2-request-filters, .admin-v2-report-filters,
  .admin-v2-endpoint-group, .admin-v2-endpoint-empty,
  .admin-v2-technical-details, .admin-v2-overview-metrics,
  .admin-v2-device-counts article, .admin-v2-overview-details article,
  .admin-v2-dashboard-metrics article,
  .admin-v2-dashboard-distribution, .admin-v2-dashboard-channel,
  .admin-v2-dashboard-distribution-list > article, .admin-v2-clients,
  .admin-v2-client-heading, .admin-v2-client-toolbar,
  .admin-v2-client-table-wrap, .admin-v2-client-overview,
  .admin-v2-client-local-tabs, .admin-v2-client-empty,
  .admin-v2-user-metrics article, .admin-v2-user-section,
  .admin-v2-users > .archived-history-section,
  .admin-v2-music-summary,
  .admin-v2-track-table-wrap, .admin-v2-pagination, .admin-v2-music-upload,
  .admin-v2-upload-intake, .catalog-folder-card,
  .admin-v2-programming-intro, .admin-v2-playlist-card, .admin-v2-playlist-builder,
  .admin-v2-program-zone-card, .admin-v2-program-client-directory,
  .admin-v2-schedule-overview, .admin-v2-program-builder,
  .admin-v2-device-card, .admin-v2-device-detail,
  .admin-v2-activation-create,
  .admin-v2-box-onboarding, .admin-v2-box-enrollment-card,
  .admin-v2-load-state, .admin-v2-context-required, .admin-v2-music-empty,
  .admin-v2-distribution-state,
  .admin-v2-upload-files, .admin-v2-upload-advanced,
  .admin-v2-simple-producer-upload, .admin-v2-legal-metadata-grid,
  .admin-v2-authority-question, .admin-v2-fact-question, .admin-v2-matrix-row,
  .admin-v2-final-confirmations, .admin-v2-export-grid a,
  .admin-v2-system-grid article, .admin-v2-system-rollout,
  .admin-v2-campaign-card, .admin-v2-campaign-summary article,
  .admin-v2-request-card, .admin-v2-request-counts article,
  .admin-v2-request-detail-host, .admin-v2-report-table-wrap,
  .admin-v2-reproduction-detail, .admin-v2-raw-events,
  .box-management-overview > label, .box-management-overview > div,
  .box-zone-assignment, .box-zone-management-card, [data-box-health]
) {
  color: var(--v2-ink);
  background: var(--v2-surface);
  border-color: var(--v2-line);
  border-radius: 12px;
  box-shadow: none;
}
#adminView.admin-v2-existing-shell :is(
  .admin-v2-dashboard-channel > header, .admin-v2-dashboard-distribution-glance,
  .admin-v2-dashboard-track-list > article, .admin-v2-dashboard-channel-cards > article,
  .admin-v2-dashboard-signals > article, .admin-v2-dashboard-empty,
  .admin-v2-user-row, .admin-v2-user-pending > .admin-item,
  .admin-v2-user-invite, .admin-v2-campaign-audio, .admin-v2-campaign-creative,
  .admin-v2-campaign-facts > span, .admin-v2-request-meta,
  .admin-v2-reproduction-facts > div, .admin-v2-device-detail-summary > div,
  .admin-v2-device-configuration, .admin-v2-installation-data-grid > article,
  .admin-v2-installation-qr-grid > figure,
  .admin-v2-playlist-builder-name,
  .admin-v2-playlist-draft-row, .admin-v2-program-builder-entry,
  .admin-v2-program-builder-preview, .admin-v2-program-builder-preview-row,
  .admin-v2-program-picker-options, .admin-v2-program-agenda-list,
  .admin-v2-program-builder-actions, .admin-v2-schedule-hours,
  .admin-v2-schedule-day, .admin-v2-playlist-dock, .admin-v2-cover-upload,
  .admin-v2-upload-file, .admin-v2-upload-step, .admin-v2-progressive,
  .box-zone-output, .box-output-schedule-row, .box-zone-assignment label,
  .box-health-facts > div, .box-health-charts figure,
  .box-output-fixed-level, .admin-v2-track-bulk,
  .admin-v2-upload-stepper, .admin-v2-upload-stepper b,
  .admin-v2-cover-action, .admin-v2-schedule-help,
  .admin-v2-week-zone-head, .admin-v2-schedule-legend,
  .admin-v2-schedule-legend > span, .admin-v2-schedule-overview > footer,
  .admin-v2-program-builder-scope > div, .admin-v2-half-hour-slots,
  .admin-v2-program-rule, .admin-v2-program-transition,
  .admin-v2-playlist-builder-body > section, .admin-v2-playlist-builder-body > aside,
  .admin-v2-playlist-builder-tabs, .admin-v2-playlist-track-row,
  .admin-v2-campaign-review-actions, .admin-v2-campaign-review-actions label,
  .admin-v2-campaign-card footer > strong,
  .admin-v2-request-origin-note, .admin-v2-request-facts > div,
  .admin-v2-request-message, .admin-v2-request-timeline,
  .admin-v2-request-next-action, .admin-v2-request-write-gate,
  .admin-v2-device-facts > div, .admin-v2-report-scope,
  .admin-v2-playback-timeline, .admin-v2-client-safety,
  .admin-v2-user-safety, .admin-v2-box-empty,
  .admin-v2-box-zone-option, .admin-v2-upload-files-heading,
  .admin-v2-upload-file-row, .admin-v2-ai-fields,
  .admin-v2-rights-lifecycle, .admin-v2-rights-lifecycle li,
  .admin-v2-source-materials, .admin-v2-rights-matrix, .admin-v2-cmo-matrix,
  .admin-v2-progressive > fieldset, .admin-v2-progressive > fieldset > label,
  .admin-v2-chip-grid label, .admin-v2-simple-questions fieldset,
  .admin-v2-manifest-head, .admin-v2-archived-music,
  .admin-v2-playlist-source-row, .admin-v2-playlist-collection-row,
  .admin-v2-playlist-collection-head, .admin-v2-exact-match,
  .admin-v2-export-scope
) { color: var(--v2-ink); background: var(--v2-bg); border-color: var(--v2-line); box-shadow: none; }
/* The global distribution queue is separate from the client device renderer.
 * Cover its real loading/empty/pending/approved states, not only device cards. */
#adminView.admin-v2-existing-shell :is(.admin-v2-box-onboarding-head > strong, .admin-v2-box-pairing) { color: var(--v2-brand); background: var(--v2-soft-brand); }
#adminView.admin-v2-existing-shell :is(.admin-v2-box-onboarding-head > div > span, .admin-v2-box-enrollment-head span, .admin-v2-box-enrollment-meta, .admin-v2-box-empty span, .admin-v2-box-enrollment-form .field-hint) { color: var(--v2-muted); }
#adminView.admin-v2-existing-shell .admin-v2-box-enrollment-head p { color: var(--v2-brand); }
#adminView.admin-v2-existing-shell .admin-v2-box-waiting { color: var(--v2-green); background: var(--v2-green-bg); }
#adminView.admin-v2-existing-shell .admin-v2-box-waiting span { color: inherit; }
#adminView.admin-v2-existing-shell :is(.admin-v2-box-onboarding-head, .admin-v2-box-enrollment-head, .admin-v2-box-form-actions) { flex-wrap: wrap; }
#adminView.admin-v2-existing-shell :is(.admin-v2-box-onboarding-head > div, .admin-v2-box-enrollment-head > div, .admin-v2-box-enrollment-form label, .admin-v2-box-enrollment-form fieldset) { min-width: 0; }
#adminView.admin-v2-existing-shell .admin-v2-box-enrollment-head span { overflow-wrap: anywhere; }
#adminView.admin-v2-existing-shell .admin-v2-box-zone-option { min-height: 44px; gap: 8px; }
#adminView.admin-v2-existing-shell .admin-v2-box-zone-option:has(input:checked) { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: #ad6486; }
#adminView.admin-v2-existing-shell .admin-v2-box-form-actions button { min-height: 44px; padding: 10px 14px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-context-required-icon, .admin-v2-device-empty-icon, .admin-v2-export-grid a > span, .admin-v2-program-client-directory > header > small, .admin-v2-rights-lifecycle li b, .admin-v2-manifest-head b, .admin-v2-manifest-preview li > span) { color: var(--v2-blue); background: var(--v2-blue-bg); }
#adminView.admin-v2-existing-shell .admin-v2-playlist-read-only { color: var(--v2-muted); background: var(--v2-raised); }
#adminView.admin-v2-existing-shell :is(.admin-v2-device-runtime > span, .admin-v2-device-detail-runtime > span) { color: var(--v2-muted); background: var(--v2-raised); }

/* Upload and collection source states appear only after user interaction. */
#adminView.admin-v2-existing-shell .admin-v2-music-module #globalUploadForm,
#adminView.admin-v2-existing-shell .admin-v2-music-module #globalUploadForm:has(.admin-v2-music-upload-wizard) { background: var(--v2-surface); border-color: var(--v2-line); box-shadow: none; }
#adminView.admin-v2-existing-shell .admin-v2-music-module #globalFolderDropZone { color: var(--v2-ink); background: var(--v2-bg); border-color: #ad6486; }
#adminView.admin-v2-existing-shell .admin-v2-upload-panel [data-admin-v2-upload-panel-body="5"] .admin-form-actions { color: var(--v2-ink); background: var(--v2-bg); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :is(.admin-v2-playlist-source-row.selected, .admin-v2-playlist-collection-row.selected, .admin-v2-simple-questions fieldset > label:has(input:checked), .admin-v2-final-confirmations label:has(input:checked)) { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: #ad6486; }
#adminView.admin-v2-existing-shell :is(.admin-v2-final-confirmations label:hover, .admin-v2-simple-questions fieldset > label:hover, .admin-v2-upload-file-row:hover, .admin-v2-export-grid a:hover) { background: var(--v2-raised); border-color: #737580; }
#adminView.admin-v2-existing-shell :is(.admin-v2-additional-rights, .admin-v2-legal-draft) { color: var(--v2-amber); background: var(--v2-amber-bg); border-color: var(--v2-amber); }
#adminView.admin-v2-existing-shell :is(.admin-v2-category-explanation, .admin-v2-contract-banner, .admin-v2-playlist-action-status, .admin-v2-activation-note, .admin-v2-evidence-note) { color: var(--v2-blue); background: var(--v2-blue-bg); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell .admin-v2-legal-draft > strong { color: var(--v2-amber); background: var(--v2-bg); }
#adminView.admin-v2-existing-shell .admin-v2-manifest-preview code { color: var(--v2-muted); }
#adminView.admin-v2-existing-shell .admin-v2-contract-banner { flex-wrap: wrap; }
#adminView.admin-v2-existing-shell .admin-v2-contract-banner > div { flex: 1 1 240px; min-width: 0; }
#adminView.admin-v2-existing-shell .admin-v2-contract-banner > button { flex: 0 0 auto; min-height: 44px; max-width: 100%; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
#adminView.admin-v2-existing-shell :is(.admin-v2-playlist-action-status.error, .admin-v2-audit-failure-list article) { color: var(--v2-red); background: var(--v2-red-bg); border-color: var(--v2-red); }
#adminView.admin-v2-existing-shell .admin-v2-playlist-action-status.success { color: var(--v2-green); background: var(--v2-green-bg); border-color: var(--v2-green); }
#adminView.admin-v2-existing-shell :is(
  .admin-v2-global-module-head, .admin-v2-client-module-head,
  .admin-v2-dashboard-hero, .admin-v2-music-module > .admin-panel-heading,
  .admin-v2-programming-module > .admin-panel-heading
) { color: var(--v2-ink); background: transparent; border: 0; border-radius: 0; min-height: 0; padding: 6px 0 12px; box-shadow: none; }
#adminView.admin-v2-existing-shell :is(.admin-v2-global-module-head h1, .admin-v2-client-module-head h2, .admin-v2-dashboard-hero h1, .admin-v2-music-module > .admin-panel-heading h2, .admin-v2-programming-module > .admin-panel-heading h2) { font-size: 30px; font-weight: 600; }
#adminView.admin-v2-existing-shell :is(.section-kicker, .admin-v2-dashboard-hero p, .admin-v2-global-module-head p, .admin-v2-client-module-head p) { color: var(--v2-muted); font-size: 10px; font-weight: 500; letter-spacing: .12em; }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-hero > div > span, .admin-v2-global-module-head div > span, .admin-v2-client-module-head div > span) { color: var(--v2-muted); font-size: 13px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-metrics article, .admin-v2-user-metrics article, .admin-v2-campaign-summary article, .admin-v2-request-counts article) { min-height: 96px; padding: 16px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-metrics article > strong, .admin-v2-user-metrics article > strong, .admin-v2-campaign-summary article > strong, .admin-v2-request-counts article > strong) { font-size: 27px; font-weight: 600; }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-metrics article > span, .admin-v2-user-metrics article > span, .admin-v2-campaign-summary article > span, .admin-v2-request-counts article > span) { color: var(--v2-muted); font-size: 12px; font-weight: 400; }
#adminView.admin-v2-existing-shell .admin-v2-dashboard-distribution-ring::before { background: var(--v2-surface); box-shadow: none; }
#adminView.admin-v2-existing-shell .admin-v2-dashboard-distribution-ring { background: conic-gradient(#8bd5b0 0 var(--playing-angle), #acc7ff var(--playing-angle) var(--online-angle), #3b3d46 var(--online-angle) 360deg); }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-actions button > span, .admin-v2-client-module-actions button > span, .admin-v2-playlist-icon, .admin-v2-playlist-draft-row > b, .admin-v2-user-identity > span, .admin-v2-device-kind-icon, .admin-v2-program-builder-entry > header span, .admin-v2-program-builder-preview-row > span, .admin-v2-program-client-mark) { color: var(--v2-blue); background: var(--v2-blue-bg); }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-signals b, .admin-v2-dashboard-section-head > span, .admin-v2-endpoint-group > header > span, .admin-v2-user-section > header > span, .admin-v2-schedule-overview > header > strong, .admin-v2-request-scope > strong) { color: var(--v2-muted); background: var(--v2-raised); }
#adminView.admin-v2-existing-shell .admin-v2-dashboard-track-list > article > span { color: var(--v2-brand); background: var(--v2-soft-brand); }
#adminView.admin-v2-existing-shell .admin-v2-dashboard-safety > span { color: var(--v2-green); background: var(--v2-green-bg); }
#adminView.admin-v2-existing-shell .admin-v2-dashboard-distribution-summary > span { color: var(--v2-muted); background: var(--v2-raised); }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-distribution-summary > span.attention, .admin-v2-dashboard-signals > article.attention b) { color: var(--v2-amber); background: var(--v2-amber-bg); }
#adminView.admin-v2-existing-shell .admin-v2-upload-note { color: var(--v2-blue); background: var(--v2-blue-bg); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell .admin-v2-campaign-card footer { color: var(--v2-muted); }
#adminView.admin-v2-existing-shell .admin-v2-user-invite > summary > span { color: var(--v2-brand); background: var(--v2-soft-brand); }
#adminView.admin-v2-existing-shell .admin-v2-playlist-track-row.selected { border-color: #ad6486; background: var(--v2-soft-brand); }
#adminView.admin-v2-existing-shell .admin-v2-upload-stepper button.active b { color: #fff; background: var(--v2-action); border-color: var(--v2-action); box-shadow: none; }
#adminView.admin-v2-existing-shell .admin-v2-upload-stepper button.complete b { color: var(--v2-green); background: var(--v2-green-bg); border-color: var(--v2-green); }
#adminView.admin-v2-existing-shell .admin-v2-music-count { color: var(--v2-muted); background: var(--v2-raised); }
#adminView.admin-v2-existing-shell :is(.admin-v2-upload-navigation, .admin-v2-playlist-overview-bar) { color: var(--v2-muted); background: var(--v2-surface); }

/* Typography and borders in both current components and legacy detail forms. */
#adminView.admin-v2-existing-shell :is(table, th, td, fieldset, hr, .admin-panel-heading, .admin-v2-program-row, .admin-v2-device-tabs, .admin-v2-campaign-card footer, .admin-v2-program-agenda-item) { border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :is(th, thead) { color: var(--v2-muted); background: var(--v2-bg); font-size: 11px; font-weight: 500; }
#adminView.admin-v2-existing-shell :is(td, tr, tbody) { color: var(--v2-ink); background: var(--v2-surface); font-size: 13px; }
#adminView.admin-v2-existing-shell td :is(strong, span) { overflow-wrap: anywhere; }
#adminView.admin-v2-existing-shell tr:hover > td { background: var(--v2-raised); }
#adminView.admin-v2-existing-shell :is(.admin-v2-row-menu > div, .admin-v2-row-menu[open] > summary) { color: var(--v2-ink); background: var(--v2-raised); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell .admin-form-status.success { color: var(--v2-green); }
#adminView.admin-v2-existing-shell .admin-form-status.error { color: var(--v2-red); }
/* Menus inside scrollable tables must stay reachable, including the last row. */
#adminView.admin-v2-existing-shell .admin-v2-track-table .admin-v2-row-menu[open] > div { position: static; min-width: 210px; margin-top: 8px; }
#adminView.admin-v2-existing-shell .admin-v2-chip-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
#adminView.admin-v2-existing-shell .admin-audio-preview { min-width: 0; width: 100%; max-width: 100%; }
#adminView.admin-v2-existing-shell :is(.box-management-overview > div span, .box-management-overview > div small, .box-output-schedule-head span, .box-health-note, .box-health-facts span, .admin-v2-device-detail-summary span, .admin-v2-request-meta, .admin-v2-campaign-scope, .admin-v2-report-filters label, .admin-v2-program-builder-field) { color: var(--v2-muted); }
#adminView.admin-v2-existing-shell .box-health-charts text { fill: var(--v2-muted); }
#adminView.admin-v2-existing-shell .box-health-facts strong { color: var(--v2-ink); font-size: 20px; font-weight: 600; }
#adminView.admin-v2-existing-shell .box-health-charts figcaption { font-size: 13px; font-weight: 500; }

/* Native inputs: checkboxes/radios are never full-width text inputs. Existing
 * visually-hidden picker inputs stay hidden; their labels retain focus rings. */
#adminView.admin-v2-existing-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]), select, textarea) {
  color-scheme: dark;
  color: var(--v2-ink);
  -webkit-text-fill-color: var(--v2-ink);
  background: var(--v2-bg);
  border: 1px solid #525561;
  border-radius: 8px;
  box-shadow: none;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
}
#adminView.admin-v2-existing-shell :is(input, textarea)::placeholder { color: #9699a6; -webkit-text-fill-color: #9699a6; opacity: 1; }
#adminView.admin-v2-existing-shell :is(input[type="checkbox"], input[type="radio"]):not(.admin-v2-program-picker-options input):not(.admin-v2-progressive input):not(.admin-v2-final-confirmations input):not(.admin-v2-track-table input) {
  appearance: auto;
  accent-color: var(--v2-brand);
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
#adminView.admin-v2-existing-shell input[type="range"] { accent-color: var(--v2-brand); height: 24px; padding: 0; }
#adminView.admin-v2-existing-shell input[type="file"] { color: var(--v2-muted); height: auto; background: var(--v2-bg); padding: 10px; max-width: 100%; }
#adminView.admin-v2-existing-shell input::file-selector-button { color: var(--v2-ink); background: var(--v2-raised); border: 1px solid var(--v2-line); border-radius: 6px; padding: 8px 10px; margin-right: 10px; }
#adminView.admin-v2-existing-shell :is(input, select, textarea):disabled { color: #9699a6; -webkit-text-fill-color: #9699a6; background: #25262c; border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :is(button, a, input, select, textarea, summary, [role="button"]):focus-visible { outline: 2px solid var(--v2-brand); outline-offset: 3px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-picker-options label, .admin-v2-cover-upload):has(input:focus-visible) { outline: 2px solid var(--v2-brand); outline-offset: 3px; }
#adminView.admin-v2-existing-shell :is(.box-output-toggle, .box-zone-assignment label) { align-items: center; min-height: 44px; cursor: pointer; }
#adminView.admin-v2-existing-shell .box-output-toggle > span { flex: 1 1 0; min-width: 0; }
#adminView.admin-v2-existing-shell .box-output-toggle strong { font-size: 14px; line-height: 1.5; }
#adminView.admin-v2-existing-shell .box-output-toggle small { color: var(--v2-muted); font-size: 12px; }
#adminView.admin-v2-existing-shell .box-zone-output:has(.box-output-toggle input:checked) { border-color: #ad6486; }
#adminView.admin-v2-existing-shell .box-output-settings { gap: 14px; }
#adminView.admin-v2-existing-shell .box-output-fixed-level { display: grid; align-content: start; gap: 6px; }

/* Buttons retain handlers, roles, disabled states and selected semantics. */
#adminView.admin-v2-existing-shell :where(button, a.secondary-button, label.secondary-button) {
  color: var(--v2-ink);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}
#adminView.admin-v2-existing-shell button:hover:not(:disabled) { color: var(--v2-ink); background: var(--v2-raised); border-color: #737580; transform: none; }
#adminView.admin-v2-existing-shell button:disabled { opacity: .45; cursor: not-allowed; }
#adminView.admin-v2-existing-shell :is(.primary-button, .admin-v2-program-save) { color: #fff; background: var(--v2-action); border-color: var(--v2-action); }
#adminView.admin-v2-existing-shell :is(.primary-button, .admin-v2-program-save):hover:not(:disabled) { color: #fff; background: #a82762; border-color: #ec80b3; }
#adminView.admin-v2-existing-shell :is(button.active, button[aria-selected="true"], button[aria-pressed="true"], .admin-v2-program-mode button.is-active, .admin-v2-program-builder-preview-row.is-active) { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: #ad6486; }
#adminView.admin-v2-existing-shell :is(.admin-v2-device-tabs, .admin-v2-report-tabs, .admin-v2-distribution-tabs, .admin-v2-campaign-tabs, .admin-catalog-model) { background: transparent; border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :is(.admin-v2-device-tabs button, .admin-v2-report-tabs button, .admin-v2-distribution-tabs button, .admin-v2-campaign-tabs button, .catalog-nav-card) { border-radius: 8px; min-height: 44px; padding: 9px 13px; }
#adminView.admin-v2-existing-shell .admin-v2-campaign-tabs button span { color: inherit; background: var(--v2-bg); border-radius: 5px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-delete-schedule, .admin-v2-device-management button, .danger-button) { color: var(--v2-red); }
#adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-actions button, .admin-v2-producer-hero-actions button, .admin-v2-dashboard-signal-open) { background: var(--v2-surface); border-color: var(--v2-line); box-shadow: none; }

/* Status palettes: never a global grayscale/invert filter. */
#adminView.admin-v2-existing-shell :is(.admin-v2-track-status, .admin-v2-client-status, .admin-v2-device-status, .admin-v2-campaign-status, .admin-v2-request-status) { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
#adminView.admin-v2-existing-shell :is(.admin-v2-client-status, .admin-v2-track-status, .admin-v2-device-status, .admin-v2-dashboard-distribution-state, .admin-v2-request-status, .admin-v2-campaign-status, .admin-v2-user-role, .admin-v2-request-source, .admin-v2-super-admin-badge, .admin-v2-proof) { color: var(--v2-muted); background: var(--v2-raised); border-color: var(--v2-line); font-size: 11px; font-weight: 500; }
#adminView.admin-v2-existing-shell :is(.admin-v2-client-status.active, .admin-v2-track-status.ready, .admin-v2-device-status.online, .admin-v2-device-status.active, .admin-v2-dashboard-distribution-state.online, .admin-v2-dashboard-distribution-state.playing, .admin-v2-request-status.completed, .admin-v2-request-status.approved, .admin-v2-campaign-status.active, .admin-v2-campaign-status.completed, .admin-v2-user-role.client, .admin-v2-proof.completed) { color: var(--v2-green); background: var(--v2-green-bg); }
#adminView.admin-v2-existing-shell :is(.admin-v2-device-status.attention, .admin-v2-dashboard-distribution-state.degraded, .admin-v2-request-status.new, .admin-v2-request-status.in_review, .admin-v2-campaign-status.needs_review, .admin-v2-campaign-status.needs_admin_review, .admin-v2-track-status.processing, .admin-v2-proof.pending) { color: var(--v2-amber); background: var(--v2-amber-bg); }
#adminView.admin-v2-existing-shell :is(.admin-v2-device-status.error, .admin-v2-dashboard-distribution-state.error, .admin-v2-request-status.rejected, .admin-v2-campaign-status.error, .admin-v2-proof.failed) { color: var(--v2-red); background: var(--v2-red-bg); }
#adminView.admin-v2-existing-shell .admin-v2-campaign-status.scheduled { color: var(--v2-blue); background: var(--v2-blue-bg); }
#adminView.admin-v2-existing-shell :is(.admin-v2-user-role.super, .admin-v2-request-source.ina) { color: var(--v2-brand); background: var(--v2-soft-brand); }
#adminView.admin-v2-existing-shell :is(.admin-v2-user-role.producer, .admin-v2-super-admin-badge) { color: var(--v2-blue); background: var(--v2-blue-bg); }
/* Earlier report CSS contains important text colors; override only those. */
#adminView.admin-v2-existing-shell .admin-v2-proof { color: var(--v2-muted) !important; font-size: 11px !important; }
#adminView.admin-v2-existing-shell .admin-v2-proof.completed { color: var(--v2-green) !important; }
#adminView.admin-v2-existing-shell .admin-v2-proof.failed { color: var(--v2-red) !important; }
#adminView.admin-v2-existing-shell .admin-v2-proof.pending { color: var(--v2-amber) !important; }
#adminView.admin-v2-existing-shell :is(.admin-v2-report-warning, .admin-v2-campaign-note, .admin-v2-token-rule, .admin-v2-installation-status, .admin-v2-installation-card, .admin-v2-installation-message, .admin-v2-setup-history-note, .admin-v2-report-proof-note, .box-global-controls, .box-health-alert, .admin-v2-dashboard-safety, .admin-v2-programming-read-only, .admin-v2-installed-player-note) { color: var(--v2-muted); background: var(--v2-bg); border-color: var(--v2-line); box-shadow: none; }
#adminView.admin-v2-existing-shell :is(.box-health-alert.warning, .admin-v2-report-warning, .admin-v2-installation-message.warning) { color: var(--v2-amber); background: var(--v2-amber-bg); border-color: var(--v2-amber); }
#adminView.admin-v2-existing-shell :is(.box-health-alert.critical, .admin-v2-installation-message.error) { color: var(--v2-red); background: var(--v2-red-bg); border-color: var(--v2-red); }
#adminView.admin-v2-existing-shell .admin-v2-device-configuration [data-unsaved-indicator] { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: var(--v2-brand); }
#adminView.admin-v2-existing-shell .admin-v2-campaign-progress > div { background: var(--v2-line); }
#adminView.admin-v2-existing-shell .admin-v2-campaign-progress > div > span { background: var(--v2-green); }
#adminView.admin-v2-existing-shell .admin-v2-program-builder-overlay { background: #101116bf; }
#adminView.admin-v2-existing-shell .admin-v2-program-builder { border: 1px solid var(--v2-line); }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-rule, .admin-v2-report-proof-note, .admin-v2-report-warning) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-token-rule, .admin-v2-request-origin-note) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-rule > strong, .admin-v2-program-rule > span) { min-width: 0; }
#adminView.admin-v2-existing-shell .admin-v2-program-gate { color: var(--v2-amber); background: var(--v2-amber-bg); border-color: var(--v2-amber); }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-message.error, .admin-v2-program-days > small.error, .admin-v2-program-rule.error) { color: var(--v2-red); }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-message.success, .admin-v2-program-rule.success) { color: var(--v2-green); }
#adminView.admin-v2-existing-shell .admin-v2-program-builder-preview-row.incomplete { color: var(--v2-amber); background: var(--v2-amber-bg); border-color: var(--v2-amber); }
#adminView.admin-v2-existing-shell :is(.admin-v2-installation-status.completed, .admin-v2-installation-message.success) { color: var(--v2-green); background: var(--v2-green-bg); border-color: var(--v2-green); }
#adminView.admin-v2-existing-shell .admin-v2-installation-status.pending { color: var(--v2-amber); background: var(--v2-amber-bg); border-color: var(--v2-amber); }
#adminView.admin-v2-existing-shell .admin-v2-installation-status.failed { color: var(--v2-red); background: var(--v2-red-bg); border-color: var(--v2-red); }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-picker-options label, .admin-v2-program-mode button, .admin-v2-choice-cards label) { color: var(--v2-ink); background: var(--v2-surface); border-color: var(--v2-line); }
#adminView.admin-v2-existing-shell :is(.admin-v2-program-picker-options label, .admin-v2-choice-cards label):has(input:checked) { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: var(--v2-brand); }

/* Calendar has its own semantic palette and its original positional geometry. */
#adminView.admin-v2-existing-shell :is(.admin-v2-schedule-zone, .admin-v2-half-hour-planner) { background-color: var(--v2-bg); border-color: var(--v2-line); }
/* Secondary time selection is a disclosure with readable 44px targets, not a
 * 48-column miniature timeline. Position-dependent schedule tracks below stay
 * untouched. Explicit details styling also replaces the old mobile hide rule. */
#adminView.admin-v2-existing-shell details.admin-v2-half-hour-planner { display: block; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-planner > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-planner > summary::before { content: "+"; color: var(--v2-brand); font-size: 18px; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-planner[open] > summary::before { content: "−"; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-planner > summary::-webkit-details-marker { display: none; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-groups { display: grid; gap: 16px; margin-top: 12px; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-group { min-width: 0; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-group > strong { display: block; margin-bottom: 6px; color: var(--v2-muted); font-size: 12px; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-slots { grid-template-columns: repeat(auto-fit, minmax(min(100%, 64px), 1fr)); gap: 6px; min-height: 0; padding: 4px; overflow: visible; border: 0; background: transparent; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-group .admin-v2-half-hour-slots { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-slots button { min-height: 44px; border: 1px solid var(--v2-line); border-radius: 7px; padding: 8px 3px; color: var(--v2-ink); background: var(--v2-surface); }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-slots button span { position: static; color: inherit; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.4; white-space: nowrap; transform: none; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-slots button.selected { color: var(--v2-brand); background: var(--v2-soft-brand); border-color: #ad6486; }
#adminView.admin-v2-existing-shell .admin-v2-half-hour-slots button[aria-current="true"] { outline: 2px solid var(--v2-brand); outline-offset: 1px; }
#adminView.admin-v2-existing-shell .admin-v2-program-drop-slot { border-color: #3b3d4680; }
#adminView.admin-v2-existing-shell .admin-v2-schedule-track { background: repeating-linear-gradient(90deg, transparent 0, transparent calc(2.083333% - 1px), #30323b calc(2.083333% - 1px), #30323b 2.083333%), repeating-linear-gradient(90deg, #18191e 0, #18191e calc(12.5% - 1px), #525561 calc(12.5% - 1px), #525561 12.5%); }
#adminView.admin-v2-existing-shell :is(.admin-v2-schedule-segment, .admin-v2-playlist-dock-item) { color: var(--tone-ink, #c1d4f3); background: var(--tone-bg, #29364d); border-color: var(--tone-ink, #acc7ff); box-shadow: none; }
#adminView.admin-v2-existing-shell .tone-0 { --tone-bg: #29364d; --tone-ink: #c1d4f3; }
#adminView.admin-v2-existing-shell .tone-1 { --tone-bg: #443224; --tone-ink: #f0c29e; }
#adminView.admin-v2-existing-shell .tone-2 { --tone-bg: #3f2941; --tone-ink: #e7b8eb; }
#adminView.admin-v2-existing-shell .tone-3 { --tone-bg: #21392d; --tone-ink: #a9dfc2; }
#adminView.admin-v2-existing-shell .tone-4 { --tone-bg: #3c3222; --tone-ink: #edcb8e; }
#adminView.admin-v2-existing-shell .tone-5 { --tone-bg: #432833; --tone-ink: #efb2c3; }
#adminView.admin-v2-existing-shell .tone-6 { --tone-bg: #273c3e; --tone-ink: #b0dcd9; }
#adminView.admin-v2-existing-shell .tone-7 { --tone-bg: #34334e; --tone-ink: #c7c3ed; }
#adminView.admin-v2-existing-shell .admin-v2-schedule-segment :is(strong, small) { color: inherit; }
#adminView.admin-v2-existing-shell .admin-v2-schedule-legend i { background: var(--tone-ink, var(--v2-blue)); }
#adminView.admin-v2-existing-shell .admin-v2-schedule-legend :is(strong, small) { font-size: 12px; }

/* The audio audition tray is intentionally body-mounted by app.js. */
body:has(#adminView.admin-v2-existing-shell:not(.hidden)) .admin-audio-preview-panel {
  --ink: #f4f3f6;
  --muted: #b2b4bf;
  color-scheme: dark;
  color: #f4f3f6;
  background: #23242b;
  border-color: #525561;
  box-shadow: 0 8px 32px #0005;
}
body:has(#adminView.admin-v2-existing-shell:not(.hidden)) .admin-audio-preview-panel :is(span, small) { color: #b2b4bf; }
body:has(#adminView.admin-v2-existing-shell:not(.hidden)) .admin-audio-preview-panel button { background: #2b2d36; color: #f4f3f6; border: 1px solid #525561; }

@media (max-width: 1100px) {
  #adminView.admin-v2-existing-shell .admin-v2-dashboard-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  #adminView.admin-v2-existing-shell { grid-template-columns: minmax(0, 1fr); }
  #adminView.admin-v2-existing-shell .admin-sidebar { padding: 13px 16px; gap: 12px; height: auto; }
  #adminView.admin-v2-existing-shell .admin-logo { max-width: 155px; }
  #adminView.admin-v2-existing-shell .admin-content { padding: 0 16px 28px; gap: 18px; }
  #adminView.admin-v2-existing-shell .admin-v2-existing-topbar { margin-inline: -16px; padding: 12px 16px; min-height: 0; }
  #adminView.admin-v2-existing-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]), select, textarea) { font-size: 16px; }
  #adminView.admin-v2-existing-shell .admin-sidebar > .admin-v2-mobile-nav-toggle { color: var(--v2-ink); background: var(--v2-bg); border-color: #525561; }
  #adminView.admin-v2-existing-shell .admin-v2-existing-topbar-actions { max-width: 36%; }
  #adminView.admin-v2-existing-shell :is(.admin-v2-global-module-head h1, .admin-v2-client-module-head h2, .admin-v2-dashboard-hero h1, .admin-v2-music-module > .admin-panel-heading h2, .admin-v2-programming-module > .admin-panel-heading h2) { font-size: 27px; }
  #adminView.admin-v2-existing-shell :is(.admin-v2-device-tabs, .admin-v2-report-tabs) { gap: 5px; }
  #adminView.admin-v2-existing-shell .admin-v2-device-tabs button { flex: 1 1 120px; padding-inline: 10px; }
  #adminView.admin-v2-existing-shell .box-output-settings { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  #adminView.admin-v2-existing-shell :is(.admin-v2-dashboard-metrics, .admin-v2-user-metrics, .admin-v2-campaign-summary, .admin-v2-request-counts) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #adminView.admin-v2-existing-shell .admin-v2-device-detail { padding: 16px; }
  #adminView.admin-v2-existing-shell .admin-v2-device-configuration { padding: 0; background: transparent; }
  #adminView.admin-v2-existing-shell .box-zone-management-card { padding: 12px; }
  #adminView.admin-v2-existing-shell .box-zone-output { padding: 12px; }
  #adminView.admin-v2-existing-shell .admin-v2-program-builder-actions { background: var(--v2-surface); }
  #adminView.admin-v2-existing-shell :is(.admin-v2-box-onboarding, .admin-v2-box-enrollment-card, .admin-v2-box-empty) { padding: 14px; border-radius: 12px; }
}
@media (max-width: 700px) {
  #adminView.admin-v2-existing-shell .admin-v2-request-attachment { grid-template-columns: minmax(0, 1fr); }
  #adminView.admin-v2-existing-shell .admin-v2-music-collection:has(.admin-v2-row-menu[open]) > .admin-v2-row-menu { grid-column: 1 / -1; }
  #adminView.admin-v2-existing-shell .admin-v2-upload-panel { padding-inline: 16px; }
  #adminView.admin-v2-existing-shell .admin-v2-track-table .admin-v2-row-menu[open] > div { min-width: 0; }
  #adminView.admin-v2-existing-shell .admin-v2-half-hour-group .admin-v2-half-hour-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #adminView.admin-v2-existing-shell .admin-v2-contract-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  #adminView.admin-v2-existing-shell .admin-v2-contract-banner > div { flex-basis: auto; }
  #adminView.admin-v2-existing-shell .admin-v2-contract-banner > button { width: 100%; }
}
@media (max-width: 380px) {
  #adminView.admin-v2-existing-shell .admin-v2-half-hour-group .admin-v2-half-hour-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #adminView.admin-v2-existing-shell *, #adminView.admin-v2-existing-shell *::before { transition-duration: 0s; animation-duration: .01ms; animation-iteration-count: 1; }
}
