/* Premiere Van Lines ERP — global styles */

/* ---------- Theme variables ---------- */
:root {
  --pvl-bg: 11 15 20;
  --pvl-panel: 17 24 39;
  --pvl-sidebar: 13 20 32;
  --pvl-border: 31 41 55;
  --pvl-accent: 251 191 36;
  --pvl-accent-dim: 217 119 6;
}

html.light {
  --pvl-bg: 232 240 249;
  --pvl-panel: 255 255 255;
  --pvl-sidebar: 219 231 245;
  --pvl-border: 191 209 228;
  --pvl-accent: 217 119 6;
  --pvl-accent-dim: 180 83 9;
  color-scheme: light;
}

/* ---------- Light theme overrides ---------- */
html.light body {
  color: #1f2937;
}
html.light ::-webkit-scrollbar-track {
  background: #e3ecf5;
}
html.light ::-webkit-scrollbar-thumb {
  background: #b6c6da;
  border-color: #e3ecf5;
}
html.light ::-webkit-scrollbar-thumb:hover {
  background: #8fa9c4;
}

html.light .text-white { color: #0f172a !important; }
html.light .text-slate-100,
html.light .text-slate-200 { color: #334155 !important; }
html.light .text-slate-300 { color: #475569 !important; }
html.light .text-slate-400 { color: #64748b !important; }
html.light .text-slate-500 { color: #94a3b8 !important; }
html.light .text-slate-600 { color: #64748b !important; }

html.light .bg-white\/5 { background-color: rgba(15, 23, 42, 0.05); }
html.light .bg-white\/10 { background-color: rgba(15, 23, 42, 0.08); }
html.light .bg-white\/20 { background-color: rgba(15, 23, 42, 0.12); }
html.light .hover\:bg-white\/5:hover { background-color: rgba(15, 23, 42, 0.06); }

/* Accent/status text colors — darker shades for light backgrounds */
html.light .text-sky-200, html.light .text-sky-300 { color: #0369a1 !important; }
html.light .text-sky-400 { color: #0284c7 !important; }
html.light .text-emerald-300 { color: #047857 !important; }
html.light .text-emerald-400 { color: #059669 !important; }
html.light .text-cyan-300 { color: #0e7490 !important; }
html.light .text-cyan-400 { color: #0891b2 !important; }
html.light .text-violet-300 { color: #6d28d9 !important; }
html.light .text-violet-400 { color: #7c3aed !important; }
html.light .text-teal-300 { color: #0f766e !important; }
html.light .text-teal-400 { color: #0d9488 !important; }
html.light .text-rose-300 { color: #be123c !important; }
html.light .text-rose-400 { color: #e11d48 !important; }
html.light .text-red-300 { color: #b91c1c !important; }
html.light .text-red-400 { color: #dc2626 !important; }
html.light .text-amber-200, html.light .text-amber-300 { color: #b45309 !important; }
html.light .text-amber-400 { color: #d97706 !important; }

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8;
}

/* Dark theme uses gold accents by default */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0f14;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 6px;
  border: 2px solid #0b0f14;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

::selection {
  background: rgba(245, 158, 11, 0.35);
}

/* Sidebar nav active state helper (applied via JS class toggle) */
.nav-item {
  transition: background-color 120ms ease, color 120ms ease;
}

/* Calendar day column drag-over highlight */
.day-column.drag-over {
  background-color: rgba(245, 158, 11, 0.08);
  outline: 2px dashed rgba(245, 158, 11, 0.5);
  outline-offset: -2px;
}

/* Draggable resource items (sidebar legacy + schedule panel) */
.resource-item,
.panel-resource-item {
  transition: border-color 120ms ease, background-color 120ms ease;
}
.resource-item:active,
.panel-resource-item:active {
  cursor: grabbing;
}

/* Queue cards */
.queue-card {
  transition: border-color 120ms ease, background-color 120ms ease, filter 120ms ease;
}
.queue-card:active {
  cursor: grabbing;
}
.queue-card:hover {
  filter: brightness(1.1);
}

/* Locked (verified) address inputs — double-click to edit */
.aj-map-input.aj-locked {
  border-color: rgba(245, 158, 11, 0.45);
  padding-right: 2rem;
}

/* ---------- Print: single-page landscape sheets ---------- */
.print-sheet {
  display: none;
}

@media print {
  @page {
    size: landscape;
    margin: 0.5cm;
  }

  body {
    overflow: visible !important;
    height: auto !important;
    background: #fff !important;
  }

  /* Hide the whole app, reveal only the active print sheet */
  body > *:not(.print-sheet) {
    display: none !important;
  }

  .print-sheet {
    display: none !important;
  }

  .print-sheet.print-active {
    display: block !important;
  }

  .print-sheet table {
    page-break-inside: avoid;
  }
}

/* On-screen print preview — scale the 277mm sheet to fit the modal */
.print-preview-paper > div {
  zoom: 0.62;
}

/* Run sheet print preview — white paper pages on dark backdrop */
.rs-preview-page {
  background: #fff;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  overflow: hidden;
}
.rs-preview-page .rs-page {
  padding: 10px 14px;
}
.rs-preview-page {
  zoom: 1.15;
}

/* Run sheet row drag-reorder */
#runSheetBody [data-grip] {
  cursor: grab;
}
#runSheetBody [data-grip]:active {
  cursor: grabbing;
}
#runSheetBody tr.rs-drop td {
  background: rgba(245, 158, 11, 0.15) !important;
}

.hh-col-resize { position:absolute; top:0; right:-3px; width:7px; height:100%; cursor:col-resize; z-index:5; }
.hh-col-resize:hover { background: rgb(var(--pvl-accent) / 0.5); }
