/* ============================================
   Driver — Mobile Enterprise (No Emojis, Pro Icons)
   Dark theme, pill buttons, floating cards
   ============================================ */
.driver-layout { min-height: 100vh; display: flex; flex-direction: column; background: #060a14; }

/* ── Topbar ── */
.driver-topbar {
  position: sticky; top: 0; z-index: 30; height: 56px;
  background: rgba(6,10,20,0.95); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.driver-topbar-logo { display: flex; align-items: center; gap: 10px; }
.driver-topbar-logo-icon {
  width: 34px; height: 34px; background: var(--brand); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 0 12px rgba(245,197,24,0.2);
}
.driver-topbar-logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.driver-topbar-title { font-weight: 800; font-size: 1rem; color: var(--brand); letter-spacing: -0.3px; }
.driver-topbar-right { display: flex; align-items: center; gap: 8px; }
.driver-status-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 9999px;
  font-size: 0.72rem; font-weight: 700; border: 1px solid;
  letter-spacing: 0.5px;
}
.driver-status-indicator.free { background: rgba(34,197,94,0.12); color: #22c55e; border-color: rgba(34,197,94,0.25); }
.driver-status-indicator.busy { background: rgba(245,158,11,0.12); color: #f59e0b; border-color: rgba(245,158,11,0.25); }
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; animation: statusPulse 2s ease-in-out infinite; }
@keyframes statusPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.driver-topbar-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3); transition: all 150ms ease;
  background: rgba(255,255,255,0.04);
}
.driver-topbar-btn.logout:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.driver-topbar-btn.end-shift { color: var(--brand); }
.driver-topbar-btn.end-shift:hover { background: rgba(245,197,24,0.15); }

/* ── Content ── */
.driver-content { flex: 1; display: flex; flex-direction: column; padding: 16px 16px 24px; overflow-y: auto; gap: 14px; }

/* ── Professional Icon Circles ── */
.drv-icon-circle {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.drv-icon-circle.brand { background: rgba(245,197,24,0.1); border: 2px solid rgba(245,197,24,0.2); }
.drv-icon-circle.green { background: rgba(34,197,94,0.1); border: 2px solid rgba(34,197,94,0.2); }
.drv-icon-circle.blue { background: rgba(59,130,246,0.1); border: 2px solid rgba(59,130,246,0.2); }
.drv-icon-circle.amber { background: rgba(245,197,24,0.1); border: 2px solid rgba(245,197,24,0.2); }
.drv-icon-circle.red { background: rgba(239,68,68,0.1); border: 2px solid rgba(239,68,68,0.2); }
.pulse-ring { animation: pulseRing 2.5s ease-in-out infinite; }
@keyframes pulseRing { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.3); } 50% { box-shadow: 0 0 0 16px transparent; } }
.drv-heading { font-size: 1.3rem; font-weight: 900; color: var(--brand); letter-spacing: 1px; }
.drv-truck-badge {
  display: flex; align-items: center; gap: 6px; padding: 6px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9999px; font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.3);
}
.drv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 20px; color: rgba(255,255,255,0.3); font-size: 0.85rem; }
.drv-section-title { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }

