/* Screen-only palette: warehouse printouts and PDFs retain their light styling. */
@media screen {
  :root {
    color-scheme: dark;
    --screen-bg: #0d1422;
    --screen-panel: #151f30;
    --screen-raised: #1c2940;
    --screen-input: #0f192a;
    --screen-border: #30415c;
    --screen-text: #e7edf7;
    --screen-muted: #b0bfd3;
    --screen-subtle: #93a8c4;
    --screen-blue: #9fc2ff;
    --screen-blue-bg: #223454;
    --screen-warning: #ffcf88;
    --screen-warning-bg: #392d1a;
    color: var(--screen-text);
    background: var(--screen-bg);
  }
  body { background: var(--screen-bg); color: var(--screen-text); }
  aside { background: linear-gradient(165deg, #111c2e, #0a1220); color: var(--screen-muted); border-right: 1px solid var(--screen-border); }
  .panel, .stats article, .auth, dialog { background: var(--screen-panel); color: var(--screen-text); border-color: var(--screen-border); }
  dialog { box-shadow: 0 24px 100px #0009; }
  dialog::backdrop { background: #020813bd; }
  p, label, .muted, label small, td small, .stats span, .week-bar small,
  .topline, .live span, .auth small, .page-footer, .checklist-task small {
    color: var(--screen-muted);
  }
  .topline, .page-footer, td, hr, .crew-summary article, .transport-row,
  .recipe-row, .checklist-task, .history-entry, .venue-photo-editor,
  .monthly-rankings li, .run-days p { border-color: var(--screen-border); }
  th { color: #adc1dd; }
  .eyebrow, .page-header .eyebrow, .workspace { color: var(--screen-subtle); }
  .topline b { color: var(--screen-subtle); }
  .live { color: #83b2ff; }
  .nav { color: #c1d0e5; }
  .nav:hover { background: #1a2c46; }
  .nav.active { color: #fff; background: #243d66; border-color: #4c76ba; box-shadow: inset 3px 0 #82b1ff; }
  .aside-bottom small { color: #adbfda; }
  .aside-bottom button { color: #c5d6ef; border-color: #3a5073; }
  button { background: #2962c9; color: #fff; }
  button.ghost { background: transparent; color: #c4d7f3; border-color: #405576; }
  button.ghost:hover { background: #23344f; }
  button:disabled { opacity: .5; }
  button:focus-visible, a:focus-visible { outline-color: #a0c7ff; }
  input, select, textarea, option {
    background: var(--screen-input); color: var(--screen-text); border-color: #4b607e;
  }
  input::placeholder, textarea::placeholder { color: #9baec7; opacity: 1; }
  input:focus, select:focus, textarea:focus { border-color: #8abaff; outline-color: #436da9; }
  input[type=checkbox] { accent-color: #6b9ff5; }
  input[type=file]::file-selector-button { background: #263e62; color: var(--screen-text); border: 1px solid #50709b; border-radius: 4px; padding: 6px 9px; }
  .crew-fields input:disabled, .crew-fields select:disabled,
  input:disabled, select:disabled, textarea:disabled { background: #192334; color: #93a4bc; border-color: var(--screen-border); }
  a { color: #a5c9ff; }
  .tag, .stats i, .empty-icon, .stop-number { background: var(--screen-blue-bg); color: #b8d2ff; border-color: #405e8d; }
  .amber, .checklist-alert { background: var(--screen-warning-bg); color: var(--screen-warning); border-color: #94703b; }
  .warning, .checklist-warning { background: var(--screen-warning-bg); color: var(--screen-warning); }
  .driver-alert { color: #ffd08c !important; }
  .event-attention, .floor-needs-review, .packdown-priority { background: #2b261e; }
  .packdown-priority strong { color: #ffd08c; }
  .needs-attention, .preparation-card.needs-attention { border-left-color: #e7aa53; }
  .attention-row { border-top-color: #6d5534; }
  .attention-row small { color: #ddc299; }
  .empty { background: #111b2b; border-color: #465e7c; }
  .hint { background: #172b49; color: var(--screen-text); border-left-color: #6c9ff3; }
  .preparation-card, .venue-info > div, .booking-venue-preview { background: var(--screen-raised); border-color: var(--screen-border); }
  .venue-info dt, .crew-summary small, .stop small, .prep-dates,
  .checklist-task .task-source, .task-verified .check span, .event-context,
  .route-preview, .venue-originals summary { color: var(--screen-blue); }
  .history-values { color: #bed0e9; }
  .crew-assignment, .packdown-run-context { border-color: #3e577c; }
  .packdown-run-context { background: #14243a; border-left-color: #76a8ff; }
  .item-photo { background: #101a29; }
  .no-photo, .no-photo small, .pick-no-photo { color: #9eb2cb; }
  .pick-no-photo { border-color: #506683; }
  .split-table thead { background: var(--screen-raised); }
  .calendar-grid, .calendar-cell { border-color: #3b506f; }
  .calendar-weekday { background: #20324f; color: #c2d8f8; }
  .calendar-cell { background: var(--screen-panel); }
  .calendar-outside { background: #0f1929; }
  .calendar-day, .calendar-more { background: transparent; color: #c3d7f4; }
  .calendar-outside .calendar-day { color: #91a6c2; }
  .calendar-current .calendar-day { background: #2962c9; color: #fff; }
  .calendar-selected { box-shadow: inset 0 0 0 2px #86b6ff; }
  .calendar-event { background: #223958; color: #d5e4ff; border-left-color: #87b5ff; }
  .calendar-event.calendar-attention { background: #3b2f1e; color: #ffe1ad; border-left-color: #ecb45d; }
  .monthly-volume meter { accent-color: #78a9ff; }
  #toast { background: #233d63; color: #f0f5ff; border: 1px solid #678fc4; box-shadow: 0 5px 30px #0007; }
  /* Preserve the original logo's blue and charcoal colours on a light plate. */
  .sidebar-brand, .auth .auth-brand { background: #f2f5fc; }
  .brand.sidebar-brand span, .auth .auth-brand span { color: #455c7c; }
  .page-footer img { background: #f2f5fc; border-radius: 4px; padding: 3px; height: auto; }
}

@media screen {
 .calendar-event.event-outsourced, .calendar-event.event-outsourced.calendar-attention { background: #3a2650; color: #edddff; border-left-color: #c4a0ff; }
}
