/* Carson Ops v1.6. Telegram-dark look per Mike's screenshot:
   dark navy panels, light text, Telegram blue actions, big readable type. */

:root {
  --ink: #f5f5f5;
  --muted: #8b98a5;
  --bg: #0e1621;
  --card: #17212b;
  --field: #242f3d;
  --line: #2f3b4a;
  --action: #3390ec;      /* Telegram blue */
  --red: #f55e53;
  --red-bg: #2a1b1c;
  --amber: #f0a83c;
  --amber-bg: #2a2314;
  --green: #33c759;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

main { max-width: 780px; margin: 0 auto; padding: 14px 14px 56px; }

h1 { font-size: 1.5rem; margin: 14px 0 6px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
a { color: var(--action); }

/* top bar */
.topbar {
  background: #17212b;
  border-bottom: 1px solid var(--line);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
}
.topbar .brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 14px; }
.topbar nav a { color: #8b98a5; text-decoration: none; padding: 5px 0; font-size: 1.02rem; }
.topbar nav a:hover { color: #fff; }
.topbar nav a.who { margin-left: auto; color: #6c7883; }

/* flashes */
.flashes { margin: 10px 0; }
.flash {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--action);
  padding: 10px 14px;
  border-radius: 8px;
  margin: 5px 0;
}

/* board head */
.board-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.count {
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}
.count.red { color: #fff; background: #c0392b; border-color: #c0392b; }
.count.amber { color: #1a1a1a; background: var(--amber); border-color: var(--amber); }
.count.green { color: #0e1621; background: var(--green); border-color: var(--green); }
.count.plain { color: var(--muted); font-weight: 400; }

/* car list */
.carlist { list-style: none; margin: 0; padding: 0; }
.car {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
}
.car.overdue { border-left-color: var(--red); background: var(--red-bg); }
.car.due { border-left-color: var(--amber); background: var(--amber-bg); }
.car > a {
  display: block;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}
.car-line1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}
.car-line1 .status { color: var(--muted); font-weight: 600; white-space: nowrap; }
.car-line2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}
.car-line3 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 3px;
}
.reason {
  margin-top: 7px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--red);
}
.car.due .reason { color: var(--amber); }

/* forms */
.carform, .contactform, .login-form { display: grid; gap: 12px; }
.row2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
label { display: grid; gap: 5px; font-weight: 600; font-size: 1rem; }
label.check { grid-auto-flow: column; justify-content: start; align-items: center; }
input, select, textarea {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  width: 100%;
}
input::placeholder, textarea::placeholder { color: #6c7883; }
select { appearance: auto; }
input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid var(--action);
  outline-offset: 1px;
}
input[type="date"] { color-scheme: dark; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn.primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn.done { background: var(--green); border-color: var(--green); color: #0e1621; }
.btn.amber { background: #e0a63a; border-color: #e0a63a; color: #161c26; font-weight: 600; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.amber.block { display: block; width: 100%; text-align: center; margin-top: 8px; }
.btn.small { padding: 7px 11px; font-size: 0.88rem; }

/* detail */
.detail-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
}
.detail-head.overdue { border-left-color: var(--red); }
.detail-head.due { border-left-color: var(--amber); }
.detail-head h1 { margin: 0; }
.sub { margin: 3px 0; color: var(--muted); }
.sub a { color: var(--action); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
}
.hint { color: var(--muted); font-size: 0.95rem; margin: 4px 0 10px; }
.warn { color: var(--red); font-weight: 700; }

/* logs */
.log { list-style: none; margin: 0; padding: 0; }
.log li {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  display: grid;
  gap: 2px;
}
.log li:first-child { border-top: 0; }
.log-when { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.log-who { font-weight: 700; font-size: 0.95rem; }
.log-msg { white-space: pre-wrap; }
.log.small .log-msg { font-size: 0.92rem; color: var(--muted); }

.userrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.userrow .log-who { flex: 1 1 100%; }
form.inline { display: flex; gap: 6px; align-items: center; }
form.inline input { width: 170px; padding: 8px; }

/* empty states */
.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.green-empty { border-color: var(--green); color: var(--green); font-weight: 700; }

/* login */
.login-wrap { max-width: 380px; margin: 10vh auto 0; }
.login-wrap h1 { font-size: 1.7rem; margin-bottom: 0; }
.tagline { color: var(--muted); margin-top: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter 120ms; }
  .btn:active { filter: brightness(0.9); }
}

/* ============================================================= v2.0 adds */

/* location badges */
.badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  overflow: hidden;
  vertical-align: middle;
  margin-right: 9px;
}
.badge img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  background: #fff;
  border-radius: 50%;
}
.badge-fallback {
  font-size: 0.62rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}
.badge.big { width: 42px; height: 42px; min-width: 42px; }
.car > a, .detail-head { position: relative; }
.badge.corner {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 52px;
  height: 52px;
  min-width: 52px;
  margin-right: 0;
  border-width: 2px;
}
.car > a { padding-right: 74px; }
.detail-head { padding-right: 74px; }
/* v8.42: car page badge is bigger and is a button */
.detail-head .badge.corner { width: 84px; height: 84px; min-width: 84px; right: 12px; bottom: 12px; border-width: 3px; cursor: pointer; padding: 0; }
.detail-head .badge.corner:hover { border-color: var(--action); }
.detail-head { padding-right: 108px; }
.locpick { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.locpick[hidden] { display: none; }
.locpick-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; width: 100%; max-width: 520px; }
.locpick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.locpick-head h2 { margin: 0; }
.locpick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.locpick-grid form { display: contents; }
.locopt { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 12px; font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; }
.locopt .badge { width: 48px; height: 48px; min-width: 48px; margin: 0; }
.locopt small { font-weight: 400; color: var(--muted); }
.locopt.on { border-color: var(--action); outline: 2px solid var(--action); }
.locopt:disabled { cursor: default; opacity: .85; }
.car-line1 { align-items: center; }
.car-line1 .vehicle { flex: 1 1 auto; min-width: 0; }

/* notes box: no drag handle, it sizes itself to the content */
#notes-box, #text-box { resize: none; overflow: hidden; }

/* ============================================== mobile pass (edit 3) */
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 8px 8px 40px; }

  /* one slim strip: brand + nav + login, horizontally scrollable */
  .topbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 7px 10px;
    gap: 13px;
    align-items: center;
  }
  .topbar::-webkit-scrollbar { display: none; }
  .topbar .brand { font-size: 0.95rem; white-space: nowrap; }
  .topbar nav { flex-wrap: nowrap; gap: 13px; align-items: center; }
  .topbar nav a { font-size: 0.88rem; padding: 3px 0; white-space: nowrap; }
  .topbar nav a.who { margin-left: 0; flex-basis: auto; font-size: 0.85rem; }

  /* counts + check-in share one row */
  .board-head { flex-wrap: nowrap; margin: 8px 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .board-head::-webkit-scrollbar { display: none; }
  .counts { flex-wrap: nowrap; }
  .count { padding: 4px 8px; font-size: 0.85rem; white-space: nowrap; }
  .board-head .btn.primary { padding: 7px 10px; font-size: 0.88rem; white-space: nowrap; margin-left: auto; }

  /* tight cards: 3-4 cars per screen */
  .car { margin: 6px 0; border-radius: 8px; border-left-width: 5px; }
  .car > a { padding: 8px 10px; }
  .car-line1 { flex-wrap: wrap; gap: 4px 8px; font-size: 0.98rem; line-height: 1.3; }
  .car-line1 .status {
    flex-basis: 100%;
    white-space: normal;
    font-size: 0.83rem;
    font-weight: 600;
    order: 3;
  }
  .badge.corner { width: 44px; height: 44px; min-width: 44px; right: 8px; bottom: 8px; }
  .car > a { padding-right: 58px; }
  .detail-head { padding-right: 58px; }
  .detail-head .badge.corner { width: 68px; height: 68px; min-width: 68px; right: 10px; bottom: 10px; }
  .detail-head { padding-right: 86px; }
  .locpick-grid { grid-template-columns: 1fr; }
  .badge-fallback { font-size: 0.55rem; }
  .car-line2 { font-size: 0.86rem; flex-wrap: wrap; gap: 2px 10px; }
  .car-line3 { font-size: 0.8rem; gap: 2px 10px; margin-top: 2px; }
  .reason { font-size: 0.85rem; margin-top: 4px; }

  h1 { font-size: 1.2rem; margin: 8px 0 4px; }
  .detail-head, .panel { padding: 10px; margin: 8px 0; }
  .row2 { grid-template-columns: 1fr; }
  .badge.big { width: 34px; height: 34px; min-width: 34px; }
}