/* ── Step Indicator ── */
.driver-step-indicator { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 6px; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.step-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.08);
  transition: all 300ms cubic-bezier(0.4,0,0.2,1); border: 1.5px solid rgba(255,255,255,0.1);
}
.step-item.done .step-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 6px rgba(245,197,24,0.3); }
.step-item.active .step-dot { background: var(--brand); border-color: var(--brand); width: 24px; border-radius: 9999px; box-shadow: 0 0 12px rgba(245,197,24,0.4); }
.step-label { font-size: 0.55rem; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.step-line { width: 20px; height: 2px; background: rgba(255,255,255,0.06); margin: 0 4px; margin-bottom: 14px; }

/* ── Truck Selection ── */
.truck-select-list { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.truck-select-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #111827; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; cursor: pointer; transition: all 150ms ease; width: 100%; text-align: left;
}
.truck-select-item:hover { border-color: var(--brand); background: rgba(245,197,24,0.04); }
.truck-select-item:active { transform: scale(0.98); }
.truck-select-icon {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(245,197,24,0.1); color: var(--brand); flex-shrink: 0;
}
.truck-select-info { flex: 1; min-width: 0; }
.truck-select-code { font-size: 0.95rem; font-weight: 800; color: #f1f5f9; }
.truck-select-name { font-size: 0.68rem; color: rgba(255,255,255,0.35); margin-top: 1px; }
.truck-select-type { font-size: 0.6rem; font-weight: 700; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }

/* ── Idle State ── */
.driver-idle {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px;
}
.driver-idle-status {
  font-size: 2.2rem; font-weight: 900; color: #22c55e; letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(34,197,94,0.2);
}
.driver-idle-text { font-size: 0.88rem; color: rgba(255,255,255,0.35); line-height: 1.7; max-width: 280px; }

/* ── Floating Cards (order info) ── */
.driver-order-card {
  background: #111827; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 18px; box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.driver-info-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.driver-info-row:last-child { border-bottom: none; }
.driver-info-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.driver-info-icon.car { background: rgba(59,130,246,0.12); }
.driver-info-icon.user { background: rgba(34,197,94,0.12); }
.driver-info-icon.location { background: rgba(245,158,11,0.12); }
.driver-info-icon.note { background: rgba(168,85,247,0.12); }
.driver-info-label {
  font-size: 0.6rem; color: rgba(255,255,255,0.3); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 700; margin-bottom: 2px;
}
.driver-info-value { font-size: 0.95rem; font-weight: 600; color: #f1f5f9; }

/* ── Call Button ── */
.driver-call-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  border-radius: 14px; color: #22c55e; font-size: 0.88rem; font-weight: 700;
  text-decoration: none; transition: all 150ms ease;
}
.driver-call-btn:hover { background: rgba(34,197,94,0.18); }

/* ── Pill Action Buttons ── */
.driver-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0 24px; border-radius: 9999px; font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.3px; min-height: 64px; width: 100%;
  transition: all 200ms cubic-bezier(0.4,0,0.2,1); text-transform: uppercase;
  border: none; position: relative; overflow: hidden;
}
.driver-action-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px;
  opacity: 0; transition: opacity 150ms ease;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
}
.driver-action-btn:hover::after { opacity: 1; }
.driver-action-btn:active { transform: scale(0.97); }
.driver-action-btn.accept {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff; box-shadow: 0 6px 28px rgba(34,197,94,0.35);
}
.driver-action-btn.navigate {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff; box-shadow: 0 6px 28px rgba(59,130,246,0.35);
}
.driver-action-btn.arrived {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000; box-shadow: 0 6px 28px rgba(245,158,11,0.35);
}
.driver-action-btn.photo {
  background: #1a2235; color: #e2e8f0; border: 1px solid rgba(255,255,255,0.08);
  min-height: 52px; font-size: 0.85rem; text-transform: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3); border-radius: 14px;
}
.driver-action-btn.loading {
  background: linear-gradient(135deg, #F5C518 0%, #e0b400 100%);
  color: #000; box-shadow: 0 6px 28px rgba(245,197,24,0.35);
}
.driver-action-btn.complete {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff; box-shadow: 0 6px 28px rgba(34,197,94,0.35);
}

/* ── Status Header ── */
.driver-status-header { text-align: center; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.driver-status-header-text { font-size: 1.15rem; font-weight: 900; letter-spacing: 1px; }
.driver-status-header-sub { font-size: 0.82rem; color: rgba(255,255,255,0.35); }

/* ── Photos Section ── */
.driver-photos-section { background: #111827; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 14px; }
.driver-photos { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0; margin-bottom: 8px; }
.driver-photo-thumb {
  width: 68px; height: 68px; object-fit: cover; border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.08); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.driver-photo-preview {
  display: flex; gap: 8px; align-items: center; padding: 10px;
  background: rgba(245,197,24,0.06); border: 1px solid rgba(245,197,24,0.15);
  border-radius: 14px; margin-top: 8px;
}
.driver-photo-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); }
.driver-photo-preview-info { flex: 1; }
.driver-photo-preview-name { font-size: 0.75rem; color: var(--text-2); font-weight: 600; }
.driver-photo-preview-size { font-size: 0.65rem; color: var(--text-4); }
.driver-photo-preview-send {
  padding: 8px 16px; background: var(--brand); color: #000;
  border-radius: 9999px; font-size: 0.78rem; font-weight: 700; transition: all 150ms ease;
}

/* ── Note ── */
.driver-note-section {
  background: #111827; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 14px;
}
.driver-note-toggle {
  font-size: 0.82rem; color: rgba(255,255,255,0.4); padding: 4px 0;
  display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer;
}
.driver-note-input {
  margin-top: 10px; min-height: 64px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  color: #f1f5f9; padding: 12px; width: 100%; resize: vertical;
}
.driver-note-save {
  margin-top: 8px; padding: 10px 20px; background: rgba(255,255,255,0.06);
  border-radius: 9999px; font-size: 0.82rem; font-weight: 700;
  color: #e2e8f0; transition: all 150ms ease;
}
.driver-note-save:hover { background: rgba(255,255,255,0.1); }

/* ── New Order Badge ── */
.driver-new-order-card {
  background: #111827; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px; padding: 22px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.driver-new-order-header { text-align: center; margin-bottom: 16px; }
.driver-new-order-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 18px; background: rgba(245,197,24,0.12); border: 1px solid rgba(245,197,24,0.2);
  border-radius: 9999px; font-size: 0.78rem; font-weight: 800; color: var(--brand);
  animation: pulseGlow 2s ease-in-out infinite; margin-bottom: 8px;
}
.driver-new-order-title {
  font-size: 1.1rem; font-weight: 800; color: rgba(255,255,255,0.5);
  font-family: 'Inter', monospace; letter-spacing: 1px;
}

/* ── Completed ── */
.driver-completed {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 14px;
}
.driver-completed-text {
  font-size: 1.5rem; font-weight: 900; color: #22c55e; letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(34,197,94,0.15);
}

/* ── Geofence Prompt ── */
.geofence-prompt {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gf-card {
  background: #111827; border: 1px solid rgba(245,197,24,0.2); border-radius: 24px;
  padding: 32px 24px; text-align: center; max-width: 340px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.gf-icon { margin-bottom: 16px; }
.gf-title { font-size: 1.2rem; font-weight: 900; color: #f1f5f9; margin-bottom: 6px; }
.gf-sub { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.gf-btns { display: flex; flex-direction: column; gap: 8px; }

/* ── Animations ── */
.slide-up { animation: slideUp 400ms cubic-bezier(0.4,0,0.2,1); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.25); } 50% { box-shadow: 0 0 0 12px transparent; } }

/* ═══════════ V3.0: Branch Choice ═══════════ */
.driver-branch-choice {
  margin: 12px 18px; padding: 16px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
}
.driver-branch-title {
  font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.5);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.driver-branch-btns { display: flex; flex-direction: column; gap: 8px; }
.driver-action-btn.repair-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
}
.driver-action-btn.repair-success-btn { font-size: 0.82rem; }
.driver-action-btn.repair-fail-btn { font-size: 0.82rem; }

/* ═══════════ V3.0: KM Input ═══════════ */
.driver-km-section { margin: 8px 18px; }
.driver-km-label {
  font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.5);
  margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
}
.driver-km-row { display: flex; align-items: center; gap: 8px; }
.driver-km-input {
  flex: 1; max-width: 120px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #f1f5f9; font-size: 1.1rem; font-weight: 700; text-align: center;
  -webkit-appearance: none;
}
.driver-km-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(245,197,24,0.15); }
.driver-km-unit { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.4); }
.driver-km-auto {
  font-size: 0.65rem; padding: 6px 10px; border-radius: 8px;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.2);
  color: #22c55e; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}

