/* PilotTrack Unified B2B SaaS Theme — Matches Homepage (/) */
:root {
  --navy: #0B1528;
  --navy-2: #12213D;
  --blue: #0284C7;
  --blue-dark: #0369A1;
  --blue-soft: #E0F2FE;
  --yellow: #FACC15;
  --green: #059669;
  --green-soft: #DCFCE7;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --amber-soft: #FEF3C7;

  /* Override legacy dark app tokens */
  --bg: #F8FAFC !important;
  --panel: #FFFFFF !important;
  --panel2: #F1F5F9 !important;
  --border: #E2E8F0 !important;
  --text: #0F172A !important;
  --ink: #0F172A !important;
  --muted: #475569 !important;
  --accent: #0284C7 !important;
}

html, body {
  background: #F8FAFC !important;
  color: #0F172A !important;
}

/* PUBLIC BETA DEMO STRIP (EXACT MATCH TO HOMEPAGE) */
.demo-bar, #demoBar, .pt-beta-strip {
  background: #FACC15 !important;
  color: #0B1528 !important;
  border-bottom: 1px solid #EAB308 !important;
  padding: 8px 14px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
}
.demo-bar a, #demoBar a, .pt-beta-strip a {
  color: #0B1528 !important;
  font-weight: 900 !important;
}
.demo-bar button, #demoBar button {
  border-radius: 8px !important;
  font-weight: 800 !important;
  border: none !important;
  padding: 6px 11px !important;
  font-size: 12px !important;
  cursor: pointer;
}

/* CLEAN STICKY LIGHT TOPBAR / HEADER */
header, .topbar, .app-hdr, .drv-hdr {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px);
  color: #0B1528 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}
header h1, header h2, header strong, .topbar strong, #coName {
  color: #0B1528 !important;
}
#drvName, header .meta, .topbar .meta {
  color: #475569 !important;
}

/* CARDS, STATS & SURFACES */
.card, .stat, .stat-box, .kpi, .panel {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
}
.stat, .stat-box {
  border-radius: 14px !important;
}
.stat-v, .stat-val {
  color: #0B1528 !important;
  font-weight: 900 !important;
}
#milBillableSum { color: #0284C7 !important; }
#milUnbillSum { color: #D97706 !important; }
#milIrsSum, #milPreview, #pnPreview { color: #059669 !important; }

.meta, .sub, .muted {
  color: #475569 !important;
}
h1, h2, h3, h4 {
  color: #0B1528 !important;
}