/* ====================================== v2.9: collapsed detail bubbles */
details.act > summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.act > summary::-webkit-details-marker { display: none; }
details.act > summary::after { content: "+"; color: var(--action); font-size: 1.3rem; }
details.act[open] > summary::after { content: "\2212"; }
details.act[open] > summary { margin-bottom: 10px; }
details.act { padding: 12px 14px; }
.notes-peek { white-space: pre-wrap; color: var(--ink); border-top: 1px solid var(--line); padding-top: 7px; margin-top: 9px; font-size: 0.95rem; }
@media (max-width: 640px) {
  details.act { padding: 10px 12px; }
  details.act > summary { font-size: 1rem; }
  .detail-head .sub { font-size: 0.9rem; }
  /* paired short fields stay side by side inside forms */
  .carform .row2 { grid-template-columns: 1fr 1fr; gap: 8px; }
}


/* ============================== v3.0: top action bar + contact ways */
.actionbar { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.actionbar .btn { flex: 1 1 auto; text-align: center; }
.act-panel { margin-top: 0; }
.contact-ways { display: flex; gap: 8px; margin-bottom: 12px; }
.contact-ways .btn { flex: 1 1 auto; text-align: center; }
@media (max-width: 640px) {
  .actionbar { gap: 6px; margin: 8px 0; }
  .actionbar .btn { padding: 10px 8px; font-size: 0.92rem; }
}

#text-box { min-height: 80px; }

.summary { white-space: pre-wrap; margin: 0 0 6px; }
details.act.inner { padding: 8px 0 0; border: 0; background: none; margin: 6px 0 0; }
details.act.inner > summary { font-size: 0.98rem; color: var(--action); }


/* ================================ v3.5: days-here, slim top, footer nav */
.topbar { justify-content: space-between; align-items: center; }
.topbar-checkin { padding: 9px 14px; font-size: 0.95rem; }
.days-here {
  position: absolute;
  top: 10px;
  right: 10px;
  text-align: center;
  line-height: 1.05;
  color: var(--ink);
}
.days-here b { font-size: 1.6rem; font-weight: 800; display: block; }
.days-here small { font-size: 0.62rem; color: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.car > a { padding-top: 10px; }
.car .car-line1 .vehicle { padding-right: 70px; }
.car .car-line2:first-of-type { padding-right: 70px; }
.bottombar {
  border-top: 1px solid var(--line);
  background: var(--card);
  margin-top: 30px;
  padding: 14px 16px 22px;
}
.bottombar nav { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 780px; margin: 0 auto; }
.bottombar nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.bottombar nav a:hover { color: #fff; }
label.check { font-weight: 400; font-size: 0.95rem; }
label.check input { width: auto; }
@media (max-width: 640px) {
  .topbar { overflow-x: visible; }
  .topbar-checkin { padding: 7px 11px; font-size: 0.88rem; white-space: nowrap; }
  .days-here { top: 8px; right: 8px; }
  .days-here b { font-size: 1.35rem; }
  .car .car-line1 .vehicle, .car .car-line2:first-of-type { padding-right: 58px; }
}


/* ============================== v3.9: customer replies scream */
.car.reply {
  border-left-color: var(--action);
  border-color: var(--action);
  background: #14202e;
}
.reply-banner {
  background: var(--action);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin: -10px -14px 8px;
  padding: 7px 14px;
  border-radius: 0;
}
.count.reply-chip { color: #fff; background: var(--action); border-color: var(--action); font-weight: 700; }
@media (max-width: 640px) {
  .reply-banner { margin: -8px -10px 6px; padding: 6px 10px; font-size: 0.88rem; }
}


/* ============================== v4.0: text thread view */
.thread-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.thread-head h1 { margin: 0; font-size: 1.2rem; }
.thread { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 90px; }
.bubble-row { display: flex; }
.bubble-row.in { justify-content: flex-start; }
.bubble-row.out { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; display: grid; gap: 2px; }
.bubble-row.in .bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-row.out .bubble { background: var(--action); color: #fff; border-bottom-right-radius: 4px; }
.bubble-msg { white-space: pre-wrap; }
.bubble-meta { font-size: 0.72rem; opacity: 0.75; }
.thread-compose {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  max-width: 780px;
  margin: 0 auto;
}
.thread-compose textarea { flex: 1; resize: none; overflow: hidden; min-height: 52px; }
body:has(.thread-compose) .bottombar { display: none; }


/* v4.1: hyphenated phones everywhere (filter-side); loud exit from thread */
.details-btn {
  background: var(--amber);
  border-color: var(--amber);
  color: #1a1a1a;
  font-weight: 800;
  padding: 11px 16px;
  white-space: nowrap;
}
.details-btn:active { filter: brightness(0.9); }


/* v4.3: dressed-up close-out */
.btn.done.closeout {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  padding: 15px 18px;
  border-radius: 10px;
  letter-spacing: 0.01em;
}


/* v4.7: fresh-sale chip */
.sold-chip {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--field);
  color: var(--muted);
  border: 1px solid var(--line);
}
.sold-chip.hot { background: var(--amber); color: #1a1a1a; border-color: var(--amber); }


/* v4.7: fresh-sale priority */
.sold-chip {
  background: var(--green);
  color: #0e1621;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
  margin-right: 8px;
  white-space: nowrap;
}
.sold-chip.old { background: none; color: var(--green); border: 1px solid var(--green); font-weight: 700; }
label.attention { color: var(--amber); }
label.attention input { border-color: var(--amber); }
label.attention::after { content: " \2190 sold car: enter the sale date"; font-size: 0.82rem; color: var(--amber); }


/* v8.36: show/hide eye inside the password box (replaces the Show password row) */
.pwwrap { position: relative; display: block; }
.pwwrap input { width: 100%; padding-right: 56px; box-sizing: border-box; }
.pwwrap .eye {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 52px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 0; border-radius: 0 8px 8px 0;
}
.pwwrap .eye:active { color: var(--ink); }
.pwwrap .eye .eye-shut { display: none; }
.pwwrap .eye[aria-pressed="true"] .eye-open { display: none; }
.pwwrap .eye[aria-pressed="true"] .eye-shut { display: block; }
.pwwrap .eye[aria-pressed="true"] { color: var(--amber); }
.forgot-link { text-align: center; display: block; padding: 12px; font-size: 1rem; color: var(--muted); text-decoration: underline; }
.code-box { font-size: 1.6rem; letter-spacing: 0.3em; text-align: center; }
.username-big { font-size: 1.3rem; }
.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  margin-top: 2px;
}


/* v5.3: submit spinner + locked button */
button.is-loading { opacity: 0.75; cursor: default; }
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* v5.4: ID scanner */
.scan-box {
  background: var(--card);
  border: 1px solid var(--action);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.scan-title { font-weight: 700; margin: 0 0 4px; }
.scan-status { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--muted); }


/* v5.6: close-out screen + closed-car summaries */
.closed-summary { margin: 8px 0 0; font-size: 0.92rem; color: var(--ink); white-space: pre-wrap; }
.contactform .btn + .btn { margin-top: 4px; text-align: center; }


/* v5.7: quick move + mark-handled */
.move-row { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 0 0 10px; }
/* v7.3.1: location on one line */
.move-line { display: flex; align-items: center; gap: 8px; }
.move-line .move-lbl { display: inline; font-weight: 600; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.move-line select { flex: 1; min-width: 0; padding: 7px 10px; font-size: 0.95rem; }
.move-line .btn { flex: none; padding: 7px 12px; font-size: 0.9rem; }
.move-row .hint { margin: 2px 0; }
.handled-row { display: flex; gap: 8px; margin: 0 0 10px; }
.handled-row input { flex: 1; }
.handled-row .btn { white-space: nowrap; padding: 10px 12px; font-size: 0.92rem; }
@media (max-width: 640px) { .handled-row { flex-direction: column; } .handled-row .btn { width: 100%; } }


/* v5.9: required off-site fields light up */
.row2.attention label { color: var(--amber); }
.row2.attention input { border-color: var(--amber); }


/* v6.2: print sheet button */
.actionbar .print-btn { flex: 0 0 auto; }

.deal-hit { display: block; width: 100%; text-align: left; margin-top: 6px; }
#deal-results .hint { margin-top: 6px; }
#deal-q { width: 100%; }

/* v6.9: deal enrichment */
.deal-box { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.deal-box h2 { margin-top: 0; }
.deal-late, .deal-box .reason { color: #c00008; font-weight: 700; }
.deal-doc, .doc-flag { color: var(--amber, #b47c00); font-weight: 600; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.badge-late { background: #c00008; color: #fff; }
.badge-docs { background: #E8B84B; color: #40300a; }


/* ============================== v7.0: next step, one per car */
.count.mymove-chip { color: #1a1a1a; background: var(--amber); border-color: var(--amber); font-weight: 800; }
.car.minemove { border-left-color: var(--amber); border-color: var(--amber); }
.mymove-banner {
  background: var(--amber);
  color: #1a1a1a;
  font-weight: 800;
  font-size: 0.95rem;
  margin: -10px -14px 8px;
  padding: 7px 14px;
  border-radius: 0;
}
.car.reply .mymove-banner { margin-top: 0; }
.nextstep { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.nextstep .who, .nextstep-head .who { color: var(--amber); font-weight: 700; white-space: nowrap; }
.nextstep-head { font-weight: 600; }
.mymove-chip-sm {
  background: var(--amber);
  color: #1a1a1a;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  margin-right: 6px;
  white-space: nowrap;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .mymove-banner { margin: -8px -10px 6px; padding: 6px 10px; font-size: 0.88rem; }
  .car.reply .mymove-banner { margin-top: 0; }
}


/* ============================== v7.1: shorter check-in form */
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row4 { display: grid; grid-template-columns: 90px 1fr 1fr 110px; gap: 10px; }
@media (max-width: 640px) {
  .row3 { grid-template-columns: 1fr 1fr; }
  .row4 { grid-template-columns: 80px 1fr; }
}
.btn.addcontact {
  padding: 6px 10px;
  font-size: 0.85rem;
  margin: -4px 0 8px;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--line);
}
.btn.addcontact:hover { color: #fff; }


/* ============================== v7.3: Warranty / VSC box */
.vsc-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.vsc-box h2 { margin-top: 0; }
.vsc-card { border-left: 4px solid var(--line); background: var(--field); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.vsc-card.vsc-active { border-left-color: var(--green); }
.vsc-card.vsc-cancelled, .vsc-card.vsc-expired { border-left-color: var(--muted); opacity: 0.8; }
.vsc-card.vsc-not-in-portal { border-left-color: var(--red); }
.vsc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vsc-chip { font-size: 0.75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--line); color: var(--ink); }
.vsc-chip-active { background: var(--green); color: #0e1621; }
.vsc-chip-cancelled, .vsc-chip-expired { background: #3a4452; color: #c9d3dd; }
.vsc-chip-not-in-portal { background: #c0392b; color: #fff; }
.vsc-line { margin: 5px 0; }
.vsc-remit { margin: 6px 0; font-weight: 700; }
.vsc-remit.ok { color: var(--green); }
.vsc-remit.due { color: var(--amber); }
.vsc-remit.late { color: var(--red); }
.vsc-remit.unknown { color: var(--muted); font-weight: 600; }
.vsc-claim { margin: 6px 0; padding: 6px 10px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font-weight: 800; }
.vsc-note { color: var(--amber); font-weight: 600; }
.vsc-stale { color: var(--amber); }
.vsc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 2px; }
.vsc-actions form.inline { display: inline-flex; }
.vsc-form { display: grid; gap: 10px; margin-top: 10px; }

/* v7.4: loaner tracking */
.loaner-wait { color: #b45309; font-weight: 700; }
.loaner-wait-text { color: #b45309; }
.loaner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* v8.16: every row is its own shaded box. Only a row that IS a link gets the
   box on the link; links inside a row are plain links again. */
.loaner-list > li > a,
.loaner-list > li > div { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.loaner-list > li > a { display: grid; gap: 2px; text-decoration: none; color: inherit; }
.loaner-list > li > div a { color: var(--action); }
.loaner-list { gap: 10px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: "Hide"; color: var(--action); font-size: 0.9rem; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; flex: none; }
details.fold:not([open]) > summary::after { content: "Show"; }
details.fold[open] > summary { margin-bottom: 10px; }
.loaner-list .loaner-car { font-weight: 700; }
#loaner-which { flex: 1; min-width: 0; padding: 7px 10px; font-size: 0.95rem; }


/* v7.9: live camera scanner with card frame */
.scan-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.scan-btns .btn { flex: 1 1 160px; }
input.scan-filled { border-color: var(--green); }
body.cam-open { overflow: hidden; }
.cam-overlay { position: fixed; inset: 0; z-index: 9999; background: #000; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame {
  position: absolute;
  border: 3px solid #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.cam-top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
}
.cam-cancel, .cam-alt {
  background: rgba(0, 0, 0, 0.55); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px; padding: 8px 14px; font-size: 1rem;
}
.cam-tip {
  position: absolute; left: 16px; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 62px);
  margin: 0; color: #fff; text-align: center; font-size: 1.05rem; font-weight: 600;
}
.cam-shutter {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  width: 76px; height: 76px; margin-left: -38px; border-radius: 50%;
  background: #fff; border: 5px solid rgba(255, 255, 255, 0.45); background-clip: padding-box;
}
.cam-shutter:active { transform: scale(0.94); }


/* ============================== v8.4: loaner desk fixes */
/* license row: the number gets the room, state is two letters */
.rowdl { display: grid; grid-template-columns: 1.7fr 70px 1fr 1fr; gap: 10px; }
.rowdl label { min-width: 0; }
@media (max-width: 640px) {
  .rowdl { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .rowdl label:nth-child(1) { grid-column: span 4; }
  .rowdl label:nth-child(2) { grid-column: span 2; }
  .rowdl label:nth-child(3), .rowdl label:nth-child(4) { grid-column: span 3; }
}
label.check input[type=checkbox] { width: 22px; height: 22px; padding: 0; flex: none; }
label.override-line { display: flex; gap: 10px; align-items: flex-start; justify-content: flex-start; }
.dash-read { border-left: 4px solid var(--green, #4fae4e); padding: 8px 12px; margin: 10px 0; background: var(--field); border-radius: 8px; }
.dash-read.bad { border-left-color: var(--red); }
.dash-read p { margin: 2px 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ============================== v8.5: deposit card box */
fieldset.dep-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; display: grid; gap: 12px; min-width: 0; }
fieldset.dep-box legend { font-weight: 700; padding: 0 6px; }
#dep-card { display: grid; gap: 12px; }
#dep-rel-wrap { color: var(--amber); }

/* ============================== v8.6: loaner line + license picture */
.loaner-line { flex-wrap: wrap; gap: 8px; }
.loaner-line form { display: inline; margin: 0; }
.loaner-line .loaner-now { font-weight: 700; margin-right: auto; }
.loaner-line .loaner-now.muted { color: var(--muted); font-weight: 600; }
.loaner-line .btn { padding: 8px 12px; font-size: 0.92rem; }
.id-thumb { float: right; margin: 0 64px 6px 12px; display: block; }
.id-thumb img { width: 150px; height: 95px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
@media (max-width: 640px) {
  .id-thumb { margin-right: 0; }
  .id-thumb img { width: 104px; height: 66px; }
  .loaner-line .loaner-now { flex-basis: 100%; }
}

/* ============================== v8.7: car page cleanup */
.head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.head-car { min-width: 0; }
.head-cust { display: flex; align-items: flex-start; gap: 12px; text-align: right; flex: none; max-width: 55%; }
.head-cust-text { display: grid; gap: 2px; min-width: 0; }
.cust-name { font-size: 1.15rem; font-weight: 700; }
.cust-phone { font-size: 1.1rem; font-weight: 600; }
.cust-more { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.head-cust .id-thumb { float: none; margin: 0; }
.head-cust .id-thumb img { width: 120px; height: 76px; }
.nextstep-box { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.nextstep-box p { margin: 0; }
.nextstep-by { color: var(--muted); font-size: 0.88rem; margin-top: 2px !important; }
.whatsup { margin-bottom: 0; }
.whatsup h2 { margin: 0 0 6px; }
.whatsup .summary { font-size: 1.02rem; line-height: 1.45; }
.act-btn.on { outline: 2px solid var(--action); outline-offset: 1px; }
.act-panel h2 { margin: 0 0 8px; }
.where-rows { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin: 0 0 10px; }   /* v8.41: both boxes the same height */
.where-rows .move-row { align-content: start; }
/* v8.41: the Print panel's two choices, big enough for a thumb */
.print-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.print-choices .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; min-height: 56px; }
.print-choices .btn small { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.where-rows .move-row { margin: 0; }
.where-rows form.move-row { flex: 0 0 auto; max-width: 100%; }
.where-rows form.move-row select { flex: 0 0 auto; width: auto; }
.where-rows form.move-row.wide { flex-basis: 100%; }
.where-rows .loaner-row { flex: 1 1 260px; }
/* v8.37: both strips are dropdowns, same height, no Save buttons */
.where-rows .move-row, .where-rows form.move-row { flex: 1 1 260px; }
.where-rows form.move-row select, .loaner-line select { flex: 1; width: auto; min-width: 0; }
.where-rows form.move-row.wide { flex-basis: 100%; }
.loaner-why { display: flex; gap: 8px; margin-top: 6px; }
.loaner-why input { flex: 1; }
.loaner-why .btn { white-space: nowrap; }
.loaner-no-text { color: var(--amber); }
#move-off .btn { align-self: end; }
@media (max-width: 640px) {
  .head-top { flex-direction: column; gap: 6px; }
  .head-cust { text-align: left; max-width: 100%; width: 100%; justify-content: space-between; }
  .head-cust .id-thumb img { width: 96px; height: 61px; }
  .where-rows form.move-row { flex-basis: 100%; }
  .where-rows form.move-row select { flex: 1; }
}

/* v8.7: room for the days-here counter in the car page's top right corner */
.detail-head .head-top { padding-right: 84px; }
@media (max-width: 640px) {
  .detail-head .head-top { padding-right: 0; }
  .detail-head .head-car { padding-right: 70px; }
}

/* ============================== v8.8: text thread: pinned header, pictures, PDFs */
.thread-head { position: sticky; top: 0; z-index: 20; background: var(--bg); margin: 0 0 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bubble { min-width: 0; }
.bubble-msg, .bubble-file { overflow-wrap: anywhere; }
.thread-who { min-width: 0; }
.thread-who h1, .thread-who .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.thread-nav { display: flex; gap: 8px; flex: none; }
.thread-nav .btn { padding: 10px 14px; white-space: nowrap; }
.thread-compose { flex-direction: column; gap: 6px; z-index: 20; }
.compose-line { display: flex; gap: 8px; align-items: flex-end; }
.compose-line textarea { flex: 1; resize: none; overflow: hidden; min-height: 52px; }
.attach-btn { display: flex; align-items: center; gap: 6px; padding: 12px; cursor: pointer; white-space: nowrap; font-size: 0.9rem; }
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attach-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 4px 30px 4px 6px; font-size: 0.85rem; max-width: 100%; }
.attach-chip img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.attach-chip button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.attach-note { flex-basis: 100%; font-size: 0.8rem; color: var(--muted); }
.bubble-pic { display: block; }
.bubble-pic img { display: block; max-width: 100%; width: 260px; max-height: 320px; object-fit: cover; border-radius: 10px; }
.bubble-pic.broken::after { content: "Picture still coming in. Tap to try again."; font-size: 0.85rem; text-decoration: underline; }
.bubble-file { display: block; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.22); color: inherit; font-weight: 600; font-size: 0.92rem; }
.bubble-row.out .bubble a { color: #fff; }
@media (max-width: 640px) {
  .attach-word { display: none; }
  .thread-nav .btn { padding: 9px 10px; font-size: 0.9rem; }
  .thread-head h1 { font-size: 1.05rem; }
}

/* ============================== v8.9: live "new text" notices, attach on the car page */
#thread-new, #car-new-text { margin: 0 0 8px; text-align: center; text-decoration: none; }
.board-new { position: fixed; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 30; width: auto; max-width: 92%; padding: 12px 18px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.contactform .attach-btn { padding: 10px 12px; }
#thread-new[hidden], #car-new-text[hidden], #board-new[hidden], .attach-row[hidden] { display: none; }

/* ============================== v8.14: Verify license with Washington DOL */
.dlv-line { margin: 2px 0 10px; color: var(--muted); }
.dlv-line.dlv-ok { color: var(--green); font-weight: 700; }
.dlv-line.dlv-bad { color: var(--red); font-weight: 700; }
.dlv-modal[hidden] { display: none; }
.dlv-modal {
  position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto;
}
.dlv-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  width: 100%; max-width: 520px; padding: 18px 18px 16px;
}
.dlv-card h2 { margin: 0 0 14px; font-size: 1.2rem; }
.dlv-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px;
}
.dlv-lb { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; }
.dlv-val { font-size: 1.45rem; letter-spacing: 0.03em; overflow-wrap: anywhere; user-select: all; }
.dlv-note { min-height: 1.3em; margin: 0 0 8px; color: var(--amber); font-size: 0.95rem; }
.btn.dlv-wide { display: block; width: 100%; text-align: center; margin: 4px 0 8px; }
.btn.dlv-nobtn { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.dlv-card .scan-title { margin-top: 12px; }

/* ============================== v8.15: back-of-card pictures */
.scan-btns.scan-extra { margin-top: 8px; }
.scan-btns.scan-extra .btn { flex: 0 1 auto; color: var(--muted); }
.id-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 2px; }
.id-more a { display: grid; gap: 3px; justify-items: center; text-decoration: none; color: var(--muted); font-size: 0.8rem; }
.id-more img { width: 84px; height: 53px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* ============================== v8.17: one ID picture on its own screen */
.idview-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.idview-img { display: block; max-width: 100%; max-height: 78vh; border: 1px solid var(--line); border-radius: 10px; background: #000; }

/* v8.18: the agreement you came from the car page to check back in */
.loaner-list li.ag-row.ag-target { outline: 3px solid var(--action); outline-offset: 4px; border-radius: 10px; }

/* v8.22: header = Carson Ops + two big buttons (repair check-in, loaner out) */
.topbar-acts { display: flex; gap: 8px; }
.topbar-acts .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; overflow-x: visible; padding: 8px 10px 10px; gap: 6px; }
  .topbar .brand { flex-basis: 100%; font-size: 1.05rem; }
  .topbar-acts { flex-basis: 100%; }
  .topbar-acts .btn { flex: 1 1 0; min-height: 50px; font-size: 1rem; padding: 8px 6px; }
  /* count chips wrap instead of running off the screen */
  .board-head { flex-wrap: wrap; overflow-x: visible; }
  .counts { flex-wrap: wrap; }
}

/* v8.26: desktop header lines up with the board column, buttons full size */
@media (min-width: 641px) {
  .topbar {
    padding: 12px max(16px, calc((100% - 780px) / 2 + 14px));
    align-items: center;
  }
  .topbar .brand { font-size: 1.35rem; }
  .topbar-acts { gap: 10px; }
  .topbar-acts .btn { min-height: 52px; padding: 10px 24px; font-size: 1.1rem; }
}

/* v8.33: Verify insurance / Verify license (Grok Bot) */
.vfy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
@media (max-width: 560px) { .vfy-grid { grid-template-columns: 1fr; } }
.vfy-item { display: flex; flex-direction: column; gap: 8px; }
.btn.vfy-btn { width: 100%; min-height: 60px; font-size: 1.15rem; font-weight: 700; }
.btn.vfy-btn:disabled { opacity: 0.75; cursor: wait; }
.vfy-badge { display: flex; flex-direction: column; gap: 3px; min-height: 52px; padding: 10px 12px;
  border-radius: 10px; border: 2px solid var(--line); border-left-width: 8px;
  background: var(--field); color: var(--ink); text-decoration: none; }
a.vfy-badge:hover { filter: brightness(1.12); }
.vfy-text { font-weight: 700; line-height: 1.3; }
.vfy-meta { font-size: 0.85rem; color: var(--muted); }
.vfy-warn { font-weight: 700; color: var(--amber); }
.vfy-green { border-color: var(--green); background: #16291d; }
.vfy-amber { border-color: var(--amber); background: var(--amber-bg); }
.vfy-red { border-color: var(--red); background: var(--red-bg); }
.vfy-red .vfy-text { color: #ffb3ad; }
.vfy-gray { border-color: #6b7785; background: #1f2731; }
.vfy-pending { border-color: var(--action); border-style: dashed; }
.vfy-hint { margin: 8px 0 0; }
.btn.dlv-hand { width: 100%; min-height: 52px; }

/* v8.35: warranty line in the car header */
.detail-head .head-vsc a { color: var(--ink); text-decoration: none; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; }
.detail-head .head-vsc a:hover { text-decoration: underline; }
.vsc-chip-none { background: #3a4452; color: #c9d3dd; }
.vsc-chip-unknown { background: var(--amber); color: #0e1621; }
.vsc-box form.inline { margin: 8px 0 12px; }
.vsc-box form.inline .btn { min-height: 48px; }


/* v8.43: Recon tab */
.recon-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.recon-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-block; font-size: 0.82rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; vertical-align: middle; }
.chip-open { background: var(--amber); color: #1a1403; }
.chip-done { background: var(--action); color: #fff; }
.chip-loaner { background: #5b4a9c; color: #fff; font-size: 0.75rem; }
.chip-cat { background: var(--field); color: var(--ink); }
.chip-st { background: var(--line); color: var(--ink); }
.chip-st-open { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber); }
.chip-st-assigned { background: #1a2a3d; color: #7fb8f2; border: 1px solid var(--action); }
.chip-st-done { background: #16301f; color: var(--green); border: 1px solid var(--green); }
.chip-st-verified { background: var(--field); color: var(--muted); }
.recon-addbtn { min-height: 54px; display: flex; align-items: center; justify-content: center; margin: 10px 0 14px; font-size: 1.05rem; }
.recon-car-head { display: block; text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.recon-car-title { display: block; font-size: 1.18rem; font-weight: 800; }
.recon-car-sub { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.recon-car-clear { opacity: 0.7; }
.recon-items { list-style: none; margin: 0; padding: 0; }
.recon-item { border-top: 1px solid var(--line); padding: 10px 0; }
.recon-items .recon-item:first-child { border-top: 0; }
.panel.recon-item { border-left: 4px solid var(--amber); }
.panel.recon-item.st-assigned { border-left-color: var(--action); }
.panel.recon-item.st-done { border-left-color: var(--green); }
.panel.recon-item.st-verified { border-left-color: var(--line); opacity: 0.75; }
.recon-item-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.recon-note { margin: 4px 0; font-size: 1.05rem; white-space: pre-wrap; }
.recon-who { margin: 2px 0; color: var(--muted); font-size: 0.9rem; }
.recon-who-inline { color: var(--muted); font-size: 0.9rem; }
.recon-found { margin: 6px 0; padding: 8px 10px; background: var(--field); border-radius: 8px; }
.recon-vnote { margin: 6px 0; padding: 8px 10px; background: #1a2a3d; border-radius: 8px; }
.recon-car-acts { margin-top: 8px; }
.recon-acts { margin-top: 10px; display: grid; gap: 10px; }
.recon-assign { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.recon-fold summary { list-style: none; cursor: pointer; display: inline-block; }
.recon-fold summary::-webkit-details-marker { display: none; }
.recon-fold form { margin-top: 8px; }
.recon-edit { display: none; }
.recon-edit.open { display: block; }
.recon-match { text-align: left; margin-top: 8px; min-height: 54px; }
.recon-donebtn { min-height: 52px; font-size: 1.05rem; }
.recon-foot a { color: var(--action); }
#recon-q { margin-top: 10px; }

/* v8.53 remittance page */
.remit-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.remit-tabs .btn { min-height: 48px; }
.remit-all { margin: 4px 0 10px; }
.remit-row { border-left: 4px solid transparent; }
.remit-row.age-amber { border-left-color: var(--amber); }
.remit-row.age-red { border-left-color: var(--red); }
.remit-amt { margin-left: auto; font-weight: 800; font-size: 1.05rem; }
.remit-row .line1 { display: flex; align-items: center; gap: 10px; }
.chip-ok { background: var(--line); color: var(--ink, #e8ecf2); }
.chip-late { background: var(--red); color: #fff; }
.remit-row .btn-row { margin-top: 8px; }
.remit-row .btn-row .btn { min-height: 48px; padding: 10px 16px; }

/* v8.56 vendors page */
.vendor-card > summary { align-items: flex-start; }
.vendor-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.vendor-sub { flex-basis: 100%; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.vendor-card .btn.block { min-height: 52px; font-size: 1.05rem; }

/* v8.61 Mission Control */
.hub-navlink { color: var(--amber) !important; font-weight: 700; }
.hub-head { margin: 4px 0 12px; }
.hub-brand { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: 0.02em; margin: 6px 0 8px; }
.hub-brand::before { content: "◎ "; color: var(--amber); }
.hub-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.hub-tabs a { flex: 0 0 auto; padding: 10px 14px; min-height: 46px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; display: flex; align-items: center; }
.hub-tabs a.on { background: var(--action); border-color: var(--action); color: #fff; }
.hub-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.hub-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center;
  text-decoration: none; color: var(--ink); display: grid; }
.hub-tile b { font-size: 1.6rem; line-height: 1.1; }
.hub-tile span { font-size: 0.8rem; color: var(--muted); }
.hub-tile.bad { border-color: var(--red); } .hub-tile.bad b { color: var(--red); }
.hub-tile.warn { border-color: var(--amber); } .hub-tile.warn b { color: var(--amber); }
.hub-add { display: grid; gap: 10px; }
.hub-title-in { font-size: 1.15rem; min-height: 54px; width: 100%; }
.hub-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.hub-seg, .hub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-seg label, .hub-chip { display: block; font-weight: 600; }
.hub-seg input, .hub-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hub-seg span, .hub-chip span { display: flex; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line); cursor: pointer; }
.hub-seg input:checked + span, .hub-chip input:checked + span { background: var(--action); border-color: var(--action); color: #fff; }
.hub-seg input:focus-visible + span, .hub-chip input:focus-visible + span { outline: 2px solid #fff; }
.hub-pickbox:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hub-pickbox select { min-height: 52px; font-size: 1.05rem; }
.hub-more summary { cursor: pointer; color: var(--muted); padding: 8px 0; min-height: 44px; }
.hub-more[open] { display: grid; gap: 10px; }
.hub-big { min-height: 54px; font-size: 1.1rem; font-weight: 700; }
.hub-del { color: var(--red); border-color: var(--red); margin-top: 10px; }
.hub-count { color: var(--muted); font-weight: 400; }
.hub-task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.hub-task:first-of-type { border-top: 0; }
.hub-task.top .hub-task-title { color: var(--amber); }
.hub-task.done .hub-task-title { text-decoration: line-through; color: var(--muted); }
.hub-tick-f { margin: 0; }
.hub-tickbox { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--muted); background: transparent;
  color: var(--green); font-size: 1.5rem; font-weight: 800; cursor: pointer; flex: 0 0 48px; }
.hub-task.done .hub-tickbox { border-color: var(--green); }
.hub-task-body { flex: 1; text-decoration: none; color: var(--ink); display: grid; gap: 4px; min-height: 48px; }
.hub-task-title { font-weight: 600; }
.hub-task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.hub-proj { color: var(--muted); font-size: 0.85rem; }
.hub-links { margin-top: 10px; }
.hub-prow { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.hub-prow.panel { border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 8px; }
.hub-prow-name { font-weight: 700; }
.hub-prow-next { color: var(--muted); font-size: 0.95rem; }
.hub-group { margin: 16px 0 8px; color: var(--muted); }
.hub-vrow { display: grid; gap: 6px; text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.hub-search { display: grid; gap: 10px; }
.hub-search select { min-height: 50px; }
.hub-card h1 { margin-top: 0; }
.hub-dir { display: grid; gap: 8px; }
.hub-log { font-size: 0.9rem; color: var(--muted); margin: 4px 0; }
@media (max-width: 420px) { .hub-tile b { font-size: 1.3rem; } }

/* v8.62 Leads */
.lead-head { display: flex; align-items: center; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.lead-brand { font-weight: 700; font-size: 1.2rem; }
.lead-tabs a, .lead-seg a, .lead-seg button { display: inline-block; padding: 10px 14px; margin: 2px; border: 1px solid #2b3a4a; border-radius: 8px; color: inherit; background: transparent; text-decoration: none; font-size: 1rem; min-height: 44px; }
.lead-tabs a.on, .lead-seg a.on, .lead-seg button.on { background: var(--action); border-color: var(--action); color: #fff; }
.lead-seg { display: flex; flex-wrap: wrap; margin: 6px 0; }
.lead-banner { background: var(--red-bg); border-left: 4px solid var(--red); padding: 10px 12px; border-radius: 6px; }
.lead-add summary { font-weight: 700; font-size: 1.05rem; padding: 6px 0; cursor: pointer; }
.lead-add label, .panel label { display: block; margin: 8px 0; }
.lead-add input, .lead-add select, .lead-add textarea, .lead-filter input, .panel textarea, .panel select, .panel input[type=tel] { width: 100%; padding: 12px; font-size: 1rem; box-sizing: border-box; }
.lead-big { min-height: 48px; font-size: 1.05rem; margin-top: 8px; }
.lead-row { display: block; padding: 12px 4px; border-bottom: 1px solid #2b3a4a; color: inherit; text-decoration: none; }
.lead-line1 { display: flex; justify-content: space-between; gap: 8px; }
.lead-st { font-size: 0.85rem; padding: 2px 8px; border-radius: 10px; border: 1px solid #2b3a4a; white-space: nowrap; }
.lead-st.st-new { border-color: var(--action); color: var(--action); }
.lead-st.st-sold { border-color: var(--green); color: var(--green); }
.lead-st.st-lost { color: var(--muted); }
.lead-contact .btn { min-height: 48px; padding: 12px 16px; }
.lead-text { padding: 8px 0; border-bottom: 1px solid #2b3a4a; }
.tx-sent { color: var(--green); } .tx-failed { color: var(--red); } .tx-held { color: #e0a63a; }
.lead-log { margin: 6px 0; }
.lead-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.lead-check input { width: 24px; height: 24px; }
.lead-in { border-left: 3px solid var(--muted); padding-left: 8px; }
.lead-out { border-left: 3px solid var(--action); padding-left: 8px; }
.lead-check select { flex: 1; padding: 10px; font-size: 1rem; }
.lead-ab { padding: 10px 0; border-bottom: 1px solid #2b3a4a; }
.panel input[type=file] { width: 100%; padding: 12px 0; font-size: 1rem; }
.panel input[type=number], .panel input[name=name] { width: 100%; padding: 12px; font-size: 1rem; box-sizing: border-box; }
