/* Taylor Scaffold — black and gold, built for one-handed use on a phone. */
:root {
  --bg: #0a0a0a;
  --s1: #141414;
  --s2: #1c1c1c;
  --s3: #262626;
  --line: #2c2c2c;
  --text: #f5f5f4;
  --muted: #9b9b98;
  --faint: #6b6b68;
  --gold: #c8a564;
  --gold-2: #dabd85;
  --gold-ink: #1a1305;
  --gold-soft: rgba(200, 165, 100, 0.13);
  --down: #8cc4ff;
  --down-soft: rgba(140, 196, 255, 0.13);
  --good: #4fd894;
  --good-soft: rgba(79, 216, 148, 0.13);
  --bad: #ff7a6b;
  --bad-soft: rgba(255, 122, 107, 0.13);
  --r: 16px;
  --r-sm: 11px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  overscroll-behavior-y: contain; /* stops Chrome reloading the app on a pull-down; pages still move */
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.demo-strip { position: sticky; top: 0; z-index: 40; background: var(--gold); color: var(--gold-ink); text-align: center; font-size: 12.5px; font-weight: 800; padding: calc(var(--safe-t) + 5px) 12px 5px; }
.demo-strip ~ #root .app { padding-top: 8px; }
.demo-strip ~ #root .topbar { top: 26px; }
.i { width: 20px; height: 20px; flex: none; }
.stat .k .i { width: 15px; height: 15px; }
.chip .i { width: 12px; height: 12px; }
.section-head h2 .i { width: 15px; height: 15px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- shell */
.app { max-width: 720px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) 16px calc(var(--nav-h) + var(--safe-b) + 96px); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 78%, transparent); }
.topbar h1 { font-size: 26px; font-weight: 800; flex: 1; min-width: 0; letter-spacing: -.02em; }
.topbar .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.back { width: 40px; height: 40px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand-word { line-height: 1; }
.brand-word { font-weight: 900; letter-spacing: 0.02em; font-size: 15px; line-height: 1.05; }
.brand-word span { display: block; color: var(--text); font-size: 15px; letter-spacing: 0.02em; font-weight: 900; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(12, 12, 12, 0.82); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.nav-in { max-width: 720px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--nav-h); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--gold); }
.nav .dot { position: absolute; top: 9px; left: calc(50% + 8px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

.fab {
  background: linear-gradient(180deg, #d9b878, var(--gold) 55%, #b8944f) !important;
  transition: transform .15s ease, box-shadow .2s ease;
  position: fixed; right: max(16px, calc(50% - 344px)); bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 19;
  height: 56px; padding: 0 22px 0 18px; border-radius: 28px; background: var(--gold); color: var(--gold-ink);
  font-weight: 800; display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.fab svg { width: 22px; height: 22px; }

@media (min-width: 960px) {
  .app.has-nav { max-width: none; margin: 0; padding: calc(var(--safe-t) + 20px) 40px 64px 272px; }
  .has-nav .wrap { max-width: 760px; margin: 0 auto; }
  .has-nav .wrap.wide { max-width: 1120px; }
  .nav { top: 0; right: auto; width: 224px; border-top: 0; border-right: 1px solid var(--line); padding: 24px 12px; }
  .nav-in { display: flex; flex-direction: column; height: auto; gap: 4px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; padding: 11px 14px; border-radius: 12px; }
  .nav a.on { background: var(--gold-soft); }
  .nav .dot { position: static; margin-left: auto; }
  .nav .nav-brand { display: flex !important; padding: 0 10px 22px; }
  .fab { right: auto; left: 24px; bottom: 24px; width: 184px; justify-content: center; }
}
.nav .nav-brand { display: none; }

/* ---------- cards and lists */
.card { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%), var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 0 2px; }
.section-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-head h2 .count { background: var(--s3); color: var(--text); border-radius: 10px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }
.section-head a, .section-head button { font-size: 14px; color: var(--gold); font-weight: 600; }

.list { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 14px; position: relative; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line); }
.item:active { background: var(--s2); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 650; font-size: 16px; }
.item .meta { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.item .end { text-align: right; flex: none; font-size: 13.5px; }
.item .end strong { display: block; font-size: 15px; color: var(--text); }
.item .chev { color: var(--faint); flex: none; }
.badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; }
.badge svg { width: 22px; height: 22px; }
.badge.up { background: var(--gold-soft); color: var(--gold); }
.badge.down { background: var(--down-soft); color: var(--down); }
.badge.done { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.plain { background: var(--s3); color: var(--muted); }
.thumbs { display: flex; gap: 6px; margin-top: 8px; }
.thumbs img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--s3); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--s3); color: var(--muted); white-space: nowrap; }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.down { background: var(--down-soft); color: var(--down); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }

.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14.5px; }
.empty svg { width: 30px; height: 30px; color: var(--faint); margin: 0 auto 8px; display: block; }

