/* Fixy: contractor workspace, landing page and customer status page.
   Calm blue brand on a soft grey canvas, white cards with real depth, thin-line
   icons, and motion that explains where things went. */
:root {
  --brand: #3f51b5;
  --brand-deep: #2f3a8f;
  --brand-ink: #1c2360;
  --brand-soft: #c5cbf0;
  --brand-tint: #eef0fb;
  --grad: linear-gradient(135deg, #5a6be0 0%, #3f51b5 46%, #29327f 100%);
  --bg: #f3f4f9;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #12141c;
  --ink-2: #2b3040;
  --muted: #5f6677;
  --line: #e3e6ef;
  --line-strong: #cfd4e3;
  --ok: #157f54;
  --ok-tint: #e2f5ec;
  --warn: #8a4b00;
  --warn-tint: #fdeccf;
  --danger: #b3261e;
  --danger-tint: #fdecea;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(18, 20, 28, .05), 0 6px 18px rgba(47, 58, 143, .07);
  --shadow-lift: 0 2px 4px rgba(18, 20, 28, .05), 0 14px 34px rgba(47, 58, 143, .13);
  --shadow-float: 0 24px 60px rgba(28, 35, 96, .24);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.12; letter-spacing: -0.025em; font-weight: 750; }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -0.012em; font-weight: 680; }
a { color: var(--brand); }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }

/* ── Motion ──────────────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fx-out .14s ease both; }
::view-transition-new(root) { animation: fx-in .32s var(--ease) both; }
@keyframes fx-out { to { opacity: 0; } }
@keyframes fx-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); } 60% { box-shadow: 0 0 0 9px transparent; } }
.wrap > *, .auth > *, .status > * { animation: rise .5s var(--ease) both; }
.wrap > :nth-child(2), .auth > :nth-child(2), .status > :nth-child(2) { animation-delay: .04s; }
.wrap > :nth-child(3), .auth > :nth-child(3), .status > :nth-child(3) { animation-delay: .08s; }
.wrap > :nth-child(4), .status > :nth-child(4) { animation-delay: .12s; }
.wrap > :nth-child(5) { animation-delay: .16s; }
.wrap > :nth-child(6) { animation-delay: .2s; }
.wrap > :nth-child(n + 7) { animation-delay: .24s; }

/* Wordmark */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1.5px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 6px 14px color-mix(in srgb, var(--brand) 26%, transparent);
  transition: transform .12s var(--ease), background .15s ease, box-shadow .15s ease, border-color .15s ease;
  -webkit-user-select: none; user-select: none;
}
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: scale(.97); }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(18, 20, 28, .04); }
.btn.quiet:hover { border-color: var(--brand-soft); background: var(--brand-tint); }
.btn.dark { background: var(--ink); box-shadow: 0 8px 20px rgba(18, 20, 28, .22); }
.btn.dark:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--brand); padding: 0 10px; min-height: 40px; box-shadow: none; }
.btn.ghost:hover { background: var(--brand-tint); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.spread > .btn { flex: none; white-space: nowrap; }
.btn.lg { min-height: 56px; font-size: 17px; padding: 0 26px; border-radius: 16px; }
.btn.danger-quiet { background: var(--surface); color: var(--danger); border-color: var(--line-strong); box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #8f1d17; }

/* ── Cards and lists ─────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair .btn { padding: 0 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; line-height: 1.5;
  border-radius: 999px; padding: 2px 10px; background: #e9ebf3; color: var(--ink-2); white-space: nowrap;
}
.badge.emergency { background: var(--danger); color: #fff; }
.badge.urgent { background: var(--warn-tint); color: var(--warn); }
.badge.soon { background: var(--brand-tint); color: var(--brand-deep); }
.badge.planning { background: var(--ok-tint); color: var(--ok); }
.badge.stage-contacted, .badge.stage-scheduled { background: var(--brand-tint); color: var(--brand-deep); }
.badge.stage-done { background: var(--ok-tint); color: var(--ok); }
.badge.solid { background: var(--brand); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: .01em; background: var(--brand-tint); color: var(--brand-deep);
}
.avatar.emergency { background: var(--danger-tint); color: var(--danger); }
.avatar.urgent { background: var(--warn-tint); color: var(--warn); }
.avatar.planning { background: var(--ok-tint); color: var(--ok); }
.avatar.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; }

/* ── Forms ───────────────────────────────────────────────── */
.field { display: block; margin-top: 16px; }
.field > span.label { display: block; font-weight: 620; font-size: 15px; }
.field > span.hint { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.field > span.err, p.err { display: block; color: var(--danger); font-weight: 600; font-size: 14px; margin-top: 6px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="datetime-local"], select, textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 13px; min-height: 50px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
input[type="file"] { width: 100%; font: inherit; font-size: 14.5px; color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-right: 12px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer;
}
input[type="color"] { width: 64px; height: 48px; margin-top: 6px; padding: 4px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.check span {
  display: block; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); font-size: 15px; min-height: 44px; transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.check input:active + span { transform: scale(.96); }
.check input:checked + span { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-deep); font-weight: 650; }
.check input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.switch { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.switch input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.notice { border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.notice.ok { background: var(--ok-tint); color: var(--ok); }
.notice.bad { background: var(--danger-tint); color: var(--danger); }
.notice.warn { background: var(--warn-tint); color: var(--warn); }
.confirm-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 16px; font-weight: 500; }
.confirm-bar span { flex: 1 1 240px; }
.confirm-bar button {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
  color: inherit; text-decoration: underline; cursor: pointer;
}
.hp { position: absolute; left: -9999px; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-float);
  animation: toast 2.6s var(--ease) both; pointer-events: none;
}
.toast .ico { width: 18px; height: 18px; color: #7fe3b7; stroke-width: 2.5; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 14px); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 8px); } }

/* ── Workspace shell ─────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
  view-transition-name: fx-top;
}
.top .inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.top .who {
  margin-left: auto; min-width: 0; max-width: 55%; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.top form { margin: 0; }
.top .acct {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--ink); border: 1px solid var(--line); background: var(--surface); text-decoration: none;
  transition: transform .12s var(--ease), border-color .15s, background .15s;
}
.top .acct:active { transform: scale(.93); }
.top .acct:hover, .top .acct[aria-current="page"] { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.wrap { max-width: 760px; margin: 0 auto; padding: 10px 16px calc(118px + env(safe-area-inset-bottom)); }
.page-head { margin: 8px 0 18px; }
.page-head p { color: var(--muted); margin-top: 4px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; pointer-events: none;
  padding: 18px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 46%, color-mix(in srgb, var(--bg) 0%, transparent));
  view-transition-name: fx-tabs;
}
.tabbar .inner {
  pointer-events: auto; max-width: 460px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 6px; border-radius: 24px; background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px var(--line), var(--shadow-lift);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 18px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 650; position: relative;
  transition: transform .14s var(--ease), color .15s, background .2s;
}
.tabbar a:active { transform: scale(.92); }
.tabbar a[aria-current="page"] { color: var(--brand-deep); background: var(--brand-tint); }
.tabbar a[aria-current="page"] .ico { stroke-width: 2.1; }
.tabbar .ico { width: 22px; height: 22px; }
.tabbar .count {
  position: absolute; top: 3px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff; animation: pop .4s var(--ease) both .2s;
}

/* ── Today ───────────────────────────────────────────────── */
.day-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius-lg); padding: 22px 20px 18px;
  background: var(--grad); box-shadow: 0 18px 40px color-mix(in srgb, var(--brand-deep) 34%, transparent);
}
.day-hero::before, .day-hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0));
}
.day-hero::before { width: 260px; height: 260px; right: -90px; top: -120px; }
.day-hero::after { width: 200px; height: 200px; left: -80px; bottom: -130px; opacity: .7; }
.day-hero > * { position: relative; }
.day-hero .eyebrow { font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; opacity: .82; }
.day-hero h1 { font-size: 30px; margin-top: 6px; }
.day-hero .sub { margin-top: 6px; font-size: 16.5px; opacity: .92; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.stat {
  display: block; padding: 10px 8px 9px; border-radius: 14px; text-decoration: none; color: #fff; text-align: left;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18);
  transition: transform .12s var(--ease), background .15s;
}
a.stat:active { transform: scale(.95); }
a.stat:hover { background: rgba(255, 255, 255, .2); }
.stat b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 750; }
.stat span { display: block; font-size: 11.5px; line-height: 1.25; opacity: .86; margin-top: 3px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.week a {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px; border-radius: 16px;
  text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.week a:active { transform: scale(.93); }
.week .wd { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.week .dn { font-size: 17px; font-weight: 720; letter-spacing: -0.01em; }
.week .pip { height: 6px; display: flex; gap: 3px; align-items: center; }
.week .pip i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.week a[aria-current="date"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(18, 20, 28, .22); }
.week a[aria-current="date"] .wd { color: rgba(255, 255, 255, .7); }
.week a[aria-current="date"] .pip i { background: #fff; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 2px 10px; }
.section-head h2 { font-size: 19px; }
.section-head a { font-size: 14.5px; font-weight: 650; text-decoration: none; }

.route {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 14px 16px; border-radius: 18px;
  text-decoration: none; color: #fff; background: var(--ink); box-shadow: 0 12px 26px rgba(18, 20, 28, .24);
  transition: transform .12s var(--ease);
}
.route:active { transform: scale(.98); }
.route .go { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.route b { display: block; font-size: 16.5px; font-weight: 700; }
.route span span { display: block; font-size: 13.5px; opacity: .78; }
.route .chev { margin-left: auto; opacity: .7; }

.visits { list-style: none; margin: 0; padding: 0; }
.visit { display: grid; grid-template-columns: 62px 1fr; gap: 0 10px; position: relative; }
.visit + .visit { margin-top: 10px; }
.visit .at { padding-top: 16px; text-align: right; font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; line-height: 1.2; }
.visit .at small { display: block; font-weight: 600; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.visit .body {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 12px; box-shadow: var(--shadow); min-width: 0;
}
.visit.next .body { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-lift); }
.visit.next .body::before {
  content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand);
}
.visit.done .body { background: var(--surface-2); box-shadow: none; }
.visit.done .v-title, .visit.done .at { color: var(--muted); }
.visit .v-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.visit .live { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); animation: pulse 2s infinite; }
.visit .v-title { display: block; font-weight: 680; font-size: 16.5px; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.visit .v-meta { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.visit .v-meta .ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
.visit .v-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.visit .v-actions form { margin: 0; }
.chipbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 640;
  text-decoration: none; cursor: pointer; transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.chipbtn:active { transform: scale(.95); }
.chipbtn:hover { background: var(--brand-tint); border-color: var(--brand-soft); }
.chipbtn .ico { width: 17px; height: 17px; }
.chipbtn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.chipbtn.primary:hover { background: var(--brand-deep); }
.chipbtn.ok { color: var(--ok); }

/* ── Search and filters ──────────────────────────────────── */
.search { position: relative; margin: 0 0 12px; }
.search .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type="search"] {
  width: 100%; min-height: 50px; padding: 10px 14px 10px 44px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; -webkit-appearance: none; appearance: none;
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.search input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -2px 12px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
  font-weight: 640; font-size: 14.5px; transition: transform .12s var(--ease), background .2s, color .2s;
}
.seg a:active { transform: scale(.95); }
.seg a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 14px rgba(18, 20, 28, .2); }
.seg a .n { font-weight: 600; opacity: .65; }

/* ── Request rows ────────────────────────────────────────── */
.req {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow);
  transition: transform .14s var(--ease), box-shadow .2s, border-color .15s;
}
.req + .req { margin-top: 10px; }
.req:hover { border-color: var(--brand-soft); box-shadow: var(--shadow-lift); }
.req:active { transform: scale(.985); }
.req .main { flex: 1; min-width: 0; }
.req .title { font-weight: 680; font-size: 16px; line-height: 1.3; margin: 5px 0 1px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req .meta { color: var(--muted); font-size: 13.5px; }
.req .thumb { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; background: var(--line); }
.req .chev { color: var(--line-strong); flex: none; }
.req.unread { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.req.unread .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.empty { text-align: center; padding: 38px 18px; }
.empty .ring { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--brand-tint); color: var(--brand); }
.empty .ring .ico { width: 28px; height: 28px; }
.empty > .ico { width: 36px; height: 36px; color: var(--brand-soft); margin-bottom: 8px; }
.empty h2 { margin-bottom: 4px; }

/* ── Request detail ──────────────────────────────────────── */
.back {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 650; font-size: 14.5px; margin: 4px 0 12px;
  padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.back .ico { width: 18px; height: 18px; }
.lead-card { padding: 20px 18px; border-radius: var(--radius-lg); }
.lead-card h1 { font-size: 25px; margin-top: 10px; }
.lead-card .sum { margin-top: 12px; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.flag { background: var(--danger-tint); border: 1px solid #f3b8b3; color: #5f1410; border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; margin-top: 14px; }

.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 0; padding: 0; list-style: none; }
.steps4 li { position: relative; text-align: center; font-size: 12px; font-weight: 640; color: var(--muted); padding-top: 26px; line-height: 1.25; }
.steps4 li::before {
  content: ""; position: absolute; top: 3px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong); z-index: 1;
}
.steps4 li::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.steps4 li:first-child::after { display: none; }
.steps4 li.done::before { background: var(--brand); border-color: var(--brand); }
.steps4 li.done::after, .steps4 li.now::after { background: var(--brand); }
.steps4 li.now { color: var(--brand-deep); }
.steps4 li.now::before { border-color: var(--brand); border-width: 5px; animation: pulse 2s infinite; }
.steps4 li.done { color: var(--ink-2); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin-top: 12px; }
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 650;
  box-shadow: var(--shadow); transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.quick a:active { transform: scale(.94); }
.quick a .ico { width: 22px; height: 22px; color: var(--brand); }
.quick a.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.quick a.primary .ico { color: #fff; }

.when-big { font-size: 20px; font-weight: 720; letter-spacing: -0.015em; line-height: 1.25; }
.shifts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.shifts form { margin: 0; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.kv { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14.5px; }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 520; }
.person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.person b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.photos { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.photos::-webkit-scrollbar { display: none; }
.photos a { flex: none; scroll-snap-align: start; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .14s var(--ease); }
.photos a:active { transform: scale(.97); }
.photos img { width: 168px; height: 168px; object-fit: cover; display: block; background: var(--line); }
.quote { white-space: pre-wrap; overflow-wrap: anywhere; }
.section-title { font-size: 12.5px; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 24px 2px 8px; }
.stage-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stage-buttons form, .stage-buttons details { margin: 0; }
.stage-buttons .btn { width: 100%; padding: 0 10px; font-size: 14.5px; line-height: 1.2; text-align: center; }
details.schedule > summary.btn { font-size: 16px; }
details.schedule { grid-column: 1 / -1; }
details.schedule > summary { list-style: none; }
details.schedule > summary::-webkit-details-marker { display: none; }
details.schedule[open] > summary { margin-bottom: 10px; }
details[open] > form, details[open] > div { animation: rise .3s var(--ease) both; }
.danger-zone { box-shadow: none; }
.danger-zone > summary { cursor: pointer; font-weight: 650; color: var(--danger); list-style: none; }
.danger-zone > summary::-webkit-details-marker { display: none; }

/* Estimates */
.price { font-size: 24px; letter-spacing: -0.02em; font-weight: 750; }
.price.big { font-size: 36px; line-height: 1.1; margin-top: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
details.estimate > summary { list-style: none; }
details.estimate > summary::-webkit-details-marker { display: none; }
details.estimate[open] > summary { display: none; }

/* Invoices */
.bill { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.bill dt { color: var(--ink-2); overflow-wrap: anywhere; }
.bill dd { margin: 0; font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; }
.bill-head, .bill-row, .bill-total { display: grid; grid-template-columns: 1fr 108px; gap: 8px; align-items: center; }
.bill-head { font-size: 13px; font-weight: 650; color: var(--muted); }
.bill-row + .bill-row { margin-top: 2px; }
.bill-row input[data-amount] { text-align: right; font-variant-numeric: tabular-nums; }
.bill-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 650; }
.bill-total strong { text-align: right; font-size: 20px; letter-spacing: -0.015em; }

/* ── Bottom sheet and photo viewer ───────────────────────── */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px; max-height: 88vh; background: transparent; color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(18, 20, 28, .42); backdrop-filter: blur(3px); animation: fade .2s ease both; }
dialog.sheet[open] { animation: sheet-up .34s var(--ease) both; }
.sheet .panel {
  background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-float);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 14px; }
.sheet h2 { font-size: 20px; }
.sheet .opts { display: grid; gap: 8px; margin: 14px 0 10px; }
.sheet .opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 640; font-size: 16px;
  text-align: left; text-decoration: none; cursor: pointer; transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.sheet .opt:active { transform: scale(.98); }
.sheet .opt:hover { background: var(--brand-tint); border-color: var(--brand-soft); }
.sheet .opt .ico { color: var(--brand); }
dialog.viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
dialog.viewer::backdrop { background: rgba(10, 12, 18, .9); animation: fade .2s ease both; }
dialog.viewer img { display: block; max-width: 96vw; max-height: 88vh; border-radius: 14px; animation: pop .3s var(--ease) both; }
dialog.viewer button {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer;
}

/* ── Share ───────────────────────────────────────────────── */
.linkbox {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px;
  background: var(--brand-tint); color: var(--brand-deep); font-weight: 620; overflow-wrap: anywhere;
}
.qr-wrap { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: center; }
.qr-wrap svg.qr { width: 148px; height: 148px; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 4px; }
.copy-text { background: var(--surface-2); border: 1px dashed var(--brand-soft); border-radius: 14px; padding: 12px 14px; overflow-wrap: anywhere; }
.welcome { background: var(--grad); color: #fff; border: 0; box-shadow: 0 18px 40px color-mix(in srgb, var(--brand-deep) 30%, transparent); }
.welcome p { color: rgba(255, 255, 255, .9); margin-top: 4px; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: #fff; }

/* ── Sign-in and sign-up ─────────────────────────────────── */
.auth { max-width: 520px; margin: 0 auto; padding: 20px 16px 56px; }
.auth .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.auth h1 { margin-bottom: 6px; }
.lang-link { font-size: 14px; font-weight: 650; text-decoration: none; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: var(--surface); }
.alt { text-align: center; margin-top: 18px; color: var(--muted); }

/* ── Landing (the public home page) ─────────────────────── */
.land-nav { max-width: 1120px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.land-nav .row { display: flex; align-items: center; gap: 10px; }
.hero { background: radial-gradient(1200px 520px at 80% -10%, #d9dffb 0%, rgba(217, 223, 251, 0) 60%), linear-gradient(180deg, #eceefb 0%, var(--bg) 100%); overflow: hidden; }
.hero .inner { max-width: 1120px; margin: 0 auto; padding: 28px 20px 56px; display: grid; gap: 36px; align-items: center; }
.hero .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: 12px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 780; animation: rise .6s var(--ease) both; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: #3a4050; margin-top: 16px; max-width: 34em; animation: rise .6s var(--ease) both .06s; }
.hero .cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; animation: rise .6s var(--ease) both .12s; }
.hero .fine { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 34em; }
/* Product pictures: real screenshots in a laptop or phone frame. */
.shot { position: relative; margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot .tag {
  position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .02em; background: rgba(18, 20, 28, .72); color: #fff; backdrop-filter: blur(4px);
}
.laptop {
  border-radius: 14px; background: #fff; border: 1px solid var(--line-strong); overflow: hidden;
  box-shadow: var(--shadow-float), 0 4px 12px rgba(18, 20, 28, .06); animation: rise .8s var(--ease) both .18s;
}
.laptop .bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.laptop .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.laptop .tag { top: 5px; right: 10px; left: auto; padding: 1px 9px; font-size: 11.5px; background: var(--line); color: var(--ink-2); backdrop-filter: none; }
.handset {
  width: min(270px, 100%); margin: 0 auto 20px; padding: 8px; border-radius: 34px; background: #12141c;
  box-shadow: 0 18px 40px rgba(28, 35, 96, .2);
}
.handset img { border-radius: 27px; aspect-ratio: 390 / 720; object-fit: cover; object-position: top; background: #fff; }
.handset .tag { top: -10px; left: 50%; transform: translateX(-50%); }
.band { max-width: 1120px; margin: 0 auto; padding: 48px 20px; }
.band h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.025em; margin-bottom: 22px; font-weight: 750; }
.steps { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.step .num { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--brand-tint); color: var(--brand-deep); font-weight: 750; margin-bottom: 10px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); }
.pay { display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px 22px; box-shadow: var(--shadow); }
.pay h2 { margin-bottom: 10px; }
.pay p { color: var(--ink-2); font-size: 17px; }
.never { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.never li { display: flex; gap: 10px; align-items: center; font-size: 16.5px; font-weight: 560; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.never .ico { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); stroke-width: 3; }
.work { max-width: 46em; }
.work p { color: var(--ink-2); font-size: 17px; }
.closing { text-align: center; background: var(--grad); color: #fff; border-radius: 28px; padding: 44px 20px; box-shadow: 0 18px 40px color-mix(in srgb, var(--brand-deep) 28%, transparent); }
.closing h2 { margin-bottom: 18px; }
.closing .cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.closing .btn { background: #fff; color: var(--brand-deep); box-shadow: 0 10px 24px rgba(18, 20, 28, .22); }
.closing .btn.quiet { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); box-shadow: none; }
.land-foot { text-align: center; color: var(--muted); font-size: 14px; padding: 8px 20px 44px; display: grid; gap: 4px; }
@media (min-width: 900px) {
  .hero .inner { grid-template-columns: .9fr 1.1fr; padding: 48px 20px 88px; }
  .pay { grid-template-columns: 1fr 1fr; align-items: center; padding: 40px; }
}
@media (max-width: 420px) {
  .land-nav .lang-link { padding: 8px 10px; }
  .land-nav .btn { padding: 0 14px; }
}

/* ── Customer status page ────────────────────────────────── */
.status { max-width: 520px; margin: 0 auto; padding: 22px 16px 56px; }
.status .biz { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-weight: 650; }
.status .biz img, .status .biz .mark { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; flex: none; }
.status .biz .mark { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--brand-soft);
}
.timeline li:last-child::before { display: none; }
.timeline .tick {
  position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.timeline .tick .ico { width: 13px; height: 13px; stroke-width: 3; }
.timeline .what { font-weight: 620; }
.timeline .what.strong { font-size: 18px; }
.timeline .when { color: var(--muted); font-size: 14px; }
.powered { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 28px; }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .wrap { padding-top: 18px; }
  h1 { font-size: 32px; }
  .day-hero { padding: 28px 28px 22px; }
  .day-hero h1 { font-size: 36px; }
  dialog.sheet { margin: auto; }
  .sheet .panel { border-radius: 26px; }
}
@media (max-width: 420px) {
  .qr-wrap { grid-template-columns: 1fr; justify-items: start; }
  .stat b { font-size: 20px; }
  .visit { grid-template-columns: 54px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* Today: requests this month */
.month-line { margin-top: 12px; font-size: 13.5px; font-weight: 600; opacity: .9; }

/* Share: Fixy on the contractor's website */
.web-card h2 + p { max-width: 60ch; }
.code-title { margin: 18px 0 2px; font-size: 15.5px; font-weight: 680; letter-spacing: -0.01em; }
.code {
  margin: 8px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-all;
}
.code:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
details.more { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
details.more > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .2s var(--ease); }
details.more[open] > summary::after { transform: rotate(45deg); }
details.more[open] > summary { margin-bottom: 8px; }
.where { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14.5px; }

/* Request: not a real request */
.junk { margin-top: 22px; text-align: center; }
.junk .muted { margin-top: 2px; }
.link-btn { border: 0; background: none; padding: 6px 8px; font: inherit; font-weight: 650; color: var(--danger); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.junk-note { gap: 10px; font-weight: 600; }

/* Owner: requests by contractor */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.month-nav strong { font-size: 17px; text-transform: capitalize; }
.ico.flip { transform: scaleX(-1); }
.billing-totals { grid-template-columns: repeat(3, 1fr); margin: 0 0 14px; }
.billing-totals .stat { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.count-card + .count-card { margin-top: 10px; }
.mini3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini3 > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.mini3 b { display: block; font-size: 17px; line-height: 1.2; }
.mini3 span { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }

/* Request: the customer's own words when Fixy AI translated them */
details.original { margin-top: 8px; }
details.original > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
details.original > summary::-webkit-details-marker { display: none; }
details.original > summary .ico { width: 16px; height: 16px; color: var(--brand); }
details.original > summary .show { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
details.original[open] > summary .show { text-decoration: none; }
details.original > .card { margin-top: 8px; }
