:root {
  --red: #cc0000;
  --red-dark: #8b0000;
  --rust: #b43412;
  --ink: #1f2328;
  --muted: #5f6873;
  --line: #e3e6ea;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ok-bg: #c6efce; --ok-fg: #006100;
  --warn-bg: #ffeb9c; --warn-fg: #9c6500;
  --bad-bg: #ffc7ce; --bad-fg: #9c0006;
  --info-bg: #ddebf7; --info-fg: #1f4e79;
  --radius: 12px;
  font-family: Calibri, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4; }
body { min-height: 100vh; -webkit-text-size-adjust: 100%; }
a { color: var(--red); }
button, input, select, textarea { font: inherit; }

.topbar {
  background: var(--red); color: #fff; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .logo {
  height: 38px; width: auto; max-width: 42vw; border-radius: 8px; background: #fff; padding: 5px 8px; box-sizing: border-box; display: block; flex: none;
}
.topbar .brand-name { font-weight: 700; font-size: 16px; line-height: 1.1; }
.topbar .brand-sub { font-size: 12px; opacity: 0.9; }
.topbar .right { font-size: 13px; opacity: 0.95; white-space: nowrap; }

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h1, .card h2, .card h3 { margin: 0 0 8px; color: var(--rust); }
.card h1 { font-size: 22px; }
.card h2 { font-size: 17px; }
.card h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 8px 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.chip.bad { background: var(--bad-bg); color: var(--bad-fg); }
.chip.info { background: var(--info-bg); color: var(--info-fg); }
.chip.grey { background: #e9ecef; color: #495057; }

.board-ref { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; margin: 4px 0 2px; }
.board-loc { font-size: 16px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 12px 16px;
  font-weight: 700; cursor: pointer; text-decoration: none; min-height: 44px; width: 100%;
}
.btn:hover { background: var(--red-dark); }
.btn.secondary { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn.secondary:hover { background: #fff5f5; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f7f7f8; }
.btn.small { padding: 8px 12px; min-height: 36px; width: auto; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn-row .btn { flex: 1 1 180px; width: auto; }

label.field { display: block; margin: 10px 0; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd4da; border-radius: 8px; background: #fff; min-height: 44px;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.note { background: #fff8e6; border: 1px solid #ffe4a3; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.error { background: var(--bad-bg); color: var(--bad-fg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.success { background: var(--ok-bg); color: var(--ok-fg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }

.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.count { border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; background: #fafbfc; }
.count b { display: block; font-size: 22px; line-height: 1.1; }
.count span { font-size: 12px; color: var(--muted); }
.count.c1 b { color: var(--bad-fg); }
.count.c2 b { color: var(--warn-fg); }
.count.fi b { color: var(--info-fg); }
.count.c3 b { color: #495057; }
.count small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.2; min-height: 0; }
.count small:empty { display: none; }

.obs { list-style: none; margin: 8px 0 0; padding: 0; }
.obs li { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.obs .code { font-weight: 800; text-align: center; border-radius: 8px; padding: 6px 0; font-size: 14px; }
.obs .code.C1 { background: var(--bad-bg); color: var(--bad-fg); }
.obs .code.C2 { background: var(--warn-bg); color: var(--warn-fg); }
.obs .code.C3 { background: #e9ecef; color: #495057; }
.obs .code.FI { background: var(--info-bg); color: var(--info-fg); }
.obs .text { font-size: 15px; }
.obs .where { font-size: 13px; color: var(--muted); }
.obs li.done .text, .obs li.done .where { color: var(--muted); }
.obs li.done .code { opacity: 0.55; }
.obs .rem { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.obs .rem.ok { background: var(--ok-bg); color: var(--ok-fg); }
.obs .rem.grey { background: #e9ecef; color: #495057; }
.obs .rem.warn { background: var(--warn-bg); color: var(--warn-fg); }
.remform { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.remform .field { margin-bottom: 6px; }
.obs li.fold { display: block; }
.obs li.fold summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 0; }
.obs li.fold ul.obs { margin-top: 4px; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.history li:first-child { border-top: 0; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 12px 0 0; }
.footer a { color: var(--muted); }

.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.admin-nav button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--ink); }
.admin-nav button.active { background: var(--red); color: #fff; border-color: var(--red); }
.admin .wrap { max-width: 1100px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; background: var(--red); color: #fff; font-weight: 700; font-size: 12px; padding: 8px; position: sticky; top: 0; }
table.grid td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
.toolbar label.field { margin: 0; flex: 1 1 180px; }
.toolbar .btn { width: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.tile b { display: block; font-size: 26px; color: var(--rust); }
.tile span { color: var(--muted); font-size: 13px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; padding: 18px; width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin-top: 0; color: var(--rust); }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline .btn, table.grid .btn { white-space: nowrap; }
.pill-code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f1f3f5; border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.drop { border: 2px dashed #cfd4da; border-radius: 10px; padding: 20px; text-align: center; color: var(--muted); background: #fafbfc; }
.drop.over { border-color: var(--red); background: #fff5f5; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: var(--red); width: 0; }
.flag { color: var(--bad-fg); font-weight: 700; }
/* on/off switch (OneDrive tab) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; min-height: 36px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: #cfd4da; position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.switch input:checked + .track { background: var(--ok-fg); }
.switch input:checked + .track::after { left: 21px; }
.switch input:focus-visible + .track { outline: 2px solid var(--red); outline-offset: 2px; }
.switch input:disabled + .track { opacity: 0.5; }
.switch .label { font-weight: 700; }
.switch.sm .track { width: 34px; height: 20px; }
.switch.sm .track::after { width: 14px; height: 14px; }
.switch.sm input:checked + .track::after { left: 17px; }

/* ---------- label printing ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .no-print, .modal-bg { display: none !important; }
  .print-only { display: block !important; }
}
.label-sheet { display: grid; }
.label {
  overflow: hidden; display: flex; align-items: center; gap: 2mm; padding: 1.5mm 2mm; page-break-inside: avoid; break-inside: avoid;
  border: 0.2mm dashed #bbb;
}
.label .qr { flex: none; }
.label .qr svg { display: block; }
.label .txt { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.15; }
.label .t1 { font-weight: 800; font-size: 8.5pt; color: #000; }
.label .t2 { font-size: 7pt; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .t3 { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 9pt; font-weight: 700; letter-spacing: 0.5px; margin-top: 1mm; }
.label .t4 { font-size: 6.5pt; color: #cc0000; font-weight: 700; margin-top: 0.5mm; }
.label .t4logo { display: block; height: 3.8mm; width: auto; margin-top: 0.8mm; }

/* emergency lighting year matrix */
table.grid td.elc, table.grid th.elc { text-align: center; padding: 4px 6px; min-width: 30px; font-weight: 700; }
table.grid td.elc.pass { color: var(--ok-fg); font-weight: 400; }
table.grid td.elc.fail { background: var(--bad-bg); color: var(--bad-fg); }
table.grid td.elc.ltd { background: var(--warn-bg); color: var(--warn-fg); }
/* the office can record or correct a result by clicking the cell; corrected cells carry a blue corner */
table.grid td.elc.click { cursor: pointer; position: relative; }
table.grid td.elc.click:hover { outline: 2px solid var(--info-fg); outline-offset: -2px; }
table.grid td.elc.edited::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0; border-color: var(--info-fg) var(--info-fg) transparent transparent; }
table.grid tr.removed td { color: var(--muted); text-decoration: line-through; }
table.grid tr.pending td { background: #fffdf3; }
table.grid tr.totals td { background: #f7f7f8; font-weight: 600; }
#elMatrix td.inline { display: table-cell; white-space: nowrap; }
#elMatrix td.inline .btn { margin-right: 4px; }

/* ---------- emergency lighting engineer app (/el) ---------- */
.elapp .topbar .brand { gap: 8px; }
.elapp .topbar .back { background: transparent; border: 0; color: #fff; font-size: 30px; line-height: 1; padding: 0 8px 4px 0; cursor: pointer; }
.elapp .topbar .brand-text { min-width: 0; }
.elapp .topbar .brand-name, .elapp .topbar .brand-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.elapp .wrap { max-width: 760px; }
.elapp .inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill-btn { background: #fff; color: var(--red); border: 0; border-radius: 999px; font-weight: 800; padding: 6px 12px; min-height: 34px; cursor: pointer; }
.syncbar { font-size: 13px; padding: 7px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.syncbar.ok { background: #eef8f0; color: var(--ok-fg); }
.syncbar.warn { background: #fff6dc; color: var(--warn-fg); }
.syncbar.busy { background: var(--info-bg); color: var(--info-fg); }
.syncbar.grey { background: #eceff2; color: #495057; }
.syncbar .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }
.syncbar.busy .dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
button.link { background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; padding: 0; cursor: pointer; font-weight: 700; }
button.link.bad { color: var(--bad-fg); }
.list-card { padding: 10px 12px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.list-head h2 { margin: 0; }
.list-head .filter { max-width: 240px; min-height: 38px; padding: 6px 10px; }
.filter.big { min-height: 48px; font-size: 18px; }
.site-row, .zone-row { display: flex; align-items: stretch; gap: 10px; border-top: 1px solid var(--line); padding: 12px 4px; text-decoration: none; color: inherit; cursor: pointer; }
.site-row:first-of-type, .zone-row:first-of-type { border-top: 0; }
.site-main, .zone-main { flex: 1; min-width: 0; }
.site-name, .zone-name { font-weight: 700; font-size: 17px; }
.site-row .dl { flex: none; width: 48px; border-radius: 10px; border: 2px solid var(--red); background: #fff; color: var(--red); font-size: 22px; font-weight: 800; cursor: pointer; align-self: center; height: 48px; }
.site-row .dl.have { border-color: var(--line); color: var(--muted); }
.zone-side { display: flex; align-items: center; gap: 8px; flex: none; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }
.bar { height: 6px; background: #e9ecef; border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: var(--ok-fg); border-radius: 3px; transition: width 0.2s; }
.bar i.has-fail { background: linear-gradient(90deg, var(--ok-fg), var(--bad-fg)); }
.bar.big { height: 10px; border-radius: 5px; margin: 12px 0 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.stat-row > div { text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; background: #fafbfc; }
.stat-row b { display: block; font-size: 24px; line-height: 1.1; }
.stat-row span { font-size: 12px; color: var(--muted); }
.ok-t b, b.ok-t { color: var(--ok-fg); } .bad-t b, b.bad-t { color: var(--bad-fg); } .warn-t b, b.warn-t { color: var(--warn-fg); }
.sel-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; cursor: pointer; color: inherit; }
.sel-main { font-weight: 700; font-size: 16px; }
.rem-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: inherit; border-left: 5px solid var(--warn-fg); }
.fit-row { display: grid; grid-template-columns: minmax(96px, 1.1fr) 2fr auto; gap: 8px 10px; align-items: center; width: 100%; text-align: left; background: #fff; border: 0; border-top: 1px solid var(--line); padding: 12px 4px; cursor: pointer; color: inherit; min-height: 56px; }
.fit-row:first-child { border-top: 0; }
.fit-row.pass { background: #f6fcf7; } .fit-row.fail { background: #fff3f4; } .fit-row.limited { background: #fffaea; }
.fit-id { font-weight: 800; font-size: 17px; word-break: break-all; }
.fit-loc { color: var(--muted); }
.fit-loc .fault { color: var(--bad-fg); margin-top: 2px; }
.fit-res { font-weight: 800; font-size: 14px; text-align: right; min-width: 56px; }
.fit-res.pass { color: var(--ok-fg); } .fit-res.fail { color: var(--bad-fg); } .fit-res.limited { color: var(--warn-fg); }
.q { color: var(--info-fg); margin-left: 3px; font-size: 18px; line-height: 0; }
.chip.tiny { font-size: 11px; padding: 1px 7px; vertical-align: middle; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: #fff; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 24px rgba(0,0,0,0.2); }
body.sheet-open { overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.sheet-title { font-size: 20px; font-weight: 800; color: var(--ink); }
.sheet .x { background: #eceff2; border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.res-btns { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; margin: 6px 0 10px; }
.res { border: 2px solid var(--line); background: #fff; border-radius: 12px; min-height: 60px; font-weight: 800; font-size: 17px; cursor: pointer; color: var(--ink); }
.res.pass.on, .res.pass:active { background: var(--ok-bg); border-color: var(--ok-fg); color: var(--ok-fg); }
.res.fail.on, .res.fail:active { background: var(--bad-bg); border-color: var(--bad-fg); color: var(--bad-fg); }
.res.limited.on, .res.limited:active { background: var(--warn-bg); border-color: var(--warn-fg); color: var(--warn-fg); }
.rem-box { background: #fff8e6; border: 1px solid #ffe4a3; border-radius: 10px; padding: 10px 12px; margin: 6px 0; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { border: 2px solid var(--line); background: #fff; border-radius: 10px; min-height: 48px; font-weight: 700; cursor: pointer; color: var(--ink); }
.seg button.on { border-color: var(--red); background: #fff5f5; color: var(--red); }
.file-btn { display: inline-flex; }
.photo-prev { max-width: 160px; max-height: 120px; border-radius: 8px; margin-top: 6px; border: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #1f2328; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: 90vw; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
@media (min-width: 700px) { .elapp .wrap { padding: 20px; } .res-btns { grid-template-columns: 1fr 1fr 1fr; } }

.modal.wide { width: min(980px, 100%); }

/* walk-order modal (emergency lighting): drag handles and the zone being edited */
.ro-handle { cursor: grab; color: var(--muted); user-select: none; letter-spacing: -2px; width: 18px; text-align: center; }
tr.ro-drag { opacity: 0.4; }
tr.ro-over td { border-top: 2px solid var(--red); }
tr.ro-cur td { background: var(--pale, #fff5f5); }
table.ro-fits td { vertical-align: middle; }
td.nowrap { white-space: nowrap; }

/* OneDrive tab: a client's site folders, shown under it */
table.grid tr.od-sites td { background: #fafbfc; border-bottom-color: #eef0f2; }
table.grid tr.od-sites select { font-size: 12px; padding: 2px 4px; max-width: 220px; }

/* ---------- Plan tab: the month strip and its chips (also used on the client portal's Planned testing) ---------- */
.pstrip-wrap { max-height: 60vh; }
table.pstrip th.pst-site, table.pstrip td.pst-site { position: sticky; left: 0; background: #fff; min-width: 180px; z-index: 1; border-right: 1px solid var(--line); }
table.pstrip th.pst-site { background: var(--red); z-index: 3; }
table.pstrip th.pst-m { min-width: 92px; text-align: center; }
table.pstrip th.pst-m.now { background: #a30000; }
table.pstrip td.pst-m { vertical-align: top; padding: 5px 4px; }
table.pstrip td.pst-m.now { background: #fff8f8; }
.pchip { display: inline-block; margin: 1px 2px; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; cursor: pointer; border: 1px solid transparent; }
.pchip.overdue { background: var(--bad-bg); color: var(--bad-fg); }
.pchip.due { background: var(--warn-bg); color: var(--warn-fg); }
.pchip.upcoming { background: #eef0f2; color: #495057; }
.pchip.planned { background: #fff; color: var(--info-fg); border: 1px dashed var(--info-fg); }
.pchip.booked { background: var(--info-fg); color: #fff; }
.pchip.done { background: var(--ok-bg); color: var(--ok-fg); }
.pchip.none { background: #fff; color: #6c757d; border: 1px dotted #adb5bd; }
.pchip.more { background: transparent; color: var(--muted); text-decoration: underline; font-weight: 600; }
.chip.plan { background: #fff; color: var(--info-fg); border: 1px dashed var(--info-fg); }
.tile.t-bad b { color: var(--bad-fg); } .tile.t-warn b { color: var(--warn-fg); } .tile.t-info b { color: var(--info-fg); } .tile.t-plan b { color: var(--info-fg); } .tile.t-ok b { color: var(--ok-fg); }
tr.prow { cursor: pointer; } tr.prow:hover td { background: #fafbfc; } tr.prow.done td { color: var(--muted); }
/* printed plan */
.plan-print { font-size: 11px; color: #111; }
.plan-print .pp-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--red); padding-bottom: 8px; margin-bottom: 10px; }
.plan-print .pp-head img { height: 40px; }
.plan-print h1 { font-size: 20px; margin: 0; } .plan-print h2 { font-size: 15px; margin: 14px 0 4px; color: var(--red); } .plan-print h3 { font-size: 13px; margin: 8px 0 4px; }
.plan-print table { width: 100%; border-collapse: collapse; margin-bottom: 6px; page-break-inside: auto; }
.plan-print th { text-align: left; background: #f1f3f5; border-bottom: 1px solid #999; padding: 3px 5px; font-size: 10.5px; }
.plan-print td { padding: 3px 5px; border-bottom: 1px solid #ddd; vertical-align: top; }
.plan-print tr { page-break-inside: avoid; }
.plan-print .pp-foot { margin-top: 12px; color: #555; font-size: 10px; }
@media print { body.print-cert main, body.print-cert .topbar { display: none !important; } }
