/* Admin-only dark theme v7. Public/customer pages are always light via admin-theme-scope-v7.js. */
html[data-admin-dark="true"],html[data-admin-dark="true"] body,html[data-admin-dark="true"] #app{background:#081319!important;color:#e7f0f3!important;color-scheme:dark}
html[data-admin-dark="true"] .admin{background:#0b1820!important;color:#e7f0f3!important;gap:0!important}
html[data-admin-dark="true"] .workspace{background:#0d1b23!important;color:#e7f0f3!important}
html[data-admin-dark="true"] .sidebar{background:#0a222c!important;color:#d7e7ec!important;border-right:1px solid #29434e!important;box-shadow:none!important}
html[data-admin-dark="true"] .sidebar nav button{color:#b9cdd4!important}
html[data-admin-dark="true"] .sidebar nav button:hover{background:#14343e!important;color:#fff!important;filter:none!important}
html[data-admin-dark="true"] .sidebar nav button.selected{background:#1b4d57!important;color:#fff!important}
html[data-admin-dark="true"] .sidebar>.eyebrow,html[data-admin-dark="true"] .sidebar-bottom p{color:#8fb0ba!important}
html[data-admin-dark="true"] .topline{color:#a8bcc4!important;border-color:#29434e!important;background:#0d1b23!important}
html[data-admin-dark="true"] .section-title>span,html[data-admin-dark="true"] .muted,html[data-admin-dark="true"] td small,html[data-admin-dark="true"] .record-card span,html[data-admin-dark="true"] .record-card small{color:#a9bec6!important}
html[data-admin-dark="true"] .eyebrow{color:#62d6d5!important}

html[data-admin-dark="true"] .table-wrap,html[data-admin-dark="true"] table,html[data-admin-dark="true"] tbody,html[data-admin-dark="true"] .record-card,html[data-admin-dark="true"] .staff-card,html[data-admin-dark="true"] .metric-card,html[data-admin-dark="true"] .settings-card,html[data-admin-dark="true"] .account-section,html[data-admin-dark="true"] .account-content-section,html[data-admin-dark="true"] .primary-toolbar,html[data-admin-dark="true"] .staff-filter-panel,html[data-admin-dark="true"] .staff-filter-fields,html[data-admin-dark="true"] .manifest-run,html[data-admin-dark="true"] .staff-manifest-run-card,html[data-admin-dark="true"] .staff-route-timeline,html[data-admin-dark="true"] .v5-dashboard-sailing,html[data-admin-dark="true"] .v5-schedule-card,html[data-admin-dark="true"] dialog{background:#122630!important;color:#e7f0f3!important;border-color:#2e4853!important}
html[data-admin-dark="true"] th{background:#19313b!important;color:#c0d4db!important;border-color:#34505b!important}
html[data-admin-dark="true"] td{background:#122630!important;color:#e2edf0!important;border-color:#2b444f!important}
html[data-admin-dark="true"] tr:hover td{background:#17323c!important}
html[data-admin-dark="true"] .empty-state,html[data-admin-dark="true"] td.empty{background:#10222a!important;color:#9fb5bd!important;border-color:#2d4651!important}

html[data-admin-dark="true"] input,html[data-admin-dark="true"] select,html[data-admin-dark="true"] textarea{background:#0d2028!important;color:#eef6f8!important;border-color:#405d68!important;box-shadow:none!important}
html[data-admin-dark="true"] input::placeholder,html[data-admin-dark="true"] textarea::placeholder{color:#7f9aa4!important}
html[data-admin-dark="true"] input[type="checkbox"],html[data-admin-dark="true"] input[type="radio"]{accent-color:#35b7b4!important}
html[data-admin-dark="true"] .subtle,html[data-admin-dark="true"] .row-actions .action-menu>summary{background:#1a3540!important;color:#e0edf1!important;border-color:#35525d!important}
html[data-admin-dark="true"] .subtle:hover,html[data-admin-dark="true"] .row-actions .action-menu>summary:hover{background:#214550!important;filter:none!important}
html[data-admin-dark="true"] .action-menu .menu-fields,html[data-admin-dark="true"] .staff-schedule-tools .schedule-selection>.menu-fields{background:#10222a!important;color:#e7f0f3!important;border-color:#35525d!important}
html[data-admin-dark="true"] .context-bar,html[data-admin-dark="true"] .notice,html[data-admin-dark="true"] .schedule-detail-grid span,html[data-admin-dark="true"] .trip-timeline article,html[data-admin-dark="true"] .contact-list article{background:#19343e!important;color:#dce9ed!important;border-color:#34515c!important}

html[data-admin-dark="true"] .badge{background:#203943!important;color:#dce9ed!important;border:1px solid #3b5660!important}
html[data-admin-dark="true"] .badge.green,html[data-admin-dark="true"] .v5-status.published{background:#183d34!important;color:#9ee0c1!important;border-color:#2b6654!important}
html[data-admin-dark="true"] .badge.amber,html[data-admin-dark="true"] .v5-status.full{background:#463a20!important;color:#f0d493!important;border-color:#6b5730!important}
html[data-admin-dark="true"] .badge.red,html[data-admin-dark="true"] .v5-status.closed{background:#442729!important;color:#efb4b7!important;border-color:#633a3d!important}

/* Staff page: remove the remaining bright pills, tabs, metrics and calendar cells. */
html[data-admin-dark="true"] .staff-tabs{background:#122832!important;border-color:#314c57!important}
html[data-admin-dark="true"] .staff-tabs button{background:transparent!important;color:#b9cdd4!important}
html[data-admin-dark="true"] .staff-tabs button.selected,html[data-admin-dark="true"] .staff-tabs button[aria-selected="true"]{background:#1d5661!important;color:#fff!important}
html[data-admin-dark="true"] .staff-metrics{border-color:#314a55!important;color:#adc2c9!important}
html[data-admin-dark="true"] .staff-metrics>*{background:#e7f0f3!important;color:#16303a!important;border-color:#d9e5e8!important}
html[data-admin-dark="true"] .staff-calendar{background:transparent!important}
html[data-admin-dark="true"] .staff-calendar>b{color:#a9bec6!important}
html[data-admin-dark="true"] .staff-calendar>article,html[data-admin-dark="true"] .staff-calendar>span{background:#122630!important;color:#e7f0f3!important;border-color:#2e4853!important}
html[data-admin-dark="true"] .staff-calendar>article.has-event{background:#16363d!important;border-color:#3a716f!important}
html[data-admin-dark="true"] .calendar-event{background:#1d494b!important;color:#cceceb!important}
html[data-admin-dark="true"] .calendar-event.pending{background:#4a3e22!important;color:#f2dda7!important}
html[data-admin-dark="true"] .calendar-event.closure{background:#472b2d!important;color:#efc4c6!important}

/* Schedule calendar and list. */
html[data-admin-dark="true"] .calendar{background:transparent!important}
html[data-admin-dark="true"] .calendar-head{color:#9fb6bf!important}
html[data-admin-dark="true"] .calendar-day,html[data-admin-dark="true"] .calendar-blank{background:#122630!important;color:#e7f0f3!important;border-color:#2f4954!important}
html[data-admin-dark="true"] .calendar-day.published{background:#14302e!important;border-top-color:#3eb58d!important}
html[data-admin-dark="true"] .calendar-day.closed{background:#302326!important;border-top-color:#ba5a5e!important}
html[data-admin-dark="true"] .calendar-day.full{background:#332d1f!important;border-top-color:#d79b39!important}
html[data-admin-dark="true"] .calendar-day.holiday-day{background:#322b20!important}
html[data-admin-dark="true"] .day-inspect{color:#e5eff2!important;background:transparent!important}
html[data-admin-dark="true"] .day-inspect small{color:#9db3bb!important}
html[data-admin-dark="true"] .v5-time-grid>span,html[data-admin-dark="true"] .v5-booked-load>span,html[data-admin-dark="true"] .staff-route-step{background:#1a3540!important;color:#dce9ed!important}
html[data-admin-dark="true"] .v5-schedule-select{background:#1a3540!important;color:#dce9ed!important;border-color:#385661!important}
html[data-admin-dark="true"] .view-toggle{background:#142b34!important;border-color:#34515b!important}
html[data-admin-dark="true"] .view-toggle button{background:transparent!important;color:#b9ccd3!important}
html[data-admin-dark="true"] .view-toggle button.selected{background:#1e5962!important;color:#fff!important}
html[data-admin-dark="true"] .staff-schedule-tools{border-color:#2f4953!important}
html[data-admin-dark="true"] .staff-schedule-tools>summary{color:#e7f0f3!important}
html[data-admin-dark="true"] .staff-schedule-tools>summary span{color:#9fb5bd!important}

/* Manifest surfaces. */
html[data-admin-dark="true"] .manifest-times,html[data-admin-dark="true"] .manifest-times>div,html[data-admin-dark="true"] .manifest-paper-table,html[data-admin-dark="true"] .manifest-paper-table th,html[data-admin-dark="true"] .manifest-paper-table td,html[data-admin-dark="true"] .manifest-returns{background:#122630!important;color:#e7f0f3!important;border-color:#3a5661!important}
html[data-admin-dark="true"] .route-heading{color:#9fb5bd!important}
html[data-admin-dark="true"] .warning{color:#f1c66f!important}

/* Mobile staff chrome. */
html[data-admin-dark="true"] .staff-mobile-header,html[data-admin-dark="true"] .staff-core-nav,html[data-admin-dark="true"] .staff-mobile-drawer{background:#10242d!important;color:#e7f0f3!important;border-color:#2e4752!important}
html[data-admin-dark="true"] .staff-core-nav button{color:#8fa8b1!important}
html[data-admin-dark="true"] .staff-core-nav button.current{color:#67d2cd!important}
html[data-admin-dark="true"] .staff-core-nav button.current:before{background:#67d2cd!important}
html[data-admin-dark="true"] .staff-tools-button,html[data-admin-dark="true"] .staff-drawer-group>button{background:#162d36!important;color:#e7f0f3!important;border-color:#324d57!important}
html[data-admin-dark="true"] .drawer-icon{background:#1d3b43!important;color:#72d2cc!important}
html[data-admin-dark="true"] .staff-drawer-links a{background:#193740!important;color:#e7f0f3!important}
html[data-admin-dark="true"] .staff-drawer-links button{background:#342426!important;color:#f0bfc1!important;border-color:#603d41!important}

/* Settings cards and autosave notes. */
html[data-admin-dark="true"] #preferences:after,html[data-admin-dark="true"] #appearance:after{color:#9fb6bf!important}

/* Print remains paper-white regardless of admin theme. */
@media print{html[data-admin-dark="true"],html[data-admin-dark="true"] body,html[data-admin-dark="true"] #app{background:#fff!important;color:#000!important;color-scheme:light}}
