/* Fallback ikon menu: Font Awesome kadang gagal dimuat sehingga glyph tampil `?`. */
.nav-icon {
  font-size: 0 !important;
  width: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif !important;
}
.nav-icon::before { font-size: 15px; line-height: 1; }
.fa-gauge::before { content: '▣'; }
.fa-car::before { content: '🚗'; font-size: 14px; }
.fa-receipt::before { content: '▤'; }
.fa-wallet::before { content: '▰'; }
.fa-users::before { content: '♟'; }
.fa-chart-line::before { content: '⌁'; font-weight: 700; }
.fa-calendar-days::before { content: '▦'; }
.fa-gear::before { content: '⚙'; }
.fa-sliders::before { content: '☷'; }
.fa-building-user::before { content: '▥'; }
.fa-box-open::before { content: '□'; }
.fa-laptop::before { content: '▣'; }
/* Ikon navigasi tetap terlihat meskipun Font Awesome CDN tidak tersedia. */
.nav-icon.fa-solid::before {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  font-weight: 400;
}
.nav-icon.fa-gauge::before { content: "▣"; }
.nav-icon.fa-car::before { content: "🚗"; font-family: "Segoe UI Emoji", sans-serif; }
.nav-icon.fa-receipt::before { content: "▤"; }
.nav-icon.fa-wallet::before { content: "▰"; }
.nav-icon.fa-users::before { content: "♙"; }
.nav-icon.fa-chart-line::before { content: "⌁"; }
.nav-icon.fa-calendar-days::before { content: "▦"; }
.nav-icon.fa-gear::before { content: "⚙"; }
/* Base layout fallback: keeps the UI usable even when the icon font/CDN is unavailable. */
:root{--purple:#7057d9;--ink:#1d2836;--muted:#96a2b0;--line:#edf0f4}
*{box-sizing:border-box}
body{margin:0;background:#fbfcfe;color:var(--ink);font:13px 'DM Sans',Arial,sans-serif}
.layout{display:flex;min-height:100vh}
aside{width:246px;background:#fff;border-right:1px solid var(--line);padding:27px 16px;display:flex;flex-direction:column;flex-shrink:0}
.brand{font:700 25px Outfit,Arial,sans-serif;margin:0 12px 35px}.brand b,.user>b{background:var(--purple);color:#fff;border-radius:8px;padding:5px 9px;margin-right:8px}
.workspace{padding:11px;background:#faf9ff;border:1px solid #eeeaff;border-radius:8px;margin-bottom:28px;color:var(--purple)}.workspace span{color:var(--muted);margin-left:8px;font-size:10px}.workspace strong{color:var(--ink)}
nav label{display:block;color:#a7b0bb;font-size:9px;letter-spacing:1px;margin:0 12px 9px}nav label:not(:first-child){margin-top:28px}nav a,footer>a{display:block;padding:11px 13px;color:#8491a1;text-decoration:none;border-radius:7px;cursor:pointer}nav a.active{background:#f0edff;color:var(--purple);font-weight:bold}nav i{float:right;background:#e6e1ff;color:var(--purple);padding:2px 7px;border-radius:10px;font-style:normal;font-size:10px}footer{margin-top:auto}.upgrade{background:#f5f2ff;color:#604ac8;border-radius:9px;padding:15px;margin-bottom:20px;font-size:18px}.upgrade strong{font-size:12px}.upgrade p{font-size:10px;color:#8d81bc;line-height:1.5}.upgrade small{font-size:10px;font-weight:bold}.user{border-top:1px solid var(--line);padding:17px 4px 0;display:flex;gap:8px;align-items:center;font-size:10px}.user>b{font-size:10px;margin:0;background:#c6a478}.user small{color:var(--muted)}
main{flex:1;min-width:0}header{height:72px;background:#fff;border-bottom:1px solid var(--line);padding:0 41px;display:flex;align-items:center;color:#a1aaba;font-size:11px}header span{margin:0 10px}header strong{color:#596678}.actions{margin-left:auto;font-size:21px}.actions em{display:inline-grid;place-items:center;background:#c6a478;color:#fff;border-radius:50%;font-size:9px;width:31px;height:31px;font-style:normal}.page{padding:36px 41px;max-width:1450px;margin:auto}.sub-page{display:none}.welcome{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.welcome h1{font:600 27px Outfit,Arial,sans-serif;margin:8px 0}.welcome p,.card>p{color:var(--muted);font-size:11px;margin:0}.primary{background:var(--purple);color:#fff;border:0;border-radius:6px;padding:11px 16px;font-weight:bold;cursor:pointer}.card,.stats article{background:#fff;border:1px solid var(--line);border-radius:9px}.card{padding:20px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stats article{padding:18px 20px;min-height:147px;color:#8794a3;font-size:11px}.toolbar{display:flex;gap:10px;border-bottom:1px solid var(--line);padding-bottom:17px}.toolbar input{flex:1;padding:10px;border:1px solid var(--line);border-radius:5px}.car-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}.car{border:1px solid var(--line);padding:14px;border-radius:7px}.car .photo{height:85px;background:#f0effb;border-radius:6px;display:grid;place-items:center;font-size:32px;color:#aaa3da}
@media(max-width:900px){aside{width:210px}.page{padding:28px 22px}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){aside{position:fixed;left:-246px;top:0;bottom:0;z-index:4;transition:.2s}aside.open{left:0}#menu{display:inline-block;border:0;background:none;margin-right:15px}.page{padding:24px 16px}.welcome{align-items:flex-start;gap:18px;flex-direction:column}.stats{gap:10px}.car-grid{grid-template-columns:1fr}header{height:60px;padding:0 16px}}

/* Fallback ikon berbasis ASCII: aman walau Font Awesome/CDN tidak tersedia. */
.fa-solid{font-family:Arial,sans-serif !important;font-style:normal;display:inline-block}
.fa-solid::before{display:inline-block;font-family:Arial,sans-serif !important;font-weight:700;content:'*' !important}
.fa-arrow-up-right-from-square::before{content:'>' !important}.fa-user-plus::before{content:'+' !important}.fa-satellite-dish::before{content:'o' !important}.fa-circle-info::before{content:'i' !important}.fa-bullhorn::before{content:'!' !important}.fa-file-pdf::before{content:'=' !important}.fa-map-location-dot::before{content:'+' !important}.fa-id-card::before{content:'=' !important}.fa-user::before{content:'o' !important}.fa-bell::before{content:'!' !important}
.fa-gauge::before{content:'D' !important}.fa-car::before,.fa-car-side::before{content:'C' !important}.fa-receipt::before{content:'R' !important}.fa-users::before{content:'U' !important}.fa-wallet::before{content:'K' !important}.fa-chart-line::before{content:'L' !important}.fa-calendar-days::before{content:'T' !important}.fa-gear::before{content:'G' !important}.fa-sliders::before{content:'S' !important}.fa-building-user::before{content:'B' !important}.fa-laptop::before{content:'P' !important}.fa-bars::before{content:'=' !important}.fa-magnifying-glass::before{content:'o' !important}.fa-plus::before{content:'+' !important}.fa-right-from-bracket::before{content:'<' !important}.fa-key::before{content:'+' !important}.fa-money-bill-wave::before{content:'$' !important}.fa-clock-rotate-left::before{content:'<' !important}.fa-wrench::before{content:'W' !important}.fa-file-invoice::before{content:'F' !important}.fa-calendar-check::before{content:'v' !important}.fa-wand-magic-sparkles::before{content:'*' !important}.fa-triangle-exclamation::before{content:'!' !important}.fa-circle-check::before{content:'v' !important}.fa-ban::before{content:'x' !important}.fa-qrcode::before{content:'#' !important}.fa-credit-card::before{content:'=' !important}.fa-camera::before{content:'o' !important}
/* --- New Interactive Features Styles --- */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
  text-align: left;
}
.checklist-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
}

.signature-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fdfdfd;
  position: relative;
  margin: 10px 0;
}
#sigCanvas {
  display: block;
  background: #fafbfe;
  border-radius: 6px;
  width: 100%;
  height: 110px;
  cursor: crosshair;
  touch-action: none;
}
#sigClear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 9px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
}
#sigClear:hover {
  background: #f5f5f5;
  color: var(--ink);
}

/* Timeline / Gantt Chart Styles */
.timeline-container {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  background: #fff;
  margin: 15px 0;
}
.timeline-header {
  display: flex;
  background: #fafbfe;
  border-bottom: 1px solid var(--line);
  font-weight: bold;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
.timeline-car-col {
  width: 150px;
  padding: 12px 15px;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.timeline-days-col {
  display: flex;
  flex: 1;
}
.timeline-day-header {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 12px 0;
  border-right: 1px solid #f1f2f5;
}
.timeline-day-header.today {
  background: #f0edff;
  color: var(--purple);
  font-weight: 700;
}

.timeline-body {
  display: flex;
  flex-direction: column;
}
.timeline-row {
  display: flex;
  border-bottom: 1px solid var(--line);
  position: relative;
  align-items: center;
  height: 54px;
}
.timeline-row:last-child {
  border-bottom: 0;
}
.timeline-row-car {
  width: 150px;
  padding: 0 15px;
  font-weight: 600;
  font-size: 11px;
  border-right: 1px solid var(--line);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  background: #fafbfe;
}
.timeline-row-car small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}
.timeline-grid-bg {
  display: flex;
  position: absolute;
  left: 150px;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}
.timeline-grid-cell {
  flex: 1;
  min-width: 60px;
  border-right: 1px solid #f8f9fa;
  height: 100%;
}
.timeline-grid-cell.today {
  background: rgba(112, 87, 217, 0.03);
}

.timeline-bars-container {
  display: flex;
  position: absolute;
  left: 150px;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  align-items: center;
}
.timeline-bar {
  position: absolute;
  height: 32px;
  border-radius: 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.15s;
}
.timeline-bar:hover {
  transform: scaleY(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 10;
}
.timeline-bar.active {
  background: linear-gradient(135deg, var(--purple) 0%, #8874e5 100%);
  border-left: 3px solid #4a36a8;
}
.timeline-bar.closed {
  background: linear-gradient(135deg, #40b88b 0%, #5cd3a4 100%);
  border-left: 3px solid #288460;
}

.timeline-legend {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  font-size: 11px;
}
.timeline-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.timeline-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.timeline-legend .dot.available {
  background: #fafbfe;
  border: 1px solid var(--line);
}
.timeline-legend .dot.active {
  background: var(--purple);
}
.timeline-legend .dot.closed {
  background: #40b88b;
}

/* WhatsApp Simulator Styles */
#whatsappSimulator {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 320px;
  background: #efeae2;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(29, 40, 54, 0.2);
  z-index: 1000;
  overflow: hidden;
  border: 1px solid #128c7e;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.wa-sim-header {
  background: #075e54;
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #128c7e;
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 15px;
  color: #fff;
}
.wa-sim-header button {
  background: none;
  border: 0;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}
.wa-sim-chat {
  height: 220px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-bubble {
  max-width: 85%;
  padding: 8px 10px 14px;
  border-radius: 7.5px;
  font-size: 10.5px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  word-wrap: break-word;
}
.wa-bubble.received {
  background: #fff;
  align-self: flex-start;
  border-top-left-radius: 0;
}
.wa-bubble.sent {
  background: #dcf8c6;
  align-self: flex-end;
  border-top-right-radius: 0;
}
.wa-time {
  position: absolute;
  right: 7px;
  bottom: 3px;
  font-size: 8px;
  color: #8c9094;
}

/* Blacklist Global Alert */
#blacklistGlobalAlert {
  background: #fff3f3;
  border: 1px solid #ffcccc;
  border-radius: 6px;
  color: #d32f2f;
  padding: 10px 12px;
  font-size: 10.5px;
  line-height: 1.4;
  margin: -5px 0 12px;
  text-align: left;
}
#blacklistGlobalAlert strong {
  display: block;
  margin-bottom: 2px;
}

/* Overtime Settle styling */
.overtime-calc-box {
  background: #faf9ff;
  border: 1px solid #eeeaff;
  padding: 12px;
  border-radius: 7px;
  margin-bottom: 12px;
  font-size: 11px;
}

/* Table Actions Button */
.table-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: #556070;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 9px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 4px;
}
.table-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.table-btn.primary-btn {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.table-btn.primary-btn:hover {
  background: #5d46c8;
}

/* GPS Coordinates details in car view */
.car-gps-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  font-size: 9px;
  color: var(--muted);
}
.gps-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #40b88b;
  margin-right: 4px;
  animation: pulseGps 1.5s infinite;
}
@keyframes pulseGps {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(64, 184, 139, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(64, 184, 139, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(64, 184, 139, 0); }
}

/* --- Additional Styles for Login & Superadmin Dashboard (Disederhanakan karena dipindah ke refresh.css) --- */
#loginForm input:focus {
  outline: none;
  border-color: rgba(124, 92, 252, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

/* Mobile responsiveness adjustments */
@media (max-width: 768px) {
  .stats {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr !important;
  }
  .quick-row {
    grid-template-columns: 1fr !important;
  }
}

/* --- Refined Modals & Telemetry Styles --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.modal.open {
  display: flex !important;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal > div {
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.gps-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 rgba(56, 189, 248, 0.4);
  animation: pulseGps 1.8s infinite;
  margin-right: 4px;
}
@keyframes pulseGps {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Ensure toast messages appear above all overlays */
#toast {
  z-index: 100000 !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  html, body {
    width: 210mm;
    background: #fff !important;
    font-size: 10pt;
  }
  body * {
    visibility: hidden;
  }
  #invoiceModal.invoice-print-target, #invoiceModal.invoice-print-target * {
    visibility: visible;
  }
  #invoiceModal.invoice-print-target {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    background: #fff !important;
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #invoiceModal.invoice-print-target > div {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  #invoiceClose, #btnDoPrintInvoice, #btnShareWaInvoice {
    display: none !important;
  }
}

/* Paket berlangganan: kartu solid dalam layout grid */
.subscription-panel {
  width: min(760px, 94vw);
  background: #ffffff !important;
  padding: 30px !important;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.plan-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-content: start;
  min-height: 135px;
  padding: 17px;
  background: #ffffff !important;
  border: 1px solid #dfe4ec;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.plan-option:hover,
.plan-option:has(input:checked) {
  border-color: var(--purple);
  box-shadow: 0 8px 20px rgba(112, 87, 217, .14);
  transform: translateY(-2px);
}

.plan-option input { width: auto; margin: 2px 0 0; accent-color: var(--purple); }
.plan-option strong { color: var(--ink); font: 600 15px Outfit; }
.plan-option b { grid-column: 2; color: var(--purple); font-size: 12px; }
.plan-option span { grid-column: 2; color: var(--muted); font-size: 10px; line-height: 1.5; }

@media (max-width: 650px) {
  .subscription-panel { padding: 22px !important; }
  .plan-options { grid-template-columns: 1fr; gap: 10px; }
  .plan-option { min-height: 0; }
}

/* Sidebar Nav Icons styling */
nav a .nav-icon {
  margin-right: 10px;
  width: 18px;
  text-align: center;
  display: inline-block;
  font-size: 14px;
  color: inherit;
  transition: color 0.2s;
}

/* Fallback final: gunakan karakter Unicode biasa, bukan glyph Font Awesome.
   Dengan begitu ikon tetap terlihat walau CDN Font Awesome gagal dimuat. */
nav a .nav-icon.fa-solid {
  font-family: Arial, sans-serif !important;
  font-size: 15px !important;
  font-style: normal !important;
  width: 20px;
  text-align: center;
  color: currentColor;
}
nav a .nav-icon.fa-solid::before {
  font-family: Arial, sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}
nav a .nav-icon.fa-gauge::before { content: '▣' !important; }
nav a .nav-icon.fa-car::before { content: '▰' !important; }
nav a .nav-icon.fa-receipt::before { content: '▤' !important; }
nav a .nav-icon.fa-wallet::before { content: '$' !important; }
nav a .nav-icon.fa-users::before { content: '♟' !important; }
nav a .nav-icon.fa-chart-line::before { content: '↗' !important; }
nav a .nav-icon.fa-calendar-days::before { content: '□' !important; }
nav a .nav-icon.fa-gear::before { content: '⚙' !important; }
/* Hindari glyph Font Awesome yang berubah menjadi tanda tanya saat CDN gagal. */
nav a .nav-icon.fa-solid::before { font-family: Arial, sans-serif !important; }

/* Ikon sidebar selalu memakai karakter ASCII yang didukung semua browser.
   Ini mencegah tanda tanya ketika Font Awesome/CDN tidak termuat. */
nav a .nav-icon.fa-gauge::before { content: 'D' !important; }
nav a .nav-icon.fa-car::before { content: 'A' !important; }
nav a .nav-icon.fa-receipt::before { content: 'T' !important; }
nav a .nav-icon.fa-wallet::before { content: 'K' !important; }
nav a .nav-icon.fa-users::before { content: 'P' !important; }
nav a .nav-icon.fa-chart-line::before { content: 'L' !important; }
nav a .nav-icon.fa-calendar-days::before { content: 'J' !important; }
nav a .nav-icon.fa-gear::before { content: 'S' !important; }

/* Ikon sidebar fallback yang aman: gunakan glyph ASCII agar tidak berubah menjadi `?`
   saat Font Awesome/CDN atau font emoji tidak tersedia. */
nav a .nav-icon.fa-solid::before,
#sidebarWorkspace .nav-icon.fa-solid::before {
  font-family: Arial, sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
nav a .nav-icon.fa-gauge::before { content: 'D' !important; }
nav a .nav-icon.fa-car::before { content: 'A' !important; }
nav a .nav-icon.fa-receipt::before { content: 'T' !important; }
nav a .nav-icon.fa-users::before { content: 'P' !important; }
nav a .nav-icon.fa-chart-line::before { content: 'L' !important; }
nav a .nav-icon.fa-calendar-days::before { content: 'J' !important; }
#sidebarWorkspace .nav-icon.fa-arrow-up-right-from-square::before { content: 'W' !important; }

.actions span {
  margin-right: 15px;
  cursor: pointer;
  color: #a1aaba;
  font-size: 16px;
  vertical-align: middle;
}

.actions em {
  vertical-align: middle;
}

/* Car Form Modal Enhancements */
#carForm input:focus,
#carForm select:focus {
  border-color: #bcb3ed;
  box-shadow: 0 0 0 3px rgba(98, 81, 201, 0.08);
}

#btnTestGpsConnect:hover {
  background: var(--purple) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(98, 81, 201, 0.25);
}

