/* ServSPPro — modern business theme: white surfaces, charcoal text, navy frame, blue for action. */
:root {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --ink: #1F2937;
  --ink-2: #374151;
  --muted: #6B7280;
  --line: #E5E8EE;
  --line-2: #CBD2DB;
  --navy: #0B1E3B;
  --navy-2: #16305A;
  --teal: #2563EB;   /* the action color (was teal; name kept so every page follows) */
  --teal-2: #3B82F6;
  --teal-bg: #EAF1FE;
  --orange: #EA580C;
  --orange-2: #F97316;
  --red: #DC2626;
  --red-bg: #FDECEC;
  --amber: #B45309;
  --amber-bg: #FEF3E2;
  --green: #15803D;
  --green-bg: #E7F6EC;
  --blue: #1D4ED8;
  --blue-bg: #E8EEFD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 2px 8px rgba(15,23,42,.05);
  --shadow-lg: 0 16px 40px rgba(15,23,42,.14);
  --side: #0A1830;
  --side-2: #10264A;
  --head: 'Sora', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { background: #EEF1F5; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ic { flex: none; vertical-align: -3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none !important; }
.brand-name { font-family: var(--head); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--navy); }
.brand-name b { color: var(--teal); font-weight: 800; }
.brand-name i { font-style: normal; color: var(--orange); }
.brand-lg .brand-name { font-size: 1.7rem; }
.logo { display: block; }

/* ---------- Top bar + side nav ---------- */
.topbar { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 24px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; color: var(--navy); cursor: pointer; }
.co-chip { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 30%, white); }
.bell { position: relative; display: inline-flex; padding: 8px; border-radius: 10px; color: var(--ink-2); }
.bell:hover, .bell.on { background: var(--surface-2); text-decoration: none; }
.bell b { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: .8rem; }
.uname { font-weight: 600; font-size: .9rem; }
.usermenu-pop { position: absolute; right: 0; top: 50px; width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; }
.usermenu-pop > div { padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-pop a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.usermenu-pop a:hover { background: var(--surface-2); text-decoration: none; }

.shell { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidenav { width: 248px; flex: none; padding: 0 12px 16px; background: linear-gradient(180deg, var(--side-2) 0%, var(--side) 55%); position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 16px 8px 18px; margin: 0 -4px 6px; border-bottom: 1px solid rgba(255,255,255,.08); text-decoration: none !important; }
.side-brand .logo { filter: drop-shadow(0 0 0 1px rgba(255,255,255,.2)); }
.side-brand .brand-name { color: #fff; font-size: 1.3rem; }
.side-brand .brand-name b { color: #60A5FA; }
.side-brand small { flex-basis: 100%; padding-left: 44px; margin-top: -6px; color: #8FA3C0; font-size: .72rem; font-weight: 500; letter-spacing: .02em; }
.sidenav .nav-group a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 2px; border-radius: 10px; color: #C3D0E4; font-weight: 500; font-size: .92rem; }
.sidenav .nav-group a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidenav .nav-group a.on { background: linear-gradient(90deg, #2563EB, #3B82F6); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.35); }
.sidenav .nav-group a.dev { color: #FDBA74; }
.content { flex: 1; min-width: 0; width: 100%; padding: 24px 28px 0; max-width: 1360px; }
.top-brand { display: none !important; }
.site-foot { margin-top: 40px; padding: 20px 0 28px; border-top: 1px solid var(--line); text-align: center; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .85rem; margin: 0 0 6px; }
.legal-links a { color: var(--muted); }
.foot-line { color: var(--muted); gap: 4px 0; }
.foot-line > * + *::before { content: '·'; margin: 0 9px; color: var(--muted); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .uname, .co-chip { display: none; }
  .sidenav { position: fixed; top: 64px; left: 0; bottom: 0; height: auto; z-index: 39; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidenav .side-brand { display: none; }
  .sidenav .nav-group:first-of-type { padding-top: 12px; }
  body.nav-open .sidenav { transform: none; }
  .top-brand { display: inline-flex !important; }
  .content { padding: 18px 16px 0; }
}

/* ---------- Page heads, cards, grids ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; display: flex; gap: 8px; align-items: center; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid-main, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat b { display: block; font-family: var(--head); font-size: 1.6rem; color: var(--navy); margin-top: 2px; }
.stat.warn b { color: var(--red); }
.stat a { font-size: .85rem; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: #EEF1F5; color: var(--ink-2); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-teal { background: #E3F5F2; color: #0F766E; }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-gray { background: #EEF1F5; color: var(--muted); }
.tone-orange { background: #FFF1E6; color: var(--orange); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand, var(--teal)); flex: none; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 0 0 rgba(20,184,166,.6); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(20,184,166,0); } 100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); } }

/* ---------- Buttons + forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--teal); color: #fff; font-family: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2; text-align: center; vertical-align: middle; box-sizing: border-box; height: 40px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: #1D4ED8; }
.btn-orange { background: var(--orange); }
.btn-orange:hover { background: #C2410C; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { min-height: 32px; height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 8px; gap: 6px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer; }
.btn-link.danger { color: var(--red); }
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font: inherit; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--teal) 35%, transparent); border-color: var(--teal); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
input[readonly].plain { background: #fff; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
input[type=color] { width: 54px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.hint { color: var(--muted); font-size: .84rem; margin: 4px 0 12px; }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 12px; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 3px; }
.inline-form { display: inline; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.seg { height: 40px; vertical-align: middle; box-sizing: border-box; }
.seg a, .seg button, .seg label { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 100%; padding: 0 14px; font-family: inherit; font-weight: 600; font-size: .92rem; color: var(--ink-2); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg a + a, .seg button + button, .seg label + label { border-left: 1px solid var(--line-2); }
.seg .on, .seg input:checked + span { background: var(--navy); color: #fff; }
.seg a:hover { text-decoration: none; background: var(--surface-2); }
.seg a.on:hover { background: var(--navy); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.choice { position: relative; display: block; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--teal-bg); }
.choice b { display: flex; gap: 8px; align-items: center; color: var(--navy); }
.choice span { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* ---------- Alerts ---------- */
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-size: .93rem; }
.alert-success { background: var(--green-bg); border-color: #B7E4C7; color: #14532D; }
.alert-error { background: var(--red-bg); border-color: #F5C2C2; color: #7F1D1D; }
.alert-info { background: var(--blue-bg); border-color: #C7D5FA; color: #1E3A8A; }
.alert-warn { background: var(--amber-bg); border-color: #F7D9A8; color: #78350F; }

/* ---------- Tables + lists ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.low td { background: #FFF8F1; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .title { font-weight: 600; color: var(--ink); }
.rows .sub { font-size: .85rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .ic { color: var(--line-2); display: block; margin: 0 auto 8px; }

/* Visit cards */
.visit { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.visit:last-child { border-bottom: 0; }
.visit-date { width: 56px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 0; }
.visit-date small { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--orange); }
.visit-date b { display: block; font-family: var(--head); font-size: 1.3rem; color: var(--navy); line-height: 1.1; }
.visit-body { flex: 1; min-width: 0; }
.visit-body .title { font-weight: 600; }
.visit-body .sub { font-size: .87rem; color: var(--muted); }
.co-name { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }

/* Live tracking hero */
.track-hero { background: linear-gradient(135deg, var(--navy) 0%, #12406E 100%); color: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.track-hero h2 { color: #fff; margin: 0 0 4px; display: flex; gap: 10px; align-items: center; }
.track-hero p { margin: 0; color: #CFE0F3; }
.track-hero .eta { text-align: right; }
.track-hero .eta b { font-family: var(--head); font-size: 2.2rem; display: block; line-height: 1; color: #5EEAD4; }
.track-hero .eta small { color: #CFE0F3; }
.track-hero .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.map { height: 380px; border-radius: 12px; border: 1px solid var(--line); background: #E5EBF0; z-index: 0; }
.map.tall { height: 460px; }
.track-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.track-meta div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.track-meta small { display: block; color: var(--muted); font-size: .78rem; }
.track-meta b { font-size: 1rem; }
.truck-pin { background: var(--orange); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.35); display: grid !important; place-items: center; color: #fff; }
.home-pin { background: var(--navy); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.35); display: grid !important; place-items: center; color: #fff; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-h { background: var(--surface-2); padding: 8px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: center; }
.cal-d { background: #fff; min-height: 104px; padding: 6px; font-size: .8rem; }
.cal-d.out { background: #FAFBFC; color: #A0A8B4; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--teal); }
.cal-d .n { font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.cal-ev { display: block; padding: 3px 6px; border-radius: 6px; margin-bottom: 3px; font-size: .74rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--brand, #0F766E) 13%, white); color: color-mix(in srgb, var(--brand, #0F766E) 85%, black); border-left: 3px solid var(--brand, #0F766E); }
.cal-ev.personal { --brand: #64748B; }
.cal-ev.done { opacity: .6; }
@media (max-width: 700px) { .cal-d { min-height: 70px; padding: 3px; } .cal-ev { font-size: .65rem; padding: 2px 3px; } }

/* Master schedule */
.sched { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lane-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lane-head .grow { flex: 1; min-width: 0; }
.lane-head b { display: block; }
.job { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); border-left: 4px solid transparent; }
.job:last-child { border-bottom: 0; }
.job:hover { background: var(--surface-2); text-decoration: none; }
.job.st-completed { border-left-color: var(--green); opacity: .75; }
.job.st-en_route, .job.st-arrived, .job.st-in_progress { border-left-color: var(--teal-2); background: #F2FBFA; }
.job.st-reschedule { border-left-color: var(--red); }
.job.st-scheduled { border-left-color: var(--blue); }
.job .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .9rem; }
.job .s { font-size: .82rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 10px; overflow-x: auto; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-height: 200px; }
.week-day.today { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.week-day h3 { font-size: .85rem; padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.week-day .job { padding: 8px 10px; font-size: .8rem; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo span { position: absolute; left: 6px; top: 6px; }
.photo .file { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .8rem; text-align: center; padding: 8px; }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 16px; text-align: center; background: var(--surface-2); }

/* Company contact card */
.contact-card { display: flex; gap: 14px; align-items: flex-start; }
.co-logo { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--head); font-weight: 700; flex: none; background: var(--brand, var(--navy)); }
.contact-lines { list-style: none; padding: 0; margin: 8px 0 0; font-size: .9rem; }
.contact-lines li { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; color: var(--ink-2); }
.contact-lines .ic { color: var(--muted); }

/* Invoice document */
.invoice-doc { max-width: 820px; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 3px solid var(--brand, var(--navy)); padding-bottom: 16px; margin-bottom: 16px; }
.inv-top h2 { font-size: 1.4rem; margin: 0; }
.inv-total { display: flex; justify-content: flex-end; }
.inv-total table { min-width: 260px; }
.inv-total td { padding: 5px 12px; }
.inv-total tr.grand td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--line); color: var(--navy); }
.pay-box { background: var(--teal-bg); border: 1px solid #A7E3DB; border-radius: 12px; padding: 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media print { .topbar, .sidenav, .site-foot, .no-print, .alert { display: none !important; } .content { padding: 0; } .card { box-shadow: none; border: 0; } body { background: #fff; } }

/* Driver screen */
.driver-next { border: 2px solid var(--teal); }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.big-actions .btn { padding: 14px; font-size: 1rem; height: auto; }
.gps-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.gps-bar.on { background: var(--teal-bg); border-color: #A7E3DB; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 13px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::before { transform: translateX(20px); }

/* Alerts list */
.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif.unread .title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: 2px; }
.notif-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--teal); flex: none; }
.notif-ic.delay, .notif-ic.issue { color: var(--amber); background: var(--amber-bg); }
.notif-ic.reschedule { color: var(--red); background: var(--red-bg); }

/* Dialog */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(11,37,69,.45); }
dialog .dlg-body { padding: 20px 22px; }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
dialog .dlg-head h2 { margin: 0; }
.x { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; }

/* ---------- Signed-out pages ---------- */
.auth-body { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface); }
.auth-side { background: radial-gradient(circle at 20% 10%, #1B4B80 0%, var(--navy) 55%); color: #DCE7F5; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-side .brand-name { color: #fff; }
.auth-side h1 { color: #fff; font-size: 2.1rem; margin: 26px 0 12px; }
.auth-side ul { list-style: none; padding: 0; margin: 18px 0 0; }
.auth-side li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.auth-side li .ic { color: #5EEAD4; margin-top: 2px; }
.auth-side li b { color: #fff; display: block; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 20px; }
.auth-card .legal-links { justify-content: center; margin-top: 26px; }
.forgot-link { text-align: right; margin: -6px 0 14px; font-size: .88rem; }
.auth-mobile-brand { display: none; margin-bottom: 18px; }
@media (max-width: 860px) { .auth-body { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-mobile-brand { display: block; } }

.plain-body { background: var(--bg); }
.plain-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.plain-top .inner { max-width: 1000px; margin: 0 auto; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plain-wrap { max-width: 1000px; margin: 0 auto; padding: 24px 18px 40px; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs a { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .87rem; font-weight: 600; }
.subtabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.subtabs a:hover { text-decoration: none; }
.legal-doc h2 { margin-top: 1.4em; }
.legal-doc li { margin-bottom: 6px; }
.missing { background: var(--amber-bg); color: var(--amber); padding: 0 4px; border-radius: 4px; }

/* Mail preview on dev page */
details.mail { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface-2); }
details.mail summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
details.mail pre { white-space: pre-wrap; font-size: .83rem; background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Photo / file picker ---------- */
.picker, .field label.picker { position: relative; display: flex; margin: 0; font-weight: 400; align-items: center; gap: 14px; padding: 14px 16px; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; flex-wrap: wrap; }
.picker:hover, .picker:focus-within { border-color: var(--teal); background: var(--teal-bg); }
.picker input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.picker-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--teal); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 10px rgba(15,118,110,.25); }
.picker-text { flex: 1; min-width: 160px; }
.picker-title { display: block; font-weight: 700; color: var(--navy); }
.picker-sub { display: block; font-size: .83rem; color: var(--muted); }
.picker-btn { pointer-events: none; }
.picker-files { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.picker-files:empty { display: none; }
.picker-file { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 8px 3px 3px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: .78rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.picker-file img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; flex: none; }
.picker.has-files { border-style: solid; border-color: var(--teal); background: var(--teal-bg); }
.picker.compact { padding: 10px 12px; }
.picker.compact .picker-ic { width: 38px; height: 38px; }

/* ---------- Top search (customers) ---------- */
.topsearch { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(560px, calc(100% - 520px)); margin: 0; z-index: 45; }
.topsearch input[type=search] { padding: 9px 14px 9px 40px; border-radius: 12px; background: var(--surface-2); border-color: var(--line-2); }
.topsearch input[type=search]:focus { background: #fff; }
.topsearch > .ic { position: absolute; left: 14px; top: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
@media (max-width: 900px) { .topsearch { position: relative; left: auto; top: auto; transform: none; width: auto; flex: 1 1 auto; min-width: 0; } .topbar .brand-name { display: none; } }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 70vh; overflow-y: auto; min-width: 300px; }
.sg-head { padding: 8px 10px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sg-head span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sg-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.sg-row:hover, .sg-row.on { background: var(--teal-bg); text-decoration: none; }
.sg-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .75rem; flex: none; }
.sg-text { min-width: 0; }
.sg-text b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-text small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-empty { padding: 8px 10px; color: var(--muted); font-size: .88rem; }
.sg-others { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.sg-more { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .88rem; font-weight: 600; color: var(--teal); cursor: pointer; }
.sg-more:hover, .sg-more.on { background: var(--teal-bg); }
.sg-more em { margin-left: auto; font-style: normal; background: var(--teal); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .75rem; }
.sg-all { display: block; text-align: center; padding: 8px; margin-top: 4px; border-top: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.result-group { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.chip:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ---------- Booking time slots ---------- */
.slot-days { display: grid; gap: 10px; }
.slot-day { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.slot-day:last-child { border-bottom: 0; }
.slot-day > b { font-size: .88rem; color: var(--navy); padding-top: 6px; }
.slot-day > b small { display: block; color: var(--muted); font-weight: 500; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot, .field label.slot { position: relative; display: inline-block; margin: 0; font-weight: 600; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: inline-block; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.slot span small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.slot input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.slot input:checked + span small { color: #CCF3EE; }
.slot input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.slot.full span { background: var(--surface-2); color: #A0A8B4; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 560px) { .slot-day { grid-template-columns: 1fr; } }

/* ---------- Clickable stats, past due, plan ---------- */
a.stat { display: block; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { text-decoration: none; border-color: var(--teal); box-shadow: var(--shadow-lg); }
a.stat.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-bg); }
.card.danger-card { border-color: #F5C2C2; border-top: 4px solid var(--red); }
.card.danger-card .card-head h2 { color: var(--red); }
.plan-price { font-family: var(--head); font-size: 2.3rem; font-weight: 800; color: var(--navy); line-height: 1; }
.plan-price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; flex-wrap: wrap; font-size: .92rem; }
.plan-bar .grow { flex: 1; min-width: 200px; }
.plan-bar.trial { background: var(--blue-bg); border-color: #C7D5FA; color: #1E3A8A; }
.plan-bar.warn { background: var(--amber-bg); border-color: #F7D9A8; color: #78350F; }
.plan-bar.bad { background: var(--red-bg); border-color: #F5C2C2; color: #7F1D1D; }

/* ---------- Signatures ---------- */
.sig-pad { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 8px 10px 10px; }
.sig-label { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.sig-pad canvas { display: block; width: 100%; height: 150px; border-bottom: 2px solid var(--line-2); touch-action: none; cursor: crosshair; }
.sig-pad.inked canvas { border-bottom-color: var(--teal); }
.sig-img { max-width: 260px; max-height: 110px; display: block; border-bottom: 1px solid var(--line-2); }

/* ---------- Quotes ---------- */
.q-lines .q-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 110px 90px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.q-lines .q-row label { margin: 0; font-size: .78rem; font-weight: 600; display: flex; gap: 4px; align-items: center; color: var(--muted); }
.q-lines .q-head { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) { .q-lines .q-row { grid-template-columns: 1fr 70px 90px; } .q-lines .q-row > :nth-child(4), .q-lines .q-row > :nth-child(5) { grid-column: span 1; } }
.q-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-item .grow { flex: 1; min-width: 0; }
.q-item.optional { background: var(--surface-2); margin: 0 -12px; padding: 10px 12px; }
.q-total { display: flex; justify-content: flex-end; gap: 30px; padding: 12px 0; font-size: 1.05rem; }
.stars { display: inline-flex; gap: 2px; color: #F59E0B; letter-spacing: 1px; }
.stars .off { color: var(--line-2); }
.star-pick { display: flex; gap: 6px; justify-content: center; margin: 10px 0 16px; flex-direction: row-reverse; }
.star-pick input { position: absolute; opacity: 0; }
.star-pick label { font-size: 2.6rem; line-height: 1; color: var(--line-2); cursor: pointer; transition: color .1s; }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label { color: #F59E0B; }
.tip-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list input { width: 20px; height: 20px; accent-color: var(--teal); }
.check-list .done { color: var(--muted); text-decoration: line-through; }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: .85rem; }
.bar-row .bar { height: 14px; border-radius: 0 4px 4px 0; background: var(--teal); min-width: 2px; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.colchart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.colchart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.colchart .col i { display: block; width: 100%; max-width: 46px; background: var(--teal); border-radius: 4px 4px 0 0; min-height: 2px; }
.colchart .col small { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.colchart .col b { font-size: .68rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.deal-card { border: 2px dashed var(--orange-2); background: #FFF7ED; }
.home-switch { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--amber-bg); color: #78350F; font-size: .82rem; font-weight: 600; }

/* ---------- Grouped side menu ---------- */
.sidenav { padding-top: 10px; }
.nav-group { padding: 4px 0 8px; }
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.nav-title { padding: 0 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7F93B0; }
.sidenav a { padding: 8px 12px; }

/* ---------- One size for single-line boxes, buttons line up ---------- */
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select {
  height: 40px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; line-height: 38px; }
select { padding-right: 30px; }
.page-actions, .form-actions, .toolbar { align-items: center; }
.page-actions .inline-form, .toolbar .inline-form { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.page-actions .badge { align-self: center; }
.copy-row { align-items: stretch; }
.copy-row .btn { height: auto; min-height: 40px; }

/* ---------- Autosuggest (combo boxes) ---------- */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; }
.combo-list[hidden] { display: none; }
.combo-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.combo-opt .grow { flex: 1; min-width: 0; }
.combo-opt .sub { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt .side { color: var(--ink-2); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.combo-opt.on, .combo-opt:hover { background: var(--surface-2); }
.combo-opt mark { background: color-mix(in srgb, var(--teal) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-empty { padding: 10px; color: var(--muted); font-size: .88rem; }
.combo-picked { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .84rem; color: var(--ink-2); }

/* ---------- Filter bars ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filter-bar .field { margin: 0; min-width: 150px; flex: 1 1 150px; }
.filter-bar .field.wide { flex: 2 1 260px; }
.filter-bar .field label { font-size: .78rem; }
.filter-bar .btn { flex: none; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 11px; bottom: 11px; color: var(--muted); pointer-events: none; z-index: 1; }
.search-box input { padding-left: 36px; }
.filter-count { color: var(--muted); font-size: .84rem; margin: -6px 0 10px; }
tr.filtered-out { display: none; }

/* ---------- Customer account status ---------- */
.acct-status { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.acct-status .ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.acct-status.on { border-color: color-mix(in srgb, var(--teal) 40%, transparent); background: color-mix(in srgb, var(--teal) 8%, #fff); color: #0B5F58; }
.acct-status.on .ic { background: var(--teal); color: #fff; }
.acct-status small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; line-height: 1.1; }
.acct-status span.t { line-height: 1.15; }

/* ---------- Invoice money columns line up ---------- */
.invoice-doc .table td.num, .invoice-doc .table th.num { font-variant-numeric: tabular-nums; }
.invoice-doc .table tfoot td { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
.invoice-doc .table tfoot tr:first-child td { border-top: 2px solid var(--line); padding-top: 12px; }
.invoice-doc .table tfoot .lbl { text-align: right; color: var(--ink-2); }
.invoice-doc .table tfoot tr.grand td { font-weight: 700; color: var(--navy); border-top: 2px solid var(--line); }
.money-col { width: 130px; }

/* ---------- Fleet six-month summary ---------- */
.six-month { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 24px; align-items: end; }
.six-month .totals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.six-month .totals small { display: block; color: var(--muted); font-size: .78rem; }
.six-month .totals b { font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--navy); }
@media (max-width: 760px) { .six-month { grid-template-columns: 1fr; } }

/* ---------- Schedule service wizard ---------- */
.wiz-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; overflow-x: auto; }
.wiz-steps li { flex: 1; min-width: 0; }
.wiz-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font: inherit; color: var(--muted); cursor: pointer; text-align: left; border-bottom: 3px solid transparent; }
.wiz-steps button:disabled { cursor: default; }
.wiz-steps .num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.wiz-steps .lbl { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-steps li.on button { color: var(--navy); border-bottom-color: var(--teal); }
.wiz-steps li.on .num { background: var(--teal); color: #fff; }
.wiz-steps li.done button { color: var(--ink-2); }
.wiz-steps li.done .num { background: color-mix(in srgb, var(--teal) 15%, #fff); color: var(--teal); }
@media (max-width: 700px) { .wiz-steps .lbl { display: none; } .wiz-steps li.on .lbl { display: inline; } .wiz-steps li.on { flex: 3; } }

.wiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.wiz-aside { position: sticky; top: 76px; }
@media (max-width: 1100px) { .wiz-layout { grid-template-columns: 1fr; } .wiz-aside { position: static; order: -1; } .summary-card .sum-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .summary-card h3, .summary-card > p { display: none; } }
.wiz .wiz-step { margin-bottom: 14px; }
.wiz h2 { margin: 0 0 4px; }
.wiz-sub { color: var(--muted); margin: 0 0 14px; font-size: .92rem; }
.wiz-nav { display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.wiz-nav #wizNext, .wiz-nav #wizSend { margin-left: auto; min-width: 150px; }
.wiz-err { color: var(--red); font-weight: 600; font-size: .88rem; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pick-grid.small-picks { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pick { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pick:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 15%, transparent); }
.pick:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.pick-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pick-body b { color: var(--navy); font-size: .98rem; padding-right: 22px; }
.pick-body small { color: var(--muted); font-size: .8rem; }
.pick-meta { display: flex; align-items: center; gap: 6px; }
.pick-body .badge { align-self: flex-start; margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.pick-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.pick-check { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; opacity: 0; transform: scale(.6); transition: .15s; }
.pick:has(input:checked) .pick-check, .svc-card:has(input:checked) .pick-check { opacity: 1; transform: none; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svc-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.svc-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.svc-card input { position: absolute; opacity: 0; pointer-events: none; }
.svc-card:has(input:checked) { border-color: var(--brand, var(--teal)); background: color-mix(in srgb, var(--brand, var(--teal)) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--teal)) 15%, transparent); }
.svc-card .pick-check { background: var(--brand, var(--teal)); }
.svc-ic { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--brand, var(--teal)) 14%, #fff); color: var(--brand, var(--teal)); }
.svc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 22px; }
.svc-body b { color: var(--navy); }
.svc-cat { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.svc-desc { color: var(--ink-2); font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.svc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.svc-price { grid-column: 2; font-weight: 700; color: var(--navy); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.svc-price small { font-size: .8rem; color: var(--muted); font-weight: 600; }

.repeat-pick, .quick-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-pick { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.pill-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pill-pick span { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: .88rem; color: var(--ink-2); transition: .12s; }
.pill-pick:hover span { border-color: var(--teal); }
.pill-pick input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill-pick input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.wiz-step[data-step="3"] { container-type: inline-size; }
.bk-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@container (max-width: 640px) { .bk-wrap { grid-template-columns: 1fr; } }
.bk-cal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.bk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bk-head b { font-family: var(--head); color: var(--navy); }
.bk-head .btn { width: 32px; padding: 0; }
.bk-dow, .bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-dow span { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.bk-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; min-height: 58px; padding: 6px 2px 8px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-2); font: inherit; color: var(--ink); cursor: pointer; transition: .12s; }
.bk-day.blank { background: none; cursor: default; }
.bk-day b { font-size: .95rem; }
.bk-day small { font-size: .66rem; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: clip; }
.bk-day .bar { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bk-day .bar i { display: block; height: 100%; background: var(--teal); }
.bk-day.open { background: color-mix(in srgb, var(--teal) 9%, #fff); border-color: color-mix(in srgb, var(--teal) 25%, transparent); }
.bk-day.few { background: #FFF7ED; border-color: #FED7AA; }
.bk-day.few .bar i { background: var(--orange); }
.bk-day.none, .bk-day.past { background: none; color: var(--line-2); cursor: not-allowed; }
.bk-day.today b { text-decoration: underline; text-underline-offset: 3px; }
.bk-day:not([disabled]):hover { border-color: var(--teal); transform: translateY(-1px); }
.bk-day.sel { background: var(--teal) !important; border-color: var(--teal) !important; color: #fff; }
.bk-day.sel small { color: #D5F5F0; }
.bk-day.sel .bar { background: rgba(255,255,255,.3); }
.bk-day.sel .bar i { background: #fff; }
.bk-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .76rem; color: var(--muted); }
.bk-key i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }
.k-open { background: color-mix(in srgb, var(--teal) 20%, #fff); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.k-few { background: #FFEDD5; border: 1px solid #FDBA74; }
.k-none { background: #fff; border: 1px solid var(--line); }
.times h3 { margin: 4px 0 12px; }
.times-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; color: var(--muted); border: 2px dashed var(--line); border-radius: 14px; text-align: center; padding: 20px; }
.times-empty p { margin: 0; }
.slot-group { margin-bottom: 14px; }
.slot-group-h { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.slot-group-h svg { color: var(--orange); }
.time-grid, #windowPick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
#windowPick[hidden] { display: none; }
.time-card { position: relative; display: block; margin: 0; cursor: pointer; }
.time-card input { position: absolute; opacity: 0; pointer-events: none; }
.time-card > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; text-align: center; transition: .12s; }
.time-card > span svg { color: var(--orange); }
.time-card b { color: var(--navy); font-size: .92rem; }
.time-card small { color: var(--muted); font-size: .76rem; }
.time-card.last small { color: #C2410C; font-weight: 600; }
.time-card:hover > span { border-color: var(--line-2); transform: translateY(-1px); }
.time-card input:checked + span { border-color: var(--teal); background: var(--teal); }
.time-card input:checked + span b, .time-card input:checked + span small, .time-card input:checked + span svg { color: #fff; }
.time-card input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.addr-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.addr-card .grow { flex: 1; min-width: 180px; }
.addr-card small { display: block; font-size: .76rem; }

.summary-card h3 { margin: 0 0 10px; }
.sum-list { list-style: none; margin: 0; padding: 0; }
.sum-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--line-2); }
.sum-list li:last-child { border-bottom: 0; }
.sum-list li.set { color: var(--teal); }
.sum-list small { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.sum-list b { color: var(--ink); font-size: .9rem; }
.sum-list li:not(.set) b { color: var(--line-2); }

.review { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.review-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-row .grow { flex: 1; min-width: 0; }
.review-row small { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.review-row b { color: var(--ink); }
.review-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--teal) 10%, #fff); color: var(--teal); }
.next-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.next-steps > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; }
.next-steps > div:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: var(--line); }
.next-steps span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; }
.next-steps b { font-size: .85rem; color: var(--navy); }
.next-steps small { font-size: .74rem; color: var(--muted); }
@media (max-width: 560px) { .next-steps { grid-template-columns: 1fr 1fr; row-gap: 16px; } .next-steps > div::after { display: none; } }

[hidden] { display: none !important; }
@media (max-width: 1100px) { .wiz-aside.on-review { display: none; } }
.wiz-aside .card { margin-bottom: 0; }
@media (max-width: 1100px) { .wiz-aside { margin-bottom: -4px; } }
.wiz-aside .card { margin-bottom: 0; }


/* ---------- Chat (customer Messages + company Inbox) ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-layout.no-list { grid-template-columns: minmax(0, 760px); }
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.inbox.no-chat { grid-template-columns: 300px minmax(0, 1fr); }
@media (max-width: 1250px) { .inbox { grid-template-columns: 280px minmax(0, 1fr); } .inbox-info { grid-column: 2; } }
@media (max-width: 820px) { .chat-layout, .inbox, .inbox.no-chat { grid-template-columns: 1fr; } .inbox-info { grid-column: auto; } .chat-list, .inbox-list { max-height: 260px; } }
.chat-list, .inbox-list { max-height: calc(100vh - 220px); overflow-y: auto; margin: 0; }
.inbox-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
.inbox-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink-2); font-weight: 600; font-size: .86rem; text-decoration: none !important; white-space: nowrap; }
.inbox-tabs a:hover { background: var(--surface-2); }
.inbox-tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.inbox-tabs a.on .tab-n { background: #fff; color: var(--navy); }
.tab-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 0; flex: none; border-radius: 999px; background: var(--orange); color: #fff; font-size: .7rem; }
.inbox-tabs + #inboxList .chat-item:first-child { border-top: 0; }
.chat-item { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: color-mix(in srgb, var(--teal) 9%, #fff); box-shadow: inset 3px 0 0 var(--teal); }
.chat-item .avatar { width: 40px; height: 40px; flex: none; font-size: .85rem; }
.ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; }
.ci-top b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-top small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.ci-sub { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-last { color: var(--ink-2); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.unread .ci-last { color: var(--ink); font-weight: 600; }
.chat-item .badge { align-self: flex-start; margin-top: 4px; }
.ci-dot { position: absolute; right: 12px; bottom: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }

.chat-pane { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 460px; margin: 0; }
.chat-none { align-items: center; justify-content: center; text-align: center; color: var(--muted); gap: 6px; padding: 30px; }
.chat-none h2 { color: var(--navy); margin: 6px 0 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head .avatar { width: 42px; height: 42px; }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-head b { display: block; color: var(--navy); }
.chat-head small { color: var(--muted); font-size: .8rem; }
.chat-status.warn { color: var(--red); font-weight: 700; }
.chat-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.chat-empty { margin: auto; color: var(--muted); padding: 24px; text-align: center; font-size: .9rem; }
.chat-day { text-align: center; margin: 12px 0 8px; }
.chat-day span { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 700; }
.chat-msg { display: flex; flex-direction: column; max-width: 78%; margin-top: 8px; }
.chat-msg.grouped { margin-top: 2px; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-msg.sys { align-self: center; align-items: center; max-width: 90%; }
.chat-who { font-size: .74rem; font-weight: 700; color: var(--muted); margin: 0 0 3px 4px; }
.chat-bubble { padding: 9px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.chat-msg.me .chat-bubble { background: var(--teal); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.me .chat-bubble a { color: #fff; text-decoration: underline; }
.chat-msg.them .chat-bubble { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; }
.chat-msg.sys .chat-bubble { background: #FEF3C7; color: #78350F; font-size: .84rem; border-radius: 10px; text-align: center; }
.chat-time { font-size: .68rem; color: var(--muted); margin: 3px 6px 0; }
.chat-note { display: flex; gap: 6px; align-items: center; padding: 8px 16px; background: #FEF3C7; color: #78350F; font-size: .82rem; border-top: 1px solid #FDE68A; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; border-top: 1px solid var(--line); }
.chat-quick .chip { flex: none; cursor: pointer; font-family: inherit; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-quick + .chat-form { border-top: 0; }
.chat-form textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; padding: 10px 12px; line-height: 1.35; border-radius: 12px; }
.chat-form .btn { width: 46px; height: 42px; padding: 0; flex: none; }
.chat-compose { max-width: 760px; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green, #16A34A); margin-right: 4px; vertical-align: 1px; }
.inbox-info { margin: 0; }
.inbox-info h3 { margin: 0 0 4px; }
.info-block { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.info-block small { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.text-red { color: var(--red); }

.chat-toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; align-items: flex-start; gap: 12px; width: min(360px, calc(100vw - 32px)); padding: 14px 40px 14px 14px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 18px 40px rgba(11,37,69,.35); text-decoration: none !important; animation: toastIn .25s ease-out; transition: opacity .5s; }
.chat-toast.fade { opacity: 0; }
.chat-toast .ct-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); }
.chat-toast .ct-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-toast .ct-body span { color: #C9D6E8; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-toast .ct-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1; }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ---------- Requests with conflicts ---------- */
.req-list { display: grid; gap: 14px; }
.req-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px 22px; border-left: 5px solid var(--green, #16A34A); margin: 0; }
.req-card.req-orange { border-left-color: var(--orange); }
.req-card.req-red { border-left-color: var(--red); }
.req-main { display: flex; flex-direction: column; gap: 10px; }
.req-who { display: flex; align-items: center; gap: 10px; }
.req-who .avatar { width: 40px; height: 40px; }
.req-who > div { flex: 1; min-width: 0; }
.req-what b { color: var(--navy); }
.req-note { margin-top: 6px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: .84rem; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.req-check { display: flex; flex-direction: column; gap: 6px; }
.req-ok, .req-issue { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: .86rem; font-weight: 600; }
.req-ok { background: #DCFCE7; color: #166534; }
.req-issue.lv-red { background: #FEE2E2; color: #991B1B; }
.req-issue.lv-orange { background: #FFEDD5; color: #9A3412; }
.req-issue.lv-blue { background: #E0F2FE; color: #075985; font-weight: 500; }
.req-techs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.tech-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .82rem; font-weight: 600; cursor: default; }
.tech-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #16A34A); }
.tech-chip.busy i { background: var(--red); }
.tech-chip small { color: var(--muted); font-weight: 500; }
.req-confirm { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.req-confirm .field { margin: 0; }
.req-times { display: flex; flex-wrap: wrap; gap: 6px; }
.req-times .pill-pick span { height: 36px; font-size: .84rem; padding: 0 12px; white-space: nowrap; }
.req-times small { opacity: .75; font-weight: 500; }
.req-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.req-actions .field { min-width: 220px; }
@media (max-width: 900px) { .req-card, .req-confirm { grid-template-columns: 1fr; } }


/* ---------- Invoice designs ---------- */
.invoice-doc { position: relative; overflow: hidden; }
.inv-brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.inv-brand h2 { margin: 0; font-size: 1.35rem; }
.inv-logo { display: block; max-width: 260px; width: auto; object-fit: contain; }
.inv-contact { color: var(--muted); margin-top: 4px; line-height: 1.5; }
.inv-meta { text-align: right; }
.inv-title { font-family: var(--head); font-size: 1.45rem; font-weight: 800; color: var(--brand); letter-spacing: .04em; }
.inv-num { margin: 2px 0; }
.inv-dates { color: var(--muted); }
.inv-parties { margin-bottom: 16px; }
.inv-notes { margin-top: 14px; }
.inv-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.inv-foot p { margin: 0 0 6px; }
.inv-thanks { font-weight: 700; color: var(--brand); text-align: center; margin-top: 10px !important; }
.invoice-doc .table thead th { color: var(--brand); border-bottom: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.invoice-doc .table tfoot tr.grand td { color: var(--brand); }
.inv-stamp { position: absolute; right: 34px; bottom: 120px; transform: rotate(-12deg); border: 3px solid #16A34A; color: #16A34A; border-radius: 8px; font-weight: 800; letter-spacing: .18em; padding: 4px 16px; font-size: 1.6rem; opacity: .55; pointer-events: none; }
/* Classic: logo left, title right, colored rule (base .inv-top style) */
/* Color banner */
.inv-h-banner .inv-top { margin: -18px -20px 18px; padding: 22px 24px; background: var(--brand); color: #fff; border-bottom: 0; }
.inv-h-banner .inv-top h2, .inv-h-banner .inv-title, .inv-h-banner .inv-contact, .inv-h-banner .inv-dates, .inv-h-banner .inv-num { color: #fff; }
.inv-h-banner .inv-contact, .inv-h-banner .inv-dates { opacity: .85; }
.inv-h-banner .inv-logo { background: #fff; padding: 6px 10px; border-radius: 10px; }
/* Centered */
.inv-h-centered .inv-top { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.inv-h-centered .inv-brand { flex-direction: column; text-align: center; }
.inv-h-centered .inv-meta { text-align: center; }
.inv-h-centered .inv-title { font-size: 1.1rem; letter-spacing: .3em; }
/* Minimal */
.inv-h-minimal .inv-top { border-bottom: 1px solid var(--line); }
.inv-h-minimal .inv-title { color: var(--ink); font-size: 1.1rem; letter-spacing: .2em; font-weight: 700; }
.inv-h-minimal .table thead th { color: var(--muted); border-bottom: 1px solid var(--line); }
/* Fonts */
.inv-f-classic, .inv-f-classic h2, .inv-f-classic .inv-title { font-family: Georgia, 'Times New Roman', serif; }
.inv-f-bold h2, .inv-f-bold .inv-title, .inv-f-bold .table thead th, .inv-f-bold tfoot .grand td { font-family: var(--head); font-weight: 800; }
@media print { .invoice-doc, .inv-h-banner .inv-top, .inv-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (max-width: 560px) { .inv-meta { text-align: left; } .inv-logo { max-width: 180px; } }

/* Top bar company logo */
.co-logo-top { display: inline-flex; align-items: center; height: 36px; padding: 2px 10px; border-left: 1px solid var(--line); margin-left: 4px; }
.co-logo-top img { max-height: 32px; max-width: 150px; object-fit: contain; display: block; }
@media (max-width: 900px) { .co-logo-top { display: inline-flex; } .co-logo-top img { max-width: 90px; } }

/* Logo & invoice design page */
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.brand-preview { position: sticky; top: 76px; }
.brand-preview .invoice-doc { margin: 0; }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
@media (max-width: 1150px) { .brand-layout { grid-template-columns: 1fr; } .brand-preview { position: static; } }
.logo-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-row .grow { flex: 1; min-width: 240px; }
.logo-box { width: 170px; height: 100px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--line-2); border-radius: 12px; background: repeating-conic-gradient(#F1F5F9 0% 25%, #fff 0% 50%) 50% / 16px 16px; padding: 8px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hdr-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 560px) { .hdr-pick { grid-template-columns: 1fr 1fr; } }
.hdr-card { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 0; cursor: pointer; font-size: .84rem; }
.hdr-card input { position: absolute; opacity: 0; }
.hdr-thumb { position: relative; width: 100%; height: 64px; border: 2px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; transition: .12s; }
.hdr-card input:checked + .hdr-thumb { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.hdr-thumb i { position: absolute; display: block; border-radius: 3px; }
.hdr-thumb .t-logo { width: 18px; height: 18px; background: var(--teal); }
.hdr-thumb .t-lines { height: 5px; width: 34%; background: var(--line-2); box-shadow: 0 9px 0 var(--line), 0 18px 0 var(--line); }
.hdr-thumb .t-meta { height: 7px; width: 22%; background: var(--teal); opacity: .7; }
.hdr-classic .t-logo { left: 8px; top: 9px; } .hdr-classic .t-lines { left: 32px; top: 10px; } .hdr-classic .t-meta { right: 8px; top: 10px; }
.hdr-classic::after { content: ""; position: absolute; left: 8px; right: 8px; top: 34px; height: 2px; background: var(--teal); }
.hdr-banner::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 36px; background: var(--teal); }
.hdr-banner .t-logo { left: 8px; top: 9px; background: #fff; } .hdr-banner .t-lines { left: 32px; top: 10px; background: rgba(255,255,255,.8); box-shadow: none; } .hdr-banner .t-meta { right: 8px; top: 12px; background: #fff; }
.hdr-centered .t-logo { left: calc(50% - 9px); top: 6px; } .hdr-centered .t-lines { left: 33%; top: 30px; box-shadow: 0 8px 0 var(--line); } .hdr-centered .t-meta { left: 39%; top: 50px; }
.hdr-minimal .t-logo { left: 8px; top: 9px; width: 12px; height: 12px; background: var(--line-2); } .hdr-minimal .t-lines { left: 26px; top: 10px; } .hdr-minimal .t-meta { right: 8px; top: 10px; background: var(--ink-2); opacity: .5; }
.color-row { display: flex; align-items: center; gap: 10px; height: 40px; }
.show-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.show-grid h4 { margin: 6px 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.show-grid .check { margin-bottom: 8px; }
@media (max-width: 640px) { .show-grid { grid-template-columns: 1fr; } }


/* ---------- Chat link buttons, instant answers, saved replies ---------- */
.chat-link { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 7px 14px; border-radius: 999px; background: var(--teal); color: #fff !important; font-weight: 700; font-size: .86rem; text-decoration: none !important; }
.chat-link::after { content: "→"; }
.chat-msg.me .chat-link { background: #fff; color: var(--teal) !important; }
.chat-msg.auto .chat-bubble { background: #fff; border: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); box-shadow: inset 3px 0 0 var(--teal); }
.chat-msg.auto .chat-who::before { content: "⚡ "; }
.section-h { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 18px 0 10px; }
.section-h:first-child { margin-top: 0; }
.reply-card { margin-bottom: 12px; }
.reply-card.is-auto { border-left: 4px solid var(--teal); }
.reply-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0 18px; }
@media (max-width: 760px) { .reply-grid { grid-template-columns: 1fr; } }
.reply-card textarea { min-height: 96px; }
.reply-preview { display: flex; flex-direction: column; gap: 4px; }
.reply-preview small { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); }
.reply-preview .chat-bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px 14px 14px 5px; font-size: .88rem; }
.ph-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: .84rem; }
.ph-list li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ph-list code { font-size: .8rem; color: var(--teal); font-weight: 700; }
.ph-list span { color: var(--muted); }
.chat-quick a.chip { text-decoration: none; color: var(--teal); border-style: dashed; }


/* ---------- Several services on a job ---------- */
.svc-builder > label { margin-bottom: 8px; }
.svc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.svc-quick .chip { cursor: pointer; font-family: inherit; }
.svc-quick .chip.on { background: color-mix(in srgb, var(--teal) 12%, #fff); border-color: var(--teal); color: var(--teal); }
.chip-dashed { border-style: dashed; }
.svc-lines { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.svc-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 84px 90px 30px; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); transition: background .3s; }
.svc-line.flash { background: color-mix(in srgb, var(--teal) 12%, #fff); }
.svc-head { border-top: 0; background: var(--surface-2); font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 7px 10px; }
.svc-lines.empty .svc-head { display: none; }
.svc-lines.empty::after { content: "No services yet. Tap one above."; display: block; padding: 14px; color: var(--muted); font-size: .88rem; text-align: center; }
.svc-line-total { font-variant-numeric: tabular-nums; font-size: .9rem; }
.svc-line .btn-link { font-size: 1.3rem; line-height: 1; }
.svc-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: .9rem; color: var(--ink-2); flex-wrap: wrap; }
.svc-total b { color: var(--navy); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .svc-head { display: none; }
  .svc-line { grid-template-columns: 1fr 1fr 1fr 30px; }
  .svc-line [name="svc_name[]"] { grid-column: 1 / -1; }
  .svc-line-total { display: none; }
}
.svc-summary { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: .88rem; }
.svc-summary li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.svc-summary b { font-variant-numeric: tabular-nums; }
.svc-list-c { list-style: none; margin: 4px 0 0; padding: 0; }
.svc-list-c li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.svc-list-c li:last-child { border-bottom: 0; }
.choice.multi { padding-right: 40px; }
.choice.multi:has(input:checked)::after { content: "\2713"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.svc-builder { container-type: inline-size; }
@container (max-width: 600px) {
  .svc-head > span:first-child { display: none; }
  .svc-line { grid-template-columns: 1fr 1fr 1fr auto 30px; row-gap: 6px; }
  .svc-line [name="svc_name[]"] { grid-column: 1 / -1; font-weight: 600; }
  .svc-line [name="svc_qty[]"]::placeholder { color: var(--muted); }
  .svc-line-total { display: block; min-width: 70px; }
}


/* ---------- Click-to-toggle buttons and placement pickers (invoice design) ---------- */
.show-sec { margin-bottom: 16px; }
.show-sec h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.show-sec h4 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tog-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tog { position: relative; display: inline-flex; margin: 0; cursor: pointer; user-select: none; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog span { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); font-weight: 600; font-size: .86rem; transition: .12s; white-space: nowrap; }
.tog:hover span { border-color: var(--teal); color: var(--ink-2); }
.tog-ic { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed var(--line-2); flex: none; }
.tog-ic::after { content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: .8rem; line-height: 1; color: var(--muted); }
.tog input:checked + span { background: color-mix(in srgb, var(--teal) 10%, #fff); border-color: var(--teal); color: #0B5F58; }
.tog input:checked + span .tog-ic { background: var(--teal); border: 0; }
.tog input:checked + span .tog-ic::after { content: "\2713"; color: #fff; font-size: .72rem; font-weight: 800; }
.tog input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.place-rows { display: flex; flex-direction: column; gap: 8px; }
.place-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.license-row input { flex: 1; min-width: 200px; height: 38px; }
.place-pick { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; transition: opacity .15s; }
.place-pick label { position: relative; margin: 0; cursor: pointer; }
.place-pick input { position: absolute; opacity: 0; pointer-events: none; }
.place-pick span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.place-pick label + label span { border-left: 1px solid var(--line-2); }
.place-pick input:checked + span { background: var(--navy); color: #fff; }
.place-pick input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: -2px; }
.place-pick.off { opacity: .35; pointer-events: none; }
.inv-contact-right { margin-top: 6px; color: var(--muted); line-height: 1.5; }
.inv-h-banner .inv-contact-right { color: #fff; opacity: .85; }
.inv-contact-bottom { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 8px !important; }


/* ---------- Master schedule drag and drop ---------- */
.lane-jobs { min-height: 12px; }
.sched .job { display: flex; gap: 8px; align-items: flex-start; }
.job-body { flex: 1; min-width: 0; }
.job-btns { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.icon-btn { width: 32px; padding: 0; }
.job.draggable { cursor: grab; }
.job.draggable:hover { background: var(--surface-2); }
.grip { width: 12px; flex: none; color: var(--line-2); font-size: .9rem; letter-spacing: -3px; line-height: 1.4; padding-top: 1px; user-select: none; }
.job.draggable:hover .grip { color: var(--muted); }
.job-ghost { opacity: .35; background: color-mix(in srgb, var(--teal) 12%, #fff) !important; border: 2px dashed var(--teal) !important; }
.job-chosen { box-shadow: var(--shadow-lg); }
.job-drag { transform: rotate(1.5deg); }
.sched.dragging .job.draggable { cursor: grabbing; }
.sched.dragging .lane { outline: 2px dashed transparent; transition: outline-color .15s; }
.sched.dragging .lane-jobs { min-height: 64px; }
.sched.dragging .lane:hover { outline-color: color-mix(in srgb, var(--teal) 50%, transparent); }
.lane-unassigned.is-empty .lane-head { opacity: .7; }
.lane-unassigned.is-empty .lane-empty { border: 2px dashed var(--line-2); margin: 10px; border-radius: 10px; }
.sched-hint { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.save-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 150; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); }
.save-toast.bad { background: var(--red); }
.job.draggable, .job.draggable * { user-select: none; -webkit-user-select: none; }


/* ---------- Invoice pieces (all invoices) ---------- */
.inv-block + .inv-block { margin-top: 12px; }
.inv-body > .inv-block:first-child { margin-top: 0; }
.inv-terms { margin: 0; font-size: .86rem; color: var(--ink-2); }
.inv-payline { margin: 0; font-size: .86rem; }
.inv-text { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.inv-divider { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.inv-spacer { height: 28px; }
.inv-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; padding-top: 26px; }
.inv-sign span { display: block; border-bottom: 1px solid var(--ink-2); height: 24px; }
.inv-sign small { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
.inv-thanks { margin: 6px 0 0; }
.inv-contact-bottom { margin: 0; }
.inv-body .inv-notes { margin: 0; }

/* ---------- Editor mode (Logo & invoice design) ---------- */
.invoice-doc.is-editor .inv-block { position: relative; margin-top: 8px; padding: 26px 10px 10px; border: 1px dashed transparent; border-radius: 10px; transition: border-color .12s, background .12s; }
.invoice-doc.is-editor .inv-block:hover { border-color: color-mix(in srgb, var(--teal) 45%, transparent); background: color-mix(in srgb, var(--teal) 3%, #fff); }
.blk-bar { position: absolute; top: 4px; left: 6px; right: 6px; display: flex; align-items: center; gap: 6px; height: 20px; cursor: grab; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .55; transition: opacity .12s; }
.invoice-doc.is-editor .inv-block:hover .blk-bar { opacity: 1; color: var(--teal); }
.blk-grip { font-size: .85rem; letter-spacing: -3px; line-height: 1; }
.blk-name { flex: 1; }
.blk-x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.blk-x:hover { background: #FEE2E2; color: var(--red); }
.blk-ghost { opacity: .4; border: 2px dashed var(--teal) !important; background: color-mix(in srgb, var(--teal) 10%, #fff) !important; }
.blk-chosen { box-shadow: var(--shadow-lg); background: #fff; }
.inv-ph { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: .84rem; font-style: italic; }
.blk-edit { min-height: 24px; padding: 6px 8px; border-radius: 8px; outline: 1px solid var(--line); cursor: text; }
.blk-edit:focus { outline: 2px solid var(--teal); background: #fff; }
.blk-edit:empty::before { content: attr(data-ph); color: var(--muted); font-style: italic; }
.invoice-doc.is-editor .piece-chip.sortable-ghost, .invoice-doc.is-editor .piece-chip { display: block; margin-top: 8px; padding: 14px; border: 2px dashed var(--teal); border-radius: 10px; background: color-mix(in srgb, var(--teal) 8%, #fff); color: var(--teal); font-weight: 700; text-align: center; }
.piece-palette { margin-bottom: 14px; padding: 14px 16px; }
.palette-list { display: flex; flex-wrap: wrap; gap: 6px; }
.piece-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 600; cursor: grab; }
.piece-chip:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.piece-chip .blk-grip { color: var(--line-2); }
.piece-chip.used, .piece-chip:disabled { opacity: .4; cursor: not-allowed; }
.brand-preview .preview-head { gap: 10px; flex-wrap: wrap; }

.inv-block { position: relative; }
.inv-body .inv-stamp { position: static; display: table; margin: 10px 8px 4px auto; font-size: 1.3rem; }


/* ---------- Invoice sections and areas (every invoice) ---------- */
.invoice-doc .inv-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 24px; align-items: start; }
.invoice-doc .inv-top { border-bottom: 3px solid var(--brand, var(--navy)); padding-bottom: 16px; margin-bottom: 16px; flex-wrap: nowrap; }
.invoice-doc .inv-mid { margin-bottom: 16px; }
.invoice-doc .inv-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.invoice-doc .zone { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.invoice-doc .inv-main .zone { gap: 12px; }
.ib { position: relative; min-width: 0; }
.ib.al-center { text-align: center; }
.ib.al-right { text-align: right; }
.ib.al-center .inv-logo, .ib.al-center .co-logo { margin-left: auto; margin-right: auto; }
.ib.al-right .inv-logo, .ib.al-right .co-logo { margin-left: auto; }
.ib .co-logo { display: flex; }
.ib.sz-small { font-size: .8rem; }
.ib.sz-large { font-size: 1.05rem; }
.inv-coname { margin: 2px 0 0; font-size: 1.35rem; }
.ib-company_name.sz-small .inv-coname { font-size: 1rem; }
.ib-company_name.sz-medium .inv-coname { font-size: 1.15rem; }
.ib-company_name.sz-large .inv-coname { font-size: 1.45rem; }
.ib-title.sz-small .inv-title { font-size: 1rem; }
.ib-title.sz-medium .inv-title { font-size: 1.2rem; }
.ib-title.sz-large .inv-title { font-size: 1.6rem; }
.inv-contact { color: var(--muted); line-height: 1.4; margin: 0; }
.ib-lbl { font-weight: 600; color: var(--ink-2); }
.inv-num { margin: 0; }
.inv-dates { color: var(--muted); font-size: .86rem; }
.ib.sz-small .inv-dates { font-size: .78rem; }
.inv-text.bold { font-weight: 700; color: var(--ink); }
.inv-divider.dv-thick { border-top: 3px solid var(--brand); }
.inv-divider.dv-dashed { border-top: 1px dashed var(--line-2); }
.inv-spacer.sp-small { height: 14px; } .inv-spacer.sp-medium { height: 28px; } .inv-spacer.sp-large { height: 56px; }
.inv-sign.no-date { grid-template-columns: 1fr; max-width: 60%; }
.inv-h-banner .inv-top { margin: -18px -20px 18px; padding: 20px 24px; background: var(--brand); color: #fff; border-bottom: 0; }
.inv-h-banner .inv-top *, .inv-h-banner .inv-top .ib-lbl { color: #fff; }
.inv-h-banner .inv-top .inv-contact, .inv-h-banner .inv-top .inv-dates { opacity: .88; }
.inv-h-banner .inv-top .badge { color: inherit; }
.inv-h-centered .inv-top { grid-template-columns: 1fr; text-align: center; }
.inv-h-centered .inv-top .ib { text-align: center; }
.inv-h-centered .inv-top .inv-logo, .inv-h-centered .inv-top .co-logo { margin-left: auto; margin-right: auto; }
.inv-h-minimal .inv-top { border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .invoice-doc .inv-row2 { grid-template-columns: 1fr; } .invoice-doc .inv-top .ib.al-right { text-align: left; } .invoice-doc .inv-top .ib.al-right .inv-logo { margin-left: 0; } }

/* ---------- Designer page ---------- */
.logo-card { padding: 14px 18px; }
.logo-card .logo-box { width: 140px; height: 80px; }
.logo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.logo-actions .picker { flex: 1; min-width: 240px; }
.designer { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1200px) { .designer { grid-template-columns: 1fr; } }
.dz-panel { position: sticky; top: 76px; padding: 0; margin: 0; max-height: calc(100vh - 96px); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 1200px) { .dz-panel { top: 64px; z-index: 20; max-height: 46vh; box-shadow: var(--shadow-lg); } }
.dz-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dz-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; }
.dz-tabs button:hover { background: #fff; }
.dz-tabs button.on { background: var(--navy); color: #fff; }
.dz-pane { padding: 14px 16px; overflow-y: auto; flex: 1; }
.dz-pane h4 { margin: 12px 0 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dz-pane h4:first-of-type { margin-top: 4px; }
.dz-pane .hint { margin-top: 0; }
.dz-pane .hdr-pick { grid-template-columns: 1fr 1fr; }
.dz-pane .field { margin-bottom: 12px; }
.dz-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 10px; color: var(--muted); }
.dz-empty p { margin: 0; }
.ed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ed-head b { color: var(--navy); font-size: 1.02rem; }
.ed-tog { margin-bottom: 8px; }
.ed-tog span { width: 100%; }
.ed-align { display: flex; }
.ed-align label { flex: 1; }
.ed-align span { justify-content: center; width: 100%; }
.ed-move { display: flex; gap: 6px; margin-bottom: 12px; }
.ed-move .btn { flex: 1; }
.ed-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.dz-save { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.dz-dirty { font-size: .8rem; font-weight: 700; color: var(--orange); }
.dz-canvas .invoice-doc { margin: 0; }

/* Editor-mode invoice: areas and sections */
.invoice-doc.is-editor .zone { position: relative; min-height: 46px; padding: 18px 6px 6px; border: 1.5px dashed var(--line-2); border-radius: 10px; transition: border-color .12s, background .12s; }
.invoice-doc.is-editor .inv-row2 { gap: 10px; }
.invoice-doc.is-editor .inv-top, .invoice-doc.is-editor .inv-mid, .invoice-doc.is-editor .inv-main, .invoice-doc.is-editor .inv-bottom { margin-bottom: 10px; }
.invoice-doc.is-editor .inv-bottom { border-top: 0; padding-top: 0; margin-top: 0; }
.zone-tag { position: absolute; top: 2px; left: 8px; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); opacity: .8; pointer-events: none; }
.inv-h-banner.is-editor .inv-top .zone { border-color: rgba(255,255,255,.45); }
.inv-h-banner.is-editor .inv-top .zone-tag { color: #fff; }
#preview.dragging .zone { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 4%, transparent); }
.invoice-doc.is-editor .ib { padding: 1px 6px; border: 0; outline: 1.5px solid transparent; outline-offset: 0; border-radius: 8px; cursor: pointer; transition: outline-color .1s, background .1s; }
.invoice-doc.is-editor .ib:hover { outline-color: color-mix(in srgb, var(--teal) 55%, transparent); background: color-mix(in srgb, var(--teal) 4%, transparent); }
.invoice-doc.is-editor .ib.sel { outline-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 15%, transparent); }
.ib-tag { position: absolute; top: -11px; left: 6px; z-index: 3; display: none; align-items: center; gap: 5px; height: 20px; padding: 0 4px 0 7px; border-radius: 6px; background: var(--teal); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; cursor: grab; }
.ib.al-right .ib-tag { left: auto; right: 6px; }
.invoice-doc.is-editor .ib:hover .ib-tag, .invoice-doc.is-editor .ib.sel .ib-tag { display: inline-flex; }
.ib-tag .blk-grip { color: #fff; opacity: .8; }
.ib-x { width: 16px; height: 16px; border: 0; border-radius: 4px; background: rgba(255,255,255,.2); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; padding: 0; }
.ib-x:hover { background: var(--red); }
.ib-ghost { opacity: .35; border: 2px dashed var(--teal) !important; }
.ib-chosen { background: #fff !important; box-shadow: var(--shadow-lg); }
.invoice-doc.is-editor .piece-chip { display: flex; justify-content: center; margin: 4px 0; border: 2px dashed var(--teal); background: color-mix(in srgb, var(--teal) 8%, #fff); color: var(--teal); }
.invoice-doc.is-editor .inv-stamp { pointer-events: none; }

.invoice-doc .inv-logo { max-width: 100%; height: auto; object-fit: contain; }
.ib-items .inv-stamp { position: static; display: table; margin: 10px 8px 4px auto; font-size: 1.3rem; }

/* Sections sit single-spaced; the logo keeps a little room below it */
.invoice-doc .ib-logo { margin-bottom: 6px; }

/* ---------- Estimates: deposits and reminders ---------- */
.dep-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; border: 1.5px solid var(--orange-2); border-radius: var(--radius); background: #FFF7ED; }
.dep-box.paid { border-color: #A7E3C0; background: var(--green-bg); }
.dep-box b { font-size: 1.05rem; color: var(--navy); }
.dep-form select { width: 100%; }
.followup-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; border-radius: 9px; background: var(--blue-bg); color: var(--ink-2); line-height: 1.4; }
.followup-note svg { flex: none; margin-top: 2px; color: var(--blue); }

/* ---------- Two-step sign-in ---------- */
.twofa-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--teal-bg); color: var(--teal); margin-bottom: 10px; }
.code-input { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.twofa-card.must { border: 2px solid var(--orange-2); }
.twofa-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.twofa-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.twofa-opt:hover { border-color: var(--teal); background: var(--teal-bg); }
.twofa-opt svg { color: var(--teal); }
.twofa-opt small { color: var(--muted); }
.twofa-on { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--green); }
.twofa-on b { color: var(--green); }
.twofa-steps { padding-left: 20px; margin: 0 0 10px; }
.twofa-steps li { margin-bottom: 10px; }
.qr-box { width: 192px; height: 192px; margin: 10px 0 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-sizing: border-box; }
.qr-box img, .qr-box canvas { display: block; }
.secret { font-size: .95rem; letter-spacing: .06em; word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.backup-codes code { padding: 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; font-size: .95rem; letter-spacing: .06em; }
.twofa-manage .field { max-width: 300px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Team: cost per hour ---------- */
.pay-form { margin: 0; }
.pay-in { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.pay-in input { width: 84px; height: 34px; padding: 4px 8px; }

/* ---------- Driver offline mode ---------- */
.offline-bar { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); font-size: .9rem; line-height: 1.4; }
.offline-bar.off { background: var(--amber-bg); border: 1px solid #F5C98A; color: #7A3E06; }
.offline-bar.sending { background: var(--blue-bg); border: 1px solid #B9C9F7; color: var(--blue); }
.offline-bar.ok { background: var(--green-bg); border: 1px solid #A7E3C0; color: var(--green); }
.offline-bar ul { margin: 6px 0 0; padding-left: 18px; }
.offline-bar li span { opacity: .7; font-size: .82rem; }
.offline-bar a { font-weight: 700; color: inherit; text-decoration: underline; }

/* ---------- Profit per job ---------- */
.neg { color: var(--red) !important; }
.money-split { display: flex; height: 22px; gap: 2px; margin: 4px 0 12px; border-radius: 6px; overflow: hidden; }
.money-split i { display: block; min-width: 3px; }
.ms-labor { background: var(--navy-2); } .ms-supplies { background: var(--teal-2); } .ms-driving { background: #D97706; } .ms-card { background: #94A3B8; } .ms-profit { background: var(--green); }
.ml-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.money-legend td { padding-top: 6px; padding-bottom: 6px; }
.profit-table td { vertical-align: top; }
.job-profit h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-profit .table td { padding: 6px 4px; }
.job-profit .grand td { font-weight: 700; border-top: 2px solid var(--line-2); }

/* ---------- Activity log ---------- */
.act-list { list-style: none; margin: 0; padding: 4px 0; }
.act-day { padding: 12px 18px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.act { display: flex; align-items: flex-start; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.act-invoice .act-ic, .act-payment .act-ic { background: var(--green-bg); color: var(--green); }
.act-security .act-ic { background: var(--blue-bg); color: var(--blue); }
.act-service .act-ic, .act-settings .act-ic { background: var(--amber-bg); color: var(--amber); }
.act-body { flex: 1; min-width: 0; }
.act-body a { color: var(--ink); font-weight: 600; }
.act-time { white-space: nowrap; }

/* ---------- Import & export ---------- */
.export-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.export-counts div { padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.export-counts b { display: block; font: 700 1.5rem var(--head); color: var(--navy); }
.export-counts small { color: var(--muted); }
.imp-start h2 { font-size: 1.02rem; margin: 18px 0 10px; }
.imp-start h2:first-of-type { margin-top: 0; }
.imp-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.imp-card { position: relative; cursor: pointer; }
.imp-card input { position: absolute; opacity: 0; pointer-events: none; }
.imp-card span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: center; transition: border-color .12s, background .12s; }
.imp-card span svg { color: var(--teal); flex: none; }
.imp-card:hover span { border-color: var(--teal); }
.imp-card input:checked + span { border-color: var(--teal); background: var(--teal-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 15%, transparent); }
.imp-card input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.imp-how { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-bg); color: var(--ink-2); font-size: .9rem; }
.imp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.imp-field { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.imp-field.matched { border-color: #A7E3DB; background: var(--teal-bg); }
.imp-field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .88rem; }
.imp-field .req { font-size: .7rem; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .04em; margin-left: 4px; }
.imp-field select { width: 100%; }
.imp-sample { display: block; min-height: 1.2em; margin-top: 4px; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-preview td, .imp-preview th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; }
.imp-problems { max-height: 220px; overflow: auto; margin: 8px 0 0; }
.imp-batch { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.imp-batch:last-child { border-bottom: 0; }
.imp-done .btn-row { margin-top: 14px; }
ul.tight { margin: 0; padding-left: 18px; }
ul.tight li { margin-bottom: 6px; }

/* Language picker (user menu, signed-out pages) */
.lang-switch label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; }
.lang-switch select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.usermenu-pop .lang-switch { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 10px 4px; }
.usermenu-pop .lang-switch select { flex: 1; }
.lang-corner { position: fixed; top: 12px; right: 14px; z-index: 50; }
.lang-corner .lang-switch label { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 10px; box-shadow: var(--shadow); }
.lang-corner .lang-switch select { border: 0; padding: 4px 6px; }

/* Company setup wizard (co-welcome.php) and the Getting started checklist */
.wizard { max-width: 860px; margin: 0 auto; }
.wizard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.wizard-head h1 { margin: 0 0 4px; }
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 16px; overflow-x: auto; }
.stepper li { flex: 1; min-width: 92px; }
.stepper a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 13px; text-align: center; }
.stepper a:hover { background: var(--surface-2); }
.stepper .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.stepper li.on .dot { background: var(--navy, #0B2545); color: #fff; border-color: transparent; }
.stepper li.on .lbl { color: var(--ink); font-weight: 600; }
.stepper li.done .dot { background: #DCFCE7; color: #15803D; border-color: #86EFAC; }
.stepper li.skipped .dot { border-style: dashed; }
.wizard-card h2 { display: flex; align-items: center; gap: 8px; }
.svc-pick { display: grid; gap: 8px; margin: 10px 0 4px; }
.svc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.svc-row:hover { background: var(--surface-2); }
.svc-row .grow { display: flex; flex-direction: column; }
.svc-row .price-in { display: flex; align-items: center; gap: 4px; }
.svc-row .price-in input { width: 92px; }
.team-rows { display: grid; gap: 8px; }
.team-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 1.1fr .9fr; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 14px; }
.choice { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.choice h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.choice .btn { align-self: flex-start; }
.mini-form { display: grid; gap: 8px; }
.mini-form .form-actions { margin-top: 4px; }
.onb-list li.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.onb-list li.done .ic { color: #16A34A; }
.onb-list .grow { display: flex; flex-direction: column; }
.onb-card .progress { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: 6px 0 8px; }
.onb-card .progress span { display: block; height: 100%; background: #16A34A; border-radius: 6px; }
.setup-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.setup-bar .btn { margin-left: auto; }
@media (max-width: 760px) {
  .team-row { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .stepper .lbl { display: none; }
  .stepper li { min-width: 40px; }
  .wizard-head { flex-direction: column; }
}

/* Guided tour (assets/js/tour.js) */
.tour-shade { position: fixed; inset: 0; background: rgba(11, 37, 69, .55); z-index: 9000; }
.tour-box { position: fixed; z-index: 9001; border-radius: 12px; box-shadow: 0 0 0 3px #5EEAD4; pointer-events: none; transition: all .25s ease; }
.tour-tip { position: fixed; z-index: 9002; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.3); padding: 16px 16px 12px; }
.tour-tip > b { display: block; font-size: 16px; margin-bottom: 6px; }
.tour-tip > p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2, var(--ink)); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-btns { display: flex; gap: 6px; }
.tour-tip > .btn-link { margin-top: 8px; }
body.touring .sidenav { z-index: 8999; }

/* ServSPPro admin (admin.php) and the support-view banner */
.admin-top .inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.admin-nav a.on, .admin-nav a:hover { background: var(--surface-2); }
.admin-search { margin-left: auto; }
.admin-search input { min-width: 260px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: inherit; background: var(--surface); color: var(--ink); }
.admin-wrap { max-width: 1200px; }
.admin-wrap .stats { margin-bottom: 16px; }
.admin-act { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.admin-act:last-child { border-bottom: 0; }
.admin-act label { font-weight: 600; font-size: 14px; }
.admin-note { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.admin-bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.admin-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.admin-bars span { width: 70%; background: #2563EB; border-radius: 6px 6px 0 0; min-height: 2px; }
.admin-bars small { color: var(--muted); font-size: 11px; }
.admin-bars b { font-size: 12px; }
.admin-as { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: #FEF3C7; border: 1px solid #F59E0B; color: #78350F; }
.admin-as .btn { margin-left: auto; }
@media (max-width: 760px) { .admin-search { margin-left: 0; width: 100%; } .admin-search input { width: 100%; min-width: 0; } }
.admin-body .lang-corner { display: none; }
.admin-wrap .rows .grow { display: flex; flex-direction: column; }
.admin-search input { min-width: 220px; }

/* ---------- Company dashboard (business OS look) ---------- */
.dash-hero { position: relative; overflow: hidden; margin: -24px -28px 22px; padding: 28px 28px 26px; color: #fff;
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(59,130,246,.45), transparent 60%),
    radial-gradient(600px 260px at 10% 120%, rgba(249,115,22,.16), transparent 60%),
    linear-gradient(120deg, #0A1830 0%, #10264A 50%, #173B73 100%); }
.dash-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-hero h1 { color: #fff; font-size: 1.9rem; margin: 0 0 4px; }
.dash-hero p { margin: 0; color: #C3D0E4; }
.btn-glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.18); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; color: #fff; text-decoration: none !important;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); transition: background .15s, transform .15s; }
.kpi:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); }
.kpi > div { min-width: 0; }
.kpi b { display: block; font-family: var(--head); font-size: 1.65rem; line-height: 1.1; white-space: nowrap; }
.kpi span:not(.kpi-ic) { display: block; font-weight: 600; font-size: .92rem; color: #E6EDF7; }
.kpi small { display: block; font-size: .78rem; color: #9FB2CE; margin-top: 2px; line-height: 1.3; }
.kpi small em { font-style: normal; font-weight: 700; }
.kpi small em.up { color: #4ADE80; }
.kpi small em.down { color: #FCA5A5; }
.kpi-ic { flex: none; width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px rgba(0,0,0,.2); }
.ic-blue { background: linear-gradient(145deg, #3B82F6, #1D4ED8); }
.ic-green { background: linear-gradient(145deg, #22C55E, #15803D); }
.ic-amber { background: linear-gradient(145deg, #FBBF24, #D97706); }
.ic-red { background: linear-gradient(145deg, #F87171, #DC2626); }
.ic-teal { background: linear-gradient(145deg, #2DD4BF, #0F766E); }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dash-hero { margin: -18px -16px 18px; padding: 22px 16px; } .dash-hero h1 { font-size: 1.5rem; } }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px; gap: 10px; } .kpi-ic { width: 40px; height: 40px; border-radius: 11px; } .kpi b { font-size: 1.3rem; } .kpis .kpi:last-child { grid-column: 1 / -1; } }

.dash-row { display: grid; gap: 18px; }
.dash-row > .card { margin-bottom: 18px; min-width: 0; }
.dash-row-3 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .9fr); }
.dash-row-money { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr); }
@media (max-width: 1200px) { .dash-row-3, .dash-row-money { grid-template-columns: 1fr 1fr; } .dash-row-3 > :last-child, .dash-row-money > :first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .dash-row-3, .dash-row-money { grid-template-columns: 1fr; } }
.h-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--teal-bg); color: var(--teal); }
.h-ic .ic { vertical-align: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.more-link { display: block; text-align: center; margin-top: 10px; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 0 0 10px 18px; align-items: center; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.timeline li::after { content: ''; position: absolute; left: 0; top: calc(50% - 10px); width: 10px; height: 10px; border-radius: 50%; background: #94A3B8; box-shadow: 0 0 0 3px var(--surface); }
.timeline li:only-child::before { display: none; }
.timeline .tl-done::after { background: #16A34A; }
.timeline .tl-now::after { background: #F59E0B; }
.timeline .tl-next::after { background: #2563EB; }
.tl-time { font-weight: 700; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.tl-card { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color .15s, background .15s; }
.tl-card:hover { border-color: #BFD3FB; background: #F5F8FF; }
.tl-card .grow { flex: 1; min-width: 0; }
.tl-card b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card small { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-now .tl-card { background: #FFFBF0; border-color: #FBE3B0; }

#dispatch { display: flex; flex-direction: column; }
.dash-map { flex: 1; height: auto; min-height: 300px; border-radius: 12px; }

.crew { list-style: none; margin: 0; padding: 0; }
.crew li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crew li:last-child { border-bottom: 0; }
.crew .avatar { width: 38px; height: 38px; font-size: .82rem; background: linear-gradient(145deg, #1E3A6B, #0B1E3B); flex: none; }
.crew .grow { flex: 1; min-width: 0; }
.crew b { display: block; font-size: .93rem; }
.crew-st { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; }
.crew-st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.crew-st.st-green { color: #15803D; }
.crew-st.st-amber { color: #B45309; }
.crew-st.st-blue { color: #1D4ED8; }
.crew-st.st-gray { color: var(--muted); }
.crew-meta { text-align: right; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.crew-meta span { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.crew-meta small { color: var(--muted); }

.overview { display: grid; gap: 12px; }
.overview-nums { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.overview-nums b { display: block; font-family: var(--head); font-size: 1.7rem; color: var(--navy); line-height: 1.15; }
.overview-nums > div + div b { font-size: 1.2rem; color: var(--ink-2); }
.overview-nums span { font-size: .85rem; color: var(--muted); }
.chart-box { position: relative; padding-left: 64px; }
.line-chart { display: block; width: 100%; height: 190px; overflow: visible; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-chart .area { fill: rgba(37,99,235,.10); }
.line-chart .line { fill: none; stroke: #2563EB; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.line-chart .pt { fill: #2563EB; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.line-chart .pt.on { fill: #1D4ED8; stroke-width: 3; }
.line-chart .hit { fill: transparent; cursor: crosshair; }
.chart-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.chart-scale { position: absolute; left: 0; top: 8px; height: 170px; display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); }
.chart-tip { position: absolute; margin-left: 64px; transform: translate(-50%, calc(-100% - 12px)); background: var(--navy); color: #fff; font-size: .8rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lg); }

.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.donut-chart { position: relative; width: 170px; height: 170px; flex: none; }
.donut-svg { width: 100%; height: 100%; }
.donut-track { fill: none; stroke: #EEF1F5; stroke-width: 16; }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-mid b { font-family: var(--head); font-size: 2rem; color: var(--navy); line-height: 1; }
.donut-mid span { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; }
.donut-legend li { display: grid; grid-template-columns: 12px 1fr auto 42px; align-items: center; gap: 9px; padding: 6px 0; font-size: .9rem; }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; }
.donut-legend b { text-align: right; }
.donut-legend small { text-align: right; color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-weight: 600; font-size: .84rem; text-align: center; text-decoration: none !important; transition: all .15s; }
.quick a span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--teal-bg); color: var(--teal); }
.quick a:hover { border-color: #BFD3FB; background: #F5F8FF; transform: translateY(-1px); box-shadow: var(--shadow); }
@media (max-width: 400px) { .quick { grid-template-columns: 1fr 1fr; } }
.map-live { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.map-live.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .kpis-3 { grid-template-columns: 1fr; } .kpis-3 .kpi:last-child { grid-column: auto; } }
.dash-hero-soft { padding-bottom: 22px; }
.kpi b { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-right { gap: 2px; }
  .help-ic { display: none !important; }
  .top-brand .brand-name { display: none; }
  .topsearch { min-width: 40px; }
  .timeline li { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; padding-left: 16px; }
  .tl-time { font-size: .78rem; }
  .tl-card { padding: 8px 10px; }
}

/* ---------- Text boxes and dropdowns (2026-11-27): tinted so they stand out on white cards, modern dropdowns ---------- */
:root { --field-bg: #F3F6FB; --field-line: #C5D0DE; --field-hover: #9FB0C6; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  background-color: var(--field-bg); border-color: var(--field-line); border-radius: 10px;
  transition: border-color .15s, background-color .15s, box-shadow .15s; }
input:not([type]):hover, input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, input[type=tel]:hover, input[type=number]:hover, input[type=date]:hover, input[type=time]:hover, input[type=url]:hover, input[type=search]:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input:focus, select:focus, textarea:focus { outline: none; background-color: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
input::placeholder, textarea::placeholder { color: #94A3B8; }
input[readonly], input[readonly]:hover { background-color: #E9EDF3; border-color: var(--field-line); color: var(--ink-2); }
input[readonly].plain { background-color: #fff; }
input[disabled], select[disabled], textarea[disabled] { background-color: #E9EDF3; color: var(--muted); cursor: not-allowed; }

select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 18px; }
select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232563EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); }
select[multiple], select[size] { background-image: none; padding-right: 11px; height: auto; line-height: 1.4; }
select option { font-weight: 400; }

/* Newer Chrome / Edge: the open list itself is styled too (others keep the phone's own list) */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size]), select:not([multiple]):not([size]):focus { background-image: none; padding-right: 12px; display: flex; align-items: center; gap: 8px; }
  select:not([multiple]):not([size])::picker-icon { color: #64748B; margin-left: auto; transition: rotate .18s; }
  select:not([multiple]):not([size]):open::picker-icon { rotate: 180deg; color: var(--teal); }
  ::picker(select) { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
    padding: 5px; margin-block: 6px; max-height: min(340px, 60vh); }
  select:not([multiple]):not([size]) option { padding: 9px 12px; border-radius: 8px; font-size: .93rem; line-height: 1.35; color: var(--ink); cursor: pointer; gap: 8px; }
  select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: var(--teal-bg); outline: none; }
  select:not([multiple]):not([size]) option:checked { font-weight: 600; color: var(--teal); }
  select:not([multiple]):not([size]) option::checkmark { color: var(--teal); }
  select:not([multiple]):not([size]) option[disabled] { color: var(--muted); cursor: default; }
  select:not([multiple]):not([size]) optgroup { font-weight: 700; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 4px 2px; }
}

/* Rows whose labels wrap differently: keep the boxes on one line */
.field-row.align-end > .field { display: flex; flex-direction: column; justify-content: flex-end; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .field-row-3 { grid-template-columns: 1fr; } }

/* Company settings: cards flow down two balanced columns (one on narrow screens) */
.settings-cols { columns: 2 420px; column-gap: 18px; }
.settings-cols > .card { break-inside: avoid; display: block; width: 100%; margin: 0 0 18px; }

/* Logo & invoice design: starter styles */
.style-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.style-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.style-card:hover { border-color: var(--teal-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.style-card.on { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-bg); }
.style-card .hdr-thumb { height: 84px; margin-bottom: 4px; }
.style-card .t-body { position: absolute; left: 8px; right: 8px; bottom: 10px; height: 4px; border-radius: 2px; background: var(--line); box-shadow: 0 -9px 0 var(--line), 0 -18px 0 var(--line); }
.style-card b { font-size: .95rem; }
.style-card small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.sf-classic { font-family: Georgia, "Times New Roman", serif; }
.sf-bold { font-weight: 800; letter-spacing: .01em; }

/* ---------- Date picker (datepicker.js, 2026-11-28): a month calendar instead of the browser's popup ---------- */
.dp-field { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; box-sizing: border-box; padding: 0 11px; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-line); border-radius: 10px; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.dp-field:hover { border-color: var(--field-hover); }
.dp-field:focus-visible, .dp-field[aria-expanded="true"] { outline: none; background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
.dp-field svg { margin-left: auto; color: #64748B; flex: none; }
.dp-field[aria-expanded="true"] svg { color: var(--teal); }
.dp-field .dp-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dp-field .dp-ph { color: #94A3B8; font-weight: 400; }
.dp-field.dp-invalid { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.dp-field:disabled { background: #E9EDF3; color: var(--muted); cursor: not-allowed; }
.dp-pop { position: fixed; z-index: 1000; width: 292px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(11, 30, 59, .28), 0 4px 12px rgba(11, 30, 59, .08); animation: dp-in .14s ease-out; color: var(--ink); }
@keyframes dp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-family: Sora, Inter, sans-serif; font-size: .98rem; text-transform: capitalize; }
.dp-nav { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--field-bg); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dp-nav:hover { background: #E3EAF5; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dp-dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 4px 0 6px; text-transform: uppercase; }
.dp-day { aspect-ratio: 1; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .9rem; font-weight: 500; color: var(--ink); cursor: pointer; position: relative; }
.dp-day:hover:not(:disabled) { background: #EAF1FE; color: #1D4ED8; }
.dp-day:focus-visible { outline: 2px solid #2563EB; outline-offset: 1px; }
.dp-day.is-today { color: #2563EB; font-weight: 700; }
.dp-day.is-today::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.dp-day.is-sel, .dp-day.is-sel:hover { background: #2563EB; color: #fff; font-weight: 700; box-shadow: 0 4px 10px -3px rgba(37, 99, 235, .55); }
.dp-day:disabled { color: #CBD5E1; cursor: default; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-link { border: 0; background: none; font: inherit; font-weight: 600; font-size: .88rem; color: #2563EB; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.dp-link:hover:not(:disabled) { background: #EAF1FE; }
.dp-link:disabled { color: #CBD5E1; cursor: default; }
.dp-pop.dp-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: dp-up .18s ease-out; }
.dp-pop.dp-sheet .dp-day { font-size: 1rem; }
@keyframes dp-up { from { transform: translateY(30px); opacity: 0; } }

/* Dropdowns keep their chosen text on one line inside the box (long choices end in "…") */
select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@supports (appearance: base-select) {
  select:not([multiple]):not([size]) > button, select:not([multiple]):not([size]) selectedcontent { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; flex: 1; }
  select:not([multiple]):not([size])::picker(select) { white-space: normal; }
}
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size]):focus { position: relative; padding-right: 36px; display: block; text-overflow: ellipsis; }
  select:not([multiple]):not([size])::picker-icon { position: absolute; right: 1px; top: 1px; bottom: 1px; margin: 0; padding: 0 11px 0 8px; display: flex; align-items: center; background-color: inherit; border-radius: 0 9px 9px 0; }
}

/* ---------- Scrollbars (2026-11-29): thin, rounded, quiet until you point at them ---------- */
html { scrollbar-width: thin; scrollbar-color: #B8C3D3 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #C5CEDB; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #94A3B8; }
::-webkit-scrollbar-thumb:active { background-color: #64748B; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: #C5CEDB transparent; }
*:hover { scrollbar-color: #94A3B8 transparent; }
/* the dark sidebar gets a light-on-dark bar */
.sidenav { scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidenav:hover { scrollbar-color: rgba(255,255,255,.32) transparent; }
.sidenav::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.16); }
.sidenav::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.3); }

/* Admin: claims and Verified badge requests to check */
.admin-review { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-review:first-of-type { border-top: 0; }
.admin-review .grow { flex: 1; min-width: 260px; line-height: 1.7; }

/* ---------- Find a Service (2026-11-30): list + map, like the GolfPin360 finder ---------- */
.find-bar { display: grid; grid-template-columns: 1.1fr 1.3fr 1.2fr .8fr auto; gap: 12px; align-items: end; }
.find-bar .field { margin: 0; }
.find-bar .btn { height: 40px; }
.find-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.find-head .find-toggle { margin-left: auto; display: none; }
.find-toggle button { border: 0; background: none; font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.find-toggle button.on { background: var(--navy); color: #fff; }
.find-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.find-list { display: grid; gap: 12px; }
.find-card { margin: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.find-card:hover, .find-card.on { border-color: #93B4F5; box-shadow: 0 0 0 3px rgba(37,99,235,.12), var(--shadow); }
.find-card.is-listing { background: #FBFCFE; }
.find-top { display: flex; gap: 12px; align-items: flex-start; }
.find-top h3 { margin: 0 0 2px; font-size: 1.05rem; }
.find-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.find-card .contact-lines { margin: 10px 0 0; }
.find-card .form-actions { margin-top: 12px; align-items: center; }
.find-claim { margin-left: auto; color: var(--muted); }
.find-map-wrap { position: sticky; top: 80px; }
.find-map { height: calc(100vh - 170px); min-height: 420px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; z-index: 0; }
.find-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.find-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.lg-member { background: #2563EB; } .lg-listing { background: #94A3B8; } .lg-home { background: #0B1E3B; }
.fpin-wrap { background: none; border: 0; }
.fpin { display: block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15,23,42,.35); }
.fpin-member { background: #2563EB; }
.fpin-listing { background: #94A3B8; width: 18px; height: 18px; margin: 2px; }
.fpin-home { width: 30px; height: 30px; background: #0B1E3B; display: grid; place-items: center; border-width: 3px; }
.fpop { display: grid; gap: 3px; min-width: 180px; font: 13px/1.4 Inter, system-ui, sans-serif; }
.fpop b { font-size: .95rem; color: var(--navy); } .fpop small { color: var(--muted); } .fpop .badge { justify-self: start; }
.fpop-more { font-weight: 600; margin-top: 4px; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
@media (max-width: 1100px) { .find-bar { grid-template-columns: 1fr 1fr; } .find-bar .btn { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .find-head .find-toggle { display: inline-flex; }
  .find-layout { grid-template-columns: 1fr; }
  .find-layout[data-view="list"] .find-map-wrap { display: none; }
  .find-layout[data-view="map"] .find-list { display: none; }
  .find-map-wrap { position: static; }
  .find-map { height: calc(100vh - 230px); min-height: 380px; }
}
/* app: the map alone, full screen (find-map.php) */
body.find-embed { margin: 0; background: #fff; }
body.find-embed .find-map { height: 100vh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
/* Verified badge page */
.verify-state { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; margin-bottom: 14px; }
.verify-state.ok { background: var(--green-bg); color: var(--green); } .verify-state.wait { background: var(--amber-bg); color: var(--amber); } .verify-state.no { background: var(--red-bg); color: var(--red); }
.verify-state b { color: inherit; }

/* Find a Service: filters apply by themselves (no Search button) */
.find-bar { grid-template-columns: 1.1fr 1.3fr 1.2fr .8fr; }
@media (max-width: 1100px) { .find-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .find-bar { grid-template-columns: 1fr; } }
.find-bar.busy { opacity: .7; pointer-events: none; }

/* Find a Service: Use my location */
.near-box { position: relative; }
.near-box input[type=search] { padding-right: 44px; }
.near-loc { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--teal); display: grid; place-items: center; cursor: pointer; }
.near-loc:hover { background: var(--teal-bg); }
.near-loc.on { background: var(--teal); color: #fff; }
.near-loc.busy { opacity: .5; pointer-events: none; }
.leaflet-bar a.fmap-locate { display: grid; place-items: center; color: #2563EB; }

/* Vendors & bills */
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.vendor-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.vendor-head { display: flex; gap: 12px; align-items: center; }
.vendor-head h3 { margin: 0; font-size: 1.05rem; }
.vendor-head h3 a { color: var(--navy); }
.vendor-contact { display: flex; flex-direction: column; gap: 4px; }
.vendor-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.vendor-money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.vendor-money small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.vendor-money b { font-family: var(--head); font-size: 1.1rem; color: var(--navy); }
.vendor-money b.due { color: var(--orange, #EA580C); }
.vendor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.vendor-top { margin-bottom: 16px; }
.vendor-top .card { margin: 0; }
.vendor-top dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0 0 10px; }
.vendor-top dl.facts dt { color: var(--muted); font-size: .88rem; }
.vendor-top dl.facts dd { margin: 0; font-weight: 600; }

/* Driver mode (driver-mode.php) and its Start button on My route */
.dm-start { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: #EA580C; color: #fff; margin: 0 0 16px; box-shadow: 0 6px 16px rgba(234,88,12,.32); text-decoration: none; }
.dm-start:hover { background: #C2410C; color: #fff; }
.dm-start-ic { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
.dm-start-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-start-t b { font-family: var(--head); font-size: 1.25rem; }
.dm-start-t small { color: #FFEDD5; font-size: .88rem; }
.dm-start-go { font-size: 1.8rem; line-height: 1; }
.dm { max-width: 640px; margin: 0 auto; }
.dm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dm-back { font-weight: 600; }
.dm-title { margin: 0 0 12px; }
.dm-shift { background: #10264A; border: 1px solid #173B73; border-radius: 16px; padding: 12px; margin-bottom: 16px; }
.dm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dm-tile { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; color: #fff; margin: 0; }
.dm-tile.on { background: rgba(34,197,94,.16); border-color: rgba(134,239,172,.35); }
.dm-loc.on { background: rgba(37,99,235,.22); border-color: rgba(147,197,253,.45); }
.dm-tile-head { display: flex; align-items: center; gap: 6px; }
.dm-tile-head b { font-size: .95rem; }
.dm-tile .dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.dm-tile.on .dot { background: #22C55E; }
.dm-tile-sub { color: #C3D0E4; font-size: .8rem; line-height: 1.35; flex: 1; }
.dm-white { background: #fff; color: #0B1E3B; border-color: #fff; }
.dm-switch { display: flex; align-items: center; gap: 8px; color: #C3D0E4; }
.dm-progress { color: #9FB2CE; font-size: .82rem; text-align: center; margin-top: 10px; }
.dm-progress a { color: #93C5FD; }
.dm-stop { border: 2px solid var(--teal, #2563EB); }
.dm-stop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.dm-stop-head h2 { margin: 0; font-size: 1.1rem; }
.dm-cust { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.dm-addr { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-weight: 600; }
.dm-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.dm-note { background: #EFF6FF; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: .92rem; }
.dm-note.push { background: #FFF7ED; color: #9A3412; }
.dm-photos { margin: 12px 0; }
.dm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 10px; }
.dm-thumbs a { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.dm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dm-thumbs span { position: absolute; left: 4px; bottom: 4px; background: rgba(15,23,42,.7); color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 6px; }
.dm-kind { display: flex; margin-bottom: 8px; }
.dm-kind label { flex: 1; cursor: pointer; }
.dm-kind input { position: absolute; opacity: 0; pointer-events: none; }
.dm-kind span { display: block; text-align: center; padding: 7px 4px; border-radius: 8px; font-weight: 600; font-size: .88rem; }
.dm-kind input:checked + span { background: var(--navy); color: #fff; }
.dm-step { margin-top: 12px; }
.btn-lg { padding: 14px 18px; font-size: 1.05rem; }
.dm-more { margin-top: 12px; }
.dm-more summary, .dm-done summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dm-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.dm-done { padding: 14px 16px; }
.dm-done .job { margin: 0 -16px; }
@media (max-width: 330px) { .dm-tiles { grid-template-columns: 1fr; } }