/* ═══════════ V3.0: Dual Photo Buttons ═══════════ */
.driver-dual-photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.driver-dual-photo-btns .camera-btn { font-size: 0.78rem; }
.driver-dual-photo-btns .gallery-btn { font-size: 0.78rem; background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); }
.photo-req { color: #ef4444; font-size: 0.7rem; font-weight: 600; }
.photo-ok { font-size: 0.8rem; }

/* ═══════════ V3.0: Inline Edit Overlay ═══════════ */
.driver-inline-edit-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.driver-inline-edit-card {
  background: #111827; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px;
  padding: 20px; box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.driver-inline-edit-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; font-weight: 700; color: #f1f5f9; margin-bottom: 16px;
}
.driver-inline-edit-header span { display: flex; align-items: center; gap: 6px; }
.driver-inline-edit-header button {
  background: transparent; border: none; color: rgba(255,255,255,0.4); cursor: pointer;
}
.driver-inline-edit-body .form-group { margin-bottom: 10px; }
.driver-inline-edit-body .form-label { font-size: 0.7rem; color: rgba(255,255,255,0.5); margin-bottom: 3px; }
.driver-inline-edit-body input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #f1f5f9; font-size: 0.85rem;
}
.driver-inline-edit-body input:focus { border-color: var(--brand); outline: none; }
.driver-inline-edit-footer { margin-top: 14px; }
.driver-inline-edit-footer .driver-action-btn { width: 100%; }

