/* Fire Training Records - Copyright (c) 2026 S. Gloer. All rights reserved. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #1b2430;
  --ink-2: #3b4656;
  --muted: #667085;
  --line: #dfe3e8;
  --line-soft: #eceff3;
  --paper: #f3f4f6;
  --surface: #ffffff;
  --brand: #b42318;
  --brand-hover: #92190f;
  --nav: #18202b;

  --ok: #0a6b43;     --ok-bg: #e4f4ec;
  --warn: #8a4b00;   --warn-bg: #fdf0d3;
  --info: #1d4f91;   --info-bg: #e5edfa;
  --bad: #a3170e;    --bad-bg: #fde7e4;
  --mute: #4b5565;   --mute-bg: #eceef2;

  --bs-body-font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-hover);
  --bs-link-color-rgb: 180, 35, 24;
  --bs-link-hover-color-rgb: 146, 25, 15;
  --bs-border-color: var(--line);
  --bs-dropdown-bg: #fff;
  --bs-dropdown-link-hover-bg: var(--paper);
}

html { -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "tnum" 1, "kern" 1; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid #1d4f91; outline-offset: 2px; }

h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0; }
h2 { font-size: 1.35rem; }
h5 { font-size: 1.05rem; }
.text-muted, .meta { color: var(--muted) !important; }
.meta { font-size: 0.875rem; }
code { color: var(--ink-2); background: var(--mute-bg); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.85em; }

/* ---------- layout ---------- */
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.main { padding-top: 28px; padding-bottom: 56px; flex: 1 0 auto; min-width: 0; }

