:root {
  --ink: #14181F;
  --muted: #5B6472;
  --line: #E3E6EA;
  --line-soft: #EDEFF2;
  --ground: #F3F4F6;
  --surface: #FFFFFF;
  --nav: #12161C;
  --nav-2: #2A313C;
  --accent: #C2410C;
  --accent-dark: #9A3412;
  --green: #15803D;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--ground);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }

/* Top bar */
.topbar {
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
}
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 300px; }
.topbar nav a {
  color: #C9CED6; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: 14px;
}
.topbar nav a.active { color: #fff; background: var(--nav-2); font-weight: 600; }
.topbar .who { font-size: 13px; color: #C9CED6; }

/* Layout */
.wrap { max-width: 1440px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.main { flex: 999 1 640px; min-width: 0; }
.side { flex: 1 1 340px; min-width: 280px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 16px 18px; }
.card-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; padding: 10px 8px;
}
th:first-child, td:first-child { padding-left: 18px; }
td { border-top: 1px solid var(--line-soft); padding: 12px 8px; vertical-align: top; }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); border: 1px solid #D3D7DD; border-radius: 6px;
  padding: 9px 10px; background: #fff; width: 100%;
}
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.check input { width: 18px; height: 18px; }

/* Buttons */
button, .btn {
  font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid #D3D7DD;
  background: #fff; color: var(--ink); padding: 10px 14px; min-height: 44px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-block { width: 100%; }
.btn-big { min-height: 54px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border-radius: 999px; padding: 6px 14px; font-size: 13px; min-height: 36px; font-weight: 500;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

/* Status pills */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: #EEF0F3; color: #3B4452;
}
.s-dispatched { background: #DBEAFE; color: #1E40AF; }
.s-en_route, .s-waiting_payment { background: #FFEDD5; color: #9A3412; }
.s-on_scene, .s-towing { background: #F3E8FF; color: #6B21A8; }
.s-destination_arrival { background: #E0F2FE; color: #075985; }
.s-completed { background: #FEF3C7; color: #92400E; }
.s-acknowledged { background: #DCFCE7; color: #166534; }
.flag-bad { color: #B42318; font-weight: 600; }
.flag-warn { color: #9A3412; font-weight: 600; }
.flag-ok { color: #166534; font-weight: 600; }

/* Quote lines */
.lines { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.lines .l { display: flex; justify-content: space-between; gap: 10px; }
.lines .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; font-size: 16px; }

/* Login */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }

/* Driver app (phone first) */
.phone { max-width: 520px; margin: 0 auto; }
.phone .topbar { flex-direction: column; align-items: stretch; gap: 10px; }
.earn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.earn div { border-radius: 10px; padding: 10px 12px; background: var(--nav-2); }
.earn .today { background: var(--green); }
.earn .v { font-size: 24px; font-weight: 700; }
.earn .k { font-size: 12px; opacity: .85; }
.section-label {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.callcard { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.callcard.current { border: 2px solid var(--accent); }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 600; }
.timer { font-size: 44px; font-weight: 700; text-align: center; }
.prompt { border: 2px solid var(--accent); background: #FFF7ED; border-radius: 12px; padding: 16px; }
.zelle-box { border: 2px solid var(--ink); border-radius: 12px; padding: 16px; text-align: center; }
.zelle-box img { max-width: 200px; width: 100%; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600;
  transition: transform .2s; z-index: 50; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #B42318; }

.hidden { display: none !important; }
@media (max-width: 640px) {
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { padding: 12px; }
}

/* Install banner */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.install-banner > div { flex: 1; }

/* Google address search box */
.addr-search { display: block; width: 100%; color-scheme: light; }
.queue-item {
  display: flex; gap: 8px; align-items: center; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px;
}
.queue-item .num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 24px;
}
.queue-item .mv { min-height: 32px; min-width: 32px; padding: 0 8px; font-size: 14px; }
.eta { font-weight: 700; }

/* Pop-up window */
.modal-back {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 24, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal.wide { max-width: 860px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) { .modal-back { padding: 0; } .modal { border-radius: 0; min-height: 100%; } }

/* Driver picker */
.pick {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; justify-content: flex-start;
  padding: 12px 14px; font-weight: 500;
}
.pick:hover { border-color: var(--accent); }
.pick .when { margin-left: auto; text-align: right; }
.pick .when .t { font-size: 18px; font-weight: 700; }
.pick.best { border: 2px solid var(--green); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #DCFCE7; color: #166534;
}

/* Form fields with a button in the heading */
.field { display: flex; flex-direction: column; gap: 4px; }
.field-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.map-btn { min-height: 28px; padding: 2px 10px; font-size: 12px; border-radius: 999px; color: var(--accent); }

/* Editable charge lines */
.cline { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px 78px 32px; gap: 6px; align-items: center; font-size: 14px; }
.cline input { padding: 6px 7px; text-align: right; }
.cline .amt { text-align: right; font-weight: 600; }
.cline .x { min-height: 32px; padding: 0; color: var(--muted); }
.cline .pct { display: flex; align-items: center; gap: 4px; }
.cline-head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.add-svc { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; gap: 6px; }
.add-svc.with-price { grid-template-columns: minmax(0, 1fr) 64px 84px auto; }
.removed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.removed .chip { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.charges-btn { min-height: 34px; padding: 4px 10px; font-weight: 700; }

/* Status history */
details.hist summary { cursor: pointer; color: var(--accent); }
details.hist div { padding-top: 2px; }
.timeline { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.timeline strong { color: var(--ink); }
/* The new call / quote panel is about twice the normal side width. */
.quote-side { flex: 1 1 680px; min-width: 300px; max-width: 760px; }
/* On narrow screens each quote line gets the name on top and the boxes below. */
@media (max-width: 700px) {
  #quote-lines .cline { grid-template-columns: 64px 90px minmax(0, 1fr) 32px; row-gap: 2px; padding-top: 6px; border-top: 1px dashed var(--line-soft); }
  #quote-lines .cline > span:first-child { grid-column: 1 / -1; font-weight: 600; }
  #quote-lines .cline-head { display: none; }
}

/* Accounts list */
.acct-row {
  display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line-soft);
  border-radius: 0; padding: 12px 18px; font-weight: 400; background: #fff;
}
.acct-row:hover { background: var(--ground); }
.acct-row.on { background: #FFF7ED; box-shadow: inset 4px 0 0 var(--accent); }
.plate-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; gap: 8px; align-items: end; }
.btn-danger { color: #B91C1C; border-color: #FCA5A5; background: #fff; }
.btn-danger:hover { background: #FEF2F2; }
.vin-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 90px; gap: 8px; align-items: end; }
.map-newtab {
  margin: 10px; min-height: 34px; padding: 4px 12px; font-size: 13px; font-weight: 600;
  background: #fff; border: 0; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: inline-flex; align-items: center; gap: 6px; color: #14181F;
}
/* Destination search with a small Impound lot picker beside it */
.dest-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px; align-items: end; }
.dest-row > .hidden + label, .dest-row:has(> .hidden) { grid-template-columns: 170px; }
.impound-pick { font-size: 13px; color: var(--muted); }
#quote-modal { z-index: 55; }
#quote-modal .modal { max-width: 900px; }
.addr-now { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.addr-now input[readonly] { background: var(--ground); }
.dest-row > .field { min-width: 0; }
.modal.quote-size { max-width: 900px; }
.edit-map { height: 320px; border-radius: 8px; margin-top: 6px; background: var(--ground); }
.clickable { cursor: pointer; } .clickable:hover td { background: var(--ground); }

/* Photos and signatures */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.thumbs a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--ground); }
.sig-row { display: flex; gap: 10px; align-items: flex-start; }
.sig-row img { width: 160px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.terms-text { white-space: pre-wrap; font-size: 13px; line-height: 1.45; }
.overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 700px) { .overview { grid-template-columns: 1fr; } }

/* Driver call page – big and easy to read in the truck */
.call-map { height: 260px; border-radius: 10px; overflow: hidden; background: var(--ground); }
.tb { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.tb > .card, .tb > .prompt { margin: 10px 12px 0; }
.tb-head { background: #0B5CA8; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.tb-head .num { font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.tb-head .icons { display: flex; gap: 6px; }
.tb-ico { min-height: 44px; min-width: 44px; padding: 0; font-size: 22px; background: transparent; border: 0; color: inherit; }
.tb-head .tb-ico { color: #fff; }
.tb-status { color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 24px; font-weight: 600; }
.tb-status button { background: rgba(0,0,0,.22); color: #fff; border: 0; font-weight: 800; font-size: 15px; letter-spacing: .4px; min-height: 52px; padding: 6px 16px; }
.tb-sec { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.tb-title { font-size: 26px; font-weight: 800; line-height: 1.2; }
.tb-sub { font-size: 20px; color: var(--muted); margin-top: 2px; }
.tb-h { font-size: 21px; font-weight: 800; }
.tb-h2 { font-size: 23px; font-weight: 800; margin-bottom: 8px; }
.tb-dist { font-size: 17px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.tb-addr { font-size: 21px; line-height: 1.3; margin-top: 2px; }
.tb-big { font-size: 19px; line-height: 1.35; }
.tb-link { display: inline-block; margin-top: 6px; font-weight: 700; font-size: 17px; }
.tb-table { display: flex; flex-direction: column; gap: 6px; }
.tb-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); font-size: 19px; }
.tb-row .k { color: var(--muted); }
.tb-steps { display: flex; flex-direction: column; }
.tb-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 20px; color: #9CA3AF; padding: 6px 0; position: relative; }
.tb-step.done { color: var(--ink); }
.tb-step .dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid; background: #fff; justify-self: center; z-index: 1; }
.tb-step:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 26px; bottom: -8px; width: 2px; background: #D1D5DB; }
.tb-step .t { font-size: 17px; color: var(--ink); }
.tb-contact { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.tb-call { font-size: 30px; text-decoration: none; padding: 4px 8px; }
.tb-charge { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.tb-charge .muted { font-size: 16px; }
.tb-totals { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 18px; }
.tb-totals > div { display: grid; grid-template-columns: auto 110px; gap: 14px; text-align: right; }
.tb-totals .big { font-size: 22px; font-weight: 800; }
.tb .callcard, .tb .card { box-shadow: none; }

/* Driver home – list like Towbook */
.dv-bar { position: sticky; top: 0; z-index: 20; background: #0B5CA8; color: #fff; display: grid; grid-template-columns: 52px 1fr 52px 52px; align-items: center; padding: 6px 4px; }
.dv-title { font-size: 21px; font-weight: 700; }
.dv-ico { background: transparent; border: 0; color: #fff; font-size: 26px; min-height: 48px; padding: 0; }
.dv-earn { display: flex; justify-content: space-around; background: #0A4F91; color: #fff; padding: 6px 10px; font-size: 16px; }
.dv-earn .k { color: #BFD7F2; font-size: 14px; }
.dv-shift { padding: 6px 14px; font-size: 14px; color: var(--muted); background: #fff; border-bottom: 1px solid var(--line-soft); }
.dv-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-bottom: 4px solid #D1D5DB; position: sticky; top: 60px; z-index: 15; }
.dv-tabs button { background: transparent; border: 0; border-radius: 0; font-size: 17px; letter-spacing: 1.5px; font-weight: 700; color: #4B5563; min-height: 56px; border-bottom: 4px solid transparent; margin-bottom: -4px; }
.dv-tabs button.on { color: #0B5CA8; border-bottom-color: #0B5CA8; }
.dv-card { background: #fff; border-left: 8px solid #334155; border-bottom: 10px solid #E5E7EB; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.dv-top { display: flex; align-items: center; gap: 10px; }
.dv-num { background: #1F2937; color: #fff; font-weight: 800; font-size: 21px; padding: 3px 10px; border-radius: 4px; }
.dv-head { font-weight: 800; font-size: 19px; line-height: 1.2; }
.dv-veh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.dv-cam { font-size: 20px; white-space: nowrap; }
.dv-cam b { background: #1D6CF2; color: #fff; border-radius: 999px; font-size: 13px; padding: 1px 6px; margin-left: 2px; vertical-align: top; }
.dv-type { font-size: 19px; color: #9CA3AF; }
.dv-line { font-size: 19px; }
.dv-when { display: flex; justify-content: space-between; align-items: center; font-size: 19px; }
.dv-paid { background: #22C55E; color: #fff; font-weight: 800; border-radius: 999px; padding: 3px 14px; font-size: 16px; }
.dv-due { background: #FEF3C7; color: #92400E; font-weight: 800; border-radius: 999px; padding: 3px 12px; font-size: 15px; }
.dv-addr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; font-size: 18px; }
.dv-addr b { font-weight: 500; }
.dv-addr span { color: #9CA3AF; }
.dv-callview { position: fixed; inset: 0; z-index: 40; background: #F3F4F6; overflow-y: auto; display: flex; flex-direction: column; gap: 0; }
.dv-callview .call-map { border-radius: 0; flex: 0 0 240px; }
.dv-callview .tb { border-radius: 0; box-shadow: none; }
.dv-menu { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); }
.dv-menu-panel { background: #fff; width: 82%; max-width: 340px; height: 100%; padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.tb-top { position: sticky; top: 0; z-index: 5; }

/* Driver app: no double-tap zoom */
.dv-page, .dv-page * { touch-action: manipulation; }
.dv-page .call-map, .dv-page .call-map * { touch-action: auto; }

/* ---------- Dispatch call board (Towbook style) ---------- */
.cb { display: flex; padding: 0; overflow: hidden; }
.cb-lists { flex: 0 0 190px; border-right: 1px solid var(--line-soft); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; background: #fff; }
.cb-lh { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px 8px; }
.cb-l { display: block; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); cursor: pointer; min-height: 0; text-decoration: none; font-weight: 400; }
.cb-l span { color: #3B82F6; }
.cb-l:hover { background: #F3F4F6; }
.cb-l.on { background: #EEF0F3; font-weight: 600; }
.cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-top { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.cb-top input { flex: 1 1 280px; max-width: 460px; }
.cb-call { border-left: 6px solid var(--sc); border-bottom: 1px solid #fff; background: #fff; cursor: pointer; }
.cb-call:nth-child(even) { background: #FAFAFB; }
.cb-call.is-done { background: #D3F8CC; }
.cb-call.is-cancel { background: #F3F4F6; opacity: .85; }
.cb-call:hover { filter: brightness(.98); }
.cb-call.open { box-shadow: inset 0 0 0 2px #93C5FD; }
.cb-grid { display: grid; grid-template-columns: minmax(260px, 1.35fr) 1.2fr 1fr 1fr; gap: 4px 18px; padding: 10px 14px; font-size: 13.5px; }
.cb-c1 { display: flex; gap: 12px; }
.cb-num { color: #6B7280; font-size: 13px; min-width: 50px; padding-top: 3px; }
.cb-title { color: #1D6FD1; font-size: 17px; line-height: 1.25; }
.cb-sub { color: #6B7280; font-size: 13px; }
.cb-done { color: #166534; font-weight: 600; }
.cb-late { display: inline-block; background: #FFE600; color: #3F3A00; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-top: 2px; }
.cb-kv { display: flex; gap: 8px; line-height: 1.55; min-width: 0; }
.cb-kv .k { color: #8A93A0; white-space: nowrap; }
.cb-kv .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cb-link { color: #1D6FD1; }
.cb-green { color: #16A34A; }
.cb-details { padding: 4px 14px 12px 76px; cursor: default; }
.cb-dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; font-size: 13.5px; }
.cb-dgrid .k { color: #8A93A0; display: block; margin-bottom: 2px; }
.cb-dgrid .hist summary { color: #1D6FD1; }
.cb-review { margin-top: 10px; padding: 8px 10px; border: 1px solid #86EFAC; border-radius: 8px; background: #F0FDF4; font-size: 13.5px; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 10px; align-items: center; }
.cb-act { border: 0; background: none; color: #1D6FD1; font-size: 14px; padding: 4px 8px; min-height: 0; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
.cb-act:hover { background: rgba(29, 111, 209, .08); }
label.cb-act { flex-direction: row !important; }
.cb-act select { min-height: 26px; padding: 2px 6px; font-size: 13px; width: auto; }
.cb-ack { background: #16A34A; color: #fff; font-weight: 600; }
.cb-ack:hover { background: #15803D; }
.cb-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; margin-top: auto; }
.cb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cb-legend i { width: 14px; height: 14px; display: inline-block; }
@media (max-width: 1100px) {
  .cb-grid { grid-template-columns: 1fr 1fr; }
  .cb-dgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cb { flex-direction: column; }
  .cb-lists { flex: none; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .cb-lh { display: none; }
  .cb-l { white-space: nowrap; }
  .cb-grid, .cb-dgrid { grid-template-columns: 1fr; }
  .cb-details { padding-left: 14px; }
}
.cline-add { padding: 4px 0 6px; }
.cline-add .chip { font-size: 13px; }
.duty-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; margin-left: 4px; }
.duty-medium { background: #FEF3C7; color: #92400E; }
.duty-heavy { background: #1F2937; color: #fff; }
.duty-grid { width: 100%; border-collapse: collapse; }
.duty-grid th, .duty-grid td { padding: 8px 12px; border-top: 1px solid var(--line-soft); text-align: left; }
.duty-grid th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6B7280); }
.duty-grid td.num, .duty-grid th.num { text-align: right; width: 170px; white-space: nowrap; }
.duty-grid td { vertical-align: middle; }
.duty-grid input { width: 110px; text-align: right; display: inline-block; }
.cb-divider { padding: 8px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #374151; background: #F3F4F6; border-top: 2px solid #D1D5DB; }
.sched-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sched-row input[type=datetime-local] { width: auto; }
.cb-sched { color: #6D28D9; font-weight: 600; }
.dv-sched { color: #6D28D9; font-weight: 700; font-size: 15px; }
input.ro { background: #F3F4F6; color: #374151; cursor: default; }

/* ---------- Reports ---------- */
.rp-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rp-stat { border: 1px solid var(--line-soft); border-radius: 8px; padding: 8px 12px; min-width: 140px; }
.rp-stat .k { font-size: 12px; color: #6B7280; }
.rp-stat .v { font-size: 17px; font-weight: 700; }
.rp-table { max-height: 70vh; overflow: auto; }
.rp-table table { font-size: 13px; }
.rp-table th, .rp-table td { white-space: nowrap; padding: 6px 10px; }
.rp-table th { position: sticky; top: 0; background: #fff; z-index: 1; }
.rp-table td.num, .rp-table th.num { text-align: right; }
.rp-table tr.rp-sub td { background: #F3F4F6; font-weight: 700; }
.rp-table tfoot td { font-weight: 700; border-top: 2px solid #D1D5DB; background: #FAFAFB; }

/* Settings tab strip */
.set-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line-soft); }
.set-tabs a { padding: 10px 14px; text-decoration: none; color: #4B5563; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 6px 6px 0 0; }
.set-tabs a:hover { background: #F3F4F6; color: #111827; }
.set-tabs a.on { color: #C2410C; border-bottom-color: #C2410C; }

/* ---------- Public parking page ---------- */
.pk-body { background: #F3F4F6; }
.pk-top { background: #12161C; color: #fff; padding: 14px 18px; }
.pk-brand { font-weight: 800; font-size: 17px; }
.pk-brand span { font-weight: 500; color: #FDBA74; }
.pk-wrap { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pk-wrap h1 { margin: 0; font-size: 24px; }
.pk-prop { padding: 4px 2px 8px; }
.pk-card { display: flex; flex-direction: column; gap: 12px; }
.pk-tabs { display: flex; background: #E5E7EB; border-radius: 10px; padding: 4px; gap: 4px; margin: 4px 0 12px; }
.pk-tabs button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 10px 6px; font-weight: 600; min-height: 0; font-size: 14px; }
.pk-tabs button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: #C2410C; }
.pk-rules { white-space: pre-wrap; font-size: 13px; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 8px; padding: 10px; max-height: 180px; overflow: auto; }
.pk-done { text-align: center; align-items: center; }
.pk-check { width: 64px; height: 64px; border-radius: 50%; background: #16A34A; color: #fff; font-size: 36px; line-height: 64px; }
.pk-plate { font-size: 30px; font-weight: 800; letter-spacing: .08em; border: 3px solid #111827; border-radius: 8px; padding: 6px 16px; }
.pk-ok { background: #DCFCE7; color: #166534; padding: 10px; border-radius: 8px; font-weight: 600; margin-top: 10px; }
.pk-no { background: #FEE2E2; color: #991B1B; padding: 10px; border-radius: 8px; margin-top: 10px; }
.pk-foot { text-align: center; margin-top: 10px; }
.prop-link { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 8px; padding: 10px 12px; }