/* ── Edit button (pencil icon) ── */
.driver-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; border: none;
  background: rgba(245,197,24,0.12); color: var(--brand); cursor: pointer;
  margin-left: 6px; vertical-align: middle;
}
.driver-edit-btn:active { background: rgba(245,197,24,0.25); }

/* ── Embedded driver layout (for W Teresie) ── */
.driver-layout.embedded { min-height: auto; }
.driver-layout.embedded .driver-topbar { position: relative; }

/* ═══════════ Truck with pending order (orange highlight) ═══════════ */
.truck-select-item.truck-has-order {
  border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.08);
  animation: pulseOrderGlow 2.5s ease-in-out infinite;
}
.truck-select-item.truck-has-order:hover {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.14);
}
.truck-select-item.truck-has-order .truck-select-icon {
  background: rgba(245,158,11,0.2);
  color: #f59e0b;
}
.truck-order-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 9999px;
  background: rgba(245,158,11,0.18); color: #f59e0b;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.3px; margin-left: 6px; vertical-align: middle;
}
@keyframes pulseOrderGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.2); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ═══════════ Brighter placeholders for driver inputs ═══════════ */
.driver-layout input::placeholder,
.driver-layout textarea::placeholder {
  color: rgba(255,255,255,0.45) !important;
}
.driver-layout .driver-km-input::placeholder {
  color: rgba(255,255,255,0.45) !important;
}
.driver-inline-edit-body input::placeholder {
  color: rgba(255,255,255,0.45) !important;
}

/* ═══════════ Theme toggle button ═══════════ */
.driver-topbar-btn.theme-toggle {
  color: var(--brand);
}
.driver-topbar-btn.theme-toggle:hover {
  background: rgba(245,197,24,0.15);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — Full theme for driver panel
   ═══════════════════════════════════════════════════════════ */
.driver-layout.light-mode {
  background: #f0f2f5;
}

/* Topbar */
.driver-layout.light-mode .driver-topbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.driver-layout.light-mode .driver-topbar-title {
  color: #1a1a2e;
}
.driver-layout.light-mode .driver-topbar-btn {
  color: rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.04);
}
.driver-layout.light-mode .driver-topbar-btn.theme-toggle {
  color: #6366f1;
}
.driver-layout.light-mode .driver-topbar-btn.logout:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}
.driver-layout.light-mode .driver-topbar-btn.end-shift {
  color: #b8960f;
}

