/* Tankround app demo
   Navy base, tide-teal accent. Phone first; sidebar layout from 960px. */
@import url('fonts.css');

:root {
  --bg: #081427;
  --surface: #0F2140;
  --surface-2: #162C52;
  --surface-3: #1D3763;
  --line: #223B65;
  --text: #EAF0FA;
  --muted: #94A6C6;
  --accent: #3DD6C4;
  --accent-soft: rgba(61, 214, 196, .14);
  --accent-ink: #042B27;
  --brand: #14306B;
  --info: #7DB2FF;
  --info-soft: rgba(125, 178, 255, .14);
  --due: #F5BE55;
  --due-soft: rgba(245, 190, 85, .14);
  --over: #FF7F78;
  --over-soft: rgba(255, 127, 120, .14);
  --shadow: 0 10px 30px rgba(2, 8, 20, .5);
  --display: 'Archivo', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tab-h: 68px;
  --r-lg: 18px;
  --r-md: 12px;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F1F5FB;
  --surface-3: #E4EBF5;
  --line: #D6DFEC;
  --text: #0A1A36;
  --wm-drop: #14306B;
  --wm-hi: #FFFFFF;
  --muted: #55678A;
  --accent: #0C8F84;
  --accent-soft: rgba(12, 143, 132, .11);
  --accent-ink: #FFFFFF;
  --info: #1F5FC4;
  --info-soft: rgba(31, 95, 196, .1);
  --due: #A16207;
  --due-soft: rgba(202, 138, 4, .13);
  --over: #C8372F;
  --over-soft: rgba(200, 55, 47, .1);
  --shadow: 0 10px 30px rgba(20, 48, 107, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; }
.sidebar { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .mark { width: 40px; height: 40px; border-radius: 10px; }
.topbar .titles { min-width: 0; flex: 1; }
.topbar .firm { font: 700 18px/1.15 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .where { color: var(--muted); font-size: 14px; }
.topbar .desk-title { display: none; }
.topbar .desk-actions { display: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.back-btn { margin-left: -4px; }

.view {
  padding: 16px 16px calc(var(--tab-h) + 96px);
  max-width: 720px; margin: 0 auto;
  display: grid; gap: 18px; align-content: start;
}

/* ---------- Tab bar (phone) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.tab .pill {
  position: relative;
  width: 62px; height: 32px; border-radius: 16px;
  display: grid; place-items: center;
  transition: background .18s ease, color .18s ease;
}
.tab[aria-current='page'] { color: var(--text); font-weight: 700; }
.tab[aria-current='page'] .pill { background: var(--accent); color: var(--accent-ink); }
.badge {
  position: absolute; top: -6px; right: 4px;
  min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 10px; display: grid; place-items: center;
  background: var(--over); color: #2B0806; border: 2px solid var(--bg);
  font-size: 12px; font-weight: 700; line-height: 1;
}
:root[data-theme='light'] .badge { color: #fff; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); z-index: 31;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.fab:active { transform: scale(.94); }

/* ---------- Common pieces ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 0 2px; }
.section-head h2 { font: 700 17px/1.2 var(--display); letter-spacing: -.005em; }
.section-head .aside { color: var(--muted); font-size: 14px; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.card.pad { padding: 16px; }
.rows > * + * { border-top: 1px solid var(--line); }

.row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px; min-height: 64px;
}
button.row:hover, a.row:hover { background: var(--surface-2); }
.row .main { min-width: 0; flex: 1; }
.row .name { font-weight: 600; font-size: 16.5px; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
.row .name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub.wrap { white-space: normal; }
.row .time { width: 46px; font: 600 15px/1 var(--display); color: var(--muted); }
.row .amount { font-weight: 600; white-space: nowrap; }

.avatar {
  position: relative; flex: none;
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line);
  color: var(--text); font: 700 15px/1 var(--display); letter-spacing: .01em;
}
.avatar.lg { width: 60px; height: 60px; border-radius: 17px; font-size: 20px; }
.avatar .flag {
  position: absolute; right: -6px; bottom: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--surface); background: var(--over); color: #2B0806;
}

.st { display: inline-grid; place-items: center; }
.st.ok { color: var(--accent); }
.st.due { color: var(--due); }
.st.over { color: var(--over); }
.st.info { color: var(--info); }
.st.idle { color: var(--muted); }
.t-ok { color: var(--accent); } .t-due { color: var(--due); } .t-over { color: var(--over); } .t-info { color: var(--info); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5;
  background: var(--surface-3); color: var(--muted);
}
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.due { background: var(--due-soft); color: var(--due); }
.chip.over { background: var(--over-soft); color: var(--over); }
.chip.info { background: var(--info-soft); color: var(--info); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 13px;
  font-weight: 700; font-size: 15.5px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.small { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.stretch > * { flex: 1; }

/* ---------- Today ---------- */
.day-summary h1 { font: 800 30px/1.08 var(--display); letter-spacing: -.02em; }
.day-summary p { color: var(--muted); margin-top: 4px; font-size: 16px; }
.run-track { display: flex; gap: 6px; margin-top: 14px; }
.run-track i { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); }
.run-track i.done { background: var(--accent); }
.run-track i.now { background: linear-gradient(90deg, var(--accent) 50%, var(--surface-3) 50%); }

.now-card { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background:
  linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); padding: 16px; display: grid; gap: 14px; }
.now-card .kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent); font-weight: 700; font-size: 14px; }
.now-card h3 { font: 700 23px/1.15 var(--display); letter-spacing: -.015em; }
.now-card .what { color: var(--muted); margin-top: 2px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14.5px; color: var(--text); }
.note svg { color: var(--muted); margin-top: 1px; }