/* BUTTONS — FRIENDLY ROUNDED B2B SAAS */
.btn {
  border-radius: 10px !important;
  font-weight: 800 !important;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #0284C7 !important;
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.22) !important;
}
.btn-primary:hover { background: #0369A1 !important; }

.btn-blue {
  background: #0B1528 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #0B1528 !important;
}
.btn-blue:hover { background: #12213D !important; }

.btn-green {
  background: #059669 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #059669 !important;
}
.btn-green:hover { background: #047857 !important; }

.btn-red {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #DC2626 !important;
}

.btn-ghost {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1.5px solid #CBD5E1 !important;
}
.btn-ghost:hover {
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
}

/* PILLS & STATUS TAGS */
.pill {
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
}
.pill-blue { background: #E0F2FE !important; color: #0369A1 !important; }
.pill-green { background: #DCFCE7 !important; color: #166534 !important; }
.pill-amber { background: #FEF3C7 !important; color: #92400E !important; }
.pill-red { background: #FEE2E2 !important; color: #991B1B !important; }
.pill-gray { background: #F1F5F9 !important; color: #475569 !important; }

/* PROJECT FILTER PILLS & DISPATCH TABS */
.proj-pill, .tab, .nav-btn {
  background: #FFFFFF !important;
  color: #475569 !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}
.proj-pill.active, .tab.active, .nav-btn.active {
  background: #0B1528 !important;
  color: #FACC15 !important;
  border-color: #0B1528 !important;
  box-shadow: 0 4px 12px rgba(11, 21, 40, 0.16) !important;
}

/* ALERTS & LIVE DAYLIGHT SLOT (DEEP NAVY ANCHOR MATCHING HOMEPAGE) */
.alert {
  border-radius: 10px !important;
  font-weight: 700 !important;
}
.alert-danger {
  background: #FEE2E2 !important;
  color: #991B1B !important;
  border: 1px solid #FCA5A5 !important;
}
.alert-warn {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border: 1px solid #FCD34D !important;
}
.alert-ok, .alert-success {
  background: #DCFCE7 !important;
  color: #166534 !important;
  border: 1px solid #86EFAC !important;
}

/* Keep Daylight Curfew Clock in crisp Deep Navy to mirror homepage bar */
.daylight-slot > div {
  background: #0B1528 !important;
  color: #F8FAFC !important;
  border-radius: 10px !important;
  border-left: 4px solid #FACC15 !important;
}
.daylight-slot strong { color: #FFFFFF !important; }

/* FORMS & INPUTS */
label {
  color: #334155 !important;
  font-weight: 800 !important;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select, textarea {
  background: #F8FAFC !important;
  color: #0F172A !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 10px !important;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus, textarea:focus {
  background: #FFFFFF !important;
  border-color: #0284C7 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14) !important;
}
input::placeholder, textarea::placeholder {
  color: #94A3B8 !important;
}

/* DRIVER BOTTOM NAVIGATION */
.bnav {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  border-top: 1px solid #E2E8F0 !important;
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06) !important;
}
.bnav button {
  color: #64748B !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
}
.bnav button.active {
  color: #0284C7 !important;
  background: #E0F2FE !important;
}

/* DRIVER HAMBURGER MENU */
.drv-menu {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18) !important;
}
.drv-menu-item {
  color: #0F172A !important;
  border-bottom: 1px solid #F1F5F9 !important;
  background: transparent !important;
}
.drv-menu-item:hover {
  background: #F8FAFC !important;
}
.drv-menu-danger {
  color: #DC2626 !important;
}

/* MODALS */
.modal-bg {
  background: rgba(11, 21, 40, 0.62) !important;
  backdrop-filter: blur(4px);
}
.modal {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 64px rgba(11, 21, 40, 0.25) !important;
}
.all-steps-box {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
}

/* TABLES (DISPATCH BOARD) */
table {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}
th {
  background: #0B1528 !important;
  color: #FFFFFF !important;
  font-size: 11.5px !important;
  letter-spacing: 0.05em !important;
}
td {
  color: #0F172A !important;
  border-bottom: 1px solid #E2E8F0 !important;
}
tr:hover td {
  background: #F8FAFC !important;
}

/* LEAFLET MAP FRAME */
#map, #dispMap, .leaflet-container {
  border-radius: 14px !important;
  border: 1px solid #CBD5E1 !important;
}

/* TOAST */
.toast {
  background: #0B1528 !important;
  color: #FACC15 !important;
  border: 1px solid #1E293B !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 36px rgba(11, 21, 40, 0.3) !important;
}

/* FRONTLINE_SIMPLIFY_START */
body.pt-simple-view .pt-extra-strip,
body.pt-simple-view .pt-secondary-btn,
body.pt-simple-view .pt-advanced-panel {
  display: none !important;
}

.pt-more-menu {
  position: fixed;
  right: 14px;
  top: 96px;
  width: min(310px, calc(100vw - 28px));
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(11, 21, 40, 0.22);
  z-index: 2400;
  padding: 8px;
  display: none;
}
.pt-more-menu.open { display: block; }
.pt-more-hdr {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  padding: 6px 10px 4px;
}
.pt-more-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pt-more-item:hover { background: #F1F5F9; }
.pt-more-item.danger { color: #DC2626; }
.pt-more-divider { height: 1px; background: #E2E8F0; margin: 6px 4px; }
/* FRONTLINE_SIMPLIFY_END */

/* PCH_LOGO_FIX_START */
span.pch-sq-logo,
a .pch-sq-logo,
.brand .pch-sq-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #0B1528;
  border: 2px solid #FACC15;
  color: #FACC15;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  line-height: 1;
  margin-right: 8px;
  box-sizing: border-box;
  text-decoration: none;
}
/* PCH_LOGO_FIX_END */
