/* Copyright (c) 2026 Ryan Hultz. All rights reserved.
   STYLES.CSS — the app's stylesheet (moved out of index.html). */

:root {
  /* Colors used across the app's screens. Change a color here, not inline. */
  --brand: #8b0000;        /* fire-engine red: titles, primary buttons */
  --brand-dark: #5a0000;   /* header gradient */
  --brand-tint: #ffcccc;   /* text on red */
  --brand-wash: #fbeeee;   /* hover on outline buttons */
  --accent: #ffcc00;       /* active tab underline */
  --paper: #f5ede0;        /* page background */
  --paper-desktop: #ece1cd;
  --field: #fff8f0;        /* input background */
  --tan: #c8a97a;          /* input borders */
  --tan-light: #e0c9a6;    /* card borders */
  --ink: #1a1a1a;          /* body text */
  --muted: #888;           /* help text */
  --faint: #aaa;           /* captions */
  --line: #ddd;
  --neutral: #555;
  --ok: #2d6a2d;           /* success */
  --blue: #1a4a8a;         /* "Generate from Fields", "Auto-Fill" */
  --purple: #5a2a8a;       /* AI buttons */
  --warn-bg: #fff3cd;
  --warn-border: #e0c86a;
  --warn-ink: #7a5c00;
  --rule: #f0e8d8;         /* soft divider lines */
  --ok-bg: #d4edda;        /* green badge */
  --ok-ink: #155724;
  --idle-bg: #f5f5f5;      /* grey badge */
  --idle-ink: #999;
  --gold: #b8860b;         /* missing-field warning text */
  --warn-wash: #fff8e1;
  --ok-wash: #e8f5e9;
  --ok-border: #a5d6a7;
  --text-2: #333;
  --text-3: #666;
  --text-4: #777;
  --lilac: #b9a3d6;        /* AI panel border */
  --lilac-wash: #f8f4fc;
  --lilac-line: #e3d8ef;
  --stamp: #c0b39a;        /* footer stamp text */
  --err-wash: #fdf0f0;
  --err-panel-bg: #fff0f0;
  --err-panel: #c00;
  --tan-ink: #8a7d68;      /* Reports screen secondary text */
  --cream: #fdf6ea;
  --brown: #5a4f3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Georgia, serif; background: var(--paper); min-height: 100vh; }
button { cursor: pointer; font-family: Georgia, serif; }
input, select, textarea { font-family: Georgia, serif; }

/* Safari/iOS renders the value text inside <input type="date"> using
   its own internal shadow-DOM layout, which ignores a plain
   text-align on the outer input — the date shows centered even
   though JS sets textAlign:'left'. These target the actual internal
   pieces to force it left. */
input[type="date"]::-webkit-datetime-edit-fields-wrapper { justify-content: flex-start; }
input[type="date"]::-webkit-datetime-edit { text-align: left; flex-grow: 0; }
input[type="date"] { text-align: left; }

/* ── Header ── */
#app-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 13px 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
#header-eyebrow { font-size: 10px; letter-spacing: 0.15em; opacity: 0.7; text-transform: uppercase; }
#header-title   { font-size: 18px; font-weight: 700; }
#header-sub     { font-size: 11px; opacity: 0.65; margin-bottom: 7px; }
#tab-bar {
  display: flex;
  overflow-x: auto;
  margin: 0 -16px;
  scrollbar-width: none;
}
#tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none;
  border: none;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.tab-btn.active { color: #fff; border-bottom-color: var(--accent); }

/* ── Content ── */
#content { padding: 14px; max-width: 640px; margin: 0 auto; }
#tab-content { margin-top: 14px; }

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid var(--tan-light);
  margin-bottom: 14px;
  overflow: hidden;
}
.card-title {
  background: var(--brand);
  color: #fff;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.card-body { padding: 13px 13px 10px; }

/* ── Form fields ── */
.lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.inp, .sel, .ta {
  width: 100%;
  box-sizing: border-box;
  background: var(--field);
  border: 1.5px solid var(--tan);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  font-family: Georgia, serif;
  display: block;
}
.ta { resize: vertical; }
.field-row { margin-bottom: 10px; }
.flex-row { display: flex; gap: 10px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* ── Toggle ── */
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1.5px solid var(--tan);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 7px;
  transition: all 0.15s;
}
.toggle.on { background: var(--brand); border-color: var(--brand); }
.toggle-box {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: var(--tan);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 900;
  color: transparent;
}
.toggle.on .toggle-box { background: #fff; color: var(--brand); }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.toggle-sub   { font-size: 11px; color: var(--muted); }
.toggle.on .toggle-label { color: #fff; }
.toggle.on .toggle-sub   { color: var(--brand-tint); }

/* ── Nav buttons ── */
#nav-row { display: flex; gap: 10px; margin-top: 8px; margin-bottom: 20px; }
.btn-back  { flex:1; background:#fff; color:var(--brand); border:2px solid var(--brand); border-radius:10px; padding:12px 0; font-size:15px; font-weight:700; }
.btn-save  { flex:1; background:var(--neutral); color:#fff; border:none; border-radius:10px; padding:12px 0; font-size:15px; font-weight:700; transition:background 0.2s; }
.btn-save.saved { background: var(--ok); }
.btn-next  { flex:1; background:var(--brand); color:#fff; border:none; border-radius:10px; padding:12px 0; font-size:15px; font-weight:700; }
.btn-print { width:100%; height:56px; display:flex; align-items:center; justify-content:center; background:var(--brand); color:#fff; border:none; border-radius:10px; padding:0 12px; font-size:17px; font-weight:700; letter-spacing:0.05em; margin-bottom:10px; text-align:center; line-height:1.2; }
.btn-clear { width:100%; background:none; color:var(--faint); border:1px solid var(--line); border-radius:8px; padding:8px 0; font-size:12px; margin-bottom:30px; }

/* ════════════════════════════════
   DESKTOP LAYOUT (wide screens)
   Activates only at 900px+; phones are unaffected.
   ════════════════════════════════ */
@media (min-width: 900px) {
  body { background: var(--paper-desktop); }

  #app-header { padding: 18px 32px 0; }
  #header-eyebrow { font-size: 12px; }
  #header-title   { font-size: 26px; }
  #header-sub     { font-size: 13px; margin-bottom: 10px; }

  /* Tab bar: no scroll needed, space the tabs out */
  #tab-bar { margin: 0 -32px; padding: 0 24px; justify-content: flex-start; }
  .tab-btn { font-size: 14px; padding: 11px 20px; }

  /* Wider centered content column */
  #content { max-width: 1000px; padding: 26px 32px; }
  #tab-content { margin-top: 20px; }

  /* Cards: roomier, two across where they fit */
  .card { margin-bottom: 20px; border-radius: 12px; }
  .card-title { font-size: 14px; padding: 10px 18px; }
  .card-body { padding: 20px 18px 16px; }

  /* Bigger, more comfortable form controls */
  .lbl { font-size: 12px; margin-bottom: 5px; }
  .inp, .sel, .ta { font-size: 16px; padding: 11px 13px; border-radius: 8px; }
  .field-row { margin-bottom: 14px; }
  .flex-row { gap: 16px; }

  /* Toggles a little roomier on desktop */
  .toggle { padding: 11px 15px; }
  .toggle-label { font-size: 15px; }

  /* Nav + action buttons sized for mouse, not full width */
  #nav-row { margin-top: 14px; margin-bottom: 28px; }
  .btn-back, .btn-next { padding: 14px 0; font-size: 17px; }
  .btn-print { height: 60px; font-size: 18px; max-width: 520px; margin-left: auto; margin-right: auto; }
  .btn-clear { max-width: 360px; margin-left: auto; margin-right: auto; }

  /* Hover affordances (desktop has a real cursor) */
  .tab-btn:hover { color: #fff; }
  .toggle:hover { border-color: var(--brand); }
  .btn-print:hover, .btn-next:hover { filter: brightness(1.08); }
  .btn-back:hover { background: var(--brand-wash); }
}


/* ════════════════════════════════
   SHARED COMPONENTS
   Replace inline styles in the tab files. Kept after the desktop block
   so, like the inline styles they replace, they win over .ta etc. at
   every width.
   ════════════════════════════════ */
.help { font-size: 11px; color: var(--muted); line-height: 1.4; }
.note-warn {
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; color: var(--warn-ink); line-height: 1.4;
}
.btn {
  border: none; border-radius: 8px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; font-family: Georgia, serif; color: #fff;
}
.btn-blue { background: var(--blue); }
.btn-purple { background: var(--purple); }
.btn-outline { background: none; border: 1.5px solid var(--tan); color: var(--brand); padding: 10px 14px; }
.ta-prose { font-size: 14px; line-height: 1.5; }

/* Spacing helpers, so converted elements keep their exact margins. */
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mr-8 { margin-right: 8px; }

/* ── Shared small pieces used by several tabs ── */
.hint { font-size: 11px; color: var(--faint); }
.sub-title { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.divider-soft { border-top: 1px solid var(--rule); margin: 12px 0 12px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.fld-tall { width: 100%; box-sizing: border-box; height: 46px; padding: 0 12px; font-size: 16px; line-height: 46px; display: block; }

/* ── Apparatus tab ── */
.time-row { display: flex; gap: 8px; margin-top: 6px; }
.lbl-sm { font-size: 10px; margin-bottom: 3px; }
.unit-diff {
  min-width: 56px; text-align: center; font-size: 11px; font-weight: 700;
  background: var(--idle-bg); border: 1px solid var(--tan); border-radius: 6px; padding: 4px 6px; color: var(--idle-ink);
  align-self: flex-end; margin-bottom: 1px;
}
.unit-diff.has-time { background: var(--ok-bg); color: var(--ok-ink); }

/* ── More shared pieces ── */
.note { font-size: 11px; color: var(--muted); }
.note-xs { font-size: 10px; color: var(--muted); margin-top: 1px; }
.pad-13 { padding: 13px; }
.mb-4 { margin-bottom: 4px; }
.mb-12 { margin-bottom: 12px; }
.mt-6 { margin-top: 6px; }
.clickable { cursor: pointer; }
.btn-green { background: var(--ok); margin-top: 14px; }
.readonly-box { padding: 9px 10px; background: var(--rule); border: 1.5px solid var(--tan); border-radius: 6px; font-size: 15px; color: var(--neutral); min-height: 40px; }
.stat-strip { margin-top: 12px; background: var(--paper); border: 1px solid var(--tan-light); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 14px; }
.cap-brand { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.stat-big { font-size: 22px; font-weight: 700; color: var(--ink); }
.flex-wrap-10 { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-box { flex: 1; min-width: 130px; background: var(--paper); border: 1px solid var(--tan-light); border-radius: 6px; padding: 8px 10px; }
.stat-label { font-size: 10px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--ink); }

/* ── Times tab ── */
.time-field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.time-field-label { width: 110px; flex-shrink: 0; }
.time-input { flex: 1; font-size: 18px; font-weight: 600; letter-spacing: 0.05em; text-align: center; }
.diff-badge { min-width: 54px; text-align: center; font-size: 12px; font-weight: 700; background: var(--idle-bg); border: 1px solid var(--tan); border-radius: 6px; padding: 4px 6px; color: var(--idle-ink); flex-shrink: 0; }
.diff-badge.has-time { background: var(--ok-bg); color: var(--ok-ink); }
.time-spacer { min-width: 54px; padding: 4px 6px; flex-shrink: 0; visibility: hidden; }

/* ── Review tab ── */
.rv-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.rv-label { font-size: 11px; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; width: 38%; }
.rv-value { font-size: 14px; text-align: right; flex: 1; color: var(--ink); font-weight: 400; }
.rv-value.warn { color: var(--gold); font-weight: 700; }
.card-title-link { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.jump-link { font-size: 11px; color: var(--blue); font-weight: 600; }
.warn-box { background: var(--warn-wash); border: 1.5px solid var(--warn-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.warn-title { font-size: 13px; font-weight: 700; color: var(--warn-ink); margin-bottom: 6px; }
.warn-item { font-size: 12.5px; color: var(--warn-ink); padding: 2px 0; cursor: pointer; text-decoration: underline; }
.ok-box { background: var(--ok-wash); border: 1.5px solid var(--ok-border); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--ok); }
.narr-preview { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }

/* ── Incident tab ── */
.cat-btn {
  width: 100%; text-align: left; padding: 13px 14px; margin-bottom: 8px; border-radius: 10px;
  font-size: 15px; font-weight: 700; font-family: Georgia, serif; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  border: 1.5px solid var(--tan); background: var(--field); color: var(--brand);
}
.cat-btn.has-data { border-color: var(--brand); background: var(--brand); color: #fff; }
.cat-btn.open { margin-bottom: 0; border-radius: 10px 10px 0 0; }
.cat-arrow { font-size: 18px; }
.cat-body {
  background: #fff; border: 1.5px solid var(--brand); border-top: none; border-radius: 0 0 10px 10px;
  padding: 12px 14px 14px; margin-bottom: 10px;
}
.chip {
  display: inline-block; padding: 6px 10px; border-radius: 7px; border: 1.5px solid var(--brand);
  font-size: 12px; margin-right: 6px; margin-bottom: 6px; cursor: pointer; background: #fff; color: var(--brand);
}
.chip.on { background: var(--brand); color: #fff; }
.divider-soft-lg { border-top: 1px solid var(--rule); margin: 14px 0 14px; }
.h-8 { height: 8px; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }

/* ── Law tab and vehicle pickers ── */
.is-hidden { display: none; }
.mb-6 { margin-bottom: 6px; }

/* ── Finalize tab ── */
.bg-ok { background: var(--ok); }
.bg-blue { background: var(--blue); }
.bg-neutral { background: var(--neutral); }
.mt-0 { margin-top: 0; }
.status-line { font-size: 12.5px; margin: 0 0 10px; line-height: 1.4; min-height: 0; }
.status-line.err { color: var(--brand); }
.status-line.ok { color: var(--ok); }
.err-border { border-color: var(--brand); }
.btn-hist { background: var(--neutral); margin: 10px 13px 0; width: calc(100% - 26px); }
.muted-line { font-size: 13px; color: var(--muted); padding: 4px 0; }
.hist-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.flex-1-min0 { flex: 1; min-width: 0; }
.hist-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.btn-sm { background: var(--brand); color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; font-family: Georgia, serif; flex-shrink: 0; }
.btn-sm-outline { background: none; border: 1px solid var(--tan); color: var(--brand); padding: 6px 10px; }

/* ── Dispatch tab ── */
.date-inp { text-align: left; -webkit-appearance: none; appearance: none; min-height: 46px; max-height: 46px; line-height: normal; }
.ta-dispatch { font-size: 14px; line-height: 1.4; }
.fill-status { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.fill-status.ok { color: var(--ok); }
.fill-status.err { color: var(--brand); }
.btn-row { margin: 0 8px 8px 0; }
.btn-link { background: none; border: none; color: var(--brand); font-size: 12px; cursor: pointer; padding: 0; margin-top: 2px; font-family: Georgia, serif; }

/* ── AI review panel ── */
.ai-panel { margin-top: 12px; border: 1.5px solid var(--lilac); background: var(--lilac-wash); border-radius: 10px; padding: 10px 12px; }
.ai-heading { font-size: 12px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 6px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.ai-none { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--lilac-line); }
.ai-text { flex: 1; font-size: 13.5px; line-height: 1.4; }
.ai-reason { font-size: 12px; color: var(--text-4); margin-top: 2px; }
.ai-btn { border: none; border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 600; font-family: Georgia, serif; flex-shrink: 0; }
.ai-btn-solid { background: var(--purple); color: #fff; }
.ai-btn-done { background: none; color: var(--ok); }
.ai-btn-go { background: none; border: 1.5px solid var(--lilac); color: var(--purple); }

/* ── Home screen and error panels ── */
.home-wrap { padding: 4px 0 24px; }
.mb-18 { margin-bottom: 18px; }
.mt-22 { margin-top: 22px; }
.loading-msg { font-size: 13px; color: var(--muted); padding: 10px 0; }
.loading-msg.err { color: var(--brand); }
.stamp { text-align: center; font-size: 10px; color: var(--stamp); letter-spacing: .03em; }
.none-line { font-size: 13px; color: var(--faint); padding: 6px 0; }
.btn-sm-wide { padding: 6px 14px; }
.err-panel {
  background: var(--err-panel-bg); border: 2px solid var(--err-panel); border-radius: 8px; padding: 16px; margin: 14px;
  font-family: monospace; font-size: 13px; color: var(--err-panel); white-space: pre-wrap;
}

/* ── New-report paste modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 14px; max-width: 560px; width: 100%; margin-top: 24px; padding: 20px 20px 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); font-family: Georgia, serif; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.modal-sub { font-size: 12.5px; color: var(--text-4); margin-bottom: 12px; line-height: 1.45; }
.ta-modal { font-size: 13px; line-height: 1.4; width: 100%; margin-bottom: 10px; }
.modal-status { font-size: 12px; margin: 0 0 12px; line-height: 1.4; min-height: 16px; }
.modal-status.err { color: var(--brand); }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.btn-skip { background: none; border: 1.5px solid var(--tan); color: var(--brand); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; font-family: Georgia, serif; cursor: pointer; }
.btn-go { background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 700; font-family: Georgia, serif; cursor: pointer; }
.modal-rn-label { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; margin-bottom: 4px; }
.modal-rn-inp { width: 100%; border: 1.5px solid var(--brand); border-radius: 8px; padding: 10px 12px; font-size: 15px; margin-bottom: 10px; font-family: Georgia, serif; }

/* ── Sign-in screen ── */
.login-wrap { max-width: 420px; margin: 0 auto; padding: 6px 2px 30px; }
.login-err { background: var(--err-wash); border: 1.5px solid var(--brand); border-radius: 8px; padding: 10px; margin-bottom: 12px; font-size: 13px; color: var(--brand); }
.login-ok { background: var(--field); border: 1.5px solid var(--ok); border-radius: 8px; padding: 10px; margin-bottom: 12px; font-size: 13px; color: var(--ok); }
.collision-list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.login-note { font-size: 13px; color: var(--neutral); margin-bottom: 12px; }
.link-center { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* ── Reports screen ── */
.picker-wrap { max-width: 460px; margin: 0 auto; padding: 6px 2px 30px; }
.type-row { display: flex; gap: 6px; margin-bottom: 14px; }
.type-chip { flex: 1; text-align: center; padding: 9px 6px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--brand); background: #fff; color: var(--brand); }
.type-chip.on { background: var(--brand); color: #fff; }
.note-tan { font-size: 12.5px; color: var(--tan-ink); margin-bottom: 10px; }
.report-err { background: var(--err-wash); border: 1.5px solid var(--brand); border-radius: 8px; padding: 12px; margin-bottom: 14px; font-size: 13px; color: var(--brand); }
.report-warn { background: var(--cream); border: 1.5px solid var(--tan); border-radius: 8px; padding: 12px; margin-bottom: 14px; font-size: 12.5px; color: var(--brown); line-height: 1.5; }
.summary-body { font-size: 13.5px; line-height: 1.7; }
.report-narr { font-size: 13px; line-height: 1.5; color: var(--text-2); margin-bottom: 14px; padding: 10px; background: var(--cream); border-radius: 8px; }
.sum-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.sum-label { color: var(--tan-ink); }
.sum-value { font-weight: 700; }

.unit-time-inp { padding: 8px 10px; font-size: 15px; font-weight: 600; text-align: center; letter-spacing: 0.05em; }

/* ── Header bar and share toast (markup in index.html) ── */
#share-status {
  display: none; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px;
  font-family: Georgia, serif; z-index: 999; box-shadow: 0 4px 16px rgba(0,0,0,0.3); text-align: center;
  max-width: 320px; width: 90%;
}
.hdr-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hdr-subrow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hdr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; margin-top: 6px; }
#header-session { font-size: 11px; color: rgba(255,255,255,0.65); }
#header-version { font-size: 9px; color: rgba(255,255,255,0.5); white-space: nowrap; }
#home-btn {
  background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.35); color: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; font-family: Georgia, serif;
}

/* ════════════════════════════════
   PRINT FORM — hidden on screen
   ════════════════════════════════ */
#print-form { display: none; }

.rpt {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  color: #000;
  width: 100%;
  padding: 0.35in;
}
.rpt-title {
  font-size: 15pt; font-weight: bold;
  text-align: center; letter-spacing: 0.06em;
  border-bottom: 2px solid #000;
  padding-bottom: 4px; margin-bottom: 8px;
}
.rpt table { border-collapse: collapse; width: 100%; margin-bottom: 4px; }
.rpt td { border: 1px solid #000; padding: 2px 4px; vertical-align: top; font-size: 8.5pt; }
.rpt .bl { font-weight: bold; font-size: 7.5pt; white-space: nowrap; }
.rpt .ul { border-bottom: 1px solid #000; display: inline-block; min-height: 13px; padding-bottom: 1px; }
.rpt .sec-hdr {
  font-weight: bold; font-size: 7.5pt;
  background: #ddd; border: 1px solid #000;
  padding: 2px 5px; border-bottom: none;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 4px;
}
.rpt .chkbox {
  display: inline-block;
  width: 9px; height: 9px;
  border: 1px solid #000;
  text-align: center; line-height: 9px;
  font-size: 8pt; margin-right: 3px; flex-shrink: 0;
  vertical-align: middle;
}
.rpt .chkbox.on { background: #000; color: #fff; font-weight: bold; }
.rpt .disp-wrap { display: flex; flex-wrap: wrap; border: 1px solid #000; margin-bottom: 4px; }
.rpt .disp-item {
  flex: 0 0 50%; padding: 2px 5px;
  border-bottom: 1px solid #000; border-right: 1px solid #000;
  display: flex; align-items: center; gap: 3px; font-size: 8pt;
}
.rpt .disp-item.full { flex: 0 0 100%; border-right: none; }
.rpt .disp-item:nth-child(even) { border-right: none; }
.rpt .loc-wrap { display: flex; flex-wrap: wrap; border: 1px solid #000; margin-bottom: 4px; }
.rpt .loc-item {
  flex: 0 0 25%; padding: 2px 5px;
  border-bottom: 1px solid #000; border-right: 1px solid #000;
  display: flex; align-items: center; gap: 3px; font-size: 7.5pt;
}
.rpt .loc-item:nth-child(4n) { border-right: none; }
.rpt .pers-wrap { display: flex; flex-wrap: wrap; border: 1px solid #000; margin-bottom: 4px; }
.rpt .pers-item {
  flex: 0 0 50%; padding: 2px 5px;
  border-bottom: 1px solid #000; border-right: 1px solid #000;
  display: flex; align-items: center; gap: 3px; font-size: 8pt;
}
.rpt .pers-item:nth-child(even) { border-right: none; }
.rpt .app-wrap { display: flex; flex-wrap: wrap; border: 1px solid #000; margin-bottom: 4px; }
.rpt .app-item {
  flex: 0 0 20%; padding: 2px 5px;
  border-bottom: 1px solid #000; border-right: 1px solid #000;
  font-size: 7.5pt;
}
.rpt .app-item:nth-child(5n) { border-right: none; }
.rpt .remarks-box {
  border: 1px solid #000; min-height: 55pt;
  padding: 4px; font-size: 8.5pt;
  white-space: pre-wrap; margin-bottom: 4px;
}
.rpt .footer-row {
  display: flex; justify-content: space-between;
  border-top: 1px solid #000; padding-top: 3px; font-size: 8pt;
  margin-top: 4px;
}
.page2 { padding: 0.35in; }
.page2-title { font-size: 14pt; font-weight: bold; text-align: center; margin-bottom: 10px; border-bottom: 2px solid #000; padding-bottom: 4px; }