#modal > div {
  position: relative;
}

#close:hover {
  color: var(--ink);
}

/* ================================================================
   TAMPILAN BOOKING - MODAL, WORKFLOW, TRANSACTION CARDS
   ================================================================ */

/* --- Booking Panel (Modal & Workflow) --- */
.booking-panel {
  background: #fff;
  border-radius: 14px;
  padding: 28px 30px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  max-height: 85vh;
  overflow-y: auto;
}
.booking-panel-header {
  margin-bottom: 20px;
}
.booking-panel-header small {
  color: var(--purple);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
}
.booking-panel-header h2 {
  margin: 4px 0 2px;
  font-size: 22px;
  color: var(--ink);
}
.booking-panel-header p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

/* --- Booking Section (Step) --- */
.booking-section {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.bs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bs-header h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.bs-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.booking-section select,
.booking-section input[type="date"],
.booking-section input[type="time"],
.booking-section input[type="number"],
.booking-section input[type="tel"],
.booking-section input[type="text"],
.booking-section textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}
.booking-section textarea {
  resize: vertical;
  min-height: 60px;
}

/* Row Grid */
.bs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bs-row-4col {
  grid-template-columns: repeat(4, 1fr);
}
.bs-row label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

/* --- Service Toggle --- */
.service-toggle {
  display: flex;
  gap: 8px;
}
.st-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  background: #fff;
}
.st-option input { display: none; }
.st-option .st-icon { font-size: 20px; }
.st-option.active {
  border-color: var(--purple);
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(98,81,201,0.06);
}

