/* Grab a Job — app reskin (2026-11-23): light gray-blue background, white
   rounded cards, dark navy text, bright blue accent. Phone-app feel in the
   spirit of the reference Oren picked. Legacy class names are kept so the
   team / tech / job-detail / map pages stay on the same system. */
/* Icon safety net (v13): inline SVG icons are sized by the component rules
   below; this global cap means a partially-loaded or stale stylesheet can
   never let an icon blow up across the page (the giant-slash failure). */
svg{max-width:32px;max-height:32px}
:root{
  --brand:#D8BE00;
  --brand-dark:#8A6D00;
  --bg:#FAF6E9;
  --surface:#ffffff;
  --surface-2:#F3EDD8;
  --text:#161616;
  --navy:#141414;
  --dim:#6E6752;
  --border:#E4DCBE;
  --accent:#8A6D00;
  --accent-soft:#F7EBC0;
  --green:#1d9e6c;
  --red:#d64541;
  --amber:#b97d10;
  --orange:#ff7a1a;
  --radius:20px;
  --radius-sm:14px;
  --shadow:0 2px 12px rgba(20,20,20,.08);
  --font-display:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-body:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--font-body);font-size:16px;line-height:1.45;
}
h1,h2,h3,.display{font-family:var(--font-display);letter-spacing:-0.02em}
h1,h2,h3{margin:0}
a{color:inherit}
.wrap{
  max-width:1100px;margin:0 auto;
  padding:16px 16px calc(118px + env(safe-area-inset-bottom));
}
@media (min-width:760px){ .wrap{padding-left:24px;padding-right:24px} }
.muted{color:var(--dim);font-size:.9rem}
.err{
  background:#fdecea;border:1px solid var(--red);color:var(--red);
  padding:10px 12px;border-radius:var(--radius-sm);margin:10px 0;font-weight:600;
}

/* ---------- app header (Analytics / Jobs / pages) ---------- */
.app-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:10px 2px 4px;
}
.app-head .date-line{font-size:13px;color:var(--dim);margin:0 0 2px}
.app-head h1{font-size:32px;font-weight:800;color:var(--navy);line-height:1.05}
.pill-link{
  display:inline-flex;align-items:center;gap:6px;flex-shrink:0;
  background:var(--accent-soft);color:var(--accent);
  font-weight:700;font-size:15px;text-decoration:none;
  padding:9px 14px;border-radius:12px;
}
.pill-link svg{width:17px;height:17px}
.foot-links{text-align:center;color:var(--dim);font-size:.9rem;margin:20px 0 4px}
.foot-links a{color:var(--accent);text-decoration:none;font-weight:600}

/* ---------- legacy top header (job detail / map / team) ---------- */
.topline{
  padding:18px 16px 6px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  max-width:1100px;margin:0 auto;
}
.topline .date-line{font-size:13px;color:var(--dim);margin:0 0 4px}
.topline h1{font-size:clamp(23px,6.7vw,34px);font-weight:800;line-height:1.05;color:var(--navy)}
.topline .head-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}

/* ---------- buttons ---------- */
button,.btn{
  display:inline-block;min-height:46px;padding:0 16px;border:0;border-radius:12px;
  background:var(--accent);color:#fff;
  font-weight:700;font-size:1rem;font-family:var(--font-body);cursor:pointer;
  text-decoration:none;text-align:center;line-height:1.2;
  transition:transform .06s ease,opacity .06s ease;
}
button:active,.btn:active{transform:translateY(1px);opacity:.92}
button svg,.btn svg{width:20px;height:20px;vertical-align:-4px;margin-right:6px}
button:disabled{opacity:.55;cursor:not-allowed;transform:none}
button.sm,.btn.sm{min-height:38px;padding:6px 12px;font-size:.85rem}
button.ghost,.btn.ghost{
  background:var(--surface);color:var(--navy);
  border:1px solid var(--border);font-weight:600;
}
button.danger,.btn.danger{background:var(--red);color:#fff}
button.gold-outline,.btn.gold-outline{
  background:transparent;color:var(--navy);
  border:2px solid var(--accent);font-weight:700;
}
form{margin:0}
.inline-form{display:inline}

/* ---------- forms ---------- */
label{display:block;margin:12px 0 5px;font-size:12px;font-weight:700;color:var(--dim);text-transform:uppercase;letter-spacing:.05em}
input,select,textarea{
  width:100%;padding:12px 13px;border-radius:12px;
  border:1px solid var(--border);background:#FAF6E9;color:var(--text);
  font-size:1rem;font-family:var(--font-body);
}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(47,107,255,.18);background:#fff;
}
textarea{min-height:70px;resize:vertical}
select{padding:10px 30px 10px 12px}
input[type="checkbox"]{width:21px;height:21px;accent-color:var(--accent)}
.primary-wide{width:100%;margin-top:10px}

/* address autocomplete dropdown (JS hooks: .addrwrap #addrSugg.sugg) */
.addrwrap{position:relative}
.sugg{
  position:absolute;left:0;right:0;top:100%;z-index:30;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-sm);margin-top:4px;
  max-height:240px;overflow:auto;box-shadow:0 12px 28px rgba(0,0,0,.16);
}
.sugg button{
  display:block;width:100%;text-align:left;background:none;border:0;
  border-bottom:1px solid var(--border);border-radius:0;
  padding:11px 12px;color:var(--text);font-size:.92rem;font-weight:400;min-height:0;
}
.sugg button:last-child{border-bottom:0}
.sugg button:active{background:var(--surface-2)}
.sugg .none{padding:10px 12px;color:var(--dim);font-size:.9rem}