/* Status indicator */
.driver-layout.light-mode .driver-status-indicator.free {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
  border-color: rgba(34,197,94,0.3);
}
.driver-layout.light-mode .driver-status-indicator.busy {
  background: rgba(245,158,11,0.1);
  color: #d97706;
  border-color: rgba(245,158,11,0.3);
}

/* Content area */
.driver-layout.light-mode .driver-content {
  color: #1a1a2e;
}

/* Headings & texts */
.driver-layout.light-mode .drv-heading {
  color: #1a1a2e;
}
.driver-layout.light-mode .driver-idle-status {
  color: #16a34a;
  text-shadow: none;
}
.driver-layout.light-mode .driver-idle-text {
  color: #64748b;
}
.driver-layout.light-mode .driver-status-header-text {
  /* preserve original color — blue, amber, red etc */
}
.driver-layout.light-mode .driver-status-header-sub {
  color: #64748b;
}
.driver-layout.light-mode .drv-section-title {
  color: #64748b;
}

/* Cards */
.driver-layout.light-mode .driver-order-card,
.driver-layout.light-mode .driver-new-order-card,
.driver-layout.light-mode .driver-photos-section,
.driver-layout.light-mode .driver-note-section {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.driver-layout.light-mode .driver-info-row {
  border-bottom-color: rgba(0,0,0,0.06);
}
.driver-layout.light-mode .driver-info-label {
  color: #64748b;
}
.driver-layout.light-mode .driver-info-value {
  color: #1e293b;
}

/* Truck badge */
.driver-layout.light-mode .drv-truck-badge {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
  color: #64748b;
}

/* Step indicator */
.driver-layout.light-mode .step-dot {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.12);
}
.driver-layout.light-mode .step-line {
  background: rgba(0,0,0,0.08);
}

/* Truck selection */
.driver-layout.light-mode .truck-select-item {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
.driver-layout.light-mode .truck-select-item:hover {
  border-color: #b8960f;
  background: rgba(245,197,24,0.06);
}
.driver-layout.light-mode .truck-select-code {
  color: #1e293b;
}
.driver-layout.light-mode .truck-select-name {
  color: #64748b;
}
.driver-layout.light-mode .truck-select-type {
  color: #94a3b8;
}
.driver-layout.light-mode .truck-select-item.truck-has-order {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.4);
}

/* Empty state */
.driver-layout.light-mode .drv-empty {
  color: #94a3b8;
}

/* Inputs */
.driver-layout.light-mode .driver-km-input {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.12);
  color: #1e293b;
}
.driver-layout.light-mode .driver-km-input:focus {
  border-color: #b8960f;
  box-shadow: 0 0 0 3px rgba(245,197,24,0.15);
}
.driver-layout.light-mode .driver-km-unit {
  color: #64748b;
}
.driver-layout.light-mode .driver-km-label {
  color: #475569;
}

/* Notes */
.driver-layout.light-mode .driver-note-toggle {
  color: #475569;
}
.driver-layout.light-mode .driver-note-input {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.1);
  color: #1e293b;
}
.driver-layout.light-mode .driver-note-save {
  background: rgba(0,0,0,0.05);
  color: #1e293b;
}
.driver-layout.light-mode .driver-note-save:hover {
  background: rgba(0,0,0,0.1);
}

/* Call button */
.driver-layout.light-mode .driver-call-btn {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
  color: #16a34a;
}

/* Photo buttons */
.driver-layout.light-mode .driver-action-btn.photo {
  background: #f8fafc;
  color: #1e293b;
  border-color: rgba(0,0,0,0.1);
}
.driver-layout.light-mode .driver-dual-photo-btns .gallery-btn {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.2);
}
.driver-layout.light-mode .driver-photo-thumb {
  border-color: rgba(0,0,0,0.1);
}
.driver-layout.light-mode .driver-photo-preview {
  background: rgba(245,197,24,0.06);
  border-color: rgba(245,197,24,0.2);
}
.driver-layout.light-mode .driver-photo-preview-name {
  color: #1e293b;
}
.driver-layout.light-mode .driver-photo-preview-size {
  color: #94a3b8;
}