/* --- Driver Fields --- */
.driver-fields {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.driver-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.driver-tab {
  flex: 1;
  padding: 7px;
  border: 1px solid var(--line);
  background: #f5f5f5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  color: var(--muted);
  transition: all 0.15s;
}
.driver-tab.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.driver-photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--line);
  margin-top: 6px;
}

/* --- Calc Card --- */
.calc-card {
  background: linear-gradient(135deg, #f5f3ff, #ede9ff);
  border: 1.5px solid #d4ccf8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.calc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple);
  margin-bottom: 10px;
}
.calc-badge {
  font-size: 9px;
  background: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--purple);
  font-weight: 800;
}
.calc-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #444;
}
.calc-row strong {
  font-size: 12px;
  color: var(--ink);
}
.calc-total {
  border-top: 1.5px dashed #c4b8f0;
  padding-top: 8px;
  margin-top: 4px;
}
.calc-total span {
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
}
.calc-total strong {
  font-size: 20px;
  color: var(--purple);
  font-weight: 800;
}

/* --- Checklist Grid --- */
.checklist-grid-booking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
}
.check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
}

/* --- Payment Methods --- */
.payment-methods {
  display: flex;
  gap: 6px;
}
.pm-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.pm-option input { display: none; }
.pm-option:has(input:checked) {
  border-color: var(--purple);
  background: #f5f3ff;
}