.attn .row { align-items: center; }
.attn .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.attn .ico.over { background: var(--over-soft); color: var(--over); }
.attn .ico.due { background: var(--due-soft); color: var(--due); }

.waste-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; }
.waste-banner .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; flex: none; }
.waste-banner strong { display: block; font-weight: 600; }
.waste-banner span { color: var(--muted); font-size: 14.5px; }

/* ---------- Customers ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 16.5px; }
.search input::placeholder { color: var(--muted); }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-weight: 600; font-size: 14.5px;
}
.filter[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: transparent; }
.list-note { color: var(--muted); font-size: 14px; padding: 0 2px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

.split { display: grid; gap: 18px; }
.detail { display: grid; gap: 18px; align-content: start; }
.cust-head { display: flex; gap: 14px; align-items: center; }
.cust-head h1 { font: 800 25px/1.1 var(--display); letter-spacing: -.02em; }
.cust-head p { color: var(--muted); font-size: 15px; margin-top: 3px; }

.year { padding: 16px; display: grid; gap: 12px; }
.year .headline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.year .big { font: 700 21px/1.15 var(--display); letter-spacing: -.01em; }
.year .small { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.yearbar { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); margin: 6px 0 2px; }
.yearbar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--accent); }
.yearbar.due .fill { background: var(--due); }
.yearbar.over .fill { background: var(--over); }
.yearbar.info .fill { background: var(--info); }
.yearbar .dot { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--text); border: 4px solid var(--surface); }
.yearbar-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13.5px; }

.facts { display: grid; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); flex: none; }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px; }
.card-title h2 { font: 700 17px/1.2 var(--display); }

.plan-price { font: 800 30px/1 var(--display); letter-spacing: -.02em; }
.plan-price small { font: 500 15px/1 var(--body); color: var(--muted); letter-spacing: 0; }

/* ---------- Money ---------- */
.income { padding: 18px 16px; display: grid; gap: 14px; }
.income .label { color: var(--muted); font-size: 15px; }
.income .figs { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.income .fig { font: 800 40px/1 var(--display); letter-spacing: -.03em; }
.income .fig.second { font-size: 26px; color: var(--muted); }
.meter { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.meter-cap { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 6px; }
.plan-row .bar { height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 7px; overflow: hidden; }
.plan-row .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- Schedule ---------- */
.seg { display: inline-grid; grid-auto-flow: column; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.seg button[aria-pressed='true'] { background: var(--surface-3); color: var(--text); }
.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.day {
  display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.day .dow { font-size: 13px; font-weight: 600; }
.day .num { font: 700 20px/1.1 var(--display); color: var(--text); }
.day .dots { display: flex; gap: 3px; height: 6px; margin-top: 3px; }
.day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: .7; }
.day.today .dow { color: var(--accent); }
.day[aria-pressed='true'] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.day[aria-pressed='true'] .num, .day[aria-pressed='true'] .dow { color: var(--accent-ink); }
.day[aria-pressed='true'] .dots i { background: var(--accent-ink); }
.board { display: none; }

/* ---------- Job ---------- */
.job-head h1 { font: 800 27px/1.1 var(--display); letter-spacing: -.02em; }
.job-head p { color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; font-size: 16px; }
.check .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; transition: background .15s, border-color .15s; }
.check[aria-checked='true'] .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check[aria-checked='true'] .lbl { color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 16px 16px; }
.photo { aspect-ratio: 1; border-radius: 12px; position: relative; overflow: hidden; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.photo.p1 { background: linear-gradient(160deg, #3C5A46, #1E3327 60%, #152219); }
.photo.p2 { background: linear-gradient(200deg, #5C6470, #2F3540 55%, #1C2029); }
.photo.p3 { background: linear-gradient(140deg, #4A5B3A, #6B5A3E 50%, #2A2F22); }
.photo span { position: absolute; left: 7px; bottom: 6px; font-size: 11.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.photo.add { border: 2px dashed var(--line); color: var(--muted); background: none; gap: 2px; font-size: 13px; font-weight: 600; grid-auto-flow: row; align-content: center; justify-items: center; }
textarea.notes { width: 100%; min-height: 84px; resize: vertical; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); padding: 12px; outline: none; }
textarea.notes:focus { border-color: var(--accent); }
.sticky-cta { position: sticky; bottom: calc(var(--tab-h) + 12px); z-index: 5; }
.sticky-cta .btn { box-shadow: var(--shadow); min-height: 54px; font-size: 16.5px; }
.done-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- Waste ---------- */
.explain { padding: 14px 16px; border-radius: var(--r-lg); background: var(--info-soft); color: var(--text); font-size: 15px; }
.explain strong { color: var(--info); }

/* ---------- Sheets, dialogs, toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(3, 9, 20, .62); display: grid; align-items: end; animation: fade .18s ease; }
.sheet {
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow: auto; width: 100%; max-width: 560px; margin: 0 auto;
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
  display: grid; gap: 14px;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 4px; }
.sheet h2 { font: 700 21px/1.2 var(--display); letter-spacing: -.01em; }
.sheet .lede { color: var(--muted); font-size: 15px; margin-top: -8px; }
.sheet-actions { display: grid; gap: 4px; margin: 0 -6px; }
.sheet-actions button { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 14px; font-weight: 600; font-size: 16.5px; }
.sheet-actions button:hover { background: var(--surface-2); }
.sheet-actions .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.wa { background: #0B141A; border-radius: 16px; padding: 14px 12px; display: grid; gap: 8px; }
:root[data-theme='light'] .wa { background: #E9E2D8; }
.wa .bubble { background: #1F2C34; color: #E9EDEF; border-radius: 4px 14px 14px 14px; padding: 9px 11px 7px; font-size: 15px; line-height: 1.4; max-width: 92%; }
:root[data-theme='light'] .wa .bubble { background: #fff; color: #111B21; }
.wa .from { color: #53BDEB; font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
:root[data-theme='light'] .wa .from { color: #0C6DAE; }
.wa .meta { text-align: right; font-size: 11.5px; opacity: .6; margin-top: 2px; }
.wa .slots { display: grid; gap: 6px; max-width: 92%; }
.wa .slot { background: #1F2C34; color: #53BDEB; text-align: center; padding: 9px; border-radius: 12px; font-weight: 600; font-size: 14.5px; }
:root[data-theme='light'] .wa .slot { background: #fff; color: #0C6DAE; }

.report { background: #fff; color: #0A1A36; border-radius: 14px; padding: 18px; display: grid; gap: 12px; font-size: 14.5px; }
.report .r-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid #14306B; padding-bottom: 10px; }
.report .r-head b { font: 800 18px/1.1 var(--display); color: #14306B; }
.report .r-head span { color: #55678A; font-size: 13px; text-align: right; }
.report ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.report li { display: flex; gap: 8px; align-items: center; }
.report li svg { color: #0C8F84; }
.report .r-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.report .r-next { background: #E6F6F4; color: #075E57; padding: 10px 12px; border-radius: 10px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 24px); z-index: 60; transform: translateX(-50%);
  max-width: min(92vw, 440px); width: max-content;
  display: flex; gap: 10px; align-items: center;
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font-weight: 600; font-size: 15px; box-shadow: var(--shadow);
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.toast { animation-name: toast-in; }
@keyframes toast-in { from { transform: translate(-50%, 14px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.only-desk { display: none; }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  :root { --tab-h: 0px; }
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .tabbar, .fab, .only-phone { display: none !important; }
  .only-desk { display: revert; }

  .sidebar {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100dvh; padding: 20px 14px;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
  .sidebar .brand .wordmark { display: block; height: 23px; width: auto; color: var(--text); }
  .sidebar .brand b { font: 800 17px/1.1 var(--display); letter-spacing: -.01em; display: block; }
  .sidebar .brand span { color: var(--muted); font-size: 13px; }
  .side-link {
    display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px;
    color: var(--muted); font-weight: 600; font-size: 15.5px;
  }
  .side-link:hover { background: var(--surface-2); color: var(--text); }
  .side-link[aria-current='page'] { background: var(--accent); color: var(--accent-ink); }
  .side-link .count { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--over); color: #2B0806; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
  :root[data-theme='light'] .side-link .count { color: #fff; }
  .sidebar .spacer { flex: 1; }
  .sidebar .firm-card { display: flex; align-items: center; gap: 11px; padding: 12px 10px; border-top: 1px solid var(--line); }
  .sidebar .firm-card b { display: block; font-weight: 600; font-size: 15px; line-height: 1.2; }
  .sidebar .firm-card span { color: var(--muted); font-size: 13.5px; }
  .sidebar .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 13.5px; }

  .topbar { padding: 16px 36px; gap: 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); }
  .topbar .mark, .topbar .titles { display: none; }
  .topbar .desk-title { display: block; flex: 1; font: 800 26px/1.1 var(--display); letter-spacing: -.02em; }
  .topbar .desk-title small { display: block; font: 400 14.5px/1.4 var(--body); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
  .topbar .desk-actions { display: flex; gap: 10px; align-items: center; }
  .topbar .back-btn { display: none; }

  .view { max-width: 1180px; padding: 26px 36px 60px; margin: 0; gap: 22px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols > * { display: grid; gap: 22px; align-content: start; }
  .day-summary h1 { display: none; }
  .day-summary p { margin: 0; font-size: 17px; color: var(--text); }
  .run-track { max-width: 420px; }

  .filters { margin: 0; padding: 2px 0; }
  .split { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 26px; align-items: start; }
  .split .list-col { display: grid; gap: 14px; position: sticky; top: 92px; max-height: calc(100dvh - 116px); overflow: auto; padding-right: 4px; }
  .split .row[aria-current='true'] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .detail-grid > .span { grid-column: 1 / -1; }

  .days { display: none; }
  .board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .board .col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 220px; }
  .board .col.today { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
  .board .col-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 6px; }
  .board .col-head b { font: 700 16px/1 var(--display); }
  .board .col.today .col-head b { color: var(--accent); }
  .board .col-head span { color: var(--muted); font-size: 13px; }
  .jobcard { display: grid; gap: 2px; padding: 9px 10px; border-radius: 11px; background: var(--surface-2); border-left: 3px solid var(--muted); width: 100%; }
  .jobcard:hover { background: var(--surface-3); }
  .jobcard.service { border-left-color: var(--accent); }
  .jobcard.desludge { border-left-color: var(--info); }
  .jobcard.callout { border-left-color: var(--due); }
  .jobcard .t { font: 600 13px/1.2 var(--display); color: var(--muted); display: flex; justify-content: space-between; }
  .jobcard .n { font-weight: 600; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .jobcard .w { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .jobcard.is-done { opacity: .6; }
  .board .none { color: var(--muted); font-size: 13.5px; padding: 6px 4px; }
  .legend { display: flex; gap: 16px; color: var(--muted); font-size: 13.5px; align-items: center; }
  .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
  .sched-list { display: none; }

  .job-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .job-cols > * { display: grid; gap: 22px; align-content: start; }
  .sticky-cta { position: static; }
  .sticky-cta .btn { box-shadow: none; }

  .scrim { align-items: center; }
  .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); padding: 22px 24px 24px; max-width: 480px; }
  .sheet .grab { display: none; }
  .toast { bottom: 28px; left: calc(50% + 126px); }
}

/* Customers: phone shows either the list or one customer */
@media (max-width: 959.9px) {
  .split.has-detail .list-col { display: none; }
  .split:not(.has-detail) .detail { display: none; }
  .list-col { display: grid; gap: 14px; }
}
@media (min-width: 960px) {
  a.link.only-desk { display: inline-block !important; justify-self: start; }
}

/* Layout guards */
.view > *, .split > *, .list-col > *, .cols > *, .cols > * > *, .detail-grid > *, .job-cols > *, .job-cols > * > * { min-width: 0; }
.row .sub { display: block; }
.cols, .cols > *, .job-cols, .job-cols > * { display: grid; gap: 18px; align-content: start; }
@media (min-width: 960px) {
  .cols, .job-cols { gap: 24px; }
  .cols > *, .job-cols > * { gap: 22px; }
}
.now-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.now-actions .primary { grid-column: 1 / -1; }
.btn-row.stretch .btn { padding: 0 10px; min-width: 0; }
@media (min-width: 960px) {
  .now-actions { grid-template-columns: 1fr 1fr 1.2fr; }
  .now-actions .primary { grid-column: auto; }
}