/* ---------- top bar ---------- */
.topbar { background: var(--nav); color: #e7eaf0; }
.topbar-in { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 28px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.005em; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { height: 36px; width: auto; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.navlinks { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0 auto 0 0; padding: 0; list-style: none; }
.navlinks > li > a, .navlinks .dropdown-toggle {
  display: block; padding: 8px 12px; border-radius: 8px; color: #c5ccd8; font-weight: 500; font-size: 0.925rem; background: none; border: 0;
}
.navlinks > li > a:hover, .navlinks .dropdown-toggle:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.navlinks > li > a.active, .navlinks .dropdown-toggle.active { color: #fff; background: rgba(255,255,255,.14); }
.navlinks .dropdown-toggle::after { margin-left: .45em; vertical-align: .12em; }
.topbar .dropdown-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(16,24,40,.16); padding: 6px; min-width: 200px; font-size: 0.925rem; }
.topbar .dropdown-item { border-radius: 6px; padding: 7px 10px; color: var(--ink); }
.topbar .dropdown-item:hover, .topbar .dropdown-item.active { background: var(--paper); color: var(--ink); }
.topbar .dropdown-item.active { font-weight: 600; }
.userbox { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-left: auto; font-size: 0.9rem; color: #c5ccd8; }
.userbox form { margin: 0; }
.userbox .btn-signout { color: #e7eaf0; border: 1px solid rgba(255,255,255,.28); background: transparent; border-radius: 8px; padding: 4px 12px; font-size: 0.875rem; }
.userbox .btn-signout:hover { background: rgba(255,255,255,.1); }
.topbar .btn-add { white-space: nowrap; background: var(--brand); color: #fff; border-radius: 8px; padding: 6px 14px; font-weight: 600; font-size: 0.9rem; }
.topbar .btn-add:hover { background: var(--brand-hover); color: #fff; text-decoration: none; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; max-width: 62ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb { font-size: 0.875rem; margin-bottom: 6px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
.panel-tight { padding: 14px 16px; }
.filter-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 18px; margin-bottom: 14px; }
.filter-card .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.filter-card .actions .spacer { flex: 1 1 auto; }
.export-group { display: inline-flex; align-items: center; gap: 6px; }
.export-group .lbl { color: var(--muted); font-size: 0.85rem; margin-right: 2px; }
.result-count { color: var(--muted); font-size: 0.9rem; margin: 0 0 8px 2px; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.table-card .table-responsive { margin: 0; }

/* ---------- tables ---------- */
.table { --bs-table-bg: transparent; margin: 0; font-size: 0.9rem; color: var(--ink); }
.table > :not(caption) > * > * { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table thead th { background: #f8f9fb; color: var(--muted); font-weight: 600; font-size: 0.8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover > * { background: #fafbfc; }
.table .group-row > th { background: #f1f3f6; color: var(--ink); font-size: 0.9rem; font-weight: 600; border-bottom: 1px solid var(--line); padding-top: 9px; padding-bottom: 9px; }
.table .group-row .count { color: var(--muted); font-weight: 400; margin-left: 6px; }
.table tr.row-expired > * { background: #fff8f7; }
.table .person { font-weight: 500; color: var(--ink); }
.table a.person:hover { color: var(--brand); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nw { white-space: nowrap; }
.table .sub { display: block; color: var(--muted); font-size: 0.8rem; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table .check { width: 36px; padding-right: 0 !important; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px !important; }

/* ---------- status pills ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pill-ok { color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-info { color: var(--info); background: var(--info-bg); }
.pill-bad { color: var(--bad); background: var(--bad-bg); }
.pill-muted { color: var(--mute); background: var(--mute-bg); }

/* ---------- status strip (dashboard) ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.strip a { display: block; padding: 16px 22px 15px; color: var(--ink); border-left: 1px solid var(--line); position: relative; }
.strip a:first-child { border-left: 0; }
.strip a:hover { background: #fafbfc; text-decoration: none; }
.strip a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.strip a.s-bad::before { background: var(--bad); }
.strip a.s-warn::before { background: #d98a00; }
.strip a.s-info::before { background: #3b73c4; }
.strip a.on { background: #f8f9fb; box-shadow: inset 0 -3px 0 var(--ink); }
.strip .n { display: block; font-size: 2.1rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.strip .l { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.strip .s-bad .n { color: var(--bad); }

/* ---------- forms ---------- */
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.form-control, .form-select { background-color: #fff; border-color: #cfd5dd; border-radius: 8px; font-size: 0.925rem; padding: 0.45rem 0.7rem; color: var(--ink); }
.form-select { padding-right: 2.2rem; }
.form-control:focus, .form-select:focus { border-color: #d0463a; box-shadow: 0 0 0 3px rgba(180,35,24,.14); }
.form-text { color: var(--muted); font-size: 0.82rem; }
.form-check-input { border-color: #98a2b3; }
.form-check-input:not(:checked) { background-color: #fff; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #d0463a; box-shadow: 0 0 0 3px rgba(180,35,24,.14); }
.form-card { max-width: 720px; }
.form-card .panel { padding: 22px 24px; }
.field-note { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.validation, .text-danger { color: var(--bad) !important; }
.validation ul { margin: 0 0 12px; padding-left: 1.1rem; }
.alert { border-radius: 10px; border: 1px solid transparent; font-size: 0.925rem; }
.alert-success { background: var(--ok-bg); border-color: #b9e2cc; color: #064d30; }
.alert-danger { background: var(--bad-bg); border-color: #f6c4bf; color: #7a1009; }
.alert-warning { background: var(--warn-bg); border-color: #f1d79b; color: #5e3300; }

/* ---------- buttons ---------- */
.btn { border-radius: 8px; font-weight: 500; font-size: 0.9rem; padding: 0.42rem 0.9rem; }
.btn-sm { padding: 0.22rem 0.6rem; font-size: 0.82rem; border-radius: 7px; }
.btn-danger {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #7a150d; --bs-btn-active-border-color: #7a150d; --bs-btn-focus-shadow-rgb: 180,35,24;
  font-weight: 600;
}
.btn-outline-secondary {
  --bs-btn-color: var(--ink-2); --bs-btn-border-color: #cfd5dd; --bs-btn-bg: #fff;
  --bs-btn-hover-bg: #f3f4f6; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #b8c0cc;
  --bs-btn-active-bg: #e9ecf0; --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: #b8c0cc;
}
.btn-outline-danger {
  --bs-btn-color: var(--bad); --bs-btn-border-color: #f0b7b1; --bs-btn-bg: #fff;
  --bs-btn-hover-bg: var(--bad-bg); --bs-btn-hover-color: var(--bad); --bs-btn-hover-border-color: #e79790;
  --bs-btn-active-bg: #fbd5d1; --bs-btn-active-color: var(--bad); --bs-btn-active-border-color: #e79790;
}
.btn-link { color: var(--muted); }

/* ---------- details / disclosure ---------- */
details.disclosure { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
details.disclosure > summary { cursor: pointer; padding: 12px 18px; font-weight: 600; list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--brand); font-weight: 700; }
details.disclosure[open] > summary::before { content: "\2212"; }
details.disclosure[open] > summary { border-bottom: 1px solid var(--line-soft); }
details.disclosure > .body { padding: 16px 18px 18px; }

/* ---------- people picker (add certification) ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; }
.people-grid .person-opt { padding: 3px 0; }
.people-grid label { cursor: pointer; }
.picker-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 8px; }
.picker-tools .form-control { max-width: 260px; }

/* ---------- recertify summary ---------- */
.recert-list { margin: 0; padding: 0; list-style: none; }
.recert-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.recert-list li:last-child { border-bottom: 0; }

/* ---------- login ---------- */
.login-wrap { min-height: 62vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 30px 30px 26px; box-shadow: 0 8px 30px rgba(16,24,40,.07); }
.login-card .logo { text-align: center; margin-bottom: 18px; }
.login-card .logo img { max-height: 96px; max-width: 100%; }
.login-card h1 { font-size: 1.4rem; text-align: center; }
.login-card .dept { text-align: center; color: var(--muted); margin: 4px 0 20px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.82rem; text-align: center; padding: 14px 16px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .page { padding: 0 14px; }
  .strip { grid-template-columns: 1fr; }
  .strip a { border-left: 0; border-top: 1px solid var(--line); }
  .strip a:first-child { border-top: 0; }
  .userbox { margin-left: 0; width: 100%; justify-content: space-between; }
  .table > :not(caption) > * > * { padding: 9px 10px; }
  h1 { font-size: 1.4rem; }
}

/* ---------- print ---------- */
.print-head { display: none; }
@media print {
  body { background: #fff !important; font-size: 11px; }
  .topbar, .filter-card, .site-footer, .no-print, .page-actions, details.disclosure, .strip .on { display: none !important; }
  .print-head { display: flex !important; align-items: center; gap: 10px; margin-bottom: 12px; }
  .print-head img { height: 44px; }
  .main { padding: 0; }
  .table-card, .panel { border: 0; border-radius: 0; }
  .table thead th { background: #fff; border-bottom: 1.5px solid #000; color: #000; }
  .table tr.row-expired > *, .table tbody tr:hover > * { background: #fff; }
  .pill { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  a { color: #000; }
}

/* paging */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 4px; font-size: .9rem; color: var(--muted, #667085); }
.pager-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pager-links a, .pager-links .on, .pager-links .off { min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; text-decoration: none; }
.pager-links a { color: var(--ink, #1b2430); background: #fff; border-color: #d0d5dd; }
.pager-links a:hover { background: #f3f4f6; }
.pager-links .on { background: var(--ink, #1b2430); color: #fff; font-weight: 600; }
.pager-links .off { color: #98a2b3; }
.pager-links .gap { padding: 0 4px; }

/* ---------- phone setup ---------- */
.qr-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.qr { text-align: center; }
.qr-code { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 190px; margin: 0 auto 8px; }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-url { font-weight: 600; word-break: break-all; }

/* ---------- phone: bottom tab bar, bottom sheets, card tables ---------- */
.tabbar, .sheet { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .topbar .navlinks, .topbar .userbox { display: none; }
  .topbar-in { min-height: 52px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .brand { font-size: 1rem; }
  .main { padding-top: 18px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: #fff; border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 54px; border: 0; background: transparent; color: var(--muted); font-size: 0.72rem; font-weight: 500; text-decoration: none; border-radius: 10px;
  }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on { color: var(--brand); }
  .tabbar .on span { font-weight: 600; }
  .tabbar .tab-add { flex: 0 0 56px; min-height: 48px; margin: 0 6px; background: var(--brand); color: #fff; border-radius: 14px; }
  .tabbar .tab-add svg { stroke-width: 2.4; }

  .sheet { display: block; border-radius: 16px 16px 0 0; max-height: 80vh; padding-bottom: env(safe-area-inset-bottom); }
  .sheet .offcanvas-body { display: flex; flex-direction: column; padding: 8px 12px 14px; }
  .sheet a, .sheet .sheet-signout {
    display: block; width: 100%; text-align: left; padding: 15px 10px; font-size: 1.02rem; color: var(--ink);
    text-decoration: none; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  }
  .sheet .sheet-signout { color: var(--brand); font-weight: 600; border-bottom: 0; }
  .sheet form { margin: 0; }

  /* easier to tap, and 16px text stops iPhones zooming into fields */
  .form-control, .form-select { font-size: 16px; min-height: 46px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; padding: 6px 12px; }
  .form-check-input { width: 1.3em; height: 1.3em; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-actions .btn { flex: 1; }
  .filter-card .actions { flex-wrap: wrap; }
  .people-grid { grid-template-columns: 1fr; max-height: 50vh; padding: 4px 12px; }
  .people-grid .person-opt { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .site-footer { padding-bottom: 14px; }

  /* tables turn into one card per row */
  .table-card { border-radius: 10px; }
  .cardify, .cardify tbody { display: block; width: 100%; }
  .cardify thead { display: none; }
  .cardify tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .cardify tr:last-child { border-bottom: 0; }
  .cardify > :not(caption) > * > * { padding: 0; }
  .cardify td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 3px 0 !important; border: 0; text-align: right; }
  .cardify td::before { content: attr(data-label); flex: 0 0 34%; text-align: left; color: var(--muted); font-weight: 500; font-size: 0.85rem; padding-top: 1px; }
  .cardify td[data-label=""]::before { display: none; }
  .cardify td .cell { min-width: 0; overflow-wrap: anywhere; }
  .cardify td:first-child { font-size: 1.02rem; }
  .cardify td.check { justify-content: flex-start; }
  .cardify td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 8px !important; }
  .cardify td.actions::before { display: none; }
  .cardify td[colspan] { display: block; text-align: center; padding: 14px 0 !important; }
  .cardify .group-row th { display: block; padding: 10px 14px; }
  .cardify .group-row { padding: 0; background: var(--paper); }
  .cardify td .sub { text-align: right; }
  .cardify tr.row-expired { background: #fff8f7; }
  .cardify tr.row-expired > *, .cardify tbody tr:hover > * { background: transparent; }
}

/* ---------- officer dashboard ---------- */
.strip.strip-4 { grid-template-columns: repeat(4, 1fr); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid .panel { margin-bottom: 0; }
.iso-row { margin-bottom: 16px; }
.iso-row:last-of-type { margin-bottom: 4px; }
.iso-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; margin-bottom: 5px; }
.iso-name { font-weight: 600; }
.iso-name .meta { font-weight: 400; font-size: 0.8rem; margin-left: 6px; }
.iso-num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.iso-bar { position: relative; height: 10px; background: var(--mute-bg); border-radius: 999px; overflow: visible; margin-bottom: 3px; }
.iso-bar > div { height: 100%; border-radius: 999px; min-width: 4px; }
.iso-bar .bar-ok { background: #12805c; }
.iso-bar .bar-info { background: #3b73c4; }
.iso-bar .bar-warn { background: #d98a00; }
.iso-bar .pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.drill-list { list-style: none; margin: 0; padding: 0; }
.drill-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.drill-list li:last-child { border-bottom: 0; }
.drill-list li > a { grid-column: 1; color: var(--ink); }
.drill-list li > .meta { grid-column: 1; font-size: 0.82rem; }
.drill-list .dl-right { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

/* ---------- drill detail ---------- */
.drill-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.drill-grid .qr-code { width: 170px; }
.sig-thumb { height: 38px; max-width: 170px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px; }

/* ---------- ISO report ---------- */
.iso-table th.num .sub { font-weight: 400; }
.iso-cell { display: inline-block; min-width: 52px; padding: 1px 8px; border-radius: 6px; font-weight: 600; text-align: right; }
.iso-met { color: var(--ok); background: var(--ok-bg); }
.iso-pace { color: var(--info); background: var(--info-bg); }
.iso-behind { color: var(--warn); background: var(--warn-bg); }
.iso-key { display: inline-block; padding: 1px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; margin-right: 6px; }
.iso-table tfoot td { background: #f8f9fb; font-weight: 600; border-top: 1px solid var(--line); }
.iso-table tfoot .sub { font-weight: 400; }

/* ---------- qualification matrix ---------- */
.matrix th.mx, .matrix td.mx { text-align: center; }
.matrix th.mx { white-space: normal; min-width: 84px; max-width: 120px; line-height: 1.25; vertical-align: bottom; }
.matrix .mx-none { color: #b8c0cc; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; align-items: start; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { padding: 7px 8px; border-radius: 8px; display: flex; flex-direction: column; }
.setup-list li.on { background: var(--paper); }
.setup-list li.on a { font-weight: 600; color: var(--ink); }
.setup-list .meta { font-size: 0.8rem; }
.cert-pick { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #fff; }
.cert-cat { font-weight: 600; font-size: 0.85rem; color: var(--ink-2); margin: 10px 0 4px; }
.cert-opt { padding: 3px 0; cursor: pointer; }

/* ---------- sign-in kiosk ---------- */
body.kiosk { background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
.kiosk-top { background: var(--nav); color: #fff; display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top)) 20px 12px; }
.kiosk-top img { height: 44px; background: #fff; border-radius: 6px; padding: 3px; }
.kiosk-top strong { display: block; font-size: 1.1rem; }
.kiosk-top span { display: block; color: #c5ccd8; font-size: 0.85rem; }
.kiosk-main { width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; flex: 1 0 auto; }
.kiosk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 8px 30px rgba(16,24,40,.06); }
.kiosk-card h1 { font-size: 1.5rem; }
.kiosk-drill { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 16px; }
.kiosk-drill p { color: var(--muted); margin: 4px 0 0; }
.kiosk-step { display: block; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); margin-bottom: 6px; }
.kiosk-drills { display: grid; gap: 10px; margin-top: 14px; }
.kiosk-drills a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.kiosk-drills a:hover { background: var(--paper); text-decoration: none; }
.kiosk-drills strong { display: block; font-size: 1.1rem; }
.kiosk-drills span { color: var(--muted); font-size: 0.9rem; }
.kiosk-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.kname { position: relative; display: flex; flex-direction: column; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; user-select: none; }
.kname input { position: absolute; opacity: 0; pointer-events: none; }
.kname .nm { font-weight: 600; }
.kname .bd { font-size: 0.8rem; color: var(--muted); }
.kname.on, .kname:has(input:checked) { border-color: var(--brand); background: #fff5f4; box-shadow: 0 0 0 3px rgba(180,35,24,.12); }
.kname.signed { opacity: 0.55; cursor: default; background: var(--ok-bg); border-color: #b9e2cc; }
.kname.signed .bd { color: var(--ok); font-weight: 600; }
.sig-box { position: relative; background: #fff; border: 2px dashed #b8c0cc; border-radius: 12px; height: 190px; }
.sig-box canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 12px; }
.sig-hint { position: absolute; left: 16px; bottom: 12px; color: #b8c0cc; font-size: 0.9rem; pointer-events: none; }
.kiosk-submit { font-size: 1.1rem; padding: 0.8rem; }
.kiosk-done { background: var(--ok-bg); border: 1px solid #b9e2cc; color: #064d30; border-radius: 12px; padding: 16px 18px; font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; transition: opacity .6s; }
.kiosk-done.fade-out { opacity: 0; }

@media (max-width: 960px) {
  .dash-grid, .drill-grid, .setup-grid { grid-template-columns: 1fr; }
  .strip.strip-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .strip.strip-4 { grid-template-columns: 1fr 1fr; }
  .strip.strip-4 a { border-top: 1px solid var(--line); }
  .cardify tfoot { display: none; }
  .kiosk-names { grid-template-columns: 1fr 1fr; max-height: 42vh; }
  .sig-box { height: 170px; }
  body.kiosk { padding-bottom: 0; }
}
@media print {
  .iso-bar .pace { display: none; }
}