/* --- Full Width Button --- */
.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  margin-top: 6px;
  cursor: pointer;
}

/* ================================================================
   TRANSACTION CARDS (menggantikan tabel lama)
   ================================================================ */
.transaction-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s;
}
.transaction-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.tc-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tc-id {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
}
.tc-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tc-active {
  background: #fef3c7;
  color: #b45309;
}
.tc-done {
  background: #d1fae5;
  color: #065f46;
}
.overtime-badge {
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 12px;
}
.tc-pay-status {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.pay-ok {
  background: #d1fae5;
  color: #065f46;
}
.pay-pending {
  background: #fff3e6;
  color: #c2410c;
}

.tc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.tc-cell label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tc-cell strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.tc-cell small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.tc-cell-right {
  text-align: right;
}
.tc-price {
  font-size: 16px !important;
  color: var(--purple) !important;
}
.tc-service {
  font-style: italic;
}
.tc-checklist {
  font-size: 9px;
  color: #059669;
  margin-top: 3px;
}

.tc-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.tc-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
}
.tc-btn:hover {
  background: #f5f5f5;
}
.tc-btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.tc-btn-primary:hover {
  background: #5243c7;
}

.check-ok {
  color: #059669;
  font-weight: 600;
  font-size: 10px;
}
.check-no {
  color: var(--muted);
  font-size: 10px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 4px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
}