/* ---------- generic card ---------- */
.card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:16px;margin:12px 0;box-shadow:var(--shadow);
}
.card h3{margin:0 0 8px;font-size:19px;font-weight:800;color:var(--navy)}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.row>*{flex:1 1 auto}
.form-card{margin-top:14px}

/* ---------- headings, chips ---------- */
.eyebrow{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}
.section-heading{padding:26px 0 16px}
.section-heading h2{font-size:clamp(24px,6vw,32px);font-weight:800;line-height:1.05;margin-top:4px;color:var(--navy)}
.section-heading .head-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.count-chip{
  background:var(--surface-2);color:var(--dim);
  border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700;white-space:nowrap;
}
.panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:22px 2px 10px;
}
.panel-head h2{font-size:20px;font-weight:800;color:var(--navy);display:flex;align-items:center;gap:8px}
.panel-head a{color:var(--accent);font-weight:600;font-size:.92rem;text-decoration:none}

/* ---------- stat cards (Analytics) ---------- */
.stat-scroll{
  display:flex;gap:12px;overflow-x:auto;padding:14px 2px 6px;
  scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
}
.stat-card{
  background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);
  border:1px solid var(--border);
  min-width:148px;flex:1 0 148px;scroll-snap-align:start;
  padding:18px 16px 14px;
  text-decoration:none;
}
.stat-num{font-size:36px;font-weight:800;color:var(--navy);line-height:1;font-variant-numeric:tabular-nums}
.stat-lbl{display:flex;align-items:center;gap:7px;margin-top:12px;font-weight:600;font-size:14px;color:var(--text);white-space:nowrap}
.chip-ic{
  width:26px;height:26px;border-radius:8px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;color:#fff;
}
.chip-ic svg{width:15px;height:15px}
.chip-orange{background:var(--orange)}
.chip-navy{background:#141414}
.chip-blue{background:var(--accent)}
.chip-gray{background:#A79E86}

/* ---------- alert banner card ---------- */
.alert-card{
  display:flex;align-items:center;gap:12px;text-decoration:none;
  background:#e3eaf6;border-radius:var(--radius);
  padding:20px 18px;margin:14px 0 4px;
}
.alert-title{font-size:21px;font-weight:800;color:var(--navy);line-height:1.2}
.alert-sub{color:#6E6752;font-size:15px;margin-top:5px;line-height:1.4}
.alert-chev{color:var(--navy);margin-left:auto;flex-shrink:0}
.alert-chev svg{width:22px;height:22px}

/* ---------- inline form message (e.g. cancel validation) ---------- */
.form-alert{
  background:#fdecec;border:1px solid #e0a0a0;color:#8a1f1f;
  border-radius:var(--radius);padding:14px 16px;margin:14px 0 4px;
  font-size:15px;font-weight:600;line-height:1.4;
}

/* ---------- filter chips ---------- */
.chip-row{display:flex;gap:9px;overflow-x:auto;padding:16px 2px 2px;-webkit-overflow-scrolling:touch}
.fchip{
  display:inline-flex;align-items:center;gap:7px;flex-shrink:0;
  min-height:44px;padding:0 18px;border-radius:13px;border:0;cursor:pointer;
  background:var(--surface);color:var(--dim);border:1px solid var(--border);
  font-size:15px;font-weight:600;box-shadow:none;
}
.fchip svg{width:17px;height:17px}
.fchip.active{background:var(--accent-soft);color:var(--navy);border-color:transparent;font-weight:700}
.fchip:active{transform:none;opacity:1}

/* ---------- big cards (Calls / Charges / Money Owed) ---------- */
.big-card{
  display:block;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow);
  padding:18px;margin:14px 0;text-decoration:none;color:inherit;
}
.big-card-head{
  display:flex;align-items:center;gap:8px;
  color:#5f7089;font-weight:800;font-size:15px;letter-spacing:.06em;
}
.big-card-head svg{width:19px;height:19px}
.big-num{font-size:40px;font-weight:800;color:var(--navy);line-height:1.1;margin-top:8px;font-variant-numeric:tabular-nums}
.big-sub{color:var(--dim);font-size:.92rem;margin:6px 0 0}
.big-rows{margin-top:12px;border-top:1px solid var(--border)}
.big-row{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 0 0;font-size:15px;color:var(--dim);
}
.big-row b{color:var(--navy);font-variant-numeric:tabular-nums}
.split-bar{height:9px;border-radius:99px;background:var(--surface-2);margin-top:14px;overflow:hidden}
.split-bar span{display:block;height:100%;background:var(--accent);border-radius:99px}
.hour-strip{display:flex;gap:3px;align-items:flex-end;height:86px;margin-top:14px}
.hour-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end}
.hour-bar{width:100%;max-width:22px;border-radius:5px;background:#e7edf6;min-height:8px}
.hour-bar.on{background:var(--accent-soft)}
.hour-col span{font-size:9px;color:var(--dim);height:12px;white-space:nowrap}

/* ---------- mini lists (menu-style rows) ---------- */
.mini-list{display:grid;gap:10px}
.mini-row{
  display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:13px 14px;box-shadow:var(--shadow);
}
.mini-row:active{background:var(--surface-2)}
.mini-time{font-size:14px;font-weight:800;color:var(--dim);min-width:58px}
.mini-ic{
  width:38px;height:38px;border-radius:11px;flex-shrink:0;
  background:var(--surface-2);color:var(--navy);
  display:flex;align-items:center;justify-content:center;
}
.mini-ic svg{width:19px;height:19px}
.mini-copy{flex:1;min-width:0;display:grid;gap:1px}
.mini-copy b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-copy span{font-size:12.5px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-amt{text-align:right;display:grid;gap:3px;justify-items:end}
.mini-amt b{font-variant-numeric:tabular-nums}
.mini-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* ---------- empty states ---------- */
.empty-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:22px 18px;text-align:center;margin:10px 0;
}
.empty-card h3{font-size:19px;font-weight:800;color:var(--navy);margin-bottom:4px}
.empty-card.big{padding:34px 20px}
.empty-card .tile{
  width:54px;height:54px;border-radius:14px;background:var(--accent-soft);color:var(--accent);
  display:inline-flex;align-items:center;justify-content:center;margin-bottom:10px;
}
.empty-card .tile svg{width:26px;height:26px}
.queue-empty{padding:26px 6px;text-align:center}
.queue-empty .tile{
  width:54px;height:54px;border-radius:14px;background:var(--accent-soft);color:var(--accent);
  display:inline-flex;align-items:center;justify-content:center;
}
.queue-empty .tile svg{width:26px;height:26px}
.queue-empty h3{font-size:21px;font-weight:800;margin:12px 0 6px;color:var(--navy)}

/* ---------- status pills ---------- */
.status,.st{
  display:inline-block;font-size:11px;font-weight:800;text-transform:uppercase;
  letter-spacing:.04em;border-radius:999px;padding:3px 8px;line-height:1.4;
  background:var(--surface-2);color:var(--dim);white-space:nowrap;
}
.st-new{background:var(--accent-soft);color:var(--accent)}
.st-grabbed{background:#e6eaf5;color:#141414}
.st-closed{background:var(--surface-2);color:var(--dim)}
.st-cancelled{background:#fbe9e8;color:var(--red)}
.st-openinv{background:#fdf0d5;color:var(--amber)}
.st-paid{background:#e2f4ec;color:var(--green)}
.st-urgent{background:#fbe9e8;color:var(--red)}
.st-dispatch{background:#F7EBC0;color:var(--accent)}
.st-ai{background:#e9e4fb;color:#5b4bc4}
.st-est-draft{background:var(--surface-2);color:var(--dim)}
.st-est-sent{background:#F7EBC0;color:var(--accent)}
.st-est-approved{background:#e2f4ec;color:var(--green)}
.st-est-declined{background:#fbe9e8;color:var(--red)}
.role-chip{
  display:inline-block;font-size:10px;font-weight:900;text-transform:uppercase;
  letter-spacing:.05em;border-radius:999px;padding:3px 8px;
  background:var(--surface-2);color:var(--dim);
}
.role-chip.office{background:var(--accent-soft);color:var(--accent)}
.cancel-card{border:1px solid rgba(214,69,65,.4)}
.cancel-btn{background:var(--red);color:#fff}
.job-row.is-cancelled{opacity:.75}

/* ---------- timers ---------- */
.timer{font-variant-numeric:tabular-nums;font-weight:800}
.frozen{font-variant-numeric:tabular-nums;color:var(--dim)}

/* ---------- search bar ---------- */
.job-search{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  min-height:50px;padding:0 12px;margin:12px 0 4px;box-shadow:var(--shadow);
  display:grid;grid-template-columns:20px 1fr 34px;align-items:center;gap:8px;
}
.job-search .sicon{color:var(--dim);display:flex}
.job-search .sicon svg{width:20px;height:20px}
.job-search input{border:0;background:transparent;padding:12px 0;font-size:16px}
.job-search input:focus{box-shadow:none;background:transparent}
.job-search input::placeholder{color:var(--dim)}
.job-search .clear{
  width:34px;height:34px;min-height:0;border-radius:50%;padding:0;
  background:var(--surface-2);color:var(--dim);
  display:flex;align-items:center;justify-content:center;
}
.job-search .clear svg{width:16px;height:16px}

/* ---------- job list / job rows ---------- */
.job-list{display:grid;gap:10px;grid-template-columns:1fr}
@media (min-width:760px){ .job-list{grid-template-columns:1fr 1fr} }
.job-row{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);
}
.job-row.is-urgent{border-color:rgba(214,69,65,.55)}
.job-main{
  display:grid;grid-template-columns:54px 1fr auto;gap:4px;
  padding:15px 14px 12px 12px;text-decoration:none;color:inherit;
}
.job-main:active{background:var(--surface-2)}
.job-time{font-size:14px;font-weight:800;color:var(--dim);padding-top:2px}
.job-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:2px}
.job-code{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--dim)}
.job-service{font-size:18px;font-weight:700;line-height:1.25;color:var(--navy)}
.job-facts{margin-top:4px;display:grid;gap:2px}
.fact{
  display:flex;align-items:center;gap:6px;
  font-size:12px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.fact svg{width:14px;height:14px;flex-shrink:0}
.job-chev{color:var(--dim);display:flex;align-items:flex-start;padding-top:4px}
.job-chev svg{width:18px;height:18px}
.live-timer{
  border-top:1px solid var(--border);
  background:#FBF3D3;
  padding:9px 14px;
  display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:baseline;
}
.live-timer.work{background:#eefaf4}
.lt-label{font-size:11px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:var(--dim)}
.lt-time{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;text-align:right;color:var(--navy)}
.lt-sub{grid-column:1/-1;font-size:12px;color:var(--dim)}
.lt-sub b{color:var(--text)}
.grab-strip{border-top:1px solid var(--border);margin:0}
.grab-strip button{
  width:100%;border-radius:0;min-height:46px;
  background:var(--accent);color:#fff;font-weight:700;
}
.closed-strip{
  border-top:1px solid var(--border);padding:9px 14px;
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  font-size:12px;color:var(--dim);
}
.closed-strip .amt{font-weight:800;color:var(--navy);font-size:15px;font-variant-numeric:tabular-nums}

/* ---------- intake (New Job page) ---------- */
.ai-intake{
  background:#FBF3D3;border:1px solid #d7e4ff;
  border-radius:var(--radius-sm);padding:14px;margin-bottom:6px;
}
.ai-badge{
  display:inline-block;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;
  color:var(--accent);margin-bottom:4px;
}
.ai-intake h3{font-size:19px;font-weight:800;margin:0 0 6px;color:var(--navy)}
.ai-command{
  background:var(--navy);color:#fff;
  border-radius:var(--radius);padding:16px;margin:14px 0;box-shadow:var(--shadow);
}
.ai-head{display:flex;align-items:center;gap:12px}
.ai-tile{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;
  background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.ai-tile svg{width:19px;height:19px}
.ai-eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.68}
.ai-headline{font-size:20px;font-weight:800;line-height:1.1;margin-top:2px}
.ai-command .ghost{margin-left:auto;color:inherit;border-color:rgba(255,255,255,.3);background:transparent;border-radius:10px;min-height:39px;font-size:12px;font-weight:700;flex-shrink:0}
.ai-body{font-size:13px;line-height:1.45;opacity:.8;margin:10px 0 0;max-width:68ch}
.ai-stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.ai-stat{border:1px solid rgba(255,255,255,.28);border-radius:10px;padding:8px 11px;font-size:12px}
.ai-stat b{display:block;font-size:20px;font-variant-numeric:tabular-nums}
.pulse-strip{
  display:grid;grid-template-columns:1fr 1fr 1fr;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  margin:14px 0;box-shadow:var(--shadow);overflow:hidden;
}
.pulse-strip .cell{padding:15px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.pulse-strip .cell + .cell{border-left:1px solid var(--border)}
.pulse-strip .lbl{font-size:12px;color:var(--dim)}
.pulse-strip .num{font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--navy)}
.drop-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px;margin:14px 0;box-shadow:var(--shadow);
}
.drop-card .primary-wide{width:100%;margin-top:10px}

/* ---------- bottom tab bar ---------- */
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:end;
  background:rgba(255,255,255,.97);
  border-top:1px solid var(--border);
  padding:6px 8px calc(7px + env(safe-area-inset-bottom));
  backdrop-filter:blur(8px);
}
.tab{
  border:0;background:none;border-radius:10px;
  min-height:52px;padding:4px 2px;margin:0;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:#A79E86;font-size:11px;font-weight:600;text-decoration:none;
}
.tab svg{width:21px;height:21px}
.tab:active{transform:none}
.tab.active{color:var(--navy);font-weight:800}
.tab-add{
  width:56px;height:56px;border-radius:16px;justify-self:center;
  background:var(--accent);color:#fff;text-decoration:none;
  display:flex;align-items:center;justify-content:center;
  transform:translateY(-14px);
  box-shadow:0 10px 22px rgba(0,0,0,.28);
}
.tab-add svg{width:26px;height:26px}
.tab-add:active{transform:translateY(-13px)}
@media (min-width:760px){
  .bottom-nav{
    left:50%;right:auto;transform:translateX(-50%);
    width:440px;bottom:12px;border:1px solid var(--border);border-radius:22px;
    box-shadow:0 14px 38px rgba(0,0,0,.18);
    padding:6px 8px;
  }
}

/* ---------- menu page ---------- */
.profile-head{
  display:flex;align-items:center;gap:14px;
  padding:18px 4px 16px;border-bottom:1px solid var(--border);
}
.avatar-lg{
  width:64px;height:64px;border-radius:50%;flex-shrink:0;
  background:#c9d3e2;color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:27px;font-weight:800;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.profile-copy{flex:1;min-width:0}
.profile-name{font-size:24px;font-weight:800;color:var(--accent);line-height:1.1}
.profile-sub{color:#6E6752;font-size:16px;margin-top:2px}
.profile-chev{color:var(--dim)}
.profile-chev svg{width:20px;height:20px}
.menu-list{margin-top:6px}
.menu-row{
  display:flex;align-items:center;gap:16px;width:100%;
  padding:17px 6px;border-bottom:1px solid var(--border);
  text-decoration:none;color:var(--text);background:none;text-align:left;
}
.menu-row:active{background:var(--surface)}
.menu-ic{color:var(--navy);display:flex;flex-shrink:0}
.menu-ic svg{width:24px;height:24px}
.menu-label{font-size:19px;flex:1}
.menu-badge{
  background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:13px;
  border-radius:999px;padding:4px 10px;font-variant-numeric:tabular-nums;
}
.menu-chev{color:#b7c2d4;display:flex}
.menu-chev svg{width:18px;height:18px}
.menu-row-form{margin:0}
button.menu-row{border:0;border-bottom:1px solid var(--border);border-radius:0;min-height:0;cursor:pointer;font-family:var(--font-body)}
button.menu-row:active{transform:none}
.menu-logout .menu-ic,.menu-logout .menu-label{color:var(--red)}

/* ---------- documents (estimate / invoice) ---------- */
.doc-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:20px 18px;margin:12px 0;
}
.doc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.doc-brand{font-size:24px;font-weight:800;color:var(--navy)}
.doc-sub{color:var(--dim);font-size:.9rem;margin-top:2px}
.doc-table{width:100%;border-collapse:collapse;margin-top:14px;font-size:.95rem}
.doc-table th{
  text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.06em;
  color:var(--dim);padding:8px 6px;border-bottom:2px solid var(--border);
}
.doc-table td{padding:9px 6px;border-bottom:1px solid var(--border)}
.doc-table .r{text-align:right;font-variant-numeric:tabular-nums}
.doc-table tfoot td{border-bottom:0;font-weight:800;color:var(--navy);font-size:1.05rem}
.item-row{display:flex;gap:8px;margin-bottom:8px}
.item-row input{margin:0}
.report-grid{display:grid;gap:0}
@media (min-width:760px){ .report-grid{grid-template-columns:1fr 1fr 1fr;gap:12px} }

/* ---------- login ---------- */
.login-wrap{max-width:430px;margin:6vh auto;padding:0 16px}
.login-panel{
  background:var(--surface);border:1px solid var(--border);
  border-radius:24px;
  box-shadow:0 20px 55px rgba(0,0,0,.16);
  padding:28px 22px;
}
.login-tile{
  width:54px;height:54px;border-radius:14px;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;margin-bottom:14px;
}
.login-tile svg{width:28px;height:28px}
.login-wrap h1{font-size:32px;font-weight:800;color:var(--navy)}
.login-wrap .eyebrow{margin-bottom:6px}

/* ---------- map ---------- */
.job-map{
  width:100%;height:min(56vh,470px);min-height:340px;
  border:1px solid var(--border);border-radius:var(--radius);margin:12px 0;
  background:var(--surface-2);
}
.stop-num{
  width:28px;height:28px;border-radius:50%;
  background:#F3B43A;color:#151816;
  border:3px solid #151816;
  font-weight:800;font-size:13px;
  display:flex;align-items:center;justify-content:center;
}
.stop-new{background:var(--brand);border-color:#8A6D00;color:#111}
.stop-grabbed{background:#23A35A;border-color:#0f5a30;color:#fff}
.stop-closed{background:#F2C230;border-color:#7a5c0e;color:#151816}
.stop-base{
  width:28px;height:28px;border-radius:50%;
  background:#151816;color:#F3B43A;
  border:3px solid #F3B43A;
  font-weight:800;font-size:13px;
  display:flex;align-items:center;justify-content:center;
}
.leaflet-popup-content{color:#111}
.leaflet-popup-content a{color:#0a58ca}
.location-list{margin-top:6px}
.loc-row{
  display:flex;align-items:center;gap:12px;
  padding:13px 6px;border-bottom:1px solid var(--border);
  text-decoration:none;color:inherit;
}
.loc-row:active{background:var(--surface)}
.pin-dot{
  width:11px;height:11px;border-radius:50%;flex-shrink:0;
  background:var(--accent);
  box-shadow:0 0 0 3px rgba(47,107,255,.22);
}
.pin-dot.unpinned{background:var(--dim);box-shadow:none}
.pin-dot.st-new{background:var(--brand);box-shadow:0 0 0 3px rgba(216,190,0,.3)}
.pin-dot.st-grabbed{background:#23A35A;box-shadow:0 0 0 3px rgba(35,163,90,.22)}
.pin-dot.st-closed{background:#F2C230;box-shadow:0 0 0 3px rgba(242,194,48,.25)}
.pin-dot.st-cancelled{background:#9aa3ad;box-shadow:0 0 0 3px rgba(154,163,173,.25)}
.map-legend{display:flex;gap:14px;flex-wrap:wrap;margin:10px 0 0;font-size:12px;color:var(--dim)}
.map-legend .key{display:inline-flex;align-items:center;gap:6px}
.map-legend .sw{width:11px;height:11px;border-radius:50%;flex-shrink:0}
.loc-copy{flex:1;min-width:0}
.loc-service{font-weight:700}
.loc-addr{font-size:12px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.loc-addr a{color:var(--dim)}

/* ---------- team ---------- */
.perm-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.perm-grid label{
  display:flex;gap:8px;align-items:center;margin:4px 0;
  color:var(--text);font-size:.92rem;font-weight:400;text-transform:none;letter-spacing:0;
}
.staffrow{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:12px 0;border-top:1px solid var(--border);flex-wrap:wrap;
}
.staff-main{display:flex;gap:12px;align-items:center;min-width:0}
.avatar{
  width:42px;height:42px;border-radius:50%;flex-shrink:0;
  background:var(--surface-2);color:var(--navy);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:18px;
}
.avatar.owner{background:var(--accent);color:#fff}
.staff-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.link-btn{
  background:none;border:0;min-height:0;padding:4px 2px;
  color:var(--dim);font-size:12px;font-weight:700;text-decoration:underline;
  text-underline-offset:3px;cursor:pointer;
}
.link-btn.danger{color:var(--red)}
/* a link-styled <button> must never inherit the filled button look */
button.link-btn{background:none !important;min-height:0;border-radius:0}
button.link-btn.danger{color:var(--red)}
.owed-row{flex-wrap:wrap}
.owed-row .mini-actions{
  width:100%;justify-content:flex-end;
  border-top:1px solid var(--border);padding-top:9px;margin-top:2px;
}
.link-btn:active{transform:none}
.staff-actions select{width:auto;min-width:110px}

/* ---------- job detail ---------- */
.detail-banner{
  background:var(--navy);color:#fff;
  border-radius:var(--radius);padding:18px;margin:14px 0;box-shadow:var(--shadow);
}
.detail-banner .status{margin-bottom:8px}
.detail-service{font-size:27px;font-weight:800;line-height:1.1}
.detail-vehicle{opacity:.68;margin-top:4px}
.timing-panel{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:14px;margin:12px 0;box-shadow:var(--shadow);
}
.timing-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;text-align:center}
.timing-grid .t-label{font-size:11px;font-weight:800;color:var(--dim);text-transform:uppercase;letter-spacing:.06em}
.timing-grid .t-val{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;margin-top:4px;color:var(--navy)}
.kv{display:grid;grid-template-columns:130px 1fr;gap:6px 10px;font-size:.95rem;margin:0}
.kv dt{
  font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:var(--dim);padding-top:3px;
}
.kv dd{margin:0;overflow-wrap:anywhere}
.quick-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:12px 0}
.qa-tile{
  border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);
  min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  font-size:11px;font-weight:700;color:var(--navy);text-decoration:none;box-shadow:var(--shadow);
}
.qa-tile svg{width:20px;height:20px}
.qa-tile:active{background:var(--surface-2)}
.wide-action{
  width:100%;min-height:49px;border-radius:12px;margin:8px 0;
  background:var(--surface-2);color:var(--text);
  display:flex;align-items:center;justify-content:space-between;padding:0 14px;
  font-weight:700;text-decoration:none;
}
.wide-action.accent{background:var(--accent);color:#fff}
.closeout-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:16px;margin:12px 0;box-shadow:var(--shadow);
}
.closeout-card h3{font-size:19px;font-weight:800;color:var(--navy);margin:0 0 8px}
.closeout-card .amount{font-size:24px;font-weight:800;color:var(--navy)}
.timeline{list-style:none;margin:8px 0;padding:0}
.timeline li{
  position:relative;padding:8px 0 8px 22px;
  border-top:1px solid var(--border);font-size:.92rem;
}
.timeline li::before{
  content:"";position:absolute;left:2px;top:14px;
  width:9px;height:9px;border-radius:50%;background:var(--accent);
  box-shadow:0 0 0 4px rgba(47,107,255,.16);
}
.timeline .t{color:var(--dim);font-size:.8rem}
.back-link{display:inline-block;margin:6px 0 2px;color:var(--accent);font-size:.92rem;text-decoration:none;font-weight:600}

/* ---------- misc ---------- */
.mt{margin-top:12px}
.spinner{
  width:44px;height:44px;border-radius:50%;margin:20px auto;
  border:4px solid var(--border);border-top-color:var(--accent);
  animation:spin .9s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .spinner{animation:none}
  html{scroll-behavior:auto}
}

/* ---------- print (estimates / invoices) ---------- */
@media print{
  body{background:#fff}
  .bottom-nav,.no-print,.tab-add,.topbar{display:none !important}
  .wrap{padding:0;max-width:none}
  .doc-card{border:0;box-shadow:none;border-radius:0}
}

/* Topbar (v12): back arrow + logo-home on every app page. */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:10px 14px 2px;max-width:880px;margin:0 auto;width:100%}
.topbar-back{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:999px;background:#fff;border:1px solid #E4DCBE;color:#141414;text-decoration:none;box-shadow:0 4px 12px rgba(0,0,0,.08)}
.topbar-back svg{width:20px;height:20px}
.topbar-logo{display:inline-flex;align-items:center;text-decoration:none}
.topbar-logo img{height:40px;width:auto;display:block;background:transparent;border-radius:0;box-shadow:none}
.topbar-sp{width:38px;height:38px}

/* Job notes carry David call records (summary + full transcript): keep line breaks */
.job-notes{white-space:pre-wrap;word-break:break-word}

/* v13: letterhead, documents, reports, sources, photos, checker */
.letterhead{display:flex;align-items:center;gap:14px;padding:6px 0 14px;border-bottom:2px solid #f2b705;margin-bottom:14px}
.letterhead-logo{width:min(300px,70%);height:auto;display:block;background:transparent}
.letterhead-name{font-size:22px;font-weight:800;color:#141414;line-height:1.1}
.letterhead-tag{font-size:13px;color:#6E6752}
.letterhead-contact{font-size:13px;color:#6E6752}
.st-source{background:#FBF3D3;color:#274b8f}
.st-est-done{background:#e6f7ec;color:#177245}
.st-est-paid{background:#e6f7ec;color:#177245}
.rep-tabs{display:flex;gap:8px;margin:10px 0 14px;flex-wrap:wrap}
.rep-tab{padding:8px 14px;border-radius:999px;background:#fff;border:1px solid #E4DCBE;color:#141414;text-decoration:none;font-weight:600}
.rep-tab.active{background:#141414;color:#fff;border-color:#141414}
.rep-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.rep-table{white-space:nowrap;font-size:13px}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}
.photo-grid img{width:100%;height:96px;object-fit:cover;border-radius:10px;display:block}
.check-card{border:1px solid #f2c94c}
.check-list{margin:8px 0;padding-left:18px}
.check-error{color:#b3261e}
.check-warn{color:#8a6d00}
.check-confirm{display:flex;gap:8px;align-items:center;margin-top:10px}

/* v13: service terms & disclosure small print at the bottom of every
   estimate/invoice, with the estimate signature block directly under it */
.doc-terms{margin-top:18px;padding-top:10px;border-top:1px solid var(--border);font-size:10.5px;line-height:1.45;color:#444}
.doc-terms-title{font-size:11px;font-weight:800;letter-spacing:.04em;margin:0 0 6px;color:#141414}
.doc-terms-list{margin:0;padding-left:16px}
.doc-terms-list li{margin:0 0 4px}
.sig-block{margin-top:16px}
.sig-note{font-size:11px;color:#141414;margin:0 0 14px}
.sig-row{display:flex;gap:24px;flex-wrap:wrap}
.sig-field{flex:3;min-width:200px}
.sig-field.sig-date{flex:1;min-width:110px}
.sig-line{display:block;border-bottom:1.5px solid #141414;height:26px}
.sig-label{display:block;font-size:10px;color:#6E6752;margin-top:4px}

/* v13 brand theme — Lock to Lock yellow/gold + black (sampled from the
   real logo). The top bar is brand yellow; the logo sits ON it as black
   artwork with a transparent background — no box, tile, border or block
   behind it anywhere. Primary actions are yellow with black text. */
.topbar{background:var(--brand);max-width:none;width:100%;padding:10px 14px;justify-content:flex-start;gap:10px;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.topbar-logo{display:inline-flex;align-items:center;text-decoration:none;background:transparent;border:0;box-shadow:none;padding:0}
.topbar-logo img{width:min(270px,62vw);height:auto;display:block;background:transparent;border-radius:0;box-shadow:none}
.topbar-back{background:#fff;border:1px solid rgba(0,0,0,.18);color:#111;box-shadow:none;margin-left:auto}
.topbar-sp{display:none}
button,.btn{background:var(--brand);color:#111;font-weight:700}
button.ghost,.btn.ghost{background:#fff;color:#111;border:2px solid #111}
.grab-strip button{background:var(--brand);color:#111}
.tab-add{background:var(--brand);color:#111;box-shadow:0 10px 22px rgba(0,0,0,.25)}
.tab.active{color:#111}
.tab.active svg{color:var(--brand-dark)}
.rep-tab.active{background:var(--brand);color:#111;border-color:var(--brand)}
.fchip.active{background:var(--brand);color:#111;border-color:var(--brand)}
.chip-navy{background:#141414}
.chip-blue{background:var(--brand)}
.st-source{background:#F7EBC0;color:#6b5600}
.stop-new{background:var(--brand);border-color:#8A6D00;color:#111}
.pin-dot.st-new{background:var(--brand);box-shadow:0 0 0 3px rgba(216,190,0,.3)}
.login-tile{background:var(--brand);color:#111}
.letterhead{border-bottom:2px solid var(--brand)}
a{color:inherit}
.foot-links a,.panel-head a{color:var(--brand-dark)}

/* --- v14: QR inventory cubes, item page, sticker sheets --- */
.items-toolbar{display:flex;flex-wrap:wrap;gap:.7rem;align-items:flex-start;justify-content:space-between}
.items-search{display:flex;gap:.45rem;flex:1 1 260px;max-width:420px;margin-left:auto}
.items-search input{flex:1;min-width:0}
.cube-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin:1rem 0}
@media (min-width:1100px){.cube-grid{grid-template-columns:repeat(5,1fr)}}
@media (max-width:640px){.cube-grid{grid-template-columns:repeat(2,1fr)}}
.cube{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.12rem;
  background:var(--panel,#fff);border:1px solid var(--line,#e3e3e3);border-radius:12px;
  padding:.5rem .3rem .55rem;text-decoration:none;color:inherit}
.cube:hover{border-color:var(--brand-dark,#8a6d00)}
.cube-qr svg{width:100%;height:auto;max-width:236px;display:block}
.cube-name{font-weight:700;font-size:.78rem;line-height:1.2}
.cube-sub{font-size:.66rem;color:var(--muted,#777);line-height:1.25;word-break:break-word}
.cube-price{font-weight:800;font-size:.85rem}
.cube-qty{font-size:.7rem;color:var(--muted,#777)}
.cube-qty.qty-low,.qty-low{color:#b3261e;font-weight:700}
.cube-low{font-size:.62rem;font-weight:800;color:#b3261e;text-transform:uppercase;letter-spacing:.04em}
.cube-low-stock{border-color:#e5a09b}
.pager{display:flex;align-items:center;gap:.8rem;justify-content:center;margin:.6rem 0 1.2rem;flex-wrap:wrap}
.item-qr-card{text-align:center}
.item-qr-big svg{width:236px;height:236px}
.alias-chip{display:inline-block;background:var(--brand);color:#111;border-radius:999px;
  padding:.08rem .5rem;font-size:.75rem;font-weight:600;margin:.1rem .1rem .1rem 0}
.stock-row{display:flex;gap:.6rem;align-items:stretch}
.stock-row form{display:flex}
.stock-set{flex:1;gap:.45rem}
.stock-set input{flex:1;text-align:center;font-size:1.1rem;font-weight:700}
.sticker-tools{max-width:640px}
.sticker-sheet{display:grid;grid-template-columns:repeat(8,1fr);gap:2mm;margin:0 0 6mm}
.sticker{border:1px dashed #bbb;border-radius:4px;padding:1.2mm .6mm;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:.4mm;overflow:hidden}
.sticker-qr svg{width:22mm;height:22mm;display:block}
.sticker-name{font-size:5.2pt;font-weight:700;line-height:1.15;max-height:2.3em;overflow:hidden}
.sticker-sub{font-size:4.6pt;color:#555}
@media print{
  .sticker-sheet{page-break-after:always;margin:0}
  .sticker-sheet:last-child{page-break-after:auto}
  .sticker{border-color:#ddd}
  .sticker-wrap{max-width:none;padding:0}
}

/* --- v15: wider items page, partial-payment forms, call log --- */
.items-wrap{max-width:1280px}
.owed-row{flex-wrap:wrap}
.pay-form{display:flex;flex-wrap:wrap;gap:.45rem;flex-basis:100%;margin-top:.4rem;align-items:center}
.pay-form input{flex:1 1 0;min-width:0}
.pay-form select{flex:1 1 0;min-width:0}
.pay-form button{flex:0 0 auto;white-space:nowrap}
/* --- v16: amount + method half-and-half in every record-payment form --- */
.pay-fields{display:flex;gap:.6rem}
.pay-fields>div{flex:1 1 0;min-width:0}

/* --- v17: UHS-style item page — stepper box, compatibility, description --- */
.cube-link{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.12rem;
  text-decoration:none;color:inherit;width:100%}
.stepper{display:inline-flex;align-items:stretch;border:1.5px solid var(--line,#d8d8d8);
  border-radius:12px;overflow:hidden;background:#fff;vertical-align:middle}
.stepper button{width:54px;min-height:48px;font-size:1.5rem;line-height:1;background:#f5f5f5;
  border:0;border-radius:0;cursor:pointer;color:#111;padding:0}
.stepper button:active{background:var(--brand,#ffd21f)}
.stepper button:disabled{opacity:.45}
.stepper-count{min-width:64px;display:flex;align-items:center;justify-content:center;
  font-size:1.25rem;font-weight:800;padding:.4rem .5rem}
.stepper-sm{margin-top:.35rem}
.stepper-sm button{width:40px;min-height:38px;font-size:1.15rem}
.stepper-sm .stepper-count{min-width:42px;font-size:1rem;padding:.2rem .3rem}
.fits-rows{margin-top:.3rem}
.fit-row{display:flex;gap:1rem;padding:.45rem 0;border-bottom:1px solid var(--line,#eee)}
.fit-row:last-child{border-bottom:0}
.fit-years{flex:0 0 104px;color:var(--muted,#666);font-variant-numeric:tabular-nums}
.fit-model{font-weight:600}
.item-desc{white-space:pre-line;line-height:1.45}
.sticker-one{border:1.5px dashed #bbb;border-radius:10px;padding:6mm 4mm;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:1.6mm;max-width:120mm;margin:0 auto}
.sticker-one-qr svg{width:84mm;height:84mm;display:block}
.sticker-one-name{font-size:15pt;font-weight:800;line-height:1.2}
.sticker-one-sub{font-size:10.5pt;color:#444}
@media print{
  .sticker-one{border-color:#ddd}
}
.call-filters{display:flex;flex-wrap:wrap;gap:.5rem;align-items:end;margin:.6rem 0 1rem}
.call-filters label{display:grid;gap:.2rem;font-size:.72rem;font-weight:700;color:var(--dim)}
.call-filters input,.call-filters select{min-width:0}
.call-filters .q-field{flex:1 1 200px}
.call-row{flex-wrap:wrap}
.call-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;text-decoration:none;color:inherit}
.call-detail{flex-basis:100%;margin-top:.35rem}
.call-detail summary{cursor:pointer;font-size:.8rem;font-weight:700;color:var(--brand-dark,#8a6d00)}
.call-detail pre{white-space:pre-wrap;word-break:break-word;font:inherit;font-size:.82rem;
  background:var(--surface-2,#f6f6f6);border-radius:8px;padding:.6rem;margin:.45rem 0 0;max-height:320px;overflow:auto}
.call-detail audio{width:100%;margin-top:.5rem}