/* Branch choice */
.driver-layout.light-mode .driver-branch-choice {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}
.driver-layout.light-mode .driver-branch-title {
  color: #475569;
}

/* New order badge */
.driver-layout.light-mode .driver-new-order-badge {
  background: rgba(245,197,24,0.12);
  border-color: rgba(245,197,24,0.25);
}
.driver-layout.light-mode .driver-new-order-title {
  color: #475569;
}

/* Completed screen */
.driver-layout.light-mode .driver-completed-text {
  color: #16a34a;
  text-shadow: none;
}

/* Geofence prompt */
.driver-layout.light-mode ~ .geofence-prompt .gf-card,
.driver-layout.light-mode .gf-card {
  background: #ffffff;
  border-color: rgba(245,197,24,0.2);
}
.driver-layout.light-mode .gf-title {
  color: #1e293b;
}
.driver-layout.light-mode .gf-sub {
  color: #64748b;
}

/* Inline edit overlay */
.driver-inline-edit-overlay.light-mode {
  background: rgba(0,0,0,0.35);
}
.driver-inline-edit-overlay.light-mode .driver-inline-edit-card {
  background: #ffffff;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
}
.driver-inline-edit-overlay.light-mode .driver-inline-edit-header {
  color: #1e293b;
}
.driver-inline-edit-overlay.light-mode .driver-inline-edit-header button {
  color: #64748b;
}
.driver-inline-edit-overlay.light-mode input {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.12);
  color: #1e293b;
}
.driver-inline-edit-overlay.light-mode input::placeholder {
  color: #94a3b8 !important;
}
.driver-inline-edit-overlay.light-mode .form-label {
  color: #475569;
}

/* Light mode placeholders */
.driver-layout.light-mode input::placeholder,
.driver-layout.light-mode textarea::placeholder {
  color: #94a3b8 !important;
}

/* KM auto-calc button */
.driver-layout.light-mode .driver-km-auto {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
  color: #16a34a;
}

/* ═══════════════════════════════════════════════
   V3.1: STICKY KM BAR
   ═══════════════════════════════════════════════ */
.driver-km-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-around;
  height: 64px; padding: 0 8px;
  background: rgba(6,10,20,0.97); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(245,197,24,0.15);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.km-bar-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer; padding: 6px 14px; border-radius: 10px;
  transition: background 150ms ease; flex: 1; min-width: 0;
}
.km-bar-item:active { background: rgba(245,197,24,0.1); }
.km-bar-label { font-size: 0.58rem; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.8px; }
.km-bar-value { font-size: 1.1rem; font-weight: 900; color: var(--brand); letter-spacing: -0.5px; line-height: 1.1; }
.km-bar-unit { font-size: 0.55rem; font-weight: 600; color: rgba(255,255,255,0.25); }
.km-bar-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.08); flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   V3.1: EMPTY RUN BUTTON
   ═══════════════════════════════════════════════ */
.driver-topbar-btn.empty-run-btn {
  color: #ef4444; background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25); border-radius: 10px;
}
.driver-topbar-btn.empty-run-btn:active { background: rgba(239,68,68,0.25); }

/* ═══════════════════════════════════════════════
   V3.1: STEP BACK BUTTON
   ═══════════════════════════════════════════════ */
.driver-step-back-btn {
  display: flex; align-items: center; gap: 5px; align-self: flex-start;
  padding: 5px 14px; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: all 150ms ease; margin-bottom: 4px;
}
.driver-step-back-btn:active {
  color: var(--brand); background: rgba(245,197,24,0.08);
  border-color: rgba(245,197,24,0.2);
}

/* ═══════════════════════════════════════════════
   V3.1: MULTI-ORDER TABS
   ═══════════════════════════════════════════════ */
