/* BPAT app styles — palette and type carried over from Brad's earlier job log */
:root {
  --bg: #F6F4EE; --surface: #FFFFFF; --surface-2: #EFEDE5;
  --ink: #15201B; --ink-muted: #58645E; --border: #DDE1D9;
  --accent: #1F5C3F; --accent-ink: #FFFFFF; --accent-soft: #E4EFE8; --accent-soft-ink: #164430;
  --pass: #1E7A3C; --pass-soft: #E3F3E8; --pass-ink: #12522A;
  --fail: #B3372B; --fail-soft: #FBE7E4; --fail-ink: #7E2419;
  --warn: #9C6B1F; --warn-soft: #F6EEDD;
  --shadow: 0 1px 2px rgba(20,30,24,.06), 0 4px 14px rgba(20,30,24,.06);
  --radius: 12px; --nav-h: 62px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.45 "IBM Plex Sans", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: "Archivo", system-ui, sans-serif; margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); } .small { font-size: 12.5px; } .center { text-align: center; }

.app { max-width: 600px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* sync bar — always visible */
.syncbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 7px 16px calc(7px); padding-top: calc(7px + env(safe-area-inset-top)); font-size: 12.5px; font-weight: 600; }
.syncbar .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.syncbar.ok { background: var(--pass-soft); color: var(--pass-ink); }
.syncbar.busy { background: var(--warn-soft); color: var(--warn); }
.syncbar.busy .dot { animation: pulse 1s infinite; }
.syncbar.bad { background: var(--fail); color: #fff; }
@keyframes pulse { 50% { opacity: .3; } }

/* top bar */
.topbar { position: sticky; top: 32px; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.topbar .back { width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); font-size: 20px; flex: none; }
.brandmark { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 2px; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar h1 { font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { font-size: 12.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally { display: flex; gap: 6px; flex: none; }
.chip { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 20px; }
.chip.pass { background: var(--pass-soft); color: var(--pass-ink); }
.chip.fail { background: var(--fail-soft); color: var(--fail-ink); }

/* layout */
.content { flex: 1; padding: 16px 16px 110px; display: flex; flex-direction: column; gap: 12px; }
.has-nav .content { padding-bottom: calc(110px + var(--nav-h)); }
.content.center { align-items: stretch; justify-content: center; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: left; }
.subcard { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.eyebrow { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.eyebrow.muted { color: var(--ink-muted); }

/* bottom action bar + nav */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; max-width: 600px; margin: 0 auto; background: var(--bg); border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.has-nav .actionbar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: 12px; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; max-width: 600px; margin: 0 auto; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; height: var(--nav-h); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--ink-muted); border-top: 3px solid transparent; }
.bottomnav a.active { color: var(--accent); border-top-color: var(--accent); }

/* buttons */
.btn { border-radius: 12px; border: 1.5px solid transparent; min-height: 52px; padding: 12px 18px; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; text-align: center; transition: transform .05s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); border-color: var(--border); }
.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-block { width: 100%; flex: none; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.armed { background: var(--fail-soft); color: var(--fail-ink); border-color: var(--fail); }
.btnrow { display: flex; gap: 10px; }
.linkbtn { background: none; border: none; padding: 6px 0; font-weight: 600; color: var(--accent); text-align: left; font-size: 14.5px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.flabel { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.req { color: var(--fail); }
.hint { font-size: 12px; color: var(--ink-muted); }
.field input, .field select, .field textarea, .search { background: var(--surface); border: 1.5px solid var(--border); border-radius: 11px; padding: 13px 12px; width: 100%; min-height: 50px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.field-row { display: flex; gap: 10px; }
@media (max-width: 380px) { .field-row { flex-direction: column; } }
.toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle { flex: 1 1 0; min-width: 0; min-height: 56px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); padding: 10px 8px; font-weight: 700; font-size: 15.5px; }
.toggle.active { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--accent); }
.toggle.pass { border-color: var(--pass); color: var(--pass-ink); background: var(--pass-soft); }
.toggle.pass.active { background: var(--pass); color: #fff; }
.toggle.fail { border-color: var(--fail); color: var(--fail-ink); background: var(--fail-soft); }
.toggle.fail.active { background: var(--fail); color: #fff; }
details.more summary { font-weight: 600; color: var(--accent); padding: 6px 0; cursor: pointer; }
details.more .stack { margin-top: 10px; }

/* lists */
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); text-align: left; width: 100%; min-height: 64px; }
.row .info { flex: 1; min-width: 0; }
.row .r1 { font-weight: 700; font-size: 15.5px; }
.row .r2 { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.row .arrow { color: var(--ink-muted); font-size: 22px; }
.row.dim { opacity: .6; box-shadow: none; }
.pill { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; flex: none; background: var(--surface-2); color: var(--ink-muted); }
.pill.in_progress, .pill.paused { background: var(--warn-soft); color: var(--warn); }
.pill.completed, .pill.certified { background: var(--pass-soft); color: var(--pass-ink); }
.search { font-size: 16px; }

.appliance-row { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 64px; }
.appliance-row .stripe { width: 6px; flex: none; background: var(--border); }
.stripe.pass { background: var(--pass); } .stripe.fail { background: var(--fail); } .stripe.review { background: var(--warn); }
.appliance-row .body { flex: 1; min-width: 0; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.appliance-row .id { font-weight: 700; font-size: 14px; min-width: 56px; }
.appliance-row .desc { flex: 1; min-width: 0; }
.appliance-row .d1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appliance-row .d2 { font-size: 12px; color: var(--ink-muted); }
.result-badge { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 7px; flex: none; background: var(--surface-2); }
.result-badge.pass { background: var(--pass-soft); color: var(--pass-ink); }
.result-badge.fail { background: var(--fail-soft); color: var(--fail-ink); }
.result-badge.review { background: var(--warn-soft); color: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 8px; text-align: center; }
.tile .n { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 26px; }
.tile .l { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.tile.pass .n { color: var(--pass); } .tile.fail .n { color: var(--fail); }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty h2 { color: var(--ink); }
.empty p { max-width: 34ch; }
.loading { padding: 48px 16px; text-align: center; color: var(--ink-muted); font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 13px; }
.errornote { background: var(--fail-soft); color: var(--fail-ink); border: 1px solid var(--fail); border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.warnnote { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.toast { background: var(--pass-soft); color: var(--pass-ink); border-radius: 20px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; text-align: center; }

/* job */
.jobhead { display: grid; gap: 8px; font-size: 14px; }
.jobhead .k { display: inline-block; width: 90px; color: var(--ink-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.blockers { margin: 0; padding-left: 20px; color: var(--warn); font-weight: 600; font-size: 14px; }

/* test flow */
.stepper { display: flex; gap: 4px; padding: 10px 16px 0; }
.stepper span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.stepper span.on { background: var(--accent); }
.history { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.history .eyebrow { margin: 0; }
.hrow { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.summary-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.summary-list b.pass { color: var(--pass); } .summary-list b.fail { color: var(--fail); }
.recap { background: var(--surface-2); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.failcard { border-color: var(--fail); }

/* label */
.labelbanner { border-radius: 12px; padding: 16px; font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 20px; text-align: center; color: #fff; }
.labelbanner.pass { background: var(--pass); } .labelbanner.fail { background: var(--fail); }
.labelcard { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.labelcard canvas { display: block; width: 100%; height: auto; }
.values { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.vrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.vrow:last-child { border-bottom: none; }
.vrow .k { color: var(--ink-muted); font-size: 13px; }
.vrow .v { font-size: 20px; font-weight: 700; }

/* documents */
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.dochead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.docbiz { text-align: right; font-size: 12px; color: var(--ink-muted); line-height: 1.5; display: flex; flex-direction: column; align-items: flex-end; }
.docbiz img { width: 140px; height: auto; margin-bottom: 4px; }
.docbiz b { color: var(--ink); }
.draftnote { margin-top: 6px; font-size: 12px; color: var(--warn); font-weight: 600; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 13.5px; }
.doc-meta .k { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.doc-meta .v { font-weight: 600; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th, .doc-table td { border: 1px solid var(--border); padding: 6px 7px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--surface-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-muted); }
.doc-table td.res { font-weight: 700; } .doc-table td.res.pass { color: var(--pass); } .doc-table td.res.fail { color: var(--fail); }
.failrow td { background: var(--fail-soft); }
.failhead { color: var(--fail); }
.doc { overflow-x: auto; }

/* audit */
.auditrow { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.auditrow .when { font-size: 11.5px; color: var(--ink-muted); }

/* sign in */
.signin .content { max-width: 420px; margin: 0 auto; width: 100%; }
.signin-logo { width: min(300px, 80vw); height: auto; margin: 16px auto 0; display: block; }
.signin-title { font-size: 26px; }

@media print {
  .syncbar, .topbar, .actionbar, .bottomnav, .no-print { display: none !important; }
  body, .app { background: #fff; max-width: none; }
  .content { padding: 0; }
  .doc { border: none; padding: 0; overflow: visible; }
  .failrow td { background: #fbe7e4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- visual checklist ---------- */
.btn-pass-big { background: var(--pass); color: #fff; min-height: 60px; font-size: 18px; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checkrow { background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.checkrow.ok { border-color: var(--pass); }
.checkrow.defect { border-color: var(--fail); background: var(--fail-soft); }
.checkrow .ctext { font-weight: 600; font-size: 15px; line-height: 1.35; }
.cbtns { display: grid; grid-template-columns: 1fr 1fr 0.7fr; gap: 6px; }
.cbtn { min-height: 48px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; font-size: 15px; }
.cbtn.ok.on { background: var(--pass); border-color: var(--pass); color: #fff; }
.cbtn.defect.on { background: var(--fail); border-color: var(--fail); color: #fff; }
.cbtn.na.on { background: var(--ink-muted); border-color: var(--ink-muted); color: #fff; }
.cnote { border: 1.5px solid var(--fail); border-radius: 10px; padding: 12px; min-height: 48px; width: 100%; }
.summary-list .faildetail { color: var(--fail-ink); font-size: 13.5px; list-style: none; margin-left: -6px; }

/* ---------- signatures ---------- */
.sigbox { border: 2px dashed var(--border); border-radius: 12px; background: var(--surface); min-height: 110px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--accent); }
.sigbox.empty:active { background: var(--accent-soft); }
.sigbox .sigicon { font-size: 26px; }
.sigbox.signed { border-style: solid; flex-direction: column; padding: 10px; }
.sigbox.signed img { max-width: 100%; max-height: 110px; }
.sigactions { display: flex; gap: 18px; }
.linkbtn.danger { color: var(--fail); }
.sigsheet { position: fixed; inset: 0; z-index: 100; background: rgba(10, 20, 15, .55); display: flex; align-items: flex-end; justify-content: center; }
.sigsheet-inner { background: var(--bg); width: 100%; max-width: 760px; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sighead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sighead .btn { flex: none; min-height: 44px; }
.sigpad-wrap { position: relative; }
.sigpad { display: block; width: 100%; height: min(46vh, 300px); background: #fff; border: 1.5px solid var(--border); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sigplaceholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b9bdb6; font-size: 22px; font-weight: 600; pointer-events: none; }
.sigline { position: absolute; left: 24px; right: 24px; bottom: 28%; border-bottom: 1.5px solid #cfd3cb; pointer-events: none; }
.declaration { font-size: 14px; line-height: 1.55; background: var(--surface-2); border-radius: 10px; padding: 12px; }

/* ---------- job: certificate link ---------- */
.certlink { display: flex; align-items: center; gap: 12px; background: var(--pass-soft); border: 2px solid var(--pass); border-radius: 12px; padding: 14px 16px; min-height: 64px; }
.certlink .cl-k { font-weight: 700; color: var(--pass-ink); }
.certlink .cl-v { flex: 1; text-align: right; font-weight: 700; }

/* ---------- certificate document ---------- */
.certwrap { padding-left: 8px; padding-right: 8px; }
.cert { display: flex; flex-direction: column; gap: 14px; color: #111; }
.cpage { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-x: auto; }
.chead { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; border-bottom: 3px solid var(--accent); padding-bottom: 12px; flex-wrap: wrap; }
.cbrand { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cbrand img { width: 170px; height: auto; margin-left: -4px; }
.cbiz { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 17px; }
.cno { text-align: right; }
.cnum { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-weight: 700; font-size: 20px; }
.clabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #5a6660; }
.cval { font-weight: 600; font-size: 14px; }
.csmall { font-size: 11.5px; color: #4a524d; }
.ctitle { font-size: 26px; color: var(--accent); margin-top: 4px; }
.csub { color: #4a524d; font-size: 13px; margin-top: -8px; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.ctiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ctile { border: 1px solid #dde1d9; border-radius: 8px; padding: 8px; text-align: center; }
.ctile .n { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 22px; }
.ctile .n.small { font-size: 14px; padding-top: 6px; }
.ctile .l { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #5a6660; }
.ctile.pass .n { color: var(--pass); } .ctile.fail .n { color: var(--fail); }
.cfailhead { color: var(--fail); font-size: 16px; }
.callpass { color: var(--pass-ink); font-weight: 700; }
.ctable { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ctable th, .ctable td { border: 1px solid #d5d9d1; padding: 5px 6px; text-align: left; vertical-align: top; }
.ctable th { background: #eef1ec; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.ctable tr.cfail td { background: #fbe7e4; }
.ctable td.cmark { text-align: center; font-weight: 700; }
.ctable td.cbad { color: var(--fail); background: #fbe7e4; }
.ctable .cnum-col { text-align: center; width: 22px; }
.cres { font-weight: 800; } .cres.pass { color: var(--pass); } .cres.fail { color: var(--fail); } .cres.review { color: var(--warn); }
.cdecl { border-top: 1px solid #dde1d9; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cdecl h2 { font-size: 15px; }
.cdecl p { font-size: 12.5px; line-height: 1.5; }
.csigs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 6px; }
.csigimg { height: 70px; display: flex; align-items: flex-end; }
.csigimg img { max-height: 70px; max-width: 100%; }
.csigline { border-top: 1px solid #111; padding-top: 4px; font-size: 11.5px; }
.csection { font-size: 17px; color: var(--accent); }
.ckey { margin: 0; padding-left: 20px; font-size: 11px; columns: 2; column-gap: 24px; }
.cfooter { margin-top: auto; padding-top: 8px; border-top: 1px solid #dde1d9; font-size: 9.5px; color: #6b736e; text-align: center; }
@media (max-width: 480px) { .ctiles { grid-template-columns: repeat(2, 1fr); } .cgrid { grid-template-columns: 1fr; } .ckey { columns: 1; } }

@media print {
  @page { size: A4; margin: 12mm; }
  .certwrap { padding: 0; }
  .cert { gap: 0; }
  .cpage { border: none; border-radius: 0; padding: 0; break-after: page; page-break-after: always; overflow: visible; min-height: 270mm; }
  .cpage:last-child { break-after: auto; page-break-after: auto; }
  .ctable tr { break-inside: avoid; }
  .ctable tr.cfail td, .ctable td.cbad, .chead { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ctiles { grid-template-columns: repeat(4, 1fr); } .cgrid { grid-template-columns: 1fr 1fr; } .ckey { columns: 2; }
}
.failtext { color: var(--fail); }

/* Search, due list, appliance page */
.searchbox { width: 100%; font-size: 17px; padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); }
.searchbox:focus { outline: none; border-color: var(--accent); }
.searchlink { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); color: var(--ink-muted); font-size: 15.5px; }
.row .kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); flex: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chipbtn { flex: none; border: 1.5px solid var(--border); background: var(--surface); border-radius: 22px; padding: 10px 14px; font-weight: 600; font-size: 14px; min-height: 44px; }
.chipbtn b { margin-left: 4px; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.chipbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.duegroup { display: flex; flex-direction: column; gap: 8px; }
.duehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.duecount { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-weight: 700; font-size: 20px; text-align: right; }
.duecount .overdue { display: block; font-size: 11px; color: var(--warn); }
.dueitem { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.dueitem span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duedate { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink-muted); }
.duedate.late, .latetext { color: var(--warn); font-weight: 700; }
.duelink { display: flex; align-items: center; gap: 12px; }
.duelink .n { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; }
a.link { color: var(--accent); font-weight: 600; }
.crevnote { border: 1.5px solid #9C6B1F; background: #F6EEDD; color: #5a3d10; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; margin: 6px 0 10px; }
.corrnote { margin: -4px 4px 0; } .corrlink { margin: -6px 4px 4px; font-size: 13.5px; }
.tile.warn { background: var(--warn-soft); color: var(--warn); }
.tablewrap { overflow-x: auto; }
.sendinfo { display: flex; flex-direction: column; gap: 4px; padding: 10px 2px 0; }
.btn-danger { background: var(--fail); color: #fff; border-color: var(--fail); }
.deletebox { border: 1.5px solid var(--fail-soft); }
.followup { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
.fbuttons { display: flex; gap: 6px; flex-wrap: wrap; }
.fbuttons .chipbtn { padding: 8px 11px; font-size: 13px; min-height: 40px; }
.fstatus { font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.fstatus.booked { color: var(--pass-ink); }
.fstatus.contacted, .fstatus.reminder_set { color: var(--warn); }
.oktext { color: var(--pass-ink); }
.sendlog { margin: 0; padding-left: 18px; color: var(--ink-muted); }
.checkrow { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkrow input { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* Next-test quick-pick buttons (Brad's own list from More) */
.quickdue { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 8px; }
.qbtn { min-height: 48px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: 15px; color: var(--ink); }
.qbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* fix / correct links under a result: big enough to tap on site */
.corrlink { display: block; padding: 10px 4px; margin: -6px 0 6px; font-size: 14.5px; }
.rowlinks { display: flex; gap: 18px; flex-wrap: wrap; margin: -6px 4px 6px; }
.rowlinks .linkbtn { padding: 10px 0; }
.duesay { font-size: 15px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-soft-ink); }
/* enquiry pipeline */
.pill.enq-new { background: var(--accent); color: var(--accent-ink); }
.pill.enq-contacted, .pill.enq-quoted { background: var(--warn-soft); color: var(--warn); }
.pill.enq-booked, .pill.enq-done { background: var(--pass-soft); color: var(--pass-ink); }
.pill.enq-lost { background: var(--surface-2); color: var(--ink-muted); }
.duelink.enqnew .n { background: var(--accent); color: var(--accent-ink); }
.wrap3 .toggle-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wrap3 .toggle { min-width: 0; }

/* two-step login & backup */
.codeinput { font-size: 28px; letter-spacing: 6px; text-align: center; }
.qr { display: block; margin: 4px auto; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--border); }
.secretkey { font-size: 15px; word-break: break-all; background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; }
.steps { margin: 0; padding-left: 20px; } .steps li { margin: 4px 0; }
