:root {
  --brand: #38049C;
  --brand-ink: #2A0277;
  --brand-tint: #EEE8FA;
  --ink: #101828;
  --muted: #667085;
  --paper: #FFFFFF;
  --canvas: #FFFFFF;
  --card: #FFFFFF;
  --line: #E8EAED;
  --line-strong: #D0D5DD;
  --onsite: #DC6803;
  --new: #344054;
  --ok: #079455;
  --bad: #D92D20;
  --side: #1B2230;
  --side-w: 240px;
  --side-2: #151B26;
  --side-hover: rgba(255, 255, 255, .06);
  --side-on: rgba(255, 255, 255, .1);
  --side-text: #D0D5DD;
  --side-muted: #8B95A7;
  --radius-lg: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden; font-family: var(--font); font-size: 15px; line-height: 1.45;
  color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2 { line-height: 1.2; margin: 0; }
code { font-size: .9em; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- form controls ---------- */
label, .label-text { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
label > input, label > select, label > textarea { display: block; margin-top: 6px; }
label small { display: block; margin-top: 5px; font-weight: 400; color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); width: 100%;
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { resize: vertical; min-height: 44px; }
label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:active { background: var(--brand-ink); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.pill { border-radius: 999px; min-height: 40px; padding: 8px 18px; }
.danger-txt { color: var(--bad); border-color: transparent; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; flex: none;
}
.icon-btn.on-dark { color: var(--ink); }
.icon-btn.subtle { color: var(--muted); width: 36px; height: 36px; }

.spinner {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }
.btn.primary .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-screen { min-height: 70vh; display: grid; place-items: center; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); margin: 0; min-height: 1em; font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 56px 20px; max-width: 36ch; margin: 0 auto; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > * { min-width: 0; }
input, select, textarea { min-width: 0; max-width: 100%; }
@media (max-width: 360px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid2.times { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(108px + var(--safe-b)); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px;
  max-width: min(92vw, 440px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { .toast, .spinner { transition: none; animation-duration: 2s; } }

/* ---------- app chrome ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  padding: calc(6px + var(--safe-t)) 10px 6px; background: #fff; color: var(--ink);
  min-height: 56px; border-bottom: 1px solid var(--line);
}
.topbar-logo { height: 26px; width: auto; margin-left: 4px; }
.topbar-title {
  flex: 1; font-weight: 700; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 0; }
.save-state { font-size: 13px; color: var(--muted); padding-right: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #EEF0F3; color: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; text-decoration: none; flex: none;
  letter-spacing: -.02em;
}
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }

.page { max-width: 1120px; margin: 0 auto; padding: 12px 16px calc(108px + var(--safe-b)); }
.page.has-island { padding-bottom: calc(118px + var(--safe-b)); }
.page.has-dock { padding-bottom: calc(210px + var(--safe-b)); }

.search-wrap { display: none; }
.search { margin: 0; border-radius: 999px; padding: 9px 16px; border: 1px solid var(--line-strong); background: #fff; font-size: 14px; }

/* drawer */
body.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(16, 24, 40, .5); }
.drawer-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 280px);
  background: var(--side); color: var(--side-text);
  padding: calc(14px + var(--safe-t)) 10px 16px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.drawer-brand {
  display: block; padding: 8px 8px 16px; text-decoration: none;
}
.drawer-brand img {
  display: block; height: 36px; width: auto; max-width: 100%;
  background: #fff; border-radius: 8px; padding: 8px 10px; box-sizing: content-box;
}
.drawer-who { padding: 0 10px 16px; }
.drawer-who strong { display: block; color: #fff; font-size: 14px; font-weight: 650; }
.drawer-who span { color: var(--side-muted); font-size: 12px; word-break: break-all; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a, .drawer-foot a, .drawer-sec a, .drawer-sec button {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  color: var(--side-text); text-decoration: none; font-weight: 500; font-size: 14px;
  border-radius: 8px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
  font-family: inherit;
}
.drawer-nav a:hover, .drawer-foot a:hover, .drawer-sec a:hover, .drawer-sec button:hover { background: var(--side-hover); color: #fff; }
.drawer-nav a.on { background: var(--side-on); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.drawer-nav svg, .drawer-foot svg, .drawer-sec svg { color: var(--side-muted); width: 18px; height: 18px; flex: none; }
.drawer-nav a.on svg { color: #fff; }
.drawer-sec { margin-top: 18px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.drawer-sec-label {
  display: block; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--side-muted); padding: 8px 12px 6px;
}
.drawer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }

@media (min-width: 900px) {
  #menu-btn { display: none !important; }
  .topbar { display: none; }
  body.has-nav, body:has(.drawer) { padding-left: var(--side-w); }
  .drawer,
  .drawer[hidden] {
    display: block !important;
    inset: 0 auto 0 0;
    width: var(--side-w);
    z-index: 25;
    pointer-events: none;
  }
  .drawer-scrim { display: none; }
  .drawer-panel {
    position: relative; width: 100%; height: 100%;
    pointer-events: auto; padding-top: 14px;
  }
  .island { display: none; }
  .page { padding: 28px 32px 64px; }
  .page.has-island { padding-bottom: 48px; }
  .page.has-dock { padding-bottom: 120px; }
  .dock { left: calc(var(--side-w) + 24px); bottom: 24px; }
  .toast { bottom: 32px; }
  .page-head { display: flex; }
}

/* floating island */
.island {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + var(--safe-b)); z-index: 22;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; background: #fff; border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.island-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); text-decoration: none;
}
.island-btn.primary, .island-btn.on.primary {
  width: 54px; height: 54px; background: var(--brand); color: #fff; border-color: var(--brand);
}
.island-btn.on:not(.primary) { border-color: var(--brand); color: var(--brand); }
@media (min-width: 900px) { .island { display: none; } }

.auth { max-width: 420px; margin: 0 auto; padding: 12vh 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.auth-logo { width: 180px; height: auto; }
.auth h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.uid-box { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 8px 12px; }
.uid-box code { flex: 1; word-break: break-all; }

/* ---------- feed ---------- */
.page-head {
  display: none; align-items: center; gap: 14px; margin: 0 0 22px;
}
.page-head a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 4px;
}
.page-head a:hover { color: var(--ink); }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }

.feed-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px;
}
.feed-head h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0;
}
.feed-find {
  flex: 1; min-width: 180px; max-width: 280px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; background: #fff;
}
.feed-find svg { color: var(--muted); flex: none; width: 16px; height: 16px; }
.feed-find input {
  border: 0; padding: 9px 0; font-size: 14px; background: transparent;
}
.feed-find input:focus { outline: none; border: 0; }
.feed-cta { margin-left: auto; }
.feed-tools {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 16px;
}
.feed-show {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 6px 0 8px;
}
.refresh-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.refresh-btn:hover { background: #F2F4F7; color: var(--ink); }

.hello { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 4px; }
.hello-sub { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.sec-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 20px 0 10px; }
.ws-head { display: none; }
.see-all { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--brand); cursor: pointer; text-decoration: none; }
.lede { color: var(--muted); max-width: 52ch; margin: 0 0 18px; line-height: 1.5; }

.tiles { display: none; }

.tabs, .pills { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; align-items: center; }
.tabs::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.tabs { background: none; border: 0; border-radius: 0; padding: 0; margin-bottom: 12px; }
.tabs button, .pills a, .pills button {
  flex: none; border: 1px solid transparent; background: transparent; font: inherit; font-weight: 600; font-size: 13.5px;
  color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  display: inline-flex; justify-content: center; gap: 6px; align-items: center; white-space: nowrap;
}
.tabs button:hover, .pills a:hover, .pills button:hover { color: var(--ink); }
.tabs button[aria-selected="true"], .pills a[aria-selected="true"], .pills button[aria-selected="true"] {
  background: #fff; color: var(--ink); border-color: var(--line-strong);
}
.count:empty { display: none; }
.count { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; display: inline-grid; place-items: center; background: #F2F4F7; color: var(--ink); }
[aria-selected="true"] .count { background: #EEF0F3; color: var(--ink); }

.list { display: flex; flex-direction: column; gap: 12px; }

.feed-card {
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(180px, .9fr);
  gap: 20px; align-items: center;
  padding: 20px 22px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.feed-card:hover { border-color: #D0D5DD; box-shadow: 0 4px 14px rgba(16, 24, 40, .06); }
.feed-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed-title { font-weight: 700; font-size: 16px; letter-spacing: -.015em; color: var(--ink); }
.feed-addr { font-size: 13.5px; color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-when { font-size: 12.5px; color: var(--muted); }
.feed-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.feed-stats {
  display: flex; align-items: stretch; gap: 0; color: var(--muted);
}
.feed-stat {
  display: flex; flex-direction: column; gap: 6px; padding: 0 18px;
  border-left: 1px solid var(--line); min-width: 88px;
}
.feed-stat:first-child { border-left: 0; padding-left: 0; }
.feed-stat span { font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.feed-stat b { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.feed-avas { display: flex; }
.feed-ava {
  width: 28px; height: 28px; border-radius: 50%; background: #EEF0F3; color: var(--ink);
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  border: 2px solid #fff; margin-left: -6px;
}
.feed-ava:first-child { margin-left: 0; }
.feed-media { min-width: 0; display: flex; justify-content: flex-end; }
.feed-thumbs { display: flex; gap: 8px; }
.feed-thumbs img {
  width: 72px; height: 56px; object-fit: cover; border-radius: 8px; background: #F2F4F7;
}
.feed-empty { margin: 0; font-size: 13.5px; color: var(--muted); text-align: right; max-width: 28ch; }

.card {
  display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--card); border-radius: 12px; text-decoration: none; color: inherit; position: relative;
  box-shadow: none; border: 1px solid var(--line);
}
.card::before { display: none; }
.card-thumb {
  width: 40px; height: 40px; border-radius: 50%; background: #EEF0F3; color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; letter-spacing: -.02em;
}
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.jobno { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--muted); line-height: 1; }
.card-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-addr, .card-when { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.card .btn { align-self: flex-start; margin-top: 8px; }
.card-chevron { color: #98A2B3; flex: none; display: grid; place-items: center; }
.chip { background: #F2F4F7; color: var(--ink); padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }

.badge { font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 6px; white-space: nowrap; background: #F2F4F7; color: #344054; }
.badge.st-pending { background: #F2F4F7; color: #344054; }
.badge.st-scheduled { background: var(--brand); color: #fff; }
.badge.st-progress { background: #F79009; color: #fff; }
.badge.st-done { background: #1B2230; color: #fff; }
.badge.st-cancel { background: #F2F4F7; color: var(--muted); }
.badge.cat { background: #EEF0F3; color: #344054; }

.app-tab { display: none; }
.fab { display: none; }

@media (max-width: 820px) {
  .feed-card { grid-template-columns: 1fr; gap: 14px; }
  .feed-stats { padding-top: 4px; }
  .feed-media { justify-content: flex-start; }
  .feed-empty { text-align: left; }
}
@media (max-width: 640px) {
  .feed-head h1 { font-size: 24px; }
  .feed-find { max-width: none; width: 100%; order: 3; }
  .feed-cta { margin-left: 0; }
  .feed-thumbs img { width: 64px; height: 50px; }
}

/* ---------- job detail ---------- */
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 4px 0 18px; }
.job-name { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.job-sub { color: var(--muted); font-size: 14px; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.quick:empty { display: none; }
.qbtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: none; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.actions:empty { display: none; }
.note { font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; width: 100%; }
.note.ok { color: var(--ok); }

.dock {
  position: fixed; left: 16px; right: 16px; z-index: 21;
  bottom: calc(96px + var(--safe-b));
  padding: 0; background: transparent; border: 0; pointer-events: none;
}
.dock .btn {
  max-width: 692px; margin: 0 auto; display: flex; min-height: 52px; font-size: 16px;
  border-radius: 14px; pointer-events: auto; box-shadow: var(--shadow-lg);
}

.panel {
  background: var(--card); border: 1px solid var(--line); box-shadow: none; border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 14px;
}
.panel h2 { font-size: 16px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; letter-spacing: -.01em; }
.panel h2 .opt { font-size: 13px; }

.duration { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
.duration strong { color: var(--ink); font-size: 20px; font-weight: 800; font-stretch: 80%; margin-left: auto; }

.add-row { display: flex; gap: 8px; align-items: center; }
.add-row input, .add-row select { flex: 1; }

.ck { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ck:last-child { border-bottom: 0; }
.ck-item { flex: 1; font-size: 15px; }
.ck-btn {
  min-width: 96px; min-height: 38px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700;
  border: 1.5px dashed var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.ck-btn.r-pass { background: var(--ok); border: 1.5px solid var(--ok); color: #fff; }
.ck-btn.r-fail { background: var(--bad); border: 1.5px solid var(--bad); color: #fff; }
.ck-btn.r-na { background: #EEF0F3; border: 1.5px solid #EEF0F3; color: var(--muted); }

.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-actions .btn { color: var(--ink); border-color: var(--line); background: #fff; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos.compact { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 10px; }
.photos > p { grid-column: 1 / -1; margin: 0; }
.photo { margin: 0; position: relative; display: flex; flex-direction: column; gap: 6px; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--line); }
.photo textarea { font-size: 14px; padding: 8px; }
.photo .del { position: absolute; top: 6px; right: 6px; background: rgba(23, 18, 43, .7); color: #fff; width: 34px; height: 34px; font-size: 20px; }

.fu { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fu-text { flex: 1; white-space: pre-wrap; }
.pri { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; margin-top: 2px; }
.pri-low { background: #EEF0F3; color: var(--muted); }
.pri-medium { background: #FCF1D8; color: #8A5C00; }
.pri-high { background: #FBE3E4; color: var(--bad); }

.sig-pad { width: 100%; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); touch-action: none; background: #fff; }
.sig-img { max-width: 320px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.log { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log:last-child { border-bottom: 0; }
.log.bad strong { color: var(--bad); }

.danger-zone { text-align: center; padding: 8px 0 24px; }

/* ---------- public request page ---------- */
.pub-hero { display: none; }
.pub-main { max-width: 620px; margin: 0 auto; padding: 0 14px 40px; }
.pub-main .panel { gap: 16px; padding: 20px; }
.done h2 { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.done p { margin: 0; }
.pub-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 20px 32px; }

/* ---------- customer report (document) ---------- */
.report-body { background: #F4F5F7; }
.report { max-width: 800px; margin: 0 auto; background: #fff; min-height: 100vh; }
@media (min-width: 840px) {
  .report { margin: 40px auto; min-height: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); }
}
.rep-head {
  background: #fff; color: var(--ink); padding: 32px 32px 24px;
  display: flex; flex-direction: column; gap: 20px;
  border-bottom: 1px solid var(--line);
}
.rep-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rep-logo { width: 132px; height: auto; }
.rep-kicker { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.rep-title h1 { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.rep-no { margin: 4px 0 0; font-size: clamp(32px, 6vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.rep-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rep-summary > div { padding: 18px 32px; display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); }
.rep-summary span { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rep-summary strong { font-size: 16px; font-weight: 700; }
.rep-summary em { font-style: normal; font-size: 13px; color: var(--muted); }
.rep-sec { padding: 28px 32px; border-bottom: 1px solid var(--line); }
.rep-sec h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--ink); letter-spacing: -.01em; }
.rep-sec p { margin: 0; max-width: 70ch; color: #344054; }
.rep-flag { background: #FEF3F2; color: var(--bad); padding: 8px 12px; border-radius: 8px; margin-bottom: 12px !important; font-weight: 600; }
.rep-checks { list-style: none; padding: 0; margin: 0; }
.rep-checks li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rep-checks li:last-child { border-bottom: 0; }
.rep-checks b { font-size: 13px; font-weight: 700; }
.rep-checks .r-pass { color: var(--ok); }
.rep-checks .r-fail { color: var(--bad); }
.rep-checks .r-na { color: var(--muted); font-weight: 500; }
.rep-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.rep-photos figure { margin: 0; }
.rep-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #F2F4F7; }
.rep-photos figcaption { font-size: 13.5px; margin-top: 8px; color: #475467; }
.rep-fu { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.rep-fu li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); border-left-width: 3px; }
.rep-fu li b { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.rep-fu li span { color: var(--ink); }
.rep-fu li.pri-low { border-left-color: #98A2B3; }
.rep-fu li.pri-medium { border-left-color: var(--onsite); }
.rep-fu li.pri-high { border-left-color: var(--bad); }
.rep-sig { max-width: 220px; border-bottom: 1px solid var(--ink); margin-bottom: 6px; }
.rep-foot { padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.rep-foot p { margin: 0; color: #475467; }
.report-missing { padding: 80px 32px; display: flex; flex-direction: column; gap: 12px; }

@media print {
  .report-body { background: #fff; }
  .report { margin: 0; border-radius: 0; box-shadow: none; }
  .rep-foot .btn { display: none; }
  .rep-fu li, .rep-flag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-photos figure, .rep-fu li { break-inside: avoid; }
}

/* ---------- Google sign-in ---------- */
.btn.google { background: #fff; border-color: var(--line-strong); gap: 12px; min-height: 52px; font-size: 16px; }
.btn.google:hover { border-color: var(--ink); }

/* ---------- customer portal extras ---------- */
.portal-body { min-height: 100vh; }
.portal-body.has-nav { padding-bottom: 0; }
.portal-auth { max-width: 420px; }
.portal-auth h1 { font-size: clamp(28px, 6vw, 36px); letter-spacing: -.02em; }
.portal-wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
.topbar-brand { display: flex; align-items: center; }
.hero-actions { margin-bottom: 8px; }
.banner { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; font-size: 14px; }
.banner.ok { background: #F6FEF9; color: var(--ok); border: 1px solid #DCFAE6; }
.banner.bad { background: #FEF3F2; color: var(--bad); border: 1px solid #FEE4E2; }
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 10px;
  display: flex; flex-direction: column; gap: 4px; color: var(--muted); opacity: .45;
}
.steps li.on { opacity: 1; color: var(--ink); }
.steps li b { font-size: 12px; color: var(--ink); letter-spacing: .02em; }
.steps li span { font-size: 13px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.people li, .person {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.people li:last-child, .person:last-child { border-bottom: 0; padding-bottom: 0; }
.people li strong, .person strong, .grow strong { display: block; }
.people li span, .person span, .grow span { color: var(--muted); font-size: 13px; word-break: break-all; }
.grow { flex: 1; min-width: 0; }
.suggest-list { display: flex; flex-direction: column; gap: 0; }
.suggest-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0;
  font: inherit; cursor: pointer;
}
.suggest-list button:last-child { border-bottom: 0; padding-bottom: 0; }
.plain-list { margin: 0; padding-left: 1.1em; }
.plain-list li { margin: 0 0 8px; }
.center-call { margin-top: 16px; }
.cust-nav { display: none; }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .rep-head, .rep-sec, .rep-foot { padding-left: 20px; padding-right: 20px; }
  .rep-summary > div { padding-left: 20px; padding-right: 20px; }
}