.driver-order-tabs {
  display: flex; gap: 6px; padding: 8px 16px 0;
  background: rgba(6,10,20,0.95); overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.driver-order-tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 16px; border-radius: 12px 12px 0 0;
  font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-bottom: none; cursor: pointer; transition: all 150ms ease;
  white-space: nowrap; min-width: 0; flex-shrink: 0;
}
.driver-order-tab.active {
  color: var(--brand); background: rgba(245,197,24,0.08);
  border-color: rgba(245,197,24,0.2);
}
.driver-order-tab .tab-num { font-weight: 800; font-size: 0.68rem; }
.driver-order-tab .tab-status { font-size: 0.55rem; opacity: 0.6; }

/* ═══════════════════════════════════════════════
   V3.1: LIGHT MODE OVERRIDES
   ═══════════════════════════════════════════════ */
.driver-layout.light-mode .driver-km-bar {
  background: rgba(255,255,255,0.97); border-top-color: rgba(245,197,24,0.25);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.driver-layout.light-mode .km-bar-label { color: #94a3b8; }
.driver-layout.light-mode .km-bar-value { color: #b8860b; }
.driver-layout.light-mode .km-bar-unit { color: #94a3b8; }
.driver-layout.light-mode .km-bar-divider { background: #e2e8f0; }
.driver-layout.light-mode .km-bar-item:active { background: rgba(245,197,24,0.08); }

.driver-layout.light-mode .driver-step-back-btn {
  color: #64748b; background: rgba(0,0,0,0.03); border-color: #e2e8f0;
}
.driver-layout.light-mode .driver-step-back-btn:active {
  color: #b8860b; background: rgba(245,197,24,0.08); border-color: rgba(245,197,24,0.3);
}

.driver-layout.light-mode .driver-order-tabs { background: rgba(255,255,255,0.95); }
.driver-layout.light-mode .driver-order-tab { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }
.driver-layout.light-mode .driver-order-tab.active { color: #b8860b; background: rgba(245,197,24,0.06); border-color: rgba(245,197,24,0.3); }

/* ═══════════════════════════════════════════════
   V3.2: BACKGROUND LOCATION MODAL & GPS STATUS
   ═══════════════════════════════════════════════ */
.bg-loc-modal {
  max-width: 480px;
  border: 1px solid rgba(245, 197, 24, 0.3);
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 30px rgba(245, 197, 24, 0.12);
}
.bg-loc-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.bg-loc-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 2px solid var(--border-1);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.bg-loc-option:hover {
  border-color: rgba(245, 197, 24, 0.4);
  background: var(--bg-4);
}
.bg-loc-option.active {
  border-color: var(--brand);
  background: rgba(245, 197, 24, 0.08);
  box-shadow: 0 0 15px rgba(245, 197, 24, 0.15);
}
.bg-loc-radio {
  margin-top: 2px;
}
.bg-loc-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-2);
  border-radius: 50%;
  outline: none;
  background: var(--bg-2);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
}
.bg-loc-radio input[type="radio"]:checked {
  border-color: var(--brand);
  background: var(--brand);
}
.bg-loc-radio input[type="radio"]:checked::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
}
.bg-loc-label {
  flex: 1;
}
.bg-loc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 4px;
}
.bg-loc-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--brand);
  color: #000;
  letter-spacing: 0.5px;
}
.bg-loc-desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--text-2);
}
.bg-loc-tip {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--r-md);
  font-size: 0.72rem;
  line-height: 1.4;
  color: #93c5fd;
  margin-bottom: 16px;
}
.bg-loc-tip strong {
  color: #bfdbfe;
}
.driver-topbar-gps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(245, 197, 24, 0.3);
  background: rgba(245, 197, 24, 0.1);
  color: var(--brand);
  transition: all 0.2s ease;
}
.driver-topbar-gps-badge:hover {
  background: rgba(245, 197, 24, 0.2);
}
.driver-topbar-gps-badge.always {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}
.driver-topbar-gps-badge.in_use {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}
.gps-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseGpsDot 2s infinite;
}
@keyframes pulseGpsDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