/* home stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: block; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.hello { padding: 4px 2px 18px; }
.hello h1 { font-size: 30px; font-weight: 800; }
.hello p { margin: 4px 0 0; color: var(--muted); }

.alert { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); width: 100%; text-align: left; }
.alert + .alert { margin-top: 8px; }
.alert.bad { border-color: rgba(255, 122, 107, 0.35); background: linear-gradient(90deg, var(--bad-soft), var(--s1) 60%); }
.alert.gold { border-color: rgba(200, 165, 100, 0.35); background: linear-gradient(90deg, var(--gold-soft), var(--s1) 60%); }
.alert .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.alert.bad .ic { background: var(--bad-soft); color: var(--bad); }
.alert.gold .ic { background: var(--gold-soft); color: var(--gold); }
.alert .ic svg { width: 19px; height: 19px; }

/* ---------- buttons */
.btn { height: 48px; border-radius: 14px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; background: var(--s2); border: 1px solid var(--line); white-space: nowrap; }
.btn svg { width: 19px; height: 19px; }
.btn.gold { background: linear-gradient(180deg, #d9b878, var(--gold) 55%, #b8944f); color: var(--gold-ink); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px rgba(200,165,100,.22); }
.btn.good { box-shadow: 0 6px 18px rgba(79,216,148,.18); }
.btn { transition: transform .12s ease, box-shadow .2s ease, background .2s ease; }
.btn.good { background: var(--good); color: #062014; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; border-radius: 11px; padding: 0 13px; font-size: 14px; }
.btn:disabled { opacity: 0.5; }
.btn:active { transform: scale(0.98); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions.three { grid-template-columns: repeat(3, 1fr); }

.call {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--good-soft); color: var(--good); font-weight: 700; border: 1px solid rgba(79, 216, 148, 0.25);
}
.call svg { width: 22px; height: 22px; }
.call .grow span { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }

/* ---------- segmented tabs */
.seg { display: flex; background: var(--s1); border: 1px solid var(--line); border-radius: 13px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; height: 36px; border-radius: 10px; font-size: 14px; font-weight: 650; color: var(--muted); white-space: nowrap; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--s3); color: var(--text); }
.seg button .n { font-size: 11.5px; background: var(--bg); border-radius: 8px; padding: 0 6px; color: var(--muted); }
.seg button.on .n { color: var(--gold); }

.search { display: flex; align-items: center; gap: 8px; background: var(--s1); border: 1px solid var(--line); border-radius: 13px; padding: 0 12px; height: 44px; margin: 12px 0; }
.search input { flex: 1; background: none; border: 0; outline: none; min-width: 0; }
.search svg { width: 18px; height: 18px; color: var(--faint); }
.sortbar { display: flex; align-items: center; gap: 8px; margin: -2px 0 12px; font-size: 13.5px; color: var(--muted); }
.sortbar button { padding: 6px 11px; border-radius: 9px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.sortbar button.on { color: var(--gold); border-color: rgba(200, 165, 100, 0.45); }

/* ---------- forms */
.form { display: grid; gap: 16px; }
.field label, .label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.input, .field input, .field select, .field textarea {
  width: 100%; background: var(--s1); border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; height: 50px; outline: none; font-size: 16px;
}
.field textarea { padding: 12px 14px; height: auto; min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input[type="date"], .field input[type="time"] { -webkit-appearance: none; display: flex; align-items: center; }
.field input::-webkit-date-and-time-value { text-align: left; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prefix { position: relative; }
.prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.prefix input { padding-left: 30px; }
.suffix { position: relative; }
.suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.fieldset { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.fieldset > h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.fieldset > h3 svg { width: 18px; height: 18px; color: var(--gold); }
.fieldset .field input, .fieldset .field select, .fieldset .field textarea { background: var(--s2); }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { display: none; }
.toggle .sw { width: 50px; height: 30px; border-radius: 15px; background: var(--s3); position: relative; flex: none; transition: background 0.15s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle input:checked + .sw { background: var(--gold); }
.toggle input:checked + .sw::after { transform: translateX(20px); }
.toggle .grow small { display: block; color: var(--muted); font-size: 13px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { height: 38px; padding: 0 14px; border-radius: 19px; background: var(--s2); border: 1px solid var(--line); font-size: 14px; font-weight: 650; color: var(--muted); }
.pills button.on { background: var(--gold-soft); color: var(--gold); border-color: rgba(200, 165, 100, 0.5); }

.terms { border-radius: var(--r-sm); padding: 13px 14px; background: var(--s2); font-size: 14.5px; line-height: 1.5; }
.terms.on { background: var(--gold-soft); border: 1px solid rgba(200, 165, 100, 0.35); }
.terms strong { color: var(--gold); }

.picker { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--s2); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); max-height: 290px; overflow-y: auto; }
.suggest button { display: block; width: 100%; text-align: left; padding: 12px 14px; }
.suggest button + button { border-top: 1px solid var(--line); }
.suggest button small { display: block; color: var(--muted); }

.client-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--gold-soft); border: 1px solid rgba(200, 165, 100, 0.35); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--s3); display: grid; place-items: center; font-weight: 800; color: var(--gold); flex: none; font-size: 15px; }

/* ---------- job page */
.hero { padding: 4px 2px 16px; }
.hero h1 { font-size: 27px; font-weight: 800; line-height: 1.15; }
.hero .addr { color: var(--muted); margin-top: 6px; font-size: 15px; }
.hero .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; position: relative; }
.tl + .tl { border-top: 1px dashed var(--line); }
.tl .pt { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); color: var(--faint); }
.tl .pt svg { width: 15px; height: 15px; }
.tl.done .pt { background: var(--good-soft); color: var(--good); }
.tl.now .pt { background: var(--gold-soft); color: var(--gold); }
.tl .t { font-weight: 650; }
.tl .d { color: var(--muted); font-size: 13.5px; }
.tl .r { text-align: right; font-size: 14px; color: var(--muted); }
.money-big { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.progress { height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--s3); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- calendar */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { flex: 1; font-size: 20px; font-weight: 800; text-align: center; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 6px; }
.cal-dow div { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day { height: 58px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); padding: 6px 3px 7px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-width: 0; overflow: hidden; }
.day .dn { font-size: 14px; font-weight: 750; line-height: 1; }
.day.blank { background: none; border-color: transparent; }
.day.past { opacity: 0.55; }
.day.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.day.today .dn { color: var(--gold); }
.day.sel { background: var(--s3); }
.day .cnts { display: flex; gap: 3px; height: 18px; }
.day .c { min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.day .c.u { background: var(--gold); color: var(--gold-ink); }
.day .c.d { background: var(--down); color: #06182b; }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (min-width: 560px) { .day { height: 76px; padding: 9px 4px; } .day .c { min-width: 22px; height: 22px; font-size: 12.5px; border-radius: 11px; } .day .cnts { height: 22px; gap: 4px; } }

/* ---------- sheet / modal */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.72); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s; }
.sheet { width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; background: var(--s1); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); animation: up 0.2s ease-out; }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--s3); margin: 0 auto 12px; }
.sheet h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); padding-top: 20px; } .sheet .grip { display: none; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.lightbox { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .x { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; }
.lightbox .nav-l, .lightbox .nav-r { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav-l { left: 10px; } .lightbox .nav-r { right: 10px; }
.lightbox .cap { position: absolute; bottom: calc(var(--safe-b) + 16px); left: 0; right: 0; text-align: center; color: #ccc; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 88px); transform: translateX(-50%); z-index: 70; background: var(--text); color: #111; padding: 12px 18px; border-radius: 14px; font-weight: 650; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: up 0.2s; max-width: calc(100% - 32px); text-align: center; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- sign in */
.gate { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px); max-width: 420px; margin: 0 auto; }
.gate .logo { width: 100%; max-width: 260px; margin: 0 auto 40px; display: block; }
.gate h1 { font-size: 22px; text-align: center; }
.gate p { text-align: center; color: var(--muted); margin: 6px 0 22px; }
.gate .err { color: var(--bad); text-align: center; font-size: 14px; min-height: 20px; margin-top: 10px; }

.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; padding-top: 3px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 14px; }

.login-card { border: 1px dashed rgba(200, 165, 100, 0.5); border-radius: var(--r); padding: 16px; background: var(--gold-soft); }
.login-card .big { font-size: 26px; font-weight: 800; letter-spacing: 0.05em; }

.order-list .item { cursor: default; }
.order-btns { display: flex; flex-direction: column; gap: 4px; }
.order-btns button { width: 34px; height: 30px; border-radius: 8px; background: var(--s3); display: grid; place-items: center; }
.order-btns button:disabled { opacity: 0.25; }
.order-btns svg { width: 16px; height: 16px; }
.pos { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 14px; }
.pos.done { background: var(--good); color: #062014; }
.pos.late { background: var(--bad); color: #fff; }

.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--s3); border-top-color: var(--gold); animation: spin 0.8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet .section-head h2 { font-size: 13px; margin: 0; }

/* ---------- camera measuring */
.ms { position: fixed; inset: 0; z-index: 90; background: #000; display: flex; flex-direction: column; color: #fff; }
.ms-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.ms-title { font-weight: 800; font-size: 16px; text-align: center; flex: 1; }
.ms-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.ms-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ms-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
  linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% - .5px), rgba(255,255,255,.28) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% - .5px), rgba(255,255,255,.28) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.ms-level { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.6); border-radius: 30px; padding: 6px 14px 6px 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ms-ring { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); display: grid; place-items: center; position: relative; }
.ms-ring::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6); }
.ms-bubble { width: 12px; height: 12px; border-radius: 50%; background: var(--warn, #e0a33a); transition: transform .15s ease-out, background .2s; }
.ms-level.ok .ms-bubble { background: var(--good); }
.ms-level.ok { color: var(--good); }
.ms-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; color: var(--muted); }
.ms-msg .i { width: 34px; height: 34px; }
.ms-panel { background: var(--s1); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 14px 16px calc(var(--safe-b) + 14px); }
.ms-panel h3 { font-size: 16px; margin-bottom: 8px; }
.ms-tip { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 8px 0 10px; }
.ms-seg button { font-size: 13px; padding: 0 8px; }
.ms-shutter-row { display: flex; align-items: center; justify-content: space-between; }
.ms-shutter { width: 74px; height: 74px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px #fff; }
.ms-shutter:active { transform: scale(.94); }
.ms-shutter:disabled { opacity: .3; }
.ms-canvas { position: absolute; inset: 0; touch-action: none; }
.ms-loupe { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.6); pointer-events: none; }
.ms-read { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(0,0,0,.78); border: 2px solid var(--gold); border-radius: 14px; padding: 8px 16px; font-size: 15px; white-space: nowrap; pointer-events: none; }
.ms-read strong { font-size: 20px; margin-left: 4px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--s2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.stepper button { width: 38px; height: 34px; border-radius: 9px; background: var(--s3); font-size: 20px; font-weight: 700; }
.stepper strong { min-width: 34px; text-align: center; font-size: 17px; }

/* quote editor */
.side-card { display: flex; gap: 12px; align-items: center; padding: 12px; }
.side-card + .side-card { border-top: 1px solid var(--line); }
.side-card .ph { width: 64px; height: 64px; border-radius: 10px; background: var(--s3); flex: none; overflow: hidden; display: grid; place-items: center; color: var(--faint); }
.side-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.total-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 15px; }
.total-row.big { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 800; }
.saved-note { font-size: 12.5px; color: var(--faint); }
.form > *, .fieldset > *, .two > * { min-width: 0; }
.field select { max-width: 100%; text-overflow: ellipsis; }

/* simpler home */
.todo .item { padding: 11px 14px; }
.todo .badge { width: 34px; height: 34px; border-radius: 10px; }
.todo .badge .i { width: 17px; height: 17px; }
.glance { display: flex; justify-content: center; gap: 22px; margin-top: 26px; font-size: 13.5px; color: var(--muted); }
.glance strong { color: var(--text); }
.link { color: var(--gold); font-weight: 650; background: none; border: 0; padding: 0; font-size: 14px; }
.card.stack .label { margin-bottom: 4px; }

/* ---------- polished home: today only */
.today-head { padding: 26px 2px 6px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.today-head h1 { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.tsec { margin-top: 22px; }
.tsec-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.tsec-head h2 { font-size: 17px; font-weight: 750; flex: 1; }
.tsec-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.tsec-ic .i { width: 16px; height: 16px; }
.tsec-ic.up { background: var(--gold-soft); color: var(--gold); }
.tsec-ic.down { background: var(--down-soft); color: var(--down); }
.tsec-n { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--s2); border: 1px solid var(--line); border-radius: 10px; padding: 1px 9px; }
.tlist { display: grid; gap: 8px; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); position: relative; overflow: hidden; }
.tcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.tcard.up::before { background: var(--gold); }
.tcard.down::before { background: var(--down); }
.tcard.is-done { opacity: .62; }
.tcard:active { background: var(--s2); }
.tcard-main { flex: 1; min-width: 0; }
.tcard-title { font-size: 16.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tempty { padding: 18px 16px; border-radius: 14px; border: 1px dashed var(--line); color: var(--faint); font-size: 14px; text-align: center; }
.tomorrow { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 26px; color: var(--muted); font-size: 14px; font-weight: 600; }
.tomorrow .i { width: 16px; height: 16px; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--s3); color: var(--muted); flex: none; }
.pill .i { width: 12px; height: 12px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.warn { background: rgba(255, 170, 70, .14); color: #ffb44f; }

/* ---------- polished job lists */
.jlist { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.jrow { display: flex; align-items: center; gap: 14px; padding: 15px 16px; }
.jrow + .jrow { border-top: 1px solid var(--line); }
.jrow:active { background: var(--s2); }
.jrow-main { flex: 1; min-width: 0; }
.jrow-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrow-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrow-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.jrow-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.side-k { font-size: 11.5px; color: var(--faint); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.side-v { font-size: 15px; font-weight: 750; }
.newdot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.dtile { width: 48px; flex: none; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); text-align: center; padding: 5px 0 6px; line-height: 1.1; }
.dtile span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.dtile strong { display: block; font-size: 19px; font-weight: 800; margin: 1px 0; }
.dtile.late { border-color: rgba(255, 122, 107, .45); background: var(--bad-soft); }
.dtile.late strong, .dtile.late span { color: var(--bad); }
.range { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.range::-webkit-scrollbar { display: none; }
.range button { height: 34px; padding: 0 4px; border-radius: 17px; background: var(--s1); border: 1px solid var(--line); font-size: 13.5px; font-weight: 650; color: var(--muted); white-space: nowrap; flex: none; }
.range button.on { background: var(--text); color: #111; border-color: transparent; }
.summary { display: flex; gap: 18px; margin: 14px 2px 0; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.summary strong { color: var(--text); font-size: 15px; }
.summary .warn strong { color: #ffb44f; }
.summary .good { color: var(--good); font-weight: 650; }

/* ---------- dashboard */
.dash { display: grid; gap: 12px; margin-top: 18px; }
.dcard { display: block; background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-align: left; width: 100%; }
a.dcard:active, button.dcard:active { background: var(--s2); }
.dk { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dk .i { width: 15px; height: 15px; color: var(--gold); }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { min-height: 112px; display: flex; flex-direction: column; }
.tile .tv { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: auto; padding-top: 10px; }
.tile .tv small { font-size: 13px; color: var(--muted); font-weight: 650; letter-spacing: 0; }
.tile .ts { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.jobs-card { background: linear-gradient(135deg, rgba(200,165,100,.16), var(--s1) 55%); border-color: rgba(200,165,100,.35); }
.jc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.jc-top .chev { color: var(--gold); margin-top: 4px; }
.jc-n { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin-top: 4px; }
.jc-split { display: flex; gap: 18px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.dotc { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.dotc.up { background: var(--gold); } .dotc.down { background: var(--down); }

.weather { padding: 16px 16px 12px; }
.wx-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; padding: 8px 0; }
.wx-off { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; }
.wx-ic .i { width: 30px; height: 30px; }
.wx-t { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.wx-side { text-align: right; font-size: 13px; font-weight: 650; display: grid; gap: 2px; }
.wx-side .i { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); }
.wx-note { margin-top: 12px; padding: 9px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 650; }
.wx-note.good { background: var(--good-soft); color: var(--good); }
.wx-note.warn { background: rgba(255,170,70,.13); color: #ffb44f; }
.wx-note.bad { background: var(--bad-soft); color: var(--bad); }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 12px; background: var(--s2); font-size: 12.5px; }
.wx-day > .i { width: 20px; height: 20px; color: var(--text); }
.wx-day strong { font-size: 14px; }
.wx-day span .i { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }
.warnc { color: #ffb44f; }
.wx-foot { font-size: 11px; color: var(--faint); text-align: right; margin-top: 8px; }
.dash > *, .dgrid > * { min-width: 0; }
.dgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wx-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dk { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- access picker */
.acc { display: grid; gap: 8px; }
.acc-opt { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 13px; background: var(--s2); border: 1px solid var(--line); }
.acc-opt.on { border-color: var(--gold); background: var(--gold-soft); }
.acc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.acc-pct { font-size: 13px; font-weight: 750; color: var(--gold); }
.acc-help { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* ---------- voice quote */
.vq { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; }
.vq-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px; gap: 10px; }
.vq-chat { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.vq-msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.4; }
.vq-msg.bot { align-self: flex-start; background: var(--s2); border-bottom-left-radius: 6px; }
.vq-msg.user { align-self: flex-end; background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 6px; }
.vq-msg.live { opacity: .65; }
.vq-sum { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; max-height: 34vh; overflow-y: auto; }
.vq-sum summary { font-weight: 750; cursor: pointer; color: var(--gold); }
.vq-sum ul { margin: 6px 0 0; padding-left: 18px; }
.vq-foot { padding: 12px 16px calc(var(--safe-b) + 18px); text-align: center; }
.vq-mic { width: 84px; height: 84px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: inline-grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .15s; }
.vq-mic .i { width: 36px; height: 36px; }
.vq-mic.listening { background: var(--bad); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.vq-mic.thinking { opacity: .55; }
.vq-mic.speaking { background: var(--s3); color: var(--gold); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,107,.5); } 50% { box-shadow: 0 0 0 16px rgba(255,122,107,0); } }
.vq-state { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.vq-mic.listening { box-shadow: 0 0 0 calc(var(--lvl, 0) * 22px) rgba(255,122,107,.35); animation: none; transition: box-shadow .08s linear; }
.vq-mic.working { opacity: .55; }

/* ---------- laptops and desktops */
@media (min-width: 960px) {
  .nav { width: 232px; }
  .today-head { padding-top: 30px; }
  .today-head h1 { font-size: 34px; }
  .dash { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; margin-top: 22px; }
  .dash .weather { grid-column: 1; grid-row: 1; }
  .dash .jobs-card { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; }
  .dash .jobs-card .jc-n { font-size: 64px; }
  .dash .dgrid { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .dcard { padding: 20px; border-radius: 20px; }
  .tile { min-height: 132px; }
  .tile .tv { font-size: 30px; }
  .wx-t { font-size: 42px; }
  .wx-ic { width: 64px; height: 64px; }
  .cal, .cal-dow { gap: 8px; }
  .day { height: 104px; padding: 12px 12px 10px; align-items: flex-start; border-radius: 14px; }
  .day .dn { font-size: 16px; }
  .day .cnts { height: 24px; gap: 6px; }
  .day .c { min-width: 24px; height: 24px; font-size: 13px; border-radius: 12px; padding: 0 7px; }
  .day:hover:not(.blank) { border-color: rgba(200, 165, 100, .5); }
  .cal-head h2 { font-size: 24px; }
  .tsec .tlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jrow:hover, .item:hover, .tcard:hover { background: var(--s2); }
  .vq .ms-top, .vq-body, .vq-foot { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
  .ms-panel { width: 100%; max-width: 680px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; }
  .toast { bottom: 40px; }
  .fab { z-index: 21; }
  .home-top { position: absolute; right: 0; top: 26px; padding: 0 !important; }
  .home-top .brand { display: none; }
  .has-nav .wrap { position: relative; }
}
@media (min-width: 1400px) {
  .app.has-nav { padding-left: 296px; }
}

/* ======================================================= premium feel */
h1, h2, .tv, .jc-n, .wx-t, .money-big { font-variant-numeric: tabular-nums; }
.page-in { animation: pagein .28s cubic-bezier(.2,.7,.2,1); }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }
.sheet { animation: up .26s cubic-bezier(.2,.8,.2,1); }
.tcard, .jrow, .item, .dcard, .day { transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease; }
.btn:active, .fab:active, .tcard:active, .dcard:active { transform: scale(.985); }
.jobs-card { box-shadow: 0 0 0 1px rgba(200,165,100,.12) inset, 0 12px 40px -18px rgba(200,165,100,.35); }
.hero h1 { font-size: 30px; letter-spacing: -.025em; }
.today-head h1 { letter-spacing: -.025em; }

/* first paint */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 72px; opacity: 0; animation: bootin .5s ease forwards; }
@keyframes bootin { to { opacity: 1; } }

/* skeleton shimmer while the live tiles load */
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--s2) 25%, var(--s3) 50%, var(--s2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; height: 14px; }
.sk-row { display: flex; gap: 12px; align-items: center; }
.sk-row .sk { flex: 1; }
.sk-ic { width: 54px !important; height: 54px !important; flex: none !important; border-radius: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* today's jobs progress ring */
.ring { position: relative; width: 56px; height: 56px; flex: none; }
.ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--s3); stroke-width: 4; }
.ring .val { stroke: var(--good); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: calc(119.4 - 119.4 * var(--p, 0) / 100); transition: stroke-dashoffset .8s cubic-bezier(.2,.7,.2,1); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; }

/* job page photo banner */
.hero.has-cover { position: relative; margin: 0 -16px 8px; padding: 110px 16px 16px; border-radius: 0 0 22px 22px; overflow: hidden; }
.hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(1.1); }
.hero.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.1), rgba(10,10,10,.92) 70%); }
.hero-in { position: relative; z-index: 1; }
.hero.has-cover .addr { color: var(--text); opacity: .85; }

/* success moment */
.cheer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10,10,10,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; transition: opacity .3s; }
.cheer.out { opacity: 0; pointer-events: none; }
.cheer-box { text-align: center; animation: pop .45s cubic-bezier(.2,.9,.3,1.3); }
.cheer-ring { width: 120px; height: 120px; }
.cheer-ring circle { fill: none; stroke: var(--gold); stroke-width: 4; stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw .55s .1s ease forwards; }
.cheer-ring path { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw .4s .5s ease forwards; }
.cheer-t { font-size: 28px; font-weight: 800; margin-top: 14px; letter-spacing: -.02em; }
.cheer-s { color: var(--muted); margin-top: 4px; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* toasts with an icon */
.toast { display: flex; align-items: center; gap: 8px; }
.toast .i { width: 17px; height: 17px; color: var(--good); flex: none; }
.toast.bad .i { color: #fff; }

/* pull to refresh */
.ptr { position: fixed; top: calc(var(--safe-t) + 12px); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--s2); border: 1px solid var(--line); border-radius: 20px; padding: 8px; }

@media (prefers-reduced-motion: reduce) { .page-in, .sheet, .sk, .cheer-box, .cheer-ring circle, .cheer-ring path { animation: none !important; } }

/* ======================================================= laptops: fill the screen */
@media (min-width: 960px) {
  .has-nav .wrap { max-width: 900px; }
  .has-nav .wrap.wide { max-width: 1240px; }
  .app.has-nav { padding-left: 264px; padding-right: 32px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .cols > .col-side { position: sticky; top: 24px; }
  .cols .section:first-child { margin-top: 0; }
  .hero.has-cover { margin: 0; border-radius: 22px; padding-top: 150px; }
  .tcard:hover, .jrow:hover, .item:hover, a.dcard:hover, button.dcard:hover { transform: translateY(-1px); }
  a.dcard:hover, button.dcard:hover { border-color: rgba(200,165,100,.4); box-shadow: 0 14px 34px -20px rgba(0,0,0,.9); }
  .dash .dgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav a:hover { background: var(--s2); }
  .btn:hover { filter: brightness(1.06); }
  .btn.gold:hover { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 26px rgba(200,165,100,.32); }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .dash { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .tile .tv { font-size: 24px; }
}
@media (min-width: 1400px) {
  .app.has-nav { padding-left: 296px; padding-right: 48px; }
  .has-nav .wrap { max-width: 960px; }
  .has-nav .wrap.wide { max-width: 1320px; }
}

/* ---------- inspections */
.dcard.strip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-color: rgba(200,165,100,.4); }
.dcard.strip.bad { border-color: rgba(255,122,107,.45); background: linear-gradient(90deg, var(--bad-soft), var(--s1) 55%); }
.dcard.strip .chev { color: var(--muted); }
.insp-list { margin-top: 14px; display: grid; gap: 10px; }
.insp { padding: 12px 0 0; border-top: 1px solid var(--line); }
.insp .thumbs img { cursor: pointer; }
.gallery > div { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--s3); }
.gallery > div img { width: 100%; height: 100%; object-fit: cover; }
.wx-note.good { margin-top: 0; }
@media (min-width: 960px) { .dash .dcard.strip { grid-column: 1 / -1; } }

/* ---------- vehicles */
.regplate { display: inline-block; background: #f5d33a; color: #111; font-weight: 800; font-size: 12px; letter-spacing: .06em; padding: 1px 7px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; font-family: "Arial Narrow", Arial, sans-serif; }
.topbar .sub .regplate { margin-left: 0; }
.cklist { display: grid; gap: 8px; }
.ckrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px; background: var(--s2); border: 1px solid var(--line); }
.ckrow.bad { border-color: rgba(255,122,107,.5); background: linear-gradient(90deg, var(--bad-soft), var(--s2) 60%); }
.ckrow .grow { min-width: 0; flex: 1; }
.ckbtns { display: flex; gap: 6px; flex: none; }
.ckbtns button { width: 46px; height: 40px; border-radius: 11px; background: var(--s3); color: var(--muted); display: grid; place-items: center; }
.ckbtns button[data-v="ok"].on { background: var(--good); color: #062014; }
.ckbtns button[data-v="defect"].on { background: var(--bad); color: #fff; }
.checkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ck { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--s2); font-size: 13px; }
.ck .i { width: 15px; height: 15px; flex: none; }
.ck.ok .i { color: var(--good); }
.ck.defect { background: var(--bad-soft); color: var(--bad); }

.vcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line); }
.vcard.todo { border-color: rgba(200,165,100,.5); background: linear-gradient(90deg, var(--gold-soft), var(--s1) 60%); }
.vcard.bad { border-color: rgba(255,122,107,.45); }
.vcard .chev { color: var(--muted); }

/* ---------- safety inspection checklist */
.pmi-bar { position: sticky; top: var(--pmi-top, 64px); z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: rgba(20,20,20,.94); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pmi-bar strong { font-size: 14px; }
.ck3 { display: flex; gap: 6px; flex: none; }
.ck3 button { width: 44px; height: 40px; border-radius: 11px; background: var(--s3); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ck3 button[data-v="ok"].on { background: var(--good); color: #062014; }
.ck3 button[data-v="defect"].on { background: var(--bad); color: #fff; }
.ck3 button[data-v="na"].on { background: var(--text); color: #111; }
.ckdef { width: 100%; margin-top: 4px; }
.sigpad { width: 100%; height: 140px; border-radius: 12px; background: #fff; touch-action: none; display: block; }

.qdel { width: 38px; height: 38px; flex: none; color: var(--muted); }
.qdel:hover { color: var(--bad); }

/* team app — This week: one row per day, sharing the screen height */
@media (max-width: 959px) { .app.has-nav.fit-screen { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 90px); } } /* rows fit the screen; the extra lets the page still move */
.week-rows { display: grid; grid-template-rows: repeat(7, minmax(58px, 1fr)); gap: 8px; }
.wkrow { display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.wkrow .wk-day { font-weight: 750; font-size: 16px; }
.wkrow .wk-date { color: var(--muted); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wkrow .wk-n { font-size: 24px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.wkrow .wk-n small { font-size: 13px; color: var(--muted); font-weight: 650; letter-spacing: 0; }
.wkrow .chev { color: var(--faint); }
.wkrow.today { border-color: rgba(200, 165, 100, .45); background: linear-gradient(100deg, var(--gold-soft), var(--s1) 70%); }
.wkrow.today .wk-day { color: var(--gold); }
.wkrow.none .wk-n { color: var(--faint); }

/* boss — tappable team chip (change who's doing the job) */
.teampick { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; border: 1px solid var(--line); }
.teampick svg { width: 12px; height: 12px; opacity: .7; }
.teampick:active { transform: scale(.96); }

/* team app — Today dashboard fills the phone screen exactly and doesn't scroll.
   The cards stretch to fill the height; only if they can't fit (small phones)
   does fitTeamHome() step them down with .tight / .tighter. */
@media (max-width: 959px) {
  .fit-home { height: 100vh; height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px); overflow: hidden; }
  .fit-home > .wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; min-width: 0; }
  .fit-home > .wrap > *, .fit-home .dash > * { width: 100%; min-width: 0; max-width: 100%; }
  .fit-home .dcard.strip .grow { min-width: 0; }
  .fit-home .dash { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fit-home .dash > * { flex: none; }
  .fit-home .weather { flex: .5 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
  .fit-home .jobs-card { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
  .fit-home .dash > .dgrid { flex: .8 1 auto; grid-auto-rows: 1fr; }
  .fit-home .dgrid .tile { min-height: 0; height: 100%; }
  .fit-home > .wrap > .section { flex: none; }

  /* a step smaller, only when it wouldn't otherwise fit (nothing hidden) */
  .fit-home.tight .home-top .brand img { height: 32px !important; }
  .fit-home.tight .today-head { padding-top: 12px; }
  .fit-home.tight .today-head h1 { font-size: 24px; }
  .fit-home.tight .dash { gap: 9px; margin-top: 11px; }
  .fit-home.tight .dcard { padding: 13px 14px; }
  .fit-home.tight .weather { padding: 12px 14px 9px; }
  .fit-home.tight .wx-ic { width: 46px; height: 46px; border-radius: 14px; }
  .fit-home.tight .wx-ic .i { width: 26px; height: 26px; }
  .fit-home.tight .wx-t { font-size: 30px; }
  .fit-home.tight .wx-note { margin-top: 8px; padding: 6px 11px; font-size: 13px; }
  .fit-home.tight .wx-days { margin-top: 8px; }
  .fit-home.tight .wx-day { padding: 5px 0; gap: 2px; }
  .fit-home.tight .wx-foot { margin-top: 5px; }
  .fit-home.tight .jc-n { font-size: 36px; }
  .fit-home.tight .jc-split { margin-top: 3px; }
  .fit-home.tight .jobs-card .faint.small { margin-top: 6px !important; }
  .fit-home.tight .ring, .fit-home.tight .ring svg { width: 48px; height: 48px; }
  .fit-home.tight .dcard.strip { padding: 10px 14px; }
  .fit-home.tight .dcard.strip .badge { width: 36px; height: 36px; }
  .fit-home.tight .tile .tv { font-size: 24px; padding-top: 4px; }
  /* and another, for the smallest phones (iPhone SE) */
  .fit-home.tighter .home-top .brand img { height: 30px !important; }
  .fit-home.tighter .today-head { padding-top: 8px; }
  .fit-home.tighter .today-head h1 { font-size: 22px; }
  .fit-home.tighter .dash { gap: 8px; margin-top: 10px; }
  .fit-home.tighter .wx-ic { width: 44px; height: 44px; }
  .fit-home.tighter .wx-t { font-size: 30px; }
  .fit-home.tighter .wx-day > span:last-child, .fit-home.tighter .wx-foot { display: none; }
  .fit-home.tighter .jobs-card .faint.small { display: none; }
  .fit-home.tighter .tile [data-s2] { display: none; }
}
@media (max-width: 959px) {
  /* last step down: small phone with check/vehicle tiles showing */
  .fit-home.tightest .home-top .brand img { height: 26px !important; }
  .fit-home.tightest .today-head { padding-top: 4px; }
  .fit-home.tightest .today-head h1 { font-size: 20px; }
  .fit-home.tightest .dash { gap: 7px; margin-top: 8px; }
  .fit-home.tightest .dcard { padding: 10px 12px; border-radius: 15px; }
  .fit-home.tightest .wx-ic { width: 36px; height: 36px; border-radius: 11px; }
  .fit-home.tightest .wx-ic .i { width: 21px; height: 21px; }
  .fit-home.tightest .wx-t { font-size: 26px; }
  .fit-home.tightest .wx-side { font-size: 11.5px; gap: 0; }
  .fit-home.tightest .wx-note { margin-top: 6px; padding: 5px 10px; font-size: 12px; }
  .fit-home.tightest .wx-days { margin-top: 6px; gap: 4px; }
  .fit-home.tightest .wx-day { padding: 4px 0; gap: 1px; font-size: 11px; }
  .fit-home.tightest .wx-day > .i { width: 15px; height: 15px; }
  .fit-home.tightest .wx-day strong { font-size: 12px; }
  .fit-home.tightest .jc-n { font-size: 28px; }
  .fit-home.tightest .jc-split { margin-top: 2px; font-size: 12.5px; }
  .fit-home.tightest .ring, .fit-home.tightest .ring svg { width: 42px; height: 42px; }
  .fit-home.tightest .dcard.strip { padding: 8px 12px; }
  .fit-home.tightest .dcard.strip .badge { width: 32px; height: 32px; }
  .fit-home.tightest .tile .dk { font-size: 11px; }
  .fit-home.tightest .tile .tv { font-size: 21px; padding-top: 2px; }
  .fit-home.tightest .tile .ts { font-size: 12px; }
  /* still too much (several tiles on a tiny phone): let it scroll rather than hide anything */
  .fit-home.scrolls { height: auto; min-height: 100dvh; overflow: visible; }
}

/* boss dashboard on phones: New sits in the top bar instead of floating over the tiles */
.home-new { display: none; }
@media (max-width: 959px) {
  main.fit-home ~ .fab { display: none; }
  .fit-home .home-new { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 11px; border-radius: 19px; font-weight: 800; font-size: 14px; color: var(--gold-ink); background: linear-gradient(180deg, #d9b878, var(--gold) 55%, #b8944f); }
  .fit-home .home-new svg { width: 18px; height: 18px; }
  .fit-home .home-top .row-r { display: flex; align-items: center; gap: 8px; }
}
@media (max-width: 959px) {
  /* the check/inspection tile stays on one line on the dashboards */
  .fit-home .dcard.strip .grow > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* smallest phones: drop the grey second lines so all four boss tiles still fit */
  .fit-home.tightest .dcard.strip .grow > div + div { display: none; }
  .fit-home.tightest .tile .ts { display: none; }
  .fit-home.tightest .tile { padding-bottom: 10px; }
}
@media (max-width: 959px) {
  .fit-home.tightest .dash { gap: 6px; }
  .fit-home.tightest .today-head h1 { margin-top: 0; }
  .fit-home.tightest .dcard { padding-top: 9px; padding-bottom: 9px; }
  .fit-home.tightest .home-top .icon-btn, .fit-home.tightest .home-new { height: 34px; }
  .fit-home.tightest .home-top .icon-btn { width: 34px; }
}
@media (max-width: 959px) {
  /* very last step (tiny phone + practice strip): today's weather only, no 4-day row */
  .fit-home.smallest .wx-days { display: none; }
}

/* boss calendar: clean month with dots, the picked day's jobs underneath */
.cal2 { display: grid; gap: 18px; }
.cal2-month { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 14px 12px 12px; }
.cal2-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; text-align: center; }
.cal2-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.cal2-dow, .cal2-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal2-dow span { text-align: center; font-size: 11.5px; font-weight: 750; color: var(--faint); letter-spacing: .06em; padding-bottom: 6px; }
.cal2-grid { row-gap: 4px; }
.cday { height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; padding-top: 3px; border-radius: 14px; min-width: 0; }
.cday.blank { pointer-events: none; }
.cday .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700; transition: background .15s, color .15s; }
.cday.past .n { color: var(--faint); }
.cday.today .n { box-shadow: 0 0 0 2px var(--gold) inset; color: var(--gold); }
.cday.sel .n { background: var(--gold); color: var(--gold-ink); box-shadow: none; }
.cday:active .n { transform: scale(.92); }
.cdots { display: flex; gap: 3px; height: 6px; }
.cdots i, .cal2-key i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.cdots i.u, .cal2-key i.u { background: var(--gold); }
.cdots i.d, .cal2-key i.d { background: var(--down); }
.cal2-key { display: flex; justify-content: center; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cal2-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal2-key i { width: 8px; height: 8px; }
.cal2-dayhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.cal2-dayhead h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.cal2-empty { display: flex; align-items: center; gap: 12px; padding: 18px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.cal2-empty svg { width: 22px; height: 22px; color: var(--faint); flex: none; }
.cal2-day .tlist { display: grid; gap: 8px; }
@media (min-width: 960px) {
  .cal2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .cday { height: 64px; }
  .cday .n { width: 40px; height: 40px; font-size: 16px; }
  .cal2-day { position: sticky; top: 20px; }
}

/* install welcome screen (first open in a phone browser) */
.ig { position: fixed; inset: 0; z-index: 120; background: radial-gradient(120% 70% at 50% 0%, rgba(200,165,100,.16), transparent 60%), var(--bg); display: grid; place-items: center; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 20px); overflow-y: auto; animation: fade .2s; }
.ig-card { width: 100%; max-width: 420px; text-align: center; }
.ig-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(200,165,100,.35); }
.ig h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 18px 0 6px; }
.ig-lead { color: var(--muted); margin: 0 0 20px; }
.ig-steps { text-align: left; list-style: none; counter-reset: s; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.ig-steps li { counter-increment: s; position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 14px 54px; line-height: 1.5; }
.ig-steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.ig-key { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--s3); color: #4aa3ff; vertical-align: middle; margin: -4px 2px 0; }
.ig-key svg { width: 17px; height: 17px; }
.ig-stuck { font-size: 13px; color: var(--faint); text-align: left; margin: 4px 2px 18px; line-height: 1.5; }
.ig-stuck .ig-key { width: 22px; height: 22px; } .ig-stuck .ig-key svg { width: 13px; height: 13px; }
.ig-native { margin-bottom: 18px; }
.ig-later { margin-top: 4px; font-size: 14px; }
.ig-hold { display: none !important; }
.ig-in { animation: igIn .25s ease-out; }
@keyframes igIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ig-wait { padding: 26px 0 30px; }
