/* Northport house style (as compliance-pack-design): navy ink, one blue accent,
   warm greys, hairlines instead of boxes, Inter. */
:root {
  --ink: #0B1A40;
  --ink-2: #1D2C55;
  --accent: #036DE3;
  --accent-soft: #EAF2FD;
  --text: #1C1C1A;
  --grey: #6D6A64;
  --grey-2: #8A867E;
  --hair: #E4E1DA;
  --hair-2: #EFEDE8;
  --bg: #F7F6F3;
  --card: #FFFFFF;
  --ok: #17784A;
  --ok-soft: #E8F4EE;
  --todo: #B26B00;
  --todo-soft: #FBF1E1;
  --stop: #A3261F;
  --stop-soft: #FBEDEB;
  --gold: #B8892B;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11,26,64,.04), 0 4px 16px rgba(11,26,64,.05);
  --shadow-hi: 0 2px 4px rgba(11,26,64,.06), 0 12px 32px rgba(11,26,64,.10);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16.5px/1.5 var(--font); color: var(--text); background: var(--bg);
  font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
/* Inter's optical-size axis gives Inter Display at heading sizes, as in the reports. */
body { font-optical-sizing: auto; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -.015em; font-variation-settings: "opsz" 32; }
h1 { font-size: 2rem; line-height: 1.15; margin: .2rem 0 .4rem; }
h2 { font-size: 1.15rem; margin: 2.2rem 0 .8rem; }
h3 { font-size: 1rem; margin: 1.6rem 0 .6rem; }
.muted { color: var(--grey); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.eyebrow.accent { color: var(--accent); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 28px; padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand img { height: 24px; width: auto; display: block; }
.brand .sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); }
.brand .prod { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #C9D3EA; }
.who { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: #DDE3F1; }
.who .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 650; font-size: .8rem; }
.who .link { color: #9FB0D6; font-size: .82rem; }

main { max-width: 1120px; margin: 0 auto; padding: 28px 28px 96px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--grey-2); margin-bottom: 14px; }
.crumbs a { color: var(--grey); }
.crumbs a:hover { color: var(--ink); }

/* ---------- page headers ---------- */
.hero { padding: 18px 0 26px; }
.hero h1 { font-size: 2.4rem; letter-spacing: -.03em; }
.hero p { margin: .4rem 0 0; max-width: 60ch; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--hair); }
.pagehead h1 { margin: 6px 0 2px; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 28px; margin: 20px 0 6px; }
.meta .v { font-weight: 500; color: var(--ink); margin-top: 3px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 12px; }
.section-h h2 { margin: 0; }

/* ---------- tiles ---------- */
.group { margin: 26px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tiles.small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 20px; min-height: 120px;
  border: 1px solid var(--hair); border-radius: var(--r); background: var(--card); color: var(--text); font: inherit; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-hi); border-color: #CFD6E6; outline: none; }
.tile .t { font-weight: 600; font-size: 1.02rem; color: var(--ink); letter-spacing: -.01em; }
.tile .s { color: var(--grey); font-size: .875rem; line-height: 1.45; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.tile .tag { margin-top: auto; align-self: flex-start; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--todo-soft); color: var(--todo); }
.tile .num { position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 600; color: var(--grey-2); letter-spacing: .06em; }
.tile.person { align-items: flex-start; min-height: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 650; font-size: .95rem; margin-bottom: 8px; letter-spacing: .02em; }
.tile.person:hover .avatar { background: var(--accent); }

/* ---------- job cards ---------- */
.cards { display: grid; gap: 14px; }
.card { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 22px; background: var(--card);
  border: 1px solid var(--hair); border-radius: var(--r); color: var(--text); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow-hi); border-color: #CFD6E6; }
.card-h { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.card-h strong { font-size: 1.15rem; color: var(--ink); letter-spacing: -.01em; }
.card .client { font-weight: 500; margin-top: 2px; }
.card .go { color: var(--grey-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); vertical-align: middle; white-space: nowrap; letter-spacing: .01em; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-done, .chip-outside { background: var(--ok-soft); color: var(--ok); }
.chip-blocked { background: var(--stop-soft); color: var(--stop); }
.chip-survey, .chip-order, .chip-install, .chip-mark { background: var(--todo-soft); color: var(--todo); }

/* ---------- stepper ---------- */
.stepper { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--grey-2); white-space: nowrap; }
.stepper li + li::before { content: ""; width: 26px; height: 2px; margin: 0 8px; background: var(--hair); border-radius: 2px; }
.stepper .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--hair); background: #fff; font-size: .68rem; color: var(--grey-2); }
.stepper .dot svg { width: 13px; height: 13px; stroke-width: 2.6; }
.stepper li.done { color: var(--ink); }
.stepper li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.done + li::before { background: var(--ok); }
.stepper li.now { color: var(--accent); }
.stepper li.now .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper.mini li { font-size: 0; gap: 0; }
.stepper.mini li + li::before { width: 14px; margin: 0 3px; }
.stepper.mini .dot { width: 14px; height: 14px; border-width: 2px; font-size: 0; }
.stepper.mini .dot svg { width: 9px; height: 9px; }

/* stage tabs on a door: the stepper, clickable */
.stagebar { display: flex; gap: 8px; overflow-x: auto; margin: 18px 0 6px; padding-bottom: 2px; }
.stage { flex: 1 1 0; min-width: 150px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--hair); background: var(--card); color: var(--grey); }
.stage .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--hair); font-size: .8rem; font-weight: 650; color: var(--grey-2); background: #fff; }
.stage .dot svg { width: 15px; height: 15px; stroke-width: 2.6; }
.stage .st { display: flex; flex-direction: column; line-height: 1.25; }
.stage .st b { font-size: .9rem; color: var(--ink); font-weight: 600; }
.stage .st span { font-size: .74rem; }
.stage.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stage.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stage.on .dot { border-color: var(--accent); color: var(--accent); }
.stage.done.on .dot { color: #fff; }

/* ---------- panels and forms ---------- */
.panel { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
.panel.row, .row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 22px; }
.lbl { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.field { display: block; margin: 10px 0; flex: 1 1 220px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #DAD7D0; border-radius: var(--r-sm);
  background: #FCFCFB; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236D6A64' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.field :disabled { background: var(--hair-2); color: #4A4844; border-color: var(--hair); }
.help { display: block; font-size: .8rem; color: var(--grey-2); margin-top: 6px; line-height: 1.4; }
.note { font-size: .84rem; color: var(--todo); background: var(--todo-soft); padding: 8px 12px; border-radius: 8px; margin: 2px 0 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--hair-2); }
.check:last-child { border-bottom: 0; }
.check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; flex: none; border: 2px solid #CFCBC3; border-radius: 7px; background: #fff; display: grid; place-items: center; transition: all .12s; }
.check input:checked { background: var(--ok); border-color: var(--ok); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: translateY(-1px) rotate(45deg); }
.check input:disabled { opacity: .55; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 24px; }

.line { padding-top: 16px; }
.line-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 2px; }
.line-h .area { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.line-h strong { color: var(--ink); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: var(--r-sm);
  border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; min-height: 48px; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:hover { background: var(--ink-2); box-shadow: 0 4px 14px rgba(11,26,64,.18); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #D6D3CC; }
.btn.ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.sm { padding: 7px 14px; min-height: 38px; font-size: .84rem; border-radius: 9px; }
.savebar { position: sticky; bottom: 0; padding: 16px 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); background: linear-gradient(rgba(247,246,243,0), var(--bg) 35%); }
.savebar .btn { width: 100%; font-size: 1.02rem; min-height: 54px; }

/* ---------- gates ---------- */
.gate { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); margin: 14px 0; border: 1px solid transparent; }
.gate > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.gate .gt { font-weight: 600; color: var(--ink); }
.gate ul { margin: 8px 0 0; padding: 0; list-style: none; }
.gate li { position: relative; padding: 5px 0 5px 18px; font-size: .92rem; color: #3F3D39; border-top: 1px solid rgba(178,107,0,.12); }
.gate li:first-child { border-top: 0; }
.gate li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--todo); }
.gate.ok { background: var(--ok-soft); color: var(--ok); border-color: #CFE7DA; align-items: center; }
.gate.ok .gt { color: var(--ok); }
.gate.stop { background: var(--todo-soft); color: var(--todo); border-color: #F1DDBB; }
.gate.info { background: var(--accent-soft); color: var(--ink); border-color: #D3E3FA; }
.gate.info > svg { color: var(--accent); }

/* ---------- tables ---------- */
table.doors { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
table.doors th, table.doors td { padding: 14px 16px; border-bottom: 1px solid var(--hair-2); text-align: left; vertical-align: middle; }
table.doors tr:last-child td { border-bottom: 0; }
table.doors th { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); background: #FBFAF8; }
table.doors td strong { color: var(--ink); font-weight: 600; }
table.doors .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- photos ---------- */
.photos { margin-top: 8px; }
.ph-list { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.ph { position: relative; margin: 0; width: 124px; }
.ph img, .ph-ref { width: 124px; height: 93px; object-fit: cover; border-radius: 10px; border: 1px solid var(--hair); background: var(--hair-2); display: grid; place-items: center; color: var(--grey-2); }
.ph-ref svg { width: 22px; height: 22px; }
.ph figcaption { font-size: .76rem; font-weight: 600; margin-top: 5px; color: var(--ink); line-height: 1.3; }
.ph figcaption span { font-weight: 400; color: var(--grey); }
.ph-x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--ink); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.ph-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.empty { font-size: .85rem; color: var(--grey-2); padding: 18px; border: 1.5px dashed var(--hair); border-radius: 10px; width: 100%; text-align: center; }

/* ---------- signature ---------- */
.decl { font-size: .95rem; line-height: 1.6; color: #3F3D39; max-width: 75ch; }
.sigpad { width: 100%; max-width: 600px; height: 190px; border: 1.5px dashed #CFCBC3; border-radius: var(--r-sm); background: #FDFDFC; touch-action: none; display: block; margin: 14px 0; }
.sig { max-width: 320px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: #fff; padding: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow-hi); z-index: 20; font-weight: 500; font-size: .92rem; }
.toast[hidden] { display: none; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .topbar { padding: 12px 16px; }
  .brand .sep, .brand .prod, .who .name { display: none; }
  main { padding: 18px 16px 90px; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.85rem; }
  .card { grid-template-columns: 1fr; }
  .card .go { display: none; }
  table.doors th:nth-child(2), table.doors td:nth-child(2) { display: none; }
  table.doors .actions { justify-content: flex-start; }
  .stage { min-width: 128px; }
}

/* ---------- surveys (inspections) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.gaps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.gap { padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: #FCFCFB; }
.gap.bad { border-color: #E9B4AF; background: var(--stop-soft); }
.gap.bad .lbl { color: var(--stop); }
.gap .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gap input { width: 100%; font: inherit; font-size: 1.05rem; padding: 10px; border: 1px solid #DAD7D0; border-radius: 8px; text-align: center; background: #fff; }
.gap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.deflist { margin: 0 0 6px; padding: 0; list-style: none; }
.deflist li { position: relative; padding: 7px 0 7px 18px; border-bottom: 1px solid var(--hair-2); font-size: .95rem; }
.deflist li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--stop); }
.oc { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 7px; border: 1.5px solid currentColor; white-space: nowrap; background: #fff; }
.oc-pass { color: var(--ok); } .oc-adjust { color: var(--accent); } .oc-repair { color: var(--todo); } .oc-replace { color: var(--stop); }
.ph-tag { width: 124px; margin-top: 6px; font: inherit; font-size: .78rem; padding: 6px 8px; border: 1px solid #DAD7D0; border-radius: 8px; background: #fff; }

/* banner on the home screens */
.banner-hero { display: block; width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow); margin: 6px 0 4px; }
@media (max-width: 700px) { .banner-hero { border-radius: 10px; } }
.tile.feature { background: linear-gradient(135deg, var(--ink), #1B3270); border-color: transparent; color: #fff; }
.tile.feature .t { color: #fff; }
.tile.feature .s { color: #C9D3EA; }
.tile.feature .ico { background: rgba(255,255,255,.12); color: #fff; }
.tile.feature .num { color: #9FB0D6; }
.savebar.row { display: flex; gap: 10px; align-items: stretch; }
.savebar.row .btn { width: auto; }
.savebar.row .btn.ghost { flex: 0 0 auto; padding: 0 18px; }

/* ---------- survey form (as the 2286 log): tap buttons, sections, action bar ---------- */
.sec2 { display: grid; gap: 18px; }
.sec2 > header { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--hair); padding-bottom: 10px; }
.sec2 > header .n { font-size: .78rem; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.sec2 > header h3 { margin: 0; font-size: 1.05rem; }
.field2 { display: grid; gap: 8px; }
.field2 .lab { font-weight: 600; color: var(--ink); font-size: .98rem; }
.field2 .hint { color: var(--grey); font-size: .85rem; margin: -2px 0 0; line-height: 1.4; }
.field2 input, .field2 textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #DAD7D0; border-radius: var(--r-sm); background: #FCFCFB; color: var(--text); }
.field2 input:focus, .field2 textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { font: inherit; font-weight: 500; font-size: .95rem; min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid #D6D3CC; background: #fff; color: var(--ink); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt.g[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.opt.a[aria-pressed="true"] { background: var(--todo); border-color: var(--todo); }
.opt.r[aria-pressed="true"] { background: var(--stop); border-color: var(--stop); }
.gaptable { overflow-x: auto; }
.gaptable table { width: 100%; min-width: 420px; border-collapse: collapse; }
.gaptable th, .gaptable td { padding: 8px 6px; border-bottom: 1px solid var(--hair-2); text-align: left; }
.gaptable th { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.gaptable input { width: 100%; max-width: 130px; font: inherit; font-size: 1.05rem; text-align: center; padding: 10px; border: 1px solid #DAD7D0; border-radius: 8px; background: #fff; }
.gaptable input.flag { border-color: #E5B66A; background: var(--todo-soft); color: var(--todo); font-weight: 600; }
.photocat { display: grid; gap: 10px; padding: 14px; border: 1.5px dashed var(--hair); border-radius: 12px; }
.photocat .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.photocat .top > span:first-child { flex: 1; min-width: 160px; font-weight: 600; color: var(--ink); }
.photocat .req { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--stop); }
.photocat .req.have { color: var(--ok); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; background: var(--hair-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph-x { top: 4px; right: 4px; }
.actionbar { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 10px; align-items: center; padding: 12px 0; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(247,246,243,0), var(--bg) 30%); }
.actionbar .grow { flex: 1; }
.confirm { border: 2px solid var(--stop); border-radius: 12px; padding: 16px; background: var(--stop-soft); display: grid; gap: 10px; margin: 14px 0; }
.checklist { margin: 0; padding-left: 20px; color: var(--stop); }
.pill { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: var(--hair-2); color: var(--grey); white-space: nowrap; }
.pill.pass { background: var(--ok-soft); color: var(--ok); }
.pill.adjust { background: var(--accent-soft); color: var(--accent); }
.pill.repair { background: var(--todo-soft); color: var(--todo); }
.pill.replace { background: var(--stop-soft); color: var(--stop); }
.list2 { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; min-height: 72px; background: var(--card); border: 1px solid var(--hair); border-radius: 12px; color: var(--text); box-shadow: var(--shadow); }
.row2.door { grid-template-columns: 46px 1fr auto; }
.row2:hover { border-color: #CFD6E6; box-shadow: var(--shadow-hi); }
.row2 .num { font-size: 1.15rem; font-weight: 700; color: var(--grey-2); text-align: center; }
.row2 .loc { font-weight: 600; color: var(--ink); min-width: 0; }
.row2 .asset { display: block; font-weight: 400; color: var(--grey); font-size: .85rem; margin-top: 2px; }
.progline { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.progbar { height: 6px; background: var(--hair-2); border-radius: 3px; overflow: hidden; margin: 12px 0 14px; }
.progbar i { display: block; height: 100%; background: var(--accent); }
.dayrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .dayrow { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .row2.door { grid-template-columns: 34px 1fr; }
  .row2.door .pill { grid-column: 2; justify-self: start; }
  .actionbar { flex-wrap: wrap; }
  .actionbar .grow { flex-basis: 100%; order: -1; }
}

/* ---------- drawing tiles (as the paper survey sheet) ---------- */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.picks.hand { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opt.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; min-height: 0; border-radius: 12px; background: #fff; color: var(--ink); text-align: center; }
.opt.pick .dg { width: 64px; height: auto; display: block; }
.opt.pick .dg.wide { width: 150px; }
.opt.pick .pk-code { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.4px solid var(--ink); background: #F2F3F5; font-size: .75rem; font-weight: 700; margin-top: 4px; }
.opt.pick .pk-lab { font-size: .8rem; font-weight: 500; line-height: 1.25; }
.opt.pick .pk-sub { font-size: .72rem; color: var(--grey); line-height: 1.25; }
.opt.pick[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 3px rgba(3,109,227,.18); }
.opt.pick[aria-pressed="true"] .pk-code { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- leaf switch for doubles ---------- */
.leafbar { position: sticky; top: 58px; z-index: 7; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0; padding: 10px; border-radius: 14px;
  background: var(--ink); box-shadow: var(--shadow-hi); }
.leafbtn { flex: 1 1 160px; font: inherit; font-weight: 600; font-size: 1rem; min-height: 50px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.25); background: transparent; color: #DDE3F1; cursor: pointer; }
.leafbtn.on { background: #fff; color: var(--ink); border-color: #fff; }
.leafhint { flex-basis: 100%; font-size: .78rem; color: #9FB0D6; padding: 0 4px; }
.sec2.perleaf { border-left: 4px solid var(--accent); }
.leaftag { margin-left: auto; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 99px; }

/* ---------- help tips ---------- */
.helptoggle { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; margin-right: 12px; font: inherit; font-size: .85rem; font-weight: 600;
  color: #DDE3F1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); border-radius: 99px; padding: 6px 12px 6px 6px; cursor: pointer; }
.helptoggle .hq-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #F2C14E; color: var(--ink); font-weight: 800; font-size: .8rem; }
.helptoggle[aria-pressed="false"] .hq-dot { background: rgba(255,255,255,.25); color: #fff; }
.helptoggle > .hq { display: none; }
.hq-host { position: relative; }
.hq { position: absolute; top: -9px; right: -9px; z-index: 4; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #F2C14E; color: #0B1A40; font: 800 13px/1 var(--font); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(11,26,64,.25); cursor: help; }
.hq::before { content: ""; position: absolute; inset: -10px; } /* bigger tap target */
.helptip { position: fixed; z-index: 50; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .9rem; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(11,26,64,.35); }
.helptip .ht-k { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #F2C14E; margin-bottom: 4px; }
.helptip[hidden] { display: none; }
body:not(.help-on) .hq { display: none; }
@media print { .hq, .helptip, .helptoggle { display: none !important; } }
@media (max-width: 700px) { .helptoggle { font-size: 0; padding: 4px; gap: 0; margin-right: 8px; } }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.contact { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 10px; background: #FCFCFB; }
.contact > span:nth-child(2) { display: grid; }
.avatar.sm { width: 34px; height: 34px; font-size: .75rem; margin: 0; flex: none; }
.ph-x.rel { position: static; margin-left: auto; width: 26px; height: 26px; flex: none; }
.hq { top: -11px; right: 6px; }
.who .link { position: relative; padding-right: 4px; }
.who .hq { top: -12px; right: -16px; width: 20px; height: 20px; font-size: 11px; }

/* ---------- audit file ---------- */
.atabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 18px; }
.atabs a { padding: 9px 16px; border-radius: 99px; border: 1px solid #D6D3CC; background: #fff; color: var(--ink); font-weight: 600; font-size: .88rem; text-decoration: none; }
.atabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.countdown { background: var(--ink); color: #fff; border-radius: var(--r); padding: 24px 28px; display: flex; gap: 22px 30px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-hi); }
.countdown .cd-ico svg { width: 44px; height: 44px; color: #8FB8F5; }
.countdown .big { font-size: 3.6rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.countdown .lab { font-size: .95rem; opacity: .85; margin-top: 6px; max-width: 30ch; }
.countdown .cd-side { margin-left: auto; max-width: 42ch; }
.countdown .cd-side .eyebrow { color: #8FB8F5; }
.countdown .cd-side .v { font-weight: 600; font-size: 1.1rem; margin: 3px 0 4px; }
.countdown .cd-side .small { opacity: .8; }
.astats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.astat { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.astat .n { font-size: 2.1rem; font-weight: 700; color: var(--ok); line-height: 1.05; }
.astat .n small { font-size: .9rem; color: var(--grey); font-weight: 500; }
.astat .t { font-size: .86rem; color: var(--grey); }
.astat.bad .n { color: var(--stop); }
.astat.warn .n { color: var(--todo); }
.gate li a { color: inherit; color: #3F3D39; text-decoration: none; }
.gate li a:hover { text-decoration: underline; }
.alist .arow { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.arow-h { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.arow-h > div:first-child { flex: 1 1 280px; display: grid; gap: 3px; }
.arow-h strong { color: var(--ink); }
.attach-wrap { margin-top: 10px; }
.arow details, .panel details { margin-top: 10px; }
.arow summary, .panel summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .88rem; padding: 4px 0; }
.arow details form, .panel details form { margin-top: 12px; }
.ev { list-style: none; margin: 14px 0 0; padding: 0; }
.ev li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--hair-2); }
.ev li > span:last-child { display: grid; gap: 2px; }
.ev .evl { color: var(--ink); font-weight: 500; }
.evd { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.evd svg { width: 14px; height: 14px; stroke-width: 2.4; }
.evd.ok { background: var(--ok-soft); color: var(--ok); }
.evd.miss { background: var(--todo-soft); color: var(--todo); }
.evd.na { background: #EFEDE8; color: var(--grey); }
.findings { list-style: none; margin: 14px 0 0; padding: 0; }
.findings > li { padding: 12px 0; border-top: 1px solid var(--hair-2); }
@media (max-width: 700px) { .countdown .cd-side { margin-left: 0; } .countdown .big { font-size: 2.8rem; } }

/* ---------- phones and tablets ---------- */
/* Wide registers scroll sideways inside their own box instead of the page. */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.tablewrap table.doors { min-width: 720px; }
/* On a phone, the doors table becomes one card per door. */
@media (max-width: 700px) {
  table.doors.stack, table.doors.stack tbody, table.doors.stack tr, table.doors.stack td { display: block; width: 100%; }
  table.doors.stack thead { display: none; }
  table.doors.stack tr { border-bottom: 1px solid var(--hair); padding: 12px 14px; }
  table.doors.stack tr:last-child { border-bottom: 0; }
  table.doors.stack td { border: 0; padding: 4px 0; }
}
/* Comfortable finger targets on touch screens. */
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; }
  .atabs a { padding: 11px 16px; }
}

/* ---------- cloud: sign-in and saved pill ---------- */
.signin { max-width: 460px; margin: 6vh auto 40px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 32px 28px; box-shadow: var(--shadow-hi); }
.signin h1 { font-size: 1.7rem; margin: 18px 0 6px; }
.signin > p { margin: 0 0 22px; font-size: 1.02rem; }
.si-logo { height: 30px; width: auto; display: block; }
.btn.big { width: 100%; min-height: 58px; font-size: 1.08rem; border-radius: 12px; }
.btn.ms { background: #fff; color: #1F1F1F; border: 1.5px solid #8C8C8C; }
.btn.ms:hover { border-color: #1F1F1F; box-shadow: none; }
.btn.ms svg { width: 20px; height: 20px; }
.si-or { display: flex; align-items: center; gap: 14px; color: var(--grey); margin: 22px 0 14px; font-size: .9rem; }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.si-form { display: grid; gap: 14px; }
.si-form input { font-size: 1.1rem; min-height: 52px; }
.si-code { font-size: 1.8rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: 10px; cursor: pointer; justify-self: center; }
.si-steps { padding-left: 22px; margin: 0 0 18px; display: grid; gap: 14px; font-size: 1rem; line-height: 1.45; }
.si-qr { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 12px; margin: 12px 0 8px; width: 210px; }
.si-qr img { width: 100%; display: block; }
.si-key { display: block; word-break: break-all; background: var(--hair-2); padding: 8px 10px; border-radius: 8px; margin-top: 6px; font-size: .95rem; }
.who button.link { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 99px; margin-right: 12px; background: rgba(255,255,255,.1); color: #fff; white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: #8FB8F5; }
.sync.ok i { background: #3DD68C; }
.sync.wait i { background: #F5B94A; }
.sync.busy i { background: #8FB8F5; animation: syncpulse 1s ease-in-out infinite; }
@keyframes syncpulse { 50% { opacity: .3; } }
@media (max-width: 700px) { .signin { margin-top: 2vh; padding: 24px 18px; } .sync { margin-right: 6px; } }

/* Door phases (wings / floors / batches) on the job page. */
.phase-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 22px 0 8px; }
.phase-h h3 { margin: 0; font-size: 1.05rem; }
.phase-h + table.doors { margin-top: 0; }
