/* Crew records (public/js/crew-records.js): chips on a board row, the modal,
   and the security checklist drawn as the printed form. */
.cr-chip { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--pill-neutral-bg); color: var(--text-secondary); margin-right: 4px; white-space: nowrap; }
.cr-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-chip.ok { background: var(--pill-ok-bg); color: var(--text-primary); }
.cr-chip.warn { background: var(--pill-warn-bg); color: var(--text-primary); }
.cr-chip.none { color: var(--text-faint); }

.cr-overlay { display: none; position: fixed; inset: 0; background: rgba(15,20,28,.45); z-index: 300; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow: auto; }
.cr-overlay.open { display: flex; }
.cr-modal { background: var(--bg-card); border-radius: 10px; width: 860px; max-width: 100%; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); }
.cr-head-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cr-head-acts { display: flex; align-items: center; gap: 8px; }
.cr-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--text-faint); cursor: pointer; }
.cr-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 0; }
.cr-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary); border-radius: var(--radius-control); padding: 6px 10px; font-size: 12px; cursor: pointer; }
.cr-tab small { color: var(--text-faint); font-size: 10.5px; }
.cr-tab.on { border-color: var(--accent-blue); color: var(--text-primary); }
.cr-body { padding: 14px 18px 18px; }
.cr-faint { color: var(--text-faint); font-size: 13px; }
.cr-kv { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cr-kv th { text-align: left; font-weight: 500; color: var(--text-muted); padding: 4px 10px 4px 0; width: 38%; border-bottom: 1px solid var(--border-subtle); }
.cr-kv td { padding: 4px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); font-variant-numeric: tabular-nums; word-break: break-word; }

.cr-viewer { display: block; width: 100%; height: 420px; border: 1px solid var(--border-subtle); border-radius: 6px; background: #fff; overflow: hidden; pointer-events: none; /* read-only: the wheel goes to the page, as over the checklist */ }
.cr-raw { margin-top: 10px; }
.cr-raw summary { cursor: pointer; font-size: 12px; color: var(--text-faint); }

/* The checklist keeps paper colours whatever the theme: it is a copy of a form. */
.cr-sheet { background: #fff; color: #111418; border: 1px solid #c9ced4; padding: 18px; font: 11px/1.3 Arial, Helvetica, sans-serif; }
.cr-sheet table { width: 100%; border-collapse: collapse; }
.cr-sheet th, .cr-sheet td { border: 1px solid #1b1f24; padding: 2px 5px; vertical-align: middle; }
.cr-title { display: grid; grid-template-columns: 150px 1fr 130px; border: 1px solid #1b1f24; margin-bottom: 10px; }
.cr-title > * { display: flex; align-items: center; justify-content: center; }
.cr-title h2 { margin: 0; padding: 10px; font-size: 13px; text-align: center; border-left: 1px solid #1b1f24; border-right: 1px solid #1b1f24; }
.cr-brand { font: italic 800 19px/1 Arial, sans-serif; color: #d4211c; }
.cr-brand span { color: #e8b100; }
.cr-formno { font-size: 11px; }
.cr-banner { background: #fde7e4; color: #b0281a; font-weight: 700; text-align: center; padding: 6px; margin-bottom: 8px; border: 1px solid #b0281a; }
.cr-flight th { font-weight: 700; text-align: center; }
.cr-flight td { text-align: center; }
.cr-fill { color: #1f5fc4; font-family: 'Courier New', monospace; font-weight: 700; }
.cr-cols { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #1b1f24; border-top: 0; }
.cr-col + .cr-col { border-left: 1px solid #1b1f24; }
.cr-col.off { opacity: .38; }
.cr-col-title { text-align: center; font-weight: 700; font-style: italic; padding: 4px; }
.cr-chosen { border: 1.5px solid #1f5fc4; border-radius: 10px; padding: 0 8px; }
.cr-areas tr > :first-child { border-left: 0; } .cr-areas tr > :last-child { border-right: 0; }
.cr-areas th, .cr-group td { background: #d5d7da; font-weight: 700; text-align: left; }
.cr-areas th:last-child, .cr-group td:last-child { text-align: right; width: 48px; }
.cr-letter { color: #d4211c; width: 26px; } .cr-num { text-align: center; width: 26px; }
.cr-tick { text-align: center; color: #1f5fc4; font-weight: 700; font-size: 13px; }
.cr-signs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #1b1f24; border-top: 0; background: #fff6cf; }
.cr-sign + .cr-sign { border-left: 1px solid #1b1f24; }
.cr-sign-head { text-align: center; padding: 2px 4px; min-height: 40px; border-bottom: 1px solid #1b1f24; }
.cr-sign-head b { color: #d4211c; }
.cr-sign-pad { height: 46px; background: #fff; border-bottom: 1px solid #1b1f24; display: flex; align-items: center; justify-content: center; color: #1f5fc4; }
.cr-sign-line { padding: 1px 4px; font-weight: 700; border-bottom: 1px solid #1b1f24; }
.cr-sign-line.two { display: grid; grid-template-columns: 1fr 1.5fr; }
.cr-sign-meta { font-size: 9.5px; color: #5b636d; padding: 2px 4px; font-weight: 400; }
.cr-ink { height: 100%; width: auto; max-width: 100%; }
.cr-times { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; border: 1px solid #1b1f24; border-top: 0; background: #fff6cf; padding: 6px 8px; }
.cr-final { display: inline-flex; align-items: center; gap: 6px; color: #111418; }
.cr-final .cr-ink { height: 36px; color: #1f5fc4; }
.cr-confidential { text-align: center; color: #d4211c; font-weight: 700; margin-top: 8px; }

@media print {
  body.cr-printing > *:not(#cr-modal) { display: none !important; }
  body.cr-printing #cr-modal { position: static; display: block; padding: 0; background: none; }
  body.cr-printing .cr-modal { box-shadow: none; width: auto; }
  body.cr-printing .cr-head-acts, body.cr-printing .cr-tabs { display: none; }
}