/* ================================================================
   INVOICE MODAL - PRINT READY
   ================================================================ */
.invoice-panel {
  background: #fff;
  border-radius: 14px;
  padding: 32px 36px;
  max-width: 750px;
  width: 100%;
  margin: 0 auto;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--purple);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.invoice-header h2 {
  font-size: 22px;
  color: var(--purple);
  margin: 0;
}
.invoice-header small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.invoice-id {
  text-align: right;
  font-size: 10px;
  color: var(--muted);
  font-family: monospace;
}
.invoice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}
.invoice-grid label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.invoice-grid strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.invoice-grid small {
  font-size: 10px;
  color: var(--muted);
}
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 11px;
}
.invoice-table th {
  background: #f5f3ff;
  color: var(--purple);
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: left;
}
.invoice-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.invoice-table .text-right {
  text-align: right;
}
.invoice-total-row td {
  font-weight: 800;
  font-size: 14px;
  color: var(--purple);
  border-top: 2px solid var(--purple);
}
.invoice-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 10px;
  color: var(--muted);
}
.invoice-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .tc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tc-cell-right {
    text-align: left;
  }
  .bs-row-4col {
    grid-template-columns: 1fr 1fr;
  }
  .payment-methods {
    flex-direction: column;
  }
  .checklist-grid-booking {
    grid-template-columns: 1fr;
  }
  .invoice-grid {
    grid-template-columns: 1fr;
  }
  .invoice-header {
    flex-direction: column;
    gap: 8px;
  }
}
