:root {
  --ink: #17202a; --muted: #5b6673; --line: #d9dde3; --bg: #f3f4f6; --card: #fff;
  --brand: #181818; --accent: #f2a900; --accent-ink: #3a2a00; --wpm-green: #458a2f;
  --good: #1e7d3a; --good-bg: #e3f4e8; --bad: #b42318; --bad-bg: #fde8e6; --warn: #8a5a00; --warn-bg: #fff3d6;
  --info-bg: #e7f0fb; --radius: 12px; --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
  padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: #0b5cad; }
h1 { font-size: 1.5rem; margin: .2rem 0; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
h3.section { margin: 1.2rem 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.danger { color: var(--bad); }
.mt { margin-top: .5rem; }
[hidden] { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; }
.brand img { height: 34px; width: auto; border-radius: 4px; }
.status { border: 0; border-radius: 999px; padding: 6px 12px; font: 600 .8rem system-ui, sans-serif; cursor: pointer; background: #34404d; color: #fff; }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.status.ok { color: #8ee6a5; } .status.busy { color: var(--accent); } .status.off { color: #c3cad3; }
.status.err { color: #ff9b91; } .status.demo { color: #9cc6ff; }

main { max-width: 760px; margin: 0 auto; padding: 14px; }

/* bottom tabs */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7px 0 8px; font-size: .75rem; color: var(--muted);
  text-decoration: none; position: relative; min-height: 58px; }
.tabs a .ti { font-size: 1.3rem; line-height: 1.3; }
.tabs a.on { color: var(--brand); font-weight: 700; }
.tabs a.on::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--wpm-green); border-radius: 0 0 3px 3px; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--bad); color: #fff; font-size: .7rem; border-radius: 999px; padding: 0 6px; }

/* cards & rows */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; display: block; }
.linkcard { text-decoration: none; color: inherit; position: relative; }
.linkcard p { margin: 0; }
.big-num { font-size: 2rem; font-weight: 800; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #eef0f3; color: inherit; text-decoration: none; min-height: var(--tap); }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main small { color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row.user select { width: auto; min-width: 140px; }
.row.user.pending { background: var(--warn-bg); border-radius: 8px; padding: 10px 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.pills { display: flex; gap: 4px; flex: none; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eceff3; color: #3b4652; margin: 0; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.warn { background: var(--warn-bg); color: var(--warn); }

.page-head { margin: 4px 0 12px; }
.page-head p { margin: .25rem 0 0; }
.back { display: inline-block; text-decoration: none; font-weight: 600; padding: 4px 0; }
.hello { margin: 4px 0 12px; }
.company { display: flex; align-items: center; gap: 14px; background: var(--brand); color: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; border-bottom: 3px solid var(--wpm-green); }
.company img { height: 58px; width: auto; border-radius: 6px; flex: none; }
.company-name { font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; line-height: 1.15; }
.company-sub { color: #b9c0c8; font-size: .85rem; margin-top: 2px; }

.banner { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; text-decoration: none; color: inherit; }
.banner.danger { background: var(--bad-bg); color: var(--bad); border: 1px solid #f5b7b1; }
.banner.info { background: var(--info-bg); flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }

/* start buttons */
.starts { display: grid; gap: 10px; margin-bottom: 12px; }
.start { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  text-decoration: none; color: inherit; min-height: 72px; }
.start strong { display: block; font-size: 1.05rem; }
.start small { color: var(--muted); display: block; }
.start-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: #fff4d1; }
.start-icon.equipment { background: #e6eefc; }
.loader-icon { width: 40px; height: 30px; display: block; } .start.report .start-icon { background: var(--bad-bg); }
@media (min-width: 640px) { .starts { grid-template-columns: 1fr 1fr; } }

/* forms */
.lbl { display: block; font-weight: 650; margin: 0 0 6px; }
.lbl.sm { font-size: .875rem; margin-top: 6px; }
.req { color: var(--bad); margin-left: 2px; }
.help { color: var(--muted); font-size: .875rem; margin: -2px 0 8px; }
.field { margin-bottom: 16px; }
.field.err { outline: 2px solid var(--bad); outline-offset: 6px; border-radius: 6px; }
.static { padding: 10px 0; font-weight: 600; }
input, select, textarea { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #c4cad2; border-radius: 10px; padding: 10px 12px; min-height: var(--tap); }
textarea { resize: vertical; margin-top: 6px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #ffd666; border-color: #b88400; }
input[type=checkbox] { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--brand); margin: 0; }
.grid2 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check.small { font-size: .875rem; font-weight: 500; min-height: 0; }
.check.danger { color: var(--bad); }
.attest { display: flex; gap: 12px; align-items: flex-start; background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; font-weight: 600; }
.attest input { margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 18px; border-radius: 10px; border: 1px solid #c4cad2;
  background: #fff; color: var(--ink); font: 600 1rem system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: #d99800; color: var(--accent-ink); }
.btn.big { min-height: 56px; font-size: 1.05rem; flex: 1; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; }
.link { background: none; border: 0; padding: 6px 0; color: #0b5cad; font: inherit; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.actions.sticky { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); padding-top: 18px; z-index: 5; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #c4cad2; background: #fff; font: 600 .95rem system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.on::before { content: '✓ '; }

.seg { display: inline-flex; border: 1px solid #c4cad2; border-radius: 10px; overflow: hidden; background: #fff; }
.seg.wrap { flex-wrap: wrap; }
.seg button { min-height: var(--tap); min-width: 64px; padding: 0 14px; border: 0; border-right: 1px solid #c4cad2; background: #fff; font: 600 .95rem system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; }
.seg button.on.no, .seg button.on.bad { background: var(--bad); }
.seg button.on.ok { background: var(--good); }
.seg.sm button { min-width: 54px; padding: 0 10px; font-size: .875rem; }

.allok { margin-bottom: 8px; }
.checklist { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ck { padding: 10px 12px; border-bottom: 1px solid #eef0f3; }
.ck:last-child { border-bottom: 0; }
.ck.bad { background: #fff7f6; }
.ck-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ck-label { flex: 1; font-weight: 550; }
.ck-detail { margin-top: 6px; }
@media (max-width: 480px) { .ck-row { flex-direction: column; align-items: stretch; } .ck-row .seg { display: flex; } .ck-row .seg button { flex: 1; } }

.cond { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fafbfc; }
.cond select { margin-bottom: 6px; }
.cond.ro { padding: 8px 10px; }
.cond-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select { width: auto; flex: 1; min-width: 140px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); }
.filters input { width: auto; }
.tabs-inline { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; }
.tabs-inline a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #c4cad2; background: #fff; font: 600 .9rem system-ui, sans-serif; color: var(--ink); text-decoration: none; }
.tabs-inline a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.task-group { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 6px 0; } .task-group summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
.tabs-inline button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #c4cad2; background: #fff; font: 600 .9rem system-ui, sans-serif; cursor: pointer; color: var(--ink); }
.tabs-inline button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* record view */
.rec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.rec-head span { display: block; font-size: .8rem; }
.kv { padding: 9px 0; border-bottom: 1px solid #eef0f3; }
.kv:last-child { border-bottom: 0; }
.kv .k { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.cktable { width: 100%; border-collapse: collapse; }
.cktable td { padding: 6px 0; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.cktable td.r { text-align: right; white-space: nowrap; padding-left: 8px; }
table.roles { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.roles th, table.roles td { padding: 6px 4px; border-bottom: 1px solid #eef0f3; text-align: center; }
table.roles td:first-child { text-align: left; }

/* equipment list */
.eq-row { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.eq-head { font-size: .8rem; font-weight: 700; color: var(--muted); }
.eq-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 8px; }
.eq-table th, .eq-table td { text-align: left; padding: 5px 4px; border-bottom: 1px solid #eef0f3; }
.import-card { border: 2px solid var(--accent); }
@media (max-width: 480px) {
  .eq-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid #eef0f3; }
  .eq-row > .btn.danger { justify-self: end; }
  .eq-row > input[data-k=number] { grid-column: 1 / -1; font-weight: 700; }
  .eq-head { display: none; }
}

/* sign-up approval */
.approve { border-top: 1px solid #f0e2bd; padding: 12px 0 4px; }
.approve:first-of-type { border-top: 0; }
.approve select { margin-bottom: 4px; }
.approve-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.approve-actions select { width: auto; flex: 1; min-width: 130px; margin: 0; }

/* auth */
.auth { max-width: 420px; margin: 4vh auto 0; text-align: center; }
.auth-logo { height: 96px; width: auto; border-radius: 10px; }
.auth-sub { margin: 0; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.auth form { text-align: left; margin-top: 14px; }
.auth form input { margin-bottom: 12px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 50;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 92vw; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); } .toast.good { background: var(--good); }

/* dark mode */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eaee; --muted: #9ba5b0; --line: #30363d; --bg: #0f1113; --card: #191c20; --brand: #0b0b0b;
  --good: #63d17f; --good-bg: #153321; --bad: #ff8b80; --bad-bg: #3b1916; --warn: #f3c45a; --warn-bg: #3a2e10; --info-bg: #152538;
}
[data-theme="dark"] a:not([class]), [data-theme="dark"] a.back, [data-theme="dark"] .link { color: #7cb6ff; }
[data-theme="dark"] .link.danger, [data-theme="dark"] .btn.danger { color: var(--bad); }
[data-theme="dark"] .tabs { background: #15181b; }
[data-theme="dark"] .tabs a.on { color: #fff; }
[data-theme="dark"] .status { background: #262b31; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #111316; border-color: #3a424b; color: var(--ink); }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { border-color: var(--accent); }
[data-theme="dark"] .btn, [data-theme="dark"] .chip, [data-theme="dark"] .seg, [data-theme="dark"] .seg button, [data-theme="dark"] .tabs-inline button, [data-theme="dark"] .tabs-inline a { background: #20242a; border-color: #3a424b; color: var(--ink); }
[data-theme="dark"] .btn.ghost { background: transparent; }
[data-theme="dark"] .btn.primary { background: var(--accent); border-color: #d99800; color: var(--accent-ink); }
[data-theme="dark"] .chip.on, [data-theme="dark"] .seg button.on, [data-theme="dark"] .tabs-inline button.on, [data-theme="dark"] .tabs-inline a.on { background: #e7eaee; border-color: #e7eaee; color: #111; }
[data-theme="dark"] .seg button.on.no, [data-theme="dark"] .seg button.on.bad { background: #c0392b; border-color: #c0392b; color: #fff; }
[data-theme="dark"] .seg button.on.ok { background: #2e8b47; border-color: #2e8b47; color: #fff; }
[data-theme="dark"] .row, [data-theme="dark"] .kv, [data-theme="dark"] .ck, [data-theme="dark"] .cktable td, [data-theme="dark"] table.roles th,
[data-theme="dark"] table.roles td, [data-theme="dark"] .eq-table th, [data-theme="dark"] .eq-table td, [data-theme="dark"] .eq-row { border-color: #2a3036; }
[data-theme="dark"] .pill { background: #2a3036; color: #c9d1d9; }
[data-theme="dark"] .pill.good { background: var(--good-bg); color: var(--good); }
[data-theme="dark"] .pill.bad { background: var(--bad-bg); color: var(--bad); }
[data-theme="dark"] .pill.warn { background: var(--warn-bg); color: var(--warn); }
[data-theme="dark"] .start-icon { background: #3a3220; }
[data-theme="dark"] .start-icon.equipment { background: #1d2a3d; }
[data-theme="dark"] .start.report .start-icon { background: var(--bad-bg); }
[data-theme="dark"] .ck.bad { background: #2a1715; }
[data-theme="dark"] .cond, [data-theme="dark"] .attest { background: #15181b; }
[data-theme="dark"] .banner.danger { border-color: #6b2a24; }
[data-theme="dark"] .approve { border-top-color: #3a3220; }
@media print { :root[data-theme="dark"] { --ink: #17202a; --muted: #5b6673; --line: #d9dde3; --bg: #fff; --card: #fff; } }

/* fire extinguishers */
.month-bar { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 10px; }
.month-bar input { max-width: 200px; text-align: center; font-weight: 700; }
.ext-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 10px; }
.ext-sum div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; }
.ext-sum b { display: block; font-size: 1.6rem; }
.ext-sum small { color: var(--muted); }
.ext-sum .bad b { color: var(--bad); } .ext-sum .warn b { color: var(--warn); }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.progress span { display: block; height: 100%; background: var(--wpm-green); }
.find { width: 100%; margin-bottom: 6px; }
.ext-row .row-main { flex: 1; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.ext-row .row-main small { color: var(--muted); }
.ext-hist { padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-item { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check-item .ci-label { flex: 1 1 200px; font-weight: 550; }
.check-item input { flex-basis: 100%; }
.check-item.err .ci-label { color: var(--bad); }
.inline-form { display: flex; gap: 8px; } .inline-form input { flex: 1; }
.badge.warn { background: var(--accent); color: #111; }
table.rep { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 14px; }
table.rep th, table.rep td { text-align: left; padding: 5px 6px; border: 1px solid var(--line); vertical-align: top; }
table.rep th { background: rgba(127,127,127,.12); }
table.rep td:first-child { white-space: nowrap; font-weight: 600; }
.ext-report .sign { margin-top: 28px; }
@media (max-width: 420px) { .tabs a { font-size: .66rem; } .tabs a .ti { font-size: 1.15rem; } }
@media print { table.rep th, table.rep td { border-color: #888; } table.rep { page-break-inside: auto; } table.rep tr { page-break-inside: avoid; } }

/* photos */
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.ph { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--line); flex: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; opacity: 0; transition: opacity .2s; }
.ph img.ready { opacity: 1; }
.ph img.missing { opacity: 1; font-size: .7rem; color: var(--muted); padding: 6px; }
.ph-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; cursor: pointer; }
.ph-add { cursor: pointer; }
.big-photos .ph { width: 132px; height: 132px; }
.row-thumb { position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: var(--line); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; } .row-thumb img.ready { opacity: 1; }
.row-thumb b { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,.7); color: #fff; font-size: .7rem; border-radius: 6px; padding: 0 5px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 12px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 1.2rem; }
/* QR stickers */
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; }
.scanner video { width: 100%; max-height: 70vh; object-fit: cover; }
.scan-frame { position: absolute; width: 60vmin; height: 60vmin; border: 3px solid var(--accent); border-radius: 16px; top: 50%; left: 50%; transform: translate(-50%, -62%); pointer-events: none; }
.tag-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.tag-qr { width: 110px; flex: none; } .tag-qr svg { width: 100%; height: auto; display: block; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(2in, 1fr)); gap: 10px; }
.sticker { border: 2px dashed #999; border-radius: 10px; padding: 8px; text-align: center; background: #fff; color: #000; page-break-inside: avoid; break-inside: avoid; }
.st-top { font-weight: 800; font-size: 11pt; color: #b42318; letter-spacing: .02em; }
.st-qr svg { width: 1.45in; height: 1.45in; display: block; margin: 4px auto; }
.st-num { font-weight: 800; font-size: 16pt; line-height: 1.1; }
.st-num.st-blank { font-size: 12pt; font-weight: 600; margin: 6px 0; }
.st-loc { font-size: 9pt; }
.st-code { font-size: 7.5pt; color: #444; margin-top: 3px; }
@media print { .stickers { grid-template-columns: repeat(3, 2.3in); gap: .15in; justify-content: center; } .ph { width: 1.4in; height: 1.4in; } .ph-x, .ph-add { display: none !important; } }

/* task training */
.warn-box { background: #fff4d6; border: 1px solid #f2a900; color: #5c4300; border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; font-size: .92rem; }
[data-theme="dark"] .warn-box { background: #3a2f0f; color: #ffe4a0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: rgba(69,138,47,.12); color: var(--wpm-green); border: 1px solid rgba(69,138,47,.35); border-radius: 99px; padding: 3px 10px; font-size: .85rem; font-weight: 600; }
.chip small { font-weight: 400; color: var(--muted); }
.task-row { display: grid; grid-template-columns: 1fr 140px 64px 64px auto; gap: 6px; margin-bottom: 8px; align-items: center; }
@media (max-width: 560px) { .task-row { grid-template-columns: 1fr 1fr; } .task-row select { grid-column: 1 / -1; } }
.seg-row { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0; }
.cert { font-family: Arial, Helvetica, sans-serif; color: #000; background: #fff; border: 2px solid #000; padding: 10px; max-width: 8in; }
.cert-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; border-bottom: 2px solid #000; padding-bottom: 6px; font-size: 9pt; }
.cert-head > div:last-child { text-align: right; }
.cert-title { text-align: center; font-weight: 800; font-size: 14pt; } .cert-title small { font-size: 8pt; font-weight: 400; }
.cert-box { border: 1px solid #000; padding: 5px 7px; margin-top: 6px; }
.cert-box .lab { font-size: 8pt; font-weight: 700; }
.cert-box .val { font-size: 11pt; min-height: 1.3em; margin-top: 2px; } .cert-box .val.big { font-size: 13pt; font-weight: 700; }
.cert-grid { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 10pt; margin: 4px 0; }
.cb { display: inline-block; width: 12px; height: 12px; border: 1px solid #000; text-align: center; line-height: 11px; font-size: 10px; font-weight: 800; vertical-align: -1px; }
.cert-tasks { width: 100%; border-collapse: collapse; font-size: 9pt; margin-top: 4px; }
.cert-tasks th, .cert-tasks td { border: 1px solid #000; padding: 3px 4px; height: 18px; text-align: left; }
.cert-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .cert-2 .cert-box { margin-top: 6px; }
.sigline { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0 4px; font-size: 10pt; flex-wrap: wrap; }
.tiny { font-size: 7.5pt; color: #444; margin-top: 6px; }
.matrix-wrap { overflow-x: auto; }
table.matrix th span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
table.matrix td.c { text-align: center; font-weight: 700; color: var(--wpm-green); } table.matrix td.c small { font-weight: 400; color: #555; font-size: .7rem; }
table.matrix td.bad { color: var(--bad); font-weight: 600; }
@media print { .cert { border-width: 2px; max-width: none; } table.matrix { font-size: 8pt; } }

/* training approvals, emergency */
.start.training .start-icon { background: #e9f4e4; }
[data-theme="dark"] .start.training .start-icon { background: #23361c; }
.approve-tr { border-left: 4px solid var(--accent); }
.tr-item { padding: 10px 0; border-bottom: 1px solid var(--line); } .tr-item:last-of-type { border-bottom: 0; }
.emergency { border-left: 4px solid var(--bad); }
.emergency h3 { margin: 0 0 4px; }
.em-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: .95rem; }
.em-row:last-child { border-bottom: 0; }
.em-val { font-weight: 700; text-decoration: none; color: inherit; } a.em-val { color: var(--bad); }
.em-edit { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
@media (max-width: 560px) { .em-edit { grid-template-columns: 1fr 1fr; } }

/* production */
.face-row { display: grid; grid-template-columns: 1.4fr 80px 1fr auto; gap: 6px; margin-bottom: 8px; align-items: center; }
@media (max-width: 560px) { .face-row { grid-template-columns: 1fr 80px auto; } .face-row input[data-k=notes] { grid-column: 1 / -1; grid-row: 2; } }
table.rep .num, table.rep th.num { text-align: right; white-space: nowrap; }
table.rep tr.tot td { border-top: 2px solid var(--ink); }
@media (max-width: 420px) { .tabs a { font-size: .6rem; } }

.print-only { display: none; }
@media print {
  body { background: #fff; padding: 0; font-size: 11pt; }
  .top, .tabs, .actions, .no-print, .back, .toast { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; }
  .print-only { display: block; }
  .print-rec { border-top: 2px solid #000 !important; padding-top: 10px !important; margin-bottom: 18px; page-break-inside: avoid; }
  .pill { border: 1px solid #999; background: none !important; }
  a { color: inherit; text-decoration: none; }
}
/* production: tap-to-add faces, land owner per face, product lines */
.face-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.face-pick button { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid #c4cad2; background: #fff; font: 600 .9rem system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.face-pick button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.face-pick button.on::before { content: '✓ '; }
[data-theme="dark"] .face-pick button { background: #20242a; border-color: #3a424b; color: var(--ink); }
[data-theme="dark"] .face-pick button.on { background: #e7eaee; border-color: #e7eaee; color: #111; }
.face-row { grid-template-columns: 1.4fr 1fr 80px 1fr auto; }
@media (max-width: 560px) { .face-row { grid-template-columns: 1fr 1fr auto; } .face-row input[data-k=face] { grid-column: 1 / 3; } .face-row select { grid-column: 1; grid-row: 2; } .face-row input[data-k=rounds] { grid-column: 2; grid-row: 2; } .face-row input[data-k=notes] { grid-column: 1 / -1; grid-row: 3; } .face-row button { grid-column: 3; grid-row: 1; } }
.ton-row { display: grid; grid-template-columns: 1fr 120px auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.pic-mark { font-size: .8rem; margin-left: 4px; white-space: nowrap; opacity: .85; }
/* production v3: faces entered as entry + direction, day sheets, calendar, report periods */
.face-block { border: 1px solid var(--line, #d9dde3); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.face-block-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.face-block-top button { margin-left: auto; }
.face-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr 90px; gap: 8px; }
.face-grid .field { margin: 0; }
.face-block > input { margin-top: 8px; width: 100%; }
@media (max-width: 560px) { .face-grid { grid-template-columns: 1fr 1fr; } }
.faceset-head, .faceset-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.faceset-head { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 560px) { .faceset-head { display: none; } .faceset-row { grid-template-columns: 1fr 1fr auto; } .faceset-row select[data-k=land_owner] { grid-column: 1 / 3; grid-row: 2; } }
.cal-wrap { position: relative; display: inline-block; }
.cal-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; padding: 0; border: 0; }
.cal-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.report-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ton-row .ton-prod { font-weight: 600; padding-left: 4px; }
.day-shift, .day-tons { border-top: 1px solid var(--line, #e3e6ea); padding: 10px 0; }
.day-shift:first-of-type, .day-tons:first-of-type { border-top: 0; }
.day-nav { display: flex; gap: 6px; }
.rep-nav { margin: 10px 0; gap: 8px; }
.rep-nav input { max-width: 180px; }
/* hazard acknowledgment, inspector packet, backup */
.hazard-card { border-left: 5px solid #d92d20; }
.hazard-item { border-top: 1px solid var(--line, #e3e6ea); padding: 10px 0; }
.hazard-item:first-of-type { border-top: 0; }
.hazard-item ul { margin: 6px 0 4px 18px; padding: 0; }
.ack-box { margin-bottom: 12px; }
.checks { display: grid; gap: 2px; margin: 8px 0; }
.good-box { background: #e7f6ec; color: #135d2c; padding: 10px 12px; border-radius: 10px; margin-top: 10px; display: block; }
[data-theme="dark"] .good-box { background: #16341f; color: #b7ecc8; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 3px solid #c4cad2; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.inspector h3.pb { margin-top: 24px; }
@media print { .inspector h3.pb { break-before: page; } .print-rec { break-inside: avoid; } }
.pm-row { border-top: 1px solid var(--line, #e3e6ea); padding-bottom: 8px; }
.pm-row:first-of-type { border-top: 0; }
.pm-row .row { border-bottom: 0; }
.pm-quick { background: var(--bg2, #f6f7f9); border-radius: 10px; padding: 10px; margin-top: 4px; }
[data-theme="dark"] .pm-quick { background: #1c2026; }
.quick-invite summary { cursor: pointer; list-style: none; padding: 2px 0; }
.quick-invite summary::-webkit-details-marker { display: none; }
.quick-invite[open] summary { margin-bottom: 8px; }
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hrs-table input { width: 100%; max-width: 140px; }
.hrs-table td { vertical-align: middle; }

.unit-seg { margin: 0; }
.unit-seg button { padding: 6px 12px; min-height: 38px; }
.hrs-cell { min-height: 44px; display: flex; align-items: center; justify-content: inherit; gap: 4px; }
.hrs-cell + .hrs-cell { margin-top: 6px; }
td.num .hrs-cell { justify-content: flex-end; }
.moved-card { text-align: center; }
.moved-card .big-addr { font-size: 1.4rem; font-weight: 800; margin: 6px 0 12px; word-break: break-all; }
