/* Digital logbooks -- the account panel (account.js), on top of the shared
   app's own styles (panel, field, btn, badge, verdict...). */
/* Same box as the shared app's #app (max-width 900px, 20px side padding). */
.account-holder { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.account-panel { margin-bottom: 16px; }
.account-panel input[type="text"] { min-width: 220px; }
/* Number fields (an annual sticker's season) like the shared app's text and date fields. */
.account-panel .field input[type="number"] { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-size: 0.95rem; font-family: inherit; }
.account-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.account-roles { display: inline-flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.account-actions a.btn { text-decoration: none; }
/* A button's small icon (account.js ICONS), before its label. */
.btn[data-icon]::before { content: attr(data-icon); margin-right: 5px; font-size: 0.95em; }
/* The QR sticker buttons: a little black and white QR code. */
.btn[data-icon="qr"]::before { content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; border: 1px solid #fff; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21' shape-rendering='crispEdges'%3E%3Crect width='21' height='21' fill='%23fff'/%3E%3Cpath fill='%23000' d='M0 0h7v7H0zM14 0h7v7h-7zM0 14h7v7H0z'/%3E%3Cpath fill='%23fff' d='M1 1h5v5H1zM15 1h5v5h-5zM1 15h5v5H1z'/%3E%3Cpath fill='%23000' d='M2 2h3v3H2zM16 2h3v3h-3zM2 16h3v3H2zM8 0h1v2H8zM10 1h2v1h-2zM9 3h2v2H9zM12 4h1v3h-1zM8 6h2v1H8zM0 8h2v1H0zM3 8h3v1H3zM8 8h3v2H8zM12 8h2v1h-2zM15 8h2v1h-2zM19 8h2v2h-2zM1 10h2v2H1zM5 10h2v1H5zM11 10h1v3h-1zM13 10h3v1h-3zM17 11h2v2h-2zM0 12h1v1H0zM4 12h3v1H4zM8 12h2v2H8zM14 12h2v2h-2zM20 12h1v2h-1zM8 15h3v1H8zM12 14h1v3h-1zM15 15h2v2h-2zM18 15h3v1h-3zM9 17h2v2H9zM14 18h3v1h-3zM19 17h2v3h-2zM8 20h3v1H8zM12 19h2v2h-2zM16 20h2v1h-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.account-section { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 8px; }
.account-section-head { background: none; border: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.account-section-body { padding: 4px 0 4px 16px; }
.account-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; }
.account-card-title { font-weight: 600; margin-bottom: 4px; }
.account-records { margin: 6px 0 0; padding-left: 22px; font-size: 0.85rem; }
/* A wide table (a body's scrutineers) scrolls sideways inside its card rather than overflowing it. */
.account-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.85rem; display: block; overflow-x: auto; }
.account-table th, .account-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.account-table th { color: var(--muted); font-weight: 600; }
.account-table td.account-warn { color: var(--warn); }
.account-row-actions { white-space: nowrap; }
/* In a table row the buttons wrap, so a row with several stays inside its card. */
.account-table td.account-row-actions { white-space: normal; min-width: 100px; }
.account-row-actions .btn { margin: 0 4px 2px 0; }
.account-device { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.account-card.selected { border-color: var(--accent); }
.account-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; }
.account-event-title { margin: 14px 0 2px; font-size: 1rem; }
.badge.pass { background: var(--pass-bg); color: var(--pass); }
/* Tech progress: passed (green) and failed (red) shares of the cars entered. */
.account-progress { margin-top: 6px; }
.account-progress-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); margin-bottom: 4px; }
.account-progress-bar .pass { background: var(--pass); }
.account-progress-bar .fail { background: var(--fail); }
/* A competitor: car number, driver and car, then the inspection buttons or result. */
.account-entry { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.account-entry:first-of-type { border-top: none; }
.account-car-number { font-weight: 700; min-width: 3em; }
.account-entry-main { flex: 1; min-width: 0; }
/* A logbook on this device: its name and state, then its buttons below (like a search result). */
.account-entry-stack { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
.account-entry-head { display: flex; align-items: center; gap: 10px; }
.account-entry-stack .account-actions { margin-top: 6px; }
/* Home: one card per mode, numbered, like PassTech's landing page. */
.account-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.account-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.account-mode:hover { border-color: var(--accent); }
.account-mode-number { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; }
.account-mode-title { font-weight: 700; font-size: 1rem; }
.account-mode-text { color: var(--muted); font-size: 0.85rem; }
.account-mode-header { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.account-mode-header h2 { margin: 0; }
/* Where we are: Home > section > ... (account.js crumbTrail). */
.account-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 1.05rem; }
.account-crumb { color: var(--accent, #4f8ef7); text-decoration: none; }
a.account-crumb:hover { text-decoration: underline; }
.account-crumb.current { color: inherit; font-weight: 700; font-size: 1.2rem; }
.account-crumb-sep { color: var(--muted, #888); }
/* The logbook open below: its name, and saving / viewing it. */
.account-open-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0; }
.account-open-name { min-width: 0; }
/* What a logbook still needs before it's issued. */
.account-checklist { list-style: none; margin: 4px 0; padding: 0; font-size: 0.9rem; }
.account-checklist li { padding: 4px 0; }
.account-check-mark { display: inline-block; width: 1.2em; font-weight: 700; }
.account-checklist li.done .account-check-mark { color: var(--pass); }
.account-checklist li.todo .account-check-mark { color: var(--fail); }
.account-more { margin-top: 10px; font-size: 0.9rem; }
.account-more summary { cursor: pointer; color: var(--muted); }
.account-busy { margin: 8px 0; padding: 6px 10px; border-radius: 6px; background: var(--info-bg); color: var(--accent); font-size: 0.85rem; }
/* A logbook being saved to this device: at the top of On this device, with its progress. */
.account-busy-card { border-color: var(--accent); background: var(--info-bg); }
.account-busy-card .account-card-title::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 8px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: account-spin 0.8s linear infinite; }
@keyframes account-spin { to { transform: rotate(360deg); } }
/* The public link's photos. */
.account-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.account-photos img { width: 140px; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
/* Tech sheets (techsheet.js): header fields, then each section's lines --
   the item, what's accepted, the team's declaration -- with Pass / Fail / N/A. */
.techsheet { margin-top: 8px; }
.techsheet-instructions { font-style: italic; }
.techsheet-variants { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; font-size: 0.9rem; }
.techsheet-header { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; margin: 8px 0 12px; }
.techsheet-field { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; color: var(--muted); }
.techsheet-field input, .techsheet-field select, .techsheet-field textarea { font: inherit; font-size: 0.9rem; color: var(--ink); }
.account-panel .techsheet input[type="text"], .account-panel .techsheet-editor input[type="text"] { min-width: 0; width: 100%; box-sizing: border-box; }
.techsheet-header input, .techsheet-header select { width: 100%; box-sizing: border-box; }
.techsheet input[type="number"], .techsheet input[type="date"] { font: inherit; font-size: 0.9rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--ink); }
.techsheet-section { border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; overflow: hidden; }
.techsheet-section-title { background: var(--info-bg); padding: 6px 10px; font-weight: 600; }
.techsheet-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-top: 1px solid var(--border); }
.techsheet-row.fail { background: var(--fail-bg, #fdecec); }
.techsheet-row.pass { box-shadow: inset 3px 0 0 var(--pass); }
.techsheet-row.na { opacity: 0.75; }
.techsheet-item { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.techsheet-item .badge { margin-left: 6px; }
.techsheet-declared { font-size: 0.85rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.techsheet-photos { display: inline-flex; gap: 4px; margin-left: 4px; }
.techsheet-photo img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); display: block; }
.techsheet-photo.tag img { border-color: var(--accent); }
.techsheet-values { display: flex; flex-wrap: wrap; gap: 6px 12px; }
/* A helmet's style: four pictures (techsheet.js helmetPicker). */
.techsheet-helmet-styles { flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.techsheet-helmet-style { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font: inherit; font-size: 0.8rem;
  color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.techsheet-helmet-style img { height: 48px; width: auto; }
.techsheet-helmet-style.on { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; font-weight: 600; }
.techsheet-helmet-style:disabled { cursor: default; opacity: 0.6; }
.techsheet-helmet-style.on:disabled { opacity: 1; }
@media (max-width: 640px) { .techsheet-helmet-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.techsheet-options { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.85rem; }
.techsheet-note { font-size: 0.85rem; padding: 3px 6px; }
.techsheet-results { display: flex; gap: 4px; flex: 0 0 auto; }
.techsheet-result { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; font-size: 0.85rem; }
.techsheet-result.pass.on { background: var(--pass); border-color: var(--pass); color: #fff; }
.techsheet-result.fail.on { background: var(--fail); border-color: var(--fail); color: #fff; }
.techsheet-result.na.on { background: var(--muted); border-color: var(--muted); color: #fff; }
.techsheet-corrections textarea { width: 100%; }
.techsheet-editor-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 4px 8px; }
.techsheet-editor-item { border-top: 1px solid var(--border); padding: 4px 0; }
.techsheet-item-input, .techsheet-section-input { flex: 1 1 220px; font-weight: 600; }
.techsheet-accepts-input { flex: 3 1 320px; }
.techsheet-rule-input { flex: 1 1 120px; }
@media (max-width: 640px) {
  .techsheet-row { flex-direction: column; }
}
@media (max-width: 640px) {
  .account-panel input[type="text"] { min-width: 0; width: 100%; }
}
/* Tabs: an open event (Competitor management / Admin), a body (Scrutineers / Tech sheets). */
.account-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0 8px; }
.account-tab { padding: 8px 14px; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.account-tab:hover { color: var(--ink); }
.account-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
/* Event and body cards in a list: click to open. */
.account-event-card { cursor: pointer; }
.account-event-card:hover, .account-event-card:focus-visible { border-color: var(--accent); }
.account-card-title .badge { margin-left: 6px; }
/* The tech sheet editor: sections collapsed until opened; the one being edited stands out. */
.techsheet-editor-section .techsheet-editor-head { cursor: pointer; }
.techsheet-editor-section:not(.editing) .techsheet-editor-head:hover { background: var(--info-bg); }
.techsheet-editor-section.editing { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--info-bg); }
.techsheet-editor-section.editing > .techsheet-editor-head { background: var(--accent); color: #fff; }
.techsheet-editor-section.editing > .techsheet-editor-head .btn { background: var(--panel); }
/* Its items: each a box, folded to one row; the one being edited open and highlighted. */
.techsheet-editor-section.editing .techsheet-editor-item { border: 1px solid var(--border); border-radius: var(--radius); margin: 6px 8px; padding: 2px 0; background: var(--panel); }
.techsheet-editor-item.folded .techsheet-editor-head { cursor: pointer; }
.techsheet-editor-item.folded .techsheet-editor-head:hover { background: var(--info-bg); }
.techsheet-item-name { flex: 1; min-width: 0; font-weight: 600; }
/* An item's tick list and fields (techsheet.js itemValuesEditor). */
.techsheet-values-editor { border-left: 3px solid var(--border); margin: 4px 8px; padding: 2px 0 2px 8px; }
.techsheet-values-editor > .techsheet-field { padding: 4px 0; }
.techsheet-field-editor { padding-left: 0; }
.techsheet-item-name .element-desc { font-weight: 400; }
.techsheet-editor-section.editing .techsheet-editor-item.editing { border: 2px solid var(--warn); background: var(--warn-bg); box-shadow: 0 0 0 3px var(--warn-bg); margin: 10px 8px; }
.techsheet-caret { border: none; background: none; font: inherit; font-size: 1rem; color: inherit; cursor: pointer; padding: 0 4px; }
.techsheet-section-name { flex: 1; font-weight: 600; }
.techsheet-applies { font-size: 0.85rem; color: var(--muted); }
.techsheet-variants-editor { border: 1px dashed var(--border); border-radius: var(--radius); padding: 6px 4px; margin: 8px 0; }
.techsheet-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-top: 6px; }
.techsheet-preview-title { font-weight: 700; font-size: 1.05rem; }
/* The editor's gear picker: PassTech's categories as tiles (like its Equipment summary). */
.techsheet-gear { border: 1px dashed var(--border); border-radius: var(--radius); padding: 6px 8px; margin: 8px 0; }
.techsheet-gear-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.techsheet-gear-row-label { flex: 0 0 96px; font-weight: 700; font-size: 0.85rem; padding-top: 22px; }
.techsheet-gear-row-label.required { color: var(--fail); }
.techsheet-gear-row-label.conditional { color: var(--warn); }
.techsheet-gear-tiles { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.techsheet-gear-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; padding: 4px; border: 2px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.68rem; line-height: 1.15; cursor: pointer; opacity: 0.55; }
.techsheet-gear-tile img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; background: #fff; }
.techsheet-gear-tile:hover { opacity: 1; border-color: var(--accent); }
.techsheet-gear-tile.in { opacity: 1; border-color: var(--pass); }
.techsheet-gear-tile.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--info-bg); }
.techsheet-gear-check { position: absolute; top: 2px; right: 4px; background: var(--pass); color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 0.65rem; line-height: 16px; text-align: center; }
.techsheet-gear-panel { border: 2px solid var(--accent); border-radius: var(--radius); padding: 8px 10px; margin-top: 8px; }
.techsheet-gear-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.techsheet-standards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; font-size: 0.85rem; }
.techsheet-standard { padding: 2px 4px; border-radius: 4px; }
.techsheet-standard.on { background: var(--pass-bg); }
.techsheet-standard .badge { margin-left: 4px; font-size: 0.65rem; }
@media (max-width: 640px) {
  .techsheet-gear-row { flex-direction: column; gap: 2px; }
  .techsheet-gear-row-label { flex: none; padding-top: 0; }
}
.techsheet-gear .techsheet-field { flex: 1 1 260px; min-width: 0; }
.techsheet-gear select { width: 100%; max-width: 100%; box-sizing: border-box; }
/* A gear line: its fixed PassTech category, and its accepted standards inside it. */
.techsheet-gear-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; color: var(--muted); }
.techsheet-gear-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff; }
.techsheet-standards-box { margin: 4px 8px 6px; padding: 6px 8px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 6px 6px 0; }
.techsheet-editor-item.active { box-shadow: inset 4px 0 0 var(--pass); }
.techsheet-options-label { display: block; width: 100%; }
/* MotorsportReg import: the list before it's saved. */
.msr-table { font-size: 0.8rem; }
.msr-table td { vertical-align: middle; }
.account-panel .msr-table input.msr-number { width: 4.5em; min-width: 0; padding: 3px 5px; }
.msr-table tr.msr-problem td { background: var(--fail-bg, #fdecec); }
.msr-table tr.msr-skipped td { opacity: 0.45; }
.techsheet-nocert { display: block; margin: 2px 0 4px; font-size: 0.85rem; }
/* The team's photos of the car and crew, at the top of the sheet. */
.techsheet-pictures { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.techsheet-pictures figure { margin: 0; }
.techsheet-pictures-row { display: flex; gap: 6px; }
.techsheet-pictures .techsheet-photo img { width: 120px; height: 90px; }
.techsheet-pictures figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.techsheet-start { font: inherit; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--accent); color: var(--accent); background: var(--panel); cursor: pointer; }
/* The sheet, PassTech-style: a summary, folding sections, and lines that fold once judged. */
.techsheet-row { flex-direction: column; gap: 6px; }
.techsheet-row.folded { padding-top: 6px; padding-bottom: 6px; }
.techsheet-line-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.techsheet-line-head .techsheet-caret { color: var(--muted); width: 1em; }
.techsheet-line-spacer { flex: 1; }
.techsheet-line-note { max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.techsheet-section-title { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.techsheet-section.closed .techsheet-section-title { border-bottom: none; }
.techsheet-summary { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; margin: 10px 0; }
.techsheet-summary-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.techsheet-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--border); }
.techsheet-chip.pass { background: var(--pass-bg); color: var(--pass); border-color: var(--pass); }
.techsheet-chip.fail { background: var(--fail-bg); color: var(--fail); border-color: var(--fail); }
.techsheet-chip.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.techsheet-chip.na, .techsheet-chip.todo { color: var(--muted); }
.techsheet-summary-list { list-style: none; margin: 0; padding: 0; }
.techsheet-summary-list button { display: block; width: 100%; text-align: left; border: none; background: none; color: var(--ink); font: inherit; font-size: 0.88rem; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.techsheet-summary-list button:hover { background: var(--info-bg); }
.techsheet-summary-why { display: block; margin-left: 4px; }
.techsheet-verdict { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); }
.techsheet-verdict.ok { color: var(--pass); border-color: var(--pass); }
.techsheet-verdict.bad { color: var(--fail); border-color: var(--fail); }
.techsheet-verdict.info { color: var(--warn); border-color: var(--warn); }
.techsheet-verdict-box { margin-top: 6px; padding: 6px 8px; border-radius: 6px; font-size: 0.85rem; border: 1px solid var(--border); }
.techsheet-verdict-box.ok { background: var(--pass-bg); border-color: var(--pass); }
.techsheet-verdict-box.bad { background: var(--fail-bg); border-color: var(--fail); }
.techsheet-verdict-box.info { background: var(--warn-bg); border-color: var(--warn); }
.techsheet-gear-form { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; margin: 4px 0; }
.techsheet-gear-form-title { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.techsheet-gear-form .techsheet-values { align-items: flex-end; }
.techsheet-gear-form .techsheet-field.wide { flex: 1 1 220px; }
.techsheet-gear-form select, .techsheet-gear-form input[type="date"], .techsheet-gear-form input[type="number"], .techsheet-gear-form input[type="text"] { font: inherit; font-size: 0.9rem; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--ink); }
.techsheet-gear-form input[type="number"] { width: 7em; }
.techsheet-gear-unit { border: 1px dashed var(--border); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.techsheet-gear-unit-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.85rem; }
.techsheet-gear-cert { margin-top: 4px; }
.techsheet-own-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; }
.techsheet-own-photo { position: relative; }
.techsheet-photo-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--fail); color: #fff; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; }
.techsheet-add-photo { position: relative; cursor: pointer; }
.techsheet-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .techsheet-row { flex-direction: column; }
  .techsheet-line-spacer { display: none; }
}
/* The editor's comparison with the body's built-in sheet: its lines this sheet lacks. */
.techsheet-compare { border: 1px dashed var(--border); border-radius: var(--radius); padding: 6px 8px; margin: 8px 0; }
.techsheet-compare-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; border: none; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; padding: 2px 0; }
.techsheet-compare-section { margin: 8px 0; }
.techsheet-compare-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; background: var(--info-bg); padding: 4px 8px; border-radius: 6px; }
.techsheet-compare-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.techsheet-compare-text { flex: 1; min-width: 0; }
.techsheet-compare-text .badge { margin-left: 6px; }
/* Rule # suggestions in the editor. */
.techsheet-rule-suggest { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.techsheet-rule-fill { background: var(--warn-bg); border-radius: 6px; }
/* An event's tech sheets: one row per sheet and its classes. */
.event-sheet-row { align-items: flex-end; }
/* A tech sheet's visibility: Private (its events only) or Public (PassTech's generic sheet). */
.techsheet-visibility { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; margin: 6px 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; }
.techsheet-visibility label { cursor: pointer; }
/* The other site (Digital logbooks / Scrutineering), under the home cards. */
.account-other-site { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Tech stickers (stickers.js): the print dialog and a scanned sticker. */
.sticker-dialog-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.sticker-dialog { background: var(--panel); color: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.sticker-dialog h3 { margin: 0 0 10px; }
.sticker-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.sticker-preview figure { margin: 0; text-align: center; font-size: 0.75rem; }
.sticker-preview svg { width: 120px; height: 120px; border: 1px solid var(--border); border-radius: 4px; display: block; }
.sticker-formats { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.sticker-status { padding: 10px 12px; border-radius: 8px; border: 2px solid var(--border); margin-bottom: 10px; font-size: 1.05rem; }
.sticker-status.valid { background: var(--pass-bg); color: var(--pass); border-color: var(--pass); }
.sticker-status.void { background: var(--fail-bg); color: var(--fail); border-color: var(--fail); }
.sticker-view h3 { margin: 6px 0; }
.sticker-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sticker-photo { position: relative; display: block; }
.sticker-photo img { width: 150px; height: 112px; object-fit: cover; border-radius: 6px; display: block; background: var(--border); }
.sticker-photo.tag img { outline: 2px solid var(--accent); }
.sticker-photo span { position: absolute; left: 4px; bottom: 4px; background: var(--accent); color: #fff; font-size: 0.7rem; padding: 0 6px; border-radius: 999px; }
.sticker-certs { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.sticker-cert { display: flex; flex-direction: column; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.sticker-results-title { font-weight: 600; margin-top: 8px; }
.sticker-results ul { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 3px; }
/* A gear line's tag reader (techsheet.js tagScanner). */
.techsheet-tag-scan { margin-top: 8px; padding: 8px; border: 1px dashed var(--border); border-radius: 6px; display: flex; flex-direction: column; gap: 6px; }
.techsheet-tag-scan-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.techsheet-tag-scan .btn.disabled { opacity: 0.5; pointer-events: none; }
.techsheet-tag-candidate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; }
.techsheet-tag-candidate.mismatch { border-color: var(--fail); background: var(--fail-bg); }
/* The sticker scanner's camera (stickers.js scanDialog). */
.sticker-scan-video { width: 100%; max-height: 50vh; background: #000; border-radius: 6px; margin-bottom: 8px; }
.sticker-scan-code { flex: 1; min-width: 160px; }

/* A tech sheet line's sticker row (techsheet.js stickerRow). */
.techsheet-sticker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }

/* A scrutineer's permission checkboxes (account.js permissionBoxes). */
.account-permissions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; margin: 6px 0; align-items: start; }
.account-perm-group { border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px 8px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.account-perm-group legend { padding: 0 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.account-permissions label { display: flex; align-items: flex-start; gap: 6px; }
.account-permissions input { margin-top: 3px; flex: none; }
/* My garage: a car's privacy and public link. */
.account-privacy { display: flex; flex-direction: column; gap: 8px; }
.account-privacy-shows { display: flex; flex-direction: column; gap: 6px; padding-left: 22px; }
.account-privacy-shows .field { flex: none; max-width: 260px; }
.account-card-thumb { display: flex; gap: 12px; align-items: flex-start; }
.account-card-thumb .account-card-body { flex: 1; min-width: 0; }
/* A logbook card's title, with its status badge at the right. */
.account-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.account-card-title-row .badge { flex: none; }
.account-thumb { width: 96px; height: 72px; flex: none; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.account-thumb-none { display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--muted); background: var(--surface-2, transparent); }
@media (max-width: 520px) { .account-thumb { width: 64px; height: 48px; } }
.account-privacy-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.account-privacy-pic { position: relative; cursor: pointer; border-radius: var(--radius); outline: 2px solid transparent; }
.account-privacy-pic.picked { outline-color: var(--accent); }
.account-privacy-pic input { position: absolute; top: 4px; left: 4px; }
.account-privacy-pic:not(.picked) .account-thumb { opacity: 0.55; }
.account-public-model img { max-width: 100%; width: 480px; border-radius: var(--radius); border: 1px solid var(--border); }
.account-public-tubes { margin: 6px 0; padding-left: 18px; }
/* A sticker being viewed: the sticker itself, as printed. */
.sticker-picture { margin: 10px 0; }
.sticker-picture svg { display: block; width: 140px; height: 140px; border: 1px solid var(--border); border-radius: 4px; }
/* A logbook card: click it to show its buttons (one at a time). */
.account-card-pick { cursor: pointer; }
.account-card-pick:hover { border-color: var(--accent); }
.account-card-pick.picked { border-color: var(--accent); }
.account-card-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Annual stickers tab: the gear a body (or discipline) gives them for. */
.annual-gear-row .account-card-title { display: flex; gap: 8px; align-items: center; }
.annual-gear-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.annual-gear-choices label { display: inline-flex; align-items: center; gap: 4px; }
/* One person's accreditations (one per discipline) shown together. */
.account-people tr.account-person { cursor: pointer; }
.account-people tr.account-person:hover td, .account-people tr.account-person.open td { background: var(--surface-2, rgba(127, 127, 127, 0.08)); }
.account-people tr.account-person:focus-visible { outline: 2px solid var(--accent, #4a7bd0); outline-offset: -2px; }
.account-person-caret { display: inline-block; width: 1em; color: var(--muted); }
.account-people tr.account-person-details > td { padding: 0 0 8px 1.4em; }
.account-acc-details .account-table { margin-top: 0; }
.account-status-ok { color: var(--pass); font-weight: 600; }
.account-status-off { color: var(--fail); font-weight: 600; }
.account-status-mixed { color: var(--warn); font-weight: 600; }
.account-perm-block { margin: 8px 0; padding: 6px 0 2px; border-top: 1px solid var(--border); }

/* A roll cage design's history (logbook requests, a logbook that kept it). */
.account-design-history { margin: 8px 0 0; padding-left: 20px; font-size: 0.88rem; }
.account-design-history li { margin: 2px 0; }

/* A fabricator's listing: the sanctioning bodies they build for, by discipline. */
.account-builds-for { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin: 6px 0; }
.account-builds-for label.account-checks { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 6px; margin: 3px 0; font-size: 0.88rem; }
.account-builds-for label.account-checks input { flex: none; margin-top: 3px; }
