:root {
  color-scheme: dark;
  --bg: #07101c;
  --sidebar: #0a1422;
  --surface: #101a28;
  --surface-2: #162232;
  --surface-3: #1b293a;
  --border: #39485b;
  --border-strong: #64748a;
  --text: #f3f6fb;
  --muted: #b4bfd0;
  --faint: #96a5ba;
  --amber: #f5a623;
  --green: #79cf69;
  --blue: #63a9f3;
  --red: #ff6666;
  --shadow: 0 18px 48px rgba(0, 0, 0, .24);
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.boot-screen { margin: auto; display: grid; place-items: center; gap: 12px; color: var(--faint); font: 12px var(--mono); }

.sidebar { width: 232px; min-height: 100vh; flex: 0 0 232px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid #1a1e26; }
.brand { min-height: 68px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #1a1e26; }
.brand-copy strong, .brand-copy span { display: block; font-family: var(--mono); }
.brand-copy strong { font-size: 12px; }
.brand-copy span { margin-top: 2px; color: var(--faint); font-size: 8px; letter-spacing: 1.5px; }
.menu-toggle { display: none; margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 4px; background: transparent; cursor: pointer; font-size: 18px; }
.nav { padding: 10px 0; display: grid; gap: 2px; }
.nav-button { position: relative; width: 100%; padding: 11px 16px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--faint); text-align: left; cursor: pointer; }
.nav-button:hover { color: var(--muted); background: rgba(255,255,255,.025); }
.nav-button.active { color: var(--amber); background: rgba(245,166,35,.07); }
.nav-button.active::before { content: ""; position: absolute; inset: 5px auto 5px 0; width: 2px; background: var(--amber); }
.nav-icon { font: 700 14px var(--mono); text-align: center; }
.nav-label { font: 500 11px var(--mono); }
.count { min-width: 20px; padding: 2px 5px; border-radius: 3px; background: var(--amber); color: #111; font: 700 9px var(--mono); text-align: center; }
.operator { margin-top: auto; padding: 14px 16px; border-top: 1px solid #1a1e26; }
.eyebrow { color: var(--muted); font: 600 10px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; }
.operator .eyebrow { color: var(--faint); font-size: 9px; }
.operator-name { margin-top: 5px; font: 500 11px var(--mono); color: var(--muted); }
.operator-role { margin-top: 3px; font: 9px var(--mono); color: var(--faint); }
.logout-link { display: inline-block; margin-top: 12px; color: var(--muted); font: 9px var(--mono); text-decoration: none; }
.logout-link:hover { color: var(--text); }
.nav-link { text-decoration: none; }
.mobile-logout { display: none; }

.main { width: 100%; min-width: 0; padding: 30px; overflow: auto; }
.content { width: min(100%, 960px); animation: enter .2s ease-out; }
.page-head { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.page-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.page-title { margin: 0; font: 700 21px var(--mono); letter-spacing: 0; }
.page-subtitle { margin: 5px 0 0; color: var(--faint); font: 11px var(--mono); }
.refresh-button { min-height: 30px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--faint); font: 700 8px var(--mono); cursor: pointer; }
.refresh-button:hover { border-color: var(--border-strong); color: var(--muted); }
.refresh-button[disabled] { opacity: .55; cursor: wait; }
.server-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.server-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(73,182,117,.1); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { min-height: 106px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.stat-value { font: 700 27px var(--mono); }
.stat-note { color: var(--faint); font-size: 11px; }
.green { color: var(--green); } .amber { color: var(--amber); } .red { color: var(--red); } .blue { color: var(--blue); }
.dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.panel-pad { padding: 16px; }
.panel-head { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.action-list { display: grid; gap: 9px; }
.action { width: 100%; padding: 12px; display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 11px; background: transparent; border: 1px solid var(--border); border-radius: 4px; text-align: left; cursor: pointer; }
.action:hover { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.04); }
.action.return:hover { border-color: rgba(88,166,231,.55); background: rgba(88,166,231,.04); }
.action-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 4px; color: var(--amber); background: rgba(245,166,35,.1); font: 700 18px var(--mono); }
.action.return .action-icon { color: var(--blue); background: rgba(88,166,231,.1); }
.action strong, .action small { display: block; font-family: var(--mono); }
.action strong { font-size: 12px; }
.action small { margin-top: 3px; color: var(--faint); font-size: 9px; }
.action-arrow { color: var(--faint); font: 18px var(--mono); }
.loan { padding: 10px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #1a1e26; }
.loan:last-child { border: 0; }
.loan strong, .loan span { display: block; font-family: var(--mono); }
.loan strong { font-size: 11px; }
.loan span { margin-top: 3px; color: var(--faint); font-size: 9px; }
.loan-time { text-align: right; }
.loan-time strong { color: var(--amber); font-weight: 500; }
.registration-queue { grid-column: 1 / -1; }
.registration-queue .panel-head h2 { margin: 5px 0 0; font: 700 14px var(--mono); }
.registration-queue-copy { max-width: 760px; margin: 5px 0 14px; color: var(--faint); font: 9px/1.55 var(--mono); }
.registration-queue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.registration-queue-item { width: 100%; min-width: 0; padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 4px; background: #0e1014; color: var(--text); text-align: left; cursor: pointer; }
.registration-queue-item:hover { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.04); }
.registration-queue-item strong, .registration-queue-item small { display: block; overflow-wrap: anywhere; font-family: var(--mono); }
.registration-queue-item strong { font-size: 10px; }
.registration-queue-item small { margin-top: 4px; color: var(--faint); font-size: 8px; }
.registration-queue-item > span:last-child { color: var(--amber); font: 700 8px var(--mono); white-space: nowrap; }
.registration-queue-all { margin-top: 12px; }
.empty { padding: 34px 16px; color: var(--faint); font: 11px var(--mono); text-align: center; }

.flow { width: min(100%, 610px); }
.steps { margin: 0 0 36px; display: grid; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding-top: 25px; color: var(--faint); font: 9px var(--mono); text-align: center; }
.step::before { content: ""; position: absolute; z-index: 2; top: 0; left: 50%; width: 12px; height: 12px; border: 2px solid var(--border-strong); border-radius: 50%; background: var(--bg); transform: translateX(-50%); }
.step:not(:last-child)::after { content: ""; position: absolute; top: 6px; left: 50%; width: 100%; height: 1px; background: var(--border); }
.step.active { color: var(--amber); }
.return-flow .step.active { color: var(--blue); }
.step.active::before, .step.done::before { border-color: var(--amber); background: var(--amber); }
.return-flow .step.active::before, .return-flow .step.done::before { border-color: var(--blue); background: var(--blue); }
.step.done::after { background: var(--amber); }
.return-flow .step.done::after { background: var(--blue); }
.scan-area { display: grid; justify-items: center; gap: 20px; }
.scanner { position: relative; width: min(100%, 360px); aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(245,166,35,.45); border-radius: 5px; background: rgba(245,166,35,.025); cursor: pointer; }
.return-flow .scanner { border-color: rgba(88,166,231,.5); background: rgba(88,166,231,.025); }
.qr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.camera-active .qr-video { opacity: 1; }
.camera-active .scanner-copy { opacity: 0; }
.scanner-copy small { display: block; margin-top: 8px; color: var(--faint); font-size: 9px; }
.scan-line { position: absolute; left: 16px; right: 16px; height: 1px; background: var(--amber); box-shadow: 0 0 8px rgba(245,166,35,.55); animation: scan 2.2s linear infinite; }
.return-flow .scan-line { background: var(--blue); box-shadow: 0 0 8px rgba(88,166,231,.55); }
.scanner-copy { color: var(--muted); font: 11px var(--mono); text-align: center; }
.scanner-glyph { display: block; margin-bottom: 8px; color: var(--amber); font-size: 28px; }
.return-flow .scanner-glyph { color: var(--blue); }
.scan-form { width: min(100%, 420px); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.scanner-tools { width: min(100%, 420px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.file-button { position: relative; display: grid; place-items: center; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-button.disabled { opacity: .55; cursor: not-allowed; }
.scan-security { margin: -8px 0 0; color: var(--faint); font: 9px var(--mono); text-align: center; }
.flow-back { margin-top: 14px; width: 100%; }
.identity-check { padding: 12px; display: grid; gap: 5px; border: 1px solid rgba(245,166,35,.35); border-left: 3px solid var(--amber); border-radius: 4px; background: rgba(245,166,35,.06); }
.identity-check strong { color: var(--amber); font: 700 10px var(--mono); }
.identity-check span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.identity-confirmation { padding: 13px 14px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid rgba(245,166,35,.38); border-radius: 4px; background: rgba(245,166,35,.055); cursor: pointer; }
.identity-confirmation input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--amber); cursor: pointer; }
.identity-confirmation span { color: var(--text); font: 600 11px/1.5 var(--mono); }
.identity-confirmation.return-confirmation { border-color: rgba(88,166,231,.4); background: rgba(88,166,231,.055); }
.identity-confirmation.return-confirmation input { accent-color: var(--blue); }
.confirm-stack label .select { margin-top: 8px; }
.field, .select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); font: 12px var(--mono); }
.field::placeholder { color: var(--faint); }
.field:focus, .select:focus { border-color: var(--amber); outline: 0; }
.return-flow .field:focus, .return-flow .select:focus { border-color: var(--blue); }
.button { min-height: 40px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--muted); font: 700 11px var(--mono); cursor: pointer; }
.button:hover { border-color: var(--border-strong); color: var(--text); }
.button.primary { border-color: var(--amber); background: var(--amber); color: #111; }
.button.primary:hover { background: #ffc052; }
.button.primary.blue-button { border-color: var(--blue); background: var(--blue); color: #07111a; }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.error-box { margin: 18px auto 0; width: min(100%, 420px); padding: 10px 12px; border: 1px solid rgba(239,98,98,.45); border-radius: 4px; background: rgba(239,98,98,.08); color: #ff9a9a; font: 10px var(--mono); }
.detail-card { padding: 16px; display: grid; gap: 12px; }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.detail-label { color: var(--faint); font: 10px var(--mono); }
.detail-value { font: 600 11px var(--mono); text-align: right; }
.divider { height: 1px; background: #1a1e26; }
.confirm-stack { display: grid; gap: 12px; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.success { padding: 32px 0; display: grid; justify-items: center; gap: 18px; text-align: center; }
.success-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(73,182,117,.5); border-radius: 50%; background: rgba(73,182,117,.1); color: var(--green); font-size: 28px; }
.return-flow .success-icon { border-color: rgba(88,166,231,.5); background: rgba(88,166,231,.1); color: var(--blue); }
.success h2 { margin: 0; font: 700 15px var(--mono); }
.success p { margin: 5px 0 0; color: var(--faint); font: 10px var(--mono); }
.success .button { margin-top: 6px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter { padding: 7px 11px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--faint); font: 600 9px var(--mono); text-transform: uppercase; cursor: pointer; }
.filter:hover { color: var(--muted); border-color: var(--border-strong); }
.filter.active { color: var(--amber); border-color: var(--amber); background: rgba(245,166,35,.08); }
.inline-link { display: inline-grid; place-items: center; text-decoration: none; }
.search { margin-top: 14px; }
.table-panel { margin-top: 14px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { padding: 11px 14px; color: var(--faint); font: 600 9px var(--mono); letter-spacing: 1px; text-align: left; text-transform: uppercase; border-bottom: 1px solid #1a1e26; }
.data-table td { padding: 13px 14px; color: var(--muted); font: 10px var(--mono); border-bottom: 1px solid #1a1e26; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255,255,255,.018); }
.data-table td strong { display: block; color: var(--text); font-size: 11px; }
.data-table td small { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.data-table th:last-child, .data-table td:last-child { text-align: right; }
.badge { display: inline-block; padding: 3px 6px; border: 1px solid; border-radius: 3px; font: 700 8px var(--mono); letter-spacing: .7px; text-transform: uppercase; white-space: nowrap; }
.badge.available, .badge.returned, .badge.counted, .badge.verified, .badge.fulfilled, .badge.approved { border-color: rgba(73,182,117,.45); background: rgba(73,182,117,.08); color: var(--green); }
.badge.borrowed { border-color: rgba(245,166,35,.45); background: rgba(245,166,35,.08); color: var(--amber); }
.badge.maintenance, .badge.overdue, .badge.expired, .badge.disposed, .badge.rejected, .badge.correction_required { border-color: rgba(239,98,98,.45); background: rgba(239,98,98,.08); color: var(--red); }
.badge.reserved { border-color: rgba(88,166,231,.45); background: rgba(88,166,231,.08); color: var(--blue); }
.badge.missing, .badge.expected { border-color: rgba(239,98,98,.55); background: rgba(239,98,98,.12); color: #ff8a8a; }
.badge.investigation, .badge.misplaced, .badge.pending, .badge.pending_inspection, .badge.quarantine, .badge.low_stock { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.11); color: #ffc052; }
.badge.retired, .badge.transferred, .badge.depleted, .badge.cancelled { border-color: rgba(139,149,167,.4); background: rgba(139,149,167,.08); color: var(--muted); }
.badge.active, .badge.assigned_weapon, .badge.assigned_personnel, .badge.acknowledged { border-color: rgba(88,166,231,.45); background: rgba(88,166,231,.08); color: var(--blue); }

 
.inventory-content { width: min(100%, 1240px); }
.inventory-commandbar { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.command-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count-active { border-color: rgba(245,166,35,.7); background: rgba(245,166,35,.08); color: var(--amber); }
.status-tabs { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 1px 1px 7px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.status-tabs .filter { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; white-space: nowrap; }
.status-tabs .filter span { min-width: 18px; padding: 2px 5px; border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 8px; text-align: center; }
.status-tabs .filter.active span { background: rgba(245,166,35,.16); color: var(--amber); }
.inventory-filters { margin-top: 7px; display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(135px, 180px)); gap: 8px; }
.inventory-filters label { min-width: 0; }
.search-field { position: relative; }
.inventory-filters .field, .inventory-filters .select { min-height: 42px; background-color: var(--surface); }
.inventory-summary { min-height: 33px; display: flex; align-items: end; justify-content: space-between; gap: 12px; color: var(--faint); font: 9px var(--mono); }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--muted); font: 700 9px var(--mono); cursor: pointer; }
.text-button:hover { color: var(--text); }
.inventory-table-wrap { margin-top: 5px; overflow-x: auto; }
.inventory-table { min-width: 930px; }
.inventory-table th { padding: 9px 10px; }
.inventory-table td { padding: 11px 10px; vertical-align: middle; }
.inventory-table th.select-cell, .inventory-table td.select-cell { width: 42px; padding-right: 4px; text-align: center; }
.inventory-table th:nth-child(2) { width: 20%; }
.inventory-table th:nth-child(3) { width: 17%; }
.inventory-table th:nth-child(4) { width: 17%; }
.inventory-table th:nth-child(5) { width: 18%; }
.inventory-table th:nth-child(6) { width: 18%; }
.inventory-table th:last-child { width: 46px; }
.inventory-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--amber); cursor: pointer; }
.sort-button { width: 100%; min-height: 24px; padding: 0; display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.sort-button span { min-width: 9px; color: var(--amber); font-size: 7px; }
.sort-button:hover, .sort-button.active { color: var(--muted); }
.row-title { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: 700 11px var(--mono); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.row-title:hover { color: var(--amber); }
.registration-row-action { display: block; margin-top: 7px; color: var(--amber); white-space: nowrap; }
.row-action-cell { text-align: right; }
.icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; flex: 0 0 32px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--muted); font: 700 17px/1 var(--mono); cursor: pointer; }
.icon-button:hover { border-color: var(--border-strong); background: rgba(255,255,255,.025); color: var(--text); }
.icon-button[disabled] { opacity: .38; cursor: not-allowed; }
.pagination { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--faint); font: 9px var(--mono); }
.pagination > div { display: flex; gap: 6px; }

 
.overlay { position: fixed; z-index: 40; inset: 0; padding: 24px; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain; background: rgba(3,4,6,.78); backdrop-filter: blur(2px); animation: overlay-in .16s ease-out; }
.drawer-overlay { padding: 0; place-items: stretch end; }
.modal, .drawer { width: min(100%, 700px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.drawer { width: min(100%, 520px); max-height: 100dvh; min-height: 100dvh; border-width: 0 0 0 1px; border-radius: 0; animation: drawer-in .2s ease-out; }
.overlay-head { min-height: 76px; padding: 17px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex: 0 0 auto; border-bottom: 1px solid var(--border); background: #101217; }
.overlay-head > div { min-width: 0; }
.overlay-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.overlay-head h2 { margin: 5px 0 0; font: 700 16px/1.3 var(--mono); overflow-wrap: anywhere; }
.overlay-head p { margin: 5px 0 0; color: var(--faint); font: 9px/1.45 var(--mono); overflow-wrap: anywhere; }
.overlay-head .icon-button { margin-top: -2px; }
.drawer-body, .count-body, .weapon-form, .count-start, .workflow-form { min-height: 0; overflow-y: auto; }
.drawer-body { padding: 18px 20px 24px; }
.overlay-actions, .modal-actions { min-height: 65px; padding: 12px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; border-top: 1px solid var(--border); background: #101217; }
.detail-status { padding-bottom: 17px; display: grid; gap: 7px; border-bottom: 1px solid var(--border); }
.detail-status > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-status strong { color: var(--text); font: 600 11px var(--mono); }
.detail-status > span { color: var(--faint); font: 9px/1.45 var(--mono); }
.condition-text { color: var(--muted); font: 10px var(--mono); }
.record-grid { margin: 0; padding: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 17px 22px; border-bottom: 1px solid var(--border); }
.record-grid div { min-width: 0; }
.record-grid dt { color: var(--faint); font: 9px var(--mono); text-transform: uppercase; }
.record-grid dd { margin: 5px 0 0; color: var(--text); font: 600 10px/1.45 var(--mono); overflow-wrap: anywhere; }
.record-section { padding: 18px 0; border-bottom: 1px solid var(--border); }
.record-section:last-child { border-bottom: 0; }
.record-section h3 { margin: 0 0 11px; color: var(--muted); font: 700 9px var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.section-heading { margin-bottom: 11px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading h2 { font: 700 12px var(--mono); text-transform: uppercase; }
.section-heading p { margin: 5px 0 0; color: var(--faint); font: 9px/1.45 var(--mono); }
.record-notes { margin: 0; color: var(--muted); font: 11px/1.6 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.restricted-note { margin: 10px 0 0; padding: 9px 10px; border-left: 2px solid var(--border-strong); background: rgba(255,255,255,.025); color: var(--faint); font: 9px/1.5 var(--mono); }
.status-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.activity-row { min-height: 48px; padding: 9px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #1a1e26; }
.activity-row:last-child { border-bottom: 0; }
.activity-row > div { min-width: 0; }
.activity-row strong, .activity-row span { display: block; font-family: var(--mono); overflow-wrap: anywhere; }
.activity-row strong { color: var(--text); font-size: 10px; text-transform: capitalize; }
.activity-row span { margin-top: 4px; color: var(--faint); font-size: 8px; line-height: 1.45; }
.activity-row time { flex: 0 0 auto; color: var(--faint); font: 8px/1.45 var(--mono); text-align: right; }
.danger-button { border-color: rgba(239,98,98,.55); color: #ff8a8a; }
.danger-button:hover { border-color: var(--red); background: rgba(239,98,98,.08); color: #ffaaaa; }
.danger-text { color: #ff8a8a; }
.attachment-row { min-height: 52px; padding: 9px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #1a1e26; }
.attachment-row:last-child { border-bottom: 0; }
.attachment-row > div { min-width: 0; }
.attachment-row > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 0 0 auto; }
.attachment-row strong, .attachment-row span { display: block; overflow-wrap: anywhere; font-family: var(--mono); }
.attachment-row strong { color: var(--text); font-size: 10px; }
.attachment-row span { margin-top: 4px; color: var(--faint); font-size: 8px; }
.revoked-label { color: var(--red) !important; font-weight: 700; }
.attachment-row .revocation-detail { margin-top: 7px; color: #ff9a9a; line-height: 1.5; }
.workflow-alert { margin-bottom: 18px; padding: 12px 14px; display: grid; gap: 5px; border: 1px solid rgba(245,166,35,.4); border-left: 3px solid var(--amber); border-radius: 4px; background: rgba(245,166,35,.07); }
.workflow-alert strong { color: #ffc052; font: 700 10px var(--mono); }
.workflow-alert span { color: var(--muted); font: 9px/1.55 var(--mono); }

 
.enhanced-editor { width: min(100%, 940px); }
.enhanced-drawer { width: min(100%, 820px); background: #0d0f13; }
.detail-masthead { min-height: 126px; padding: 22px 28px; align-items: center; background: linear-gradient(180deg, #12151b 0%, #0f1116 100%); }
.detail-masthead-copy { min-width: 0; display: grid; gap: 7px; }
.detail-masthead .overlay-head-actions { align-self: flex-start; }
.detail-masthead h2 { margin: 0; font: 700 22px/1.25 var(--mono); letter-spacing: -.25px; }
.detail-asset-line { display: flex; align-items: baseline; gap: 10px; color: var(--faint); font: 700 9px/1.4 var(--mono); letter-spacing: 1.1px; text-transform: uppercase; }
.detail-asset-line strong { color: var(--amber); font-size: 11px; letter-spacing: 1.4px; overflow-wrap: anywhere; }
.detail-serial { margin: 0 !important; color: var(--faint) !important; font: 10px/1.45 var(--mono) !important; }
.detail-serial strong { color: var(--muted); font-weight: 600; }
.detail-heading-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-heading-chips .badge, .condition-chip { min-height: 25px; padding: 5px 9px; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; font: 700 9px/1 var(--mono); letter-spacing: .35px; text-transform: uppercase; }
.condition-chip.serviceable { border-color: rgba(73,182,117,.42); background: rgba(73,182,117,.09); color: #79d79d; }
.condition-chip.attention { border-color: rgba(245,166,35,.42); background: rgba(245,166,35,.08); color: #ffc052; }
.detail-load-state { min-height: 0; padding: 28px; display: grid; flex: 1 1 auto; place-items: center; overflow-y: auto; }
.detail-load-state > * { width: 100%; }
.detail-record-body { padding: 24px 28px 42px; display: grid; gap: 18px; flex: 1 1 auto; background: #0b0d11; }
.detail-record-body > * { min-width: 0; }
.detail-record-body > .workflow-alert, .detail-record-body > .error-box { margin: 0; }
.detail-readiness-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.detail-readiness-card { min-width: 0; min-height: 106px; padding: 15px 16px; display: grid; align-content: space-between; gap: 8px; border: 1px solid var(--border); border-radius: 6px; background: linear-gradient(145deg, #14171d, #101218); }
.detail-readiness-grid span, .detail-readiness-grid strong, .detail-readiness-grid small { display: block; overflow-wrap: anywhere; }
.detail-readiness-grid span { color: var(--faint); font: 700 10px/1.3 var(--mono); letter-spacing: .9px; text-transform: uppercase; }
.detail-readiness-grid strong { color: var(--text); font: 700 14px/1.35 var(--mono); }
.detail-readiness-grid small { color: var(--muted); font: 10px/1.45 var(--sans); text-transform: capitalize; }
.detail-custody { min-height: 64px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid rgba(73,182,117,.27); border-left: 3px solid var(--green); border-radius: 5px; background: rgba(73,182,117,.055); }
.detail-custody.active { border-color: rgba(245,166,35,.34); border-left-color: var(--amber); background: rgba(245,166,35,.055); }
.detail-custody span, .detail-custody strong { display: block; }
.detail-custody span { color: var(--faint); font: 700 9px/1.3 var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.detail-custody strong { margin-top: 5px; color: var(--text); font: 700 12px/1.35 var(--mono); overflow-wrap: anywhere; }
.detail-custody small { color: var(--muted); font: 10px/1.45 var(--mono); text-align: right; overflow-wrap: anywhere; }
.detail-record-section { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 7px; background: #11141a; }
.detail-section-head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-section-head > div { min-width: 0; }
.detail-section-head h3 { margin: 3px 0 0; color: var(--text); font: 700 15px/1.3 var(--mono); }
.detail-section-head p { max-width: 560px; margin: 6px 0 0; color: var(--muted); font: 11px/1.5 var(--sans); }
.section-kicker { color: var(--amber); font: 700 10px/1.3 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.detail-section-action { min-height: 34px; padding: 7px 9px; flex: 0 0 auto; }
.detail-subsection + .detail-subsection { margin-top: 18px; padding-top: 18px; border-top: 1px solid #222732; }
.detail-subsection h4, .detail-subheading h4, .detail-history-group h4 { margin: 0; color: var(--muted); font: 700 9px/1.4 var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.detail-record-grid { margin-top: 13px; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; border: 0; }
.detail-record-grid dt { font-size: 10px; }
.detail-record-grid dd { margin-top: 6px; font-size: 11px; line-height: 1.5; }
.detail-note { margin-top: 18px; padding: 14px 15px; border: 1px solid #242a34; border-radius: 5px; background: #0d1015; }
.detail-note span { color: var(--faint); font: 700 9px var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.detail-note p { margin: 8px 0 0; color: var(--muted); font: 12px/1.6 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-column { min-width: 0; padding: 15px; border: 1px solid #242a34; border-radius: 5px; background: #0e1116; }
.detail-subheading { min-height: 34px; margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-activity-list .activity-row { min-height: 58px; padding: 11px 0; }
.detail-activity-list .activity-row strong { font-size: 11px; line-height: 1.4; }
.detail-activity-list .activity-row span, .detail-activity-list .activity-row time { font-size: 10px; }
.record-empty { min-height: 76px; padding: 18px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px dashed #2b313c; border-radius: 5px; color: var(--faint); text-align: center; }
.record-empty.compact { min-height: 54px; padding: 12px; }
.record-empty strong, .record-empty span { display: block; }
.record-empty strong { color: var(--muted); font: 700 10px var(--mono); }
.record-empty span { font: 10px/1.45 var(--sans); }
.document-list { overflow: hidden; border: 1px solid #242a34; border-radius: 5px; background: #0d1015; }
.document-row { min-width: 0; min-height: 84px; padding: 14px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid #242a34; }
.document-row:last-child { border-bottom: 0; }
.document-row.revoked { background: rgba(239,98,98,.025); }
.document-icon { width: 40px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2); color: var(--muted); font: 800 9px var(--mono); }
.document-copy { min-width: 0; }
.document-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.document-title strong, .document-filename, .document-meta { display: block; overflow-wrap: anywhere; }
.document-title strong { color: var(--text); font: 700 11px/1.4 var(--mono); }
.document-filename { margin-top: 5px; color: var(--muted); font: 10px/1.45 var(--mono); }
.document-meta { margin-top: 4px; color: var(--faint); font: 10px/1.45 var(--sans); }
.document-status { margin: 0 !important; padding: 3px 6px; border-radius: 999px; font: 700 9px/1 var(--mono) !important; letter-spacing: .5px; }
.document-status.active { background: rgba(73,182,117,.12); color: #79d79d !important; }
.document-status.revoked { background: rgba(239,98,98,.12); color: #ff9292 !important; }
.document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.document-actions .text-button { min-height: 34px; padding: 7px 6px; }
.document-preview-tile {
  position: relative;
  padding: 0;
  appearance: none;
  overflow: hidden;
  border-color: rgba(99,169,243,.5);
  background:
    radial-gradient(circle at 72% 27%, rgba(245,166,35,.92) 0 3px, transparent 4px),
    linear-gradient(145deg, transparent 49%, rgba(99,169,243,.24) 50% 64%, transparent 65%),
    linear-gradient(35deg, rgba(99,169,243,.14) 35%, transparent 36%),
    #0b1420;
  color: #b5d8fc;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.document-preview-tile span { position: relative; z-index: 1; font: 800 8px/1 var(--mono); letter-spacing: .7px; }
.document-preview-tile::after { content: "VIEW"; position: absolute; right: 3px; bottom: 3px; padding: 2px 3px; border-radius: 2px; background: rgba(3,8,14,.82); color: var(--amber); font: 700 6px/1 var(--mono); letter-spacing: .35px; }
.document-preview-tile:hover { border-color: var(--blue); background-color: #102035; box-shadow: 0 0 0 2px rgba(99,169,243,.1); transform: translateY(-1px); }
.document-preview-tile:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

 
.attachment-viewer-overlay { z-index: 70; padding: 18px; background: rgba(2,4,8,.9); backdrop-filter: blur(6px); }
.modal.attachment-viewer-modal {
  width: min(1180px, 100%);
  height: min(880px, calc(100dvh - 36px));
  max-height: calc(100dvh - 36px);
  border-color: #56677d;
  border-radius: 8px;
  background: #090c11;
  box-shadow: 0 28px 90px rgba(0,0,0,.76);
}
.overlay-head.attachment-viewer-head { min-height: 90px; padding: 17px 22px; background: linear-gradient(180deg, #121a25, #0e141d); }
.overlay-head.attachment-viewer-head h2 { font-size: 19px; }
.overlay-head.attachment-viewer-head p { color: #9baabd; }
.attachment-viewer-body {
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  flex: 1 1 auto;
  overflow: hidden;
  background: #07090d;
}
.attachment-viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 340px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #354154;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25% 75%, rgba(255,255,255,.018) 75%),
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25% 75%, rgba(255,255,255,.018) 75%),
    #030507;
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), inset 0 0 48px rgba(0,0,0,.58);
}
.attachment-viewer-stage img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s ease;
}
.attachment-image-loading,
.attachment-image-error {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 28px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}
.attachment-image-loading strong,
.attachment-image-error strong { color: var(--text); font: 700 12px/1.4 var(--mono); letter-spacing: .65px; }
.attachment-image-loading small,
.attachment-image-error span { max-width: 470px; color: var(--faint); font: 12px/1.55 var(--sans); }
.attachment-loading-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245,166,35,.6);
  border-radius: 6px;
  background: rgba(245,166,35,.06);
  color: var(--amber);
  font: 800 11px/1 var(--mono);
  animation: attachment-pulse 1.15s ease-in-out infinite alternate;
}
.attachment-image-error { display: none; border: 1px solid rgba(239,98,98,.28); background: rgba(50,12,18,.74); }
.attachment-image-error strong { color: #ff9a9a; }
.attachment-viewer-stage.is-loaded img { opacity: 1; }
.attachment-viewer-stage.is-loaded .attachment-image-loading { display: none; }
.attachment-viewer-stage.is-error img,
.attachment-viewer-stage.is-error .attachment-image-loading { display: none; }
.attachment-viewer-stage.is-error .attachment-image-error { display: grid; }
.attachment-viewer-meta {
  min-width: 0;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid #2a3442;
  border-radius: 6px;
  background: linear-gradient(180deg, #111722, #0d121a);
}
.attachment-viewer-meta dl { margin: 15px 0 0; display: grid; gap: 0; }
.attachment-viewer-meta dl > div { min-width: 0; padding: 11px 0; border-bottom: 1px solid #242e3b; }
.attachment-viewer-meta dl > div:first-child { padding-top: 0; }
.attachment-viewer-meta dt { color: var(--faint); font: 700 9px/1.35 var(--mono); letter-spacing: .7px; text-transform: uppercase; }
.attachment-viewer-meta dd { margin: 5px 0 0; color: var(--text); font: 12px/1.5 var(--sans); overflow-wrap: anywhere; }
.attachment-viewer-meta p { margin: 16px 0 0; color: var(--faint); font: 11px/1.55 var(--sans); }
.overlay-actions.attachment-viewer-actions { min-height: 74px; padding: 12px 18px; justify-content: space-between; background: #0e141d; }
.attachment-viewer-nav,
.attachment-viewer-primary { display: flex; align-items: center; gap: 9px; }
.attachment-viewer-nav > span { min-width: 48px; color: var(--muted); font: 700 10px/1 var(--mono); text-align: center; }
.attachment-viewer-actions .button { min-height: 42px; }
.attachment-viewer-unavailable { height: auto; max-width: 660px; }
.attachment-viewer-empty { min-height: 240px; padding: 35px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.attachment-viewer-empty strong { color: #ff9a9a; font: 700 13px/1.4 var(--mono); }
.attachment-viewer-empty span { max-width: 480px; font: 13px/1.55 var(--sans); }
@keyframes attachment-pulse { from { opacity: .5; box-shadow: 0 0 0 0 rgba(245,166,35,0); } to { opacity: 1; box-shadow: 0 0 0 7px rgba(245,166,35,.07); } }
.record-list { overflow: hidden; border: 1px solid #242a34; border-radius: 5px; }
.record-list-row { min-height: 61px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #242a34; background: #0d1015; }
.record-list-row:last-child { border-bottom: 0; }
.record-list-row > div { min-width: 0; }
.record-list-row strong, .record-list-row span { display: block; overflow-wrap: anywhere; }
.record-list-row strong { font: 700 11px/1.4 var(--mono); }
.record-list-row > div span { margin-top: 5px; color: var(--faint); font: 9px/1.4 var(--mono); }
.record-tag { max-width: 45%; padding: 5px 8px; flex: 0 1 auto; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font: 700 9px/1.35 var(--mono); text-align: right; text-transform: uppercase; white-space: normal; }
.compact-action { min-height: 35px; padding: 7px 10px; flex: 0 0 auto; }
.detail-history-group + .detail-history-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid #242a34; }
.detail-history-group h4 { margin-bottom: 8px; }
.detail-actions { min-height: 76px; padding: 14px 28px; justify-content: space-between; gap: 14px; background: rgba(16,18,23,.98); box-shadow: 0 -8px 24px rgba(0,0,0,.2); }
.detail-actions-main, .detail-actions-secondary { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-actions-main:empty, .detail-actions-secondary:empty { display: none; }
.detail-actions .button { min-height: 42px; }
.detail-action-note { max-width: 230px; color: var(--faint); font: 10px/1.4 var(--sans); text-align: right; }
.weapon-form { padding: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label, .count-start label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.form-grid label small { color: var(--faint); font: 8px/1.45 var(--mono); text-transform: none; }
.wide-field { grid-column: 1 / -1; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.compact-textarea { min-height: 70px; }
.modal-actions { margin: 20px -20px -20px; }
.error-box.wide { width: 100%; margin-top: 16px; }
.form-sections { display: grid; gap: 18px; }
.form-section { padding: 18px; border: 1px solid var(--border); border-radius: 5px; background: #0e1014; }
.form-section-head { margin-bottom: 17px; display: grid; grid-template-columns: 28px 1fr; gap: 11px; align-items: flex-start; }
.form-section-head > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(245,166,35,.45); border-radius: 50%; color: var(--amber); font: 700 9px var(--mono); }
.form-section-head h3 { margin: 0; font: 700 11px var(--mono); text-transform: uppercase; }
.form-section-head p { margin: 4px 0 0; color: var(--faint); font: 8px/1.45 var(--mono); }
.workflow-modal, .operations-modal { width: min(100%, 720px); }
.workflow-form { padding: 20px; }
.registration-review-summary { margin-bottom: 15px; padding: 12px 14px; display: grid; gap: 5px; border: 1px solid var(--border); border-radius: 4px; background: #0e1014; }
.registration-review-summary strong { font: 700 12px var(--mono); }
.registration-review-summary span { color: var(--faint); font: 9px/1.5 var(--mono); overflow-wrap: anywhere; }
.approval-checklist { margin: 0 0 15px; padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 4px; }
.approval-checklist legend { padding: 0 6px; color: var(--muted); font: 700 9px var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.approval-checklist ul { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.approval-checklist li { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); font: 9px/1.4 var(--mono); }
.approval-checklist li > span:first-child { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; }
.approval-checklist li strong { font-size: 8px; }
.approval-checklist li.complete > span:first-child { background: rgba(73,182,117,.15); color: var(--green); }
.approval-checklist li.complete strong { color: var(--green); }
.approval-checklist li.missing > span:first-child { background: rgba(239,98,98,.14); color: #ff9a9a; }
.approval-checklist li.missing strong { color: #ff9a9a; }
.registration-evidence-upload { grid-column: 2 / -1; min-width: 0; display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 8px; }
.registration-file-button, .registration-upload-button { min-height: 30px; padding: 6px 9px; font-size: 8px; }
.registration-file-name { min-width: 0; color: var(--faint); font: 8px/1.4 var(--mono); overflow-wrap: anywhere; }
.workflow-alert.approval-blocked { border-color: rgba(239,98,98,.45); border-left-color: var(--red); background: rgba(239,98,98,.07); }
.workflow-alert.approval-blocked strong { color: #ff9a9a; }
.form-grid .verification-check { padding: 12px 14px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; border: 1px solid var(--border); border-radius: 4px; background: #0e1014; text-transform: none; cursor: pointer; }
.verification-check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--amber); }
.verification-check span { color: var(--text); font: 9px/1.55 var(--mono); }
.secure-file-label .field { padding: 7px; text-transform: none; }
.secure-file-label .field::file-selector-button { min-height: 30px; margin-right: 10px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface-2); color: var(--text); font: 700 9px var(--mono); cursor: pointer; }

 
.operations-commandbar { margin-top: 16px; }
.operations-filters { grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px); }
.operations-table-wrap { overflow-x: auto; }
.operations-table { min-width: 760px; }
.operations-table th:last-child { width: 180px; }
.operations-actions > div { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.operations-actions .text-button { white-space: nowrap; }
.compact-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-stats .stat { min-height: 96px; }
.personnel-filters { grid-template-columns: minmax(260px, 1fr); }
.personnel-profile { min-width: 0; display: flex; align-items: center; gap: 10px; }
.personnel-profile > div { min-width: 0; }
.personnel-monogram { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 1px solid rgba(88,166,231,.4); border-radius: 50%; background: rgba(88,166,231,.08); color: var(--blue); font: 700 10px var(--mono); }
.personnel-code { letter-spacing: .35px; }
.personnel-modal { width: min(100%, 660px); }
.transaction-panel { margin-top: 16px; }
.transaction-list { border-top: 1px solid var(--border); }
.request-summary { margin-bottom: 16px; padding: 13px 14px; display: grid; gap: 5px; border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: 4px; background: #0e1014; }
.request-summary span { color: var(--faint); font: 700 8px var(--mono); letter-spacing: 1px; }
.request-summary strong { color: var(--text); font: 700 13px var(--mono); }
.request-summary small { color: var(--faint); font: 9px/1.45 var(--mono); overflow-wrap: anywhere; }
.stock-request-panel { margin-top: 16px; }
.stock-request-panel > .error-box { margin: 0 0 12px; }
.stock-request-list { border-top: 1px solid var(--border); }
.stock-request-row { min-height: 92px; padding: 13px 2px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; border-bottom: 1px solid #1a1e26; }
.stock-request-row:last-child { border-bottom: 0; }
.stock-request-copy { min-width: 0; }
.stock-request-copy > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stock-request-copy strong { color: var(--text); font: 700 11px var(--mono); overflow-wrap: anywhere; }
.stock-request-copy > span, .stock-request-copy small { display: block; margin-top: 5px; color: var(--faint); font: 9px/1.45 var(--mono); overflow-wrap: anywhere; }
.stock-request-copy p { margin: 8px 0 0; color: var(--muted); font: 11px/1.5 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.stock-request-actions { display: grid; justify-items: end; gap: 10px; }
.stock-request-actions time { color: var(--faint); font: 8px/1.45 var(--mono); text-align: right; }
.stock-request-actions .button { min-height: 34px; padding: 7px 10px; font-size: 9px; }

 
.review-section { margin-top: 18px; }
.review-section > .section-heading { margin-bottom: 12px; }
.review-queue-list { display: grid; gap: 12px; }
.review-card { padding: 17px; }
.review-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.review-card h2 { margin: 6px 0 0; font: 700 13px/1.4 var(--mono); text-transform: capitalize; }
.review-card header time { flex: 0 0 auto; color: var(--faint); font: 8px/1.45 var(--mono); text-align: right; }
.review-event-meta { margin-top: 13px; padding: 12px 13px; display: grid; gap: 5px; border: 1px solid var(--border); border-radius: 4px; background: #0e1014; }
.review-event-meta strong { font: 700 10px var(--mono); }
.review-event-meta span { color: var(--faint); font: 9px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-decision-form { margin-top: 13px; display: grid; grid-template-columns: minmax(130px, 180px) minmax(260px, 1fr) auto; align-items: end; gap: 10px; }
.review-decision-form label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.review-decision-form .textarea { min-height: 66px; }
.review-decision-form .button { min-height: 40px; }
.review-empty { min-height: 150px; display: grid; place-items: center; }
.review-history-section { margin-bottom: 18px; }
.review-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-history-card { min-width: 0; padding: 16px; }
.review-history-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.review-history-card h3 { margin: 5px 0 0; font: 700 12px/1.4 var(--mono); text-transform: capitalize; }
.review-history-card > p { margin: 12px 0 0; color: var(--muted); font: 11px/1.55 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-history-card > footer { margin-top: 13px; padding-top: 10px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); color: var(--faint); font: 8px/1.45 var(--mono); }
.review-history-card > footer time { flex: 0 0 auto; text-align: right; }
.manual-logbook-alert { max-width: 880px; }
.manual-logbook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.manual-logbook-card { overflow: hidden; }
.manual-logbook-card > header { min-height: 114px; padding: 17px 18px; border-bottom: 1px solid var(--border); background: #0e1014; }
.manual-logbook-card h2 { margin: 6px 0 0; font: 700 14px var(--mono); }
.manual-logbook-card header p { margin: 7px 0 0; color: var(--faint); font: 9px/1.5 var(--mono); }
.manual-logbook-card form { padding: 18px; }
.manual-logbook-card .form-grid { grid-template-columns: 1fr; }
.manual-logbook-card .wide-field { grid-column: auto; }
.manual-submit { width: 100%; margin-top: 18px; }

 
.count-modal { width: min(100%, 540px); }
.count-running { width: min(100%, 760px); }
.count-start { padding: 20px; }
.count-body { padding: 18px 20px; }
.count-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 5px; background: #0e1014; }
.count-metrics > div { min-width: 0; min-height: 72px; padding: 13px 15px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.count-metrics > div:last-child { border-right: 0; }
.count-metrics span { color: var(--faint); font: 9px var(--mono); text-transform: uppercase; }
.count-metrics strong { font: 700 21px var(--mono); }
.count-running .scan-area { margin: 18px auto; gap: 11px; }
.count-running .scanner { width: min(100%, 300px); }
.count-running .scanner-tools, .count-running .scan-form { width: min(100%, 520px); }
.count-running .scan-security { margin-top: -2px; }
.count-resolution { margin-top: 14px; padding: 11px 12px; border: 1px solid rgba(245,166,35,.4); border-left: 3px solid var(--amber); border-radius: 4px; background: rgba(245,166,35,.07); color: #ffc052; font: 9px/1.55 var(--mono); }
.count-resolution.blocked { border-color: rgba(239,98,98,.45); border-left-color: var(--red); background: rgba(239,98,98,.07); color: #ff9a9a; }
.count-items { margin-top: 16px; border-top: 1px solid var(--border); }
.count-item { min-height: 58px; padding: 10px 2px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #1a1e26; }
.count-item > div { min-width: 0; }
.count-item > div:last-child { flex: 0 0 auto; text-align: right; }
.count-item strong, .count-item span, .count-item small { display: block; font-family: var(--mono); overflow-wrap: anywhere; }
.count-item strong { color: var(--text); font-size: 10px; }
.count-item span { margin-top: 4px; color: var(--faint); font-size: 8px; }
.count-item small { margin-top: 5px; color: var(--faint); font-size: 8px; }
.count-item-result { display: grid; justify-items: end; gap: 1px; }
.count-resolve-button { margin-top: 7px; padding: 5px 7px; border: 1px solid rgba(245,166,35,.55); border-radius: 3px; background: rgba(245,166,35,.08); color: #ffc052; font: 700 8px var(--mono); cursor: pointer; }
.count-resolve-button:hover { border-color: var(--amber); background: rgba(245,166,35,.14); color: #ffd17a; }
.count-resolve-button[disabled] { opacity: .55; cursor: not-allowed; }
.count-guidance { max-width: 250px; line-height: 1.45; }
.count-guidance.blocked { color: #ff9a9a; }
.empty.compact { padding: 18px 8px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(18px); opacity: .75; } to { transform: translateX(0); opacity: 1; } }
.history-list { display: grid; gap: 9px; }
.history-card { padding: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.history-title strong { font: 700 11px var(--mono); }
.history-meta, .history-person, .history-purpose { font-family: var(--mono); }
.history-meta { margin-top: 5px; color: var(--faint); font-size: 9px; }
.history-person { margin-top: 10px; color: var(--muted); font-size: 10px; }
.history-purpose { margin-top: 5px; color: var(--faint); font-size: 9px; }
.history-time { flex: none; color: var(--faint); font: 9px var(--mono); text-align: right; }
.history-time strong { display: block; margin-top: 4px; color: var(--amber); font-weight: 500; }
.history-time span { display: block; margin-top: 6px; color: var(--blue); }

.toast-region { position: fixed; z-index: 60; top: 16px; right: 16px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 12px 14px; border: 1px solid var(--border-strong); border-left: 3px solid var(--green); border-radius: 4px; background: #171a20; box-shadow: 0 12px 30px rgba(0,0,0,.35); color: var(--text); font: 10px var(--mono); animation: enter .2s ease-out; }
.toast.error { border-left-color: var(--red); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-shell { width: min(100%, 420px); }
.login-panel { padding: 30px; display: grid; gap: 28px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.login-brand { display: flex; align-items: center; }
.login-brand strong, .login-brand span { display: block; font-family: var(--mono); }
.login-brand strong { font-size: 12px; }
.login-brand span { margin-top: 3px; color: var(--faint); font-size: 8px; letter-spacing: 1.4px; }
.login-panel h1 { margin: 8px 0 0; font: 700 21px var(--mono); }
.login-copy { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.login-form { display: grid; gap: 15px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font: 10px var(--mono); text-transform: uppercase; }
.otp-field { letter-spacing: 6px; }
.login-error { margin: 0; width: 100%; }
.access-notice { margin: 0; color: var(--faint); font: 9px var(--mono); text-align: center; }

.labels-page { padding: 24px; background: #eef1f4; color: #111; }
.labels-toolbar { max-width: 1100px; margin: 0 auto 24px; padding: 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; border: 1px solid #ccd2da; border-radius: 5px; background: #fff; }
.labels-toolbar h1 { margin: 12px 0 0; font: 700 19px var(--mono); }
.labels-toolbar p { margin: 4px 0 0; color: #667085; font: 10px var(--mono); }
.labels-toolbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.labels-toolbar .button { color: #344054; border-color: #b7bec8; }
.labels-toolbar .button.primary { color: #111; border-color: var(--amber); }
.back-link { color: #475467; font: 10px var(--mono); text-decoration: none; }
.label-grid { max-width: 1100px; margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.qr-label { min-height: 190px; padding: 16px; display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; border: 1px solid #9aa4b2; border-radius: 4px; background: #fff; break-inside: avoid; }
.qr-code { width: 150px; height: 150px; }
.qr-label > .qr-code { grid-row: 1 / span 2; }
.qr-code img, .qr-code canvas { display: block; width: 150px; height: 150px; }
.qr-label-copy strong, .qr-label-copy span, .qr-label-copy small { display: block; font-family: var(--mono); overflow-wrap: anywhere; }
.qr-label-copy strong { font-size: 13px; }
.qr-label-copy span { margin-top: 9px; font-size: 10px; font-weight: 700; }
.qr-label-copy small { margin-top: 6px; color: #667085; font-size: 8px; }
.label-grid > .success-box { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border: 1px solid #87b99a; border-radius: 4px; background: #eefaf2; color: #25623d; font: 10px/1.5 var(--mono); }

a:focus-visible, .field:focus-visible, .select:focus-visible, .sort-button:focus-visible, .row-title:focus-visible, .scanner:focus-visible, .nav-button:focus-visible, .refresh-button:focus-visible, .logout-link:focus-visible, .back-link:focus-visible, .count-resolve-button:focus-visible, .file-button:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }

@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scan { from { top: 8%; } to { top: 92%; } }

@media (min-width: 781px) and (max-width: 1180px) {
  .inventory-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inventory-filters .search-field { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 10; top: 0; width: 100%; min-height: 0; border-right: 0; border-bottom: 1px solid #1a1e26; }
  .brand { min-height: 58px; }
  .menu-toggle { display: block; }
  .nav { display: none; }
  .nav.open { display: grid; }
  .nav.open .mobile-logout { display: grid; color: var(--muted); border-top: 1px solid #1a1e26; }
  .operator { display: none; }
  .main { padding: 22px 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .registration-queue-list { grid-template-columns: 1fr; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { padding: 12px 14px; border-bottom: 1px solid #1a1e26; }
  .data-table td { padding: 4px 0; border: 0; text-align: left !important; }
  .data-table td::before { content: attr(data-label); display: inline-block; width: 88px; color: var(--faint); font-size: 8px; text-transform: uppercase; }
  .data-table td:first-child::before { display: none; }
  .data-table td:first-child { margin-bottom: 5px; }
  .inventory-commandbar { align-items: stretch; flex-direction: column; }
  .command-group { width: 100%; }
  .command-group .button { flex: 1 1 auto; }
  .inventory-filters { grid-template-columns: 1fr 1fr; }
  .inventory-filters .search-field { grid-column: 1 / -1; }
  .inventory-table-wrap { overflow: visible; }
  .inventory-table { min-width: 0; }
  .inventory-table tbody tr { position: relative; padding: 13px 80px 13px 14px; }
  .inventory-table td { position: relative; min-height: 35px; padding: 5px 0 5px 104px; }
  .inventory-table td::before { position: absolute; top: 7px; left: 0; width: 94px; }
  .inventory-table td:first-child { margin: 0; }
  .inventory-table td.select-cell { position: absolute; z-index: 2; top: 16px; right: 50px; width: 18px; min-height: 18px; padding: 0; }
  .inventory-table td.select-cell::before, .inventory-table td.row-action-cell::before, .inventory-table td[colspan]::before { display: none; }
  .inventory-table td.row-action-cell { position: absolute; top: 9px; right: 10px; width: 32px; min-height: 32px; padding: 0; }
  .inventory-table td[colspan] { min-height: 0; padding: 0; }
  .operations-table-wrap { overflow: visible; }
  .operations-table { min-width: 0; }
  .operations-table td.operations-actions { padding-top: 9px; }
  .operations-table td.operations-actions::before { display: none; }
  .operations-actions > div { justify-content: flex-start; }
  .manual-logbook-grid { grid-template-columns: 1fr; }
  .review-history-list { grid-template-columns: 1fr; }
  .review-decision-form { grid-template-columns: 1fr 1fr; }
  .review-decision-form .review-notes { grid-column: 1 / -1; }
  .review-decision-form .button { width: 100%; }
  .overlay { padding: 12px; }
  .drawer-overlay { padding: 0; }
  .modal { max-height: calc(100dvh - 24px); }
  .drawer { width: min(100%, 500px); }
  .count-running .scanner { width: min(100%, 280px); }
  .label-grid { grid-template-columns: 1fr; }
  .labels-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .stats { gap: 8px; }
  .compact-stats { grid-template-columns: 1fr; }
  .stat { min-height: 96px; padding: 13px; }
  .stat-value { font-size: 23px; }
  .steps { margin-bottom: 28px; }
  .step { font-size: 8px; }
  .scan-form { grid-template-columns: 1fr; }
  .scanner-tools { grid-template-columns: 1fr; }
  .history-card { display: block; }
  .history-time { margin-top: 12px; text-align: left; }
  .toast-region { left: 12px; right: 12px; }
  .toast { max-width: none; }
  .status-tabs { margin-right: -16px; padding-right: 16px; }
  .inventory-filters { grid-template-columns: 1fr; }
  .inventory-filters .search-field { grid-column: auto; }
  .operations-filters { grid-template-columns: 1fr; }
  .inventory-summary { align-items: center; }
  .inventory-table tbody tr { padding: 13px 76px 13px 12px; }
  .inventory-table td { padding-left: 91px; }
  .inventory-table td::before { width: 82px; }
  .inventory-table td.select-cell { right: 47px; }
  .overlay { padding: 0; align-items: end; }
  .modal, .drawer { width: 100%; max-height: 100dvh; border-radius: 0; border-right: 0; border-left: 0; }
  .drawer { min-height: 100dvh; border-top: 0; border-bottom: 0; }
  .overlay-head { min-height: 68px; padding: 14px 15px; }
  .drawer-body, .count-body { padding: 15px; }
  .weapon-form, .count-start { padding: 15px; }
  .overlay-actions, .modal-actions { min-height: 61px; padding: 10px 15px; }
  .modal-actions { margin: 16px -15px -15px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .wide-field { grid-column: auto; }
  .record-grid { grid-template-columns: 1fr; gap: 13px; }
  .activity-row { display: block; }
  .activity-row time { display: block; margin-top: 7px; text-align: left; }
  .stock-request-row { grid-template-columns: 1fr; }
  .stock-request-actions { justify-items: start; }
  .stock-request-actions time { text-align: left; }
  .review-card > header { display: block; }
  .review-card header time { display: block; margin-top: 8px; text-align: left; }
  .review-decision-form { grid-template-columns: 1fr; }
  .review-decision-form .review-notes { grid-column: auto; }
  .review-history-card > footer { flex-direction: column; }
  .review-history-card > footer time { text-align: left; }
  .count-metrics > div { min-height: 66px; padding: 11px 9px; }
  .count-metrics span { font-size: 8px; overflow-wrap: anywhere; }
  .count-metrics strong { font-size: 19px; }
  .count-item { align-items: flex-start; }
  .count-item > div:last-child { max-width: 43%; }
  .count-running .scanner { width: min(100%, 260px); }
  .overlay-actions { flex-wrap: wrap; }
  .overlay-actions .button { flex: 1 1 130px; }
  .form-section { margin: 0 -4px; padding: 14px; }
  .registration-queue-item { grid-template-columns: 1fr; gap: 8px; }
  .registration-queue-item > span:last-child { white-space: normal; }
  .registration-evidence-upload { grid-template-columns: 1fr 1fr; }
  .registration-file-button { grid-column: 1; grid-row: 1; }
  .registration-upload-button { grid-column: 2; grid-row: 1; }
  .registration-file-name { grid-column: 1 / -1; grid-row: 2; }
  .attachment-row { display: block; }
  .attachment-row > div:last-child { margin-top: 9px; justify-content: flex-start; }
}

@media (max-width: 780px) {
  .enhanced-drawer { width: 100%; }
  .detail-masthead { min-height: 112px; padding: 18px 20px; }
  .detail-masthead h2 { font-size: 19px; }
  .detail-record-body { padding: 20px 20px 34px; }
  .detail-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-columns { grid-template-columns: 1fr; }
  .detail-actions { padding: 12px 20px; flex-wrap: wrap; }
  .detail-actions-main, .detail-actions-secondary { flex: 1 1 auto; }
  .detail-actions-secondary { justify-content: flex-end; }
  .attachment-viewer-overlay { padding: 0; }
  .modal.attachment-viewer-modal { width: 100%; height: 100dvh; max-height: 100dvh; border-right: 0; border-left: 0; border-radius: 0; }
  .attachment-viewer-body { padding: 12px; grid-template-columns: 1fr; grid-template-rows: minmax(260px, 1fr) auto; gap: 12px; }
  .attachment-viewer-stage { min-height: 260px; }
  .attachment-viewer-meta { max-height: 180px; padding: 14px; }
  .attachment-viewer-meta dl { margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .attachment-viewer-meta dl > div:first-child { padding-top: 11px; }
  .attachment-viewer-meta p { display: none; }
}

@media (max-width: 600px) {
  .detail-masthead { min-height: 0; padding: 15px; align-items: flex-start; }
  .detail-masthead h2 { font-size: 17px; }
  .detail-masthead .overlay-head-actions { gap: 6px; }
  .detail-masthead .refresh-button { min-height: 44px; }
  .detail-masthead .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .detail-record-body { padding: 15px 15px 28px; gap: 13px; }
  .detail-readiness-grid { grid-template-columns: 1fr; gap: 8px; }
  .detail-readiness-card { min-height: 78px; }
  .detail-custody { align-items: flex-start; flex-direction: column; gap: 9px; }
  .detail-custody small { text-align: left; }
  .detail-record-section { padding: 16px; }
  .detail-section-head { margin-bottom: 15px; flex-direction: column; }
  .detail-section-action, .compact-action { width: 100%; min-height: 44px; }
  .detail-record-grid { grid-template-columns: 1fr; gap: 13px; }
  .detail-column { padding: 13px; }
  .detail-subheading { align-items: flex-start; flex-direction: column; }
  .document-row { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .document-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .document-actions .text-button { min-height: 44px; padding: 10px 7px; }
  .overlay-head.attachment-viewer-head { min-height: 76px; padding: 13px 15px; }
  .overlay-head.attachment-viewer-head h2 { font-size: 16px; }
  .attachment-viewer-body { padding: 9px; grid-template-rows: minmax(220px, 1fr) auto; gap: 9px; }
  .attachment-viewer-stage { min-height: 220px; }
  .attachment-viewer-meta { max-height: 145px; padding: 12px; }
  .attachment-viewer-meta dl { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .attachment-viewer-meta dl > div { padding: 8px 0; }
  .overlay-actions.attachment-viewer-actions { min-height: 0; padding: 9px; display: grid; grid-template-columns: 1fr; }
  .attachment-viewer-nav, .attachment-viewer-primary { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
  .attachment-viewer-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attachment-viewer-actions .button { width: 100%; padding: 9px 8px; }
  .record-list-row { align-items: flex-start; flex-direction: column; }
  .record-tag { max-width: 100%; text-align: left; }
  .detail-actions { min-height: 0; max-height: 45dvh; padding: 10px 15px; display: grid; grid-template-columns: 1fr; overflow-y: auto; }
  .detail-actions-main, .detail-actions-secondary { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
  .detail-actions .button { width: 100%; min-height: 44px; padding: 9px 8px; }
  .detail-action-note { max-width: none; grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 380px) {
  .detail-masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .detail-masthead .refresh-button { width: 44px; padding: 0; overflow: hidden; color: transparent; }
  .detail-masthead .refresh-button::before { content: "\21BB"; color: var(--muted); font-size: 15px; }
  .detail-actions-main, .detail-actions-secondary { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  .labels-page { padding: 0; background: #fff; }
  .labels-toolbar { display: none; }
  .label-grid { max-width: none; grid-template-columns: repeat(2, 1fr); gap: 4mm; }
  .qr-label { min-height: 48mm; padding: 4mm; border-color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

 
.flow-alternative { max-width: 620px; margin: 18px auto 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #29303b; background: #11151b; color: var(--muted); font-size: 12px; }
.flow-alternative .button { flex: 0 0 auto; }
.fallback-warning, .secret-warning { display: grid; gap: 5px; margin: 16px auto; padding: 13px 15px; border: 1px solid rgba(233, 170, 50, .45); background: rgba(233, 170, 50, .08); color: var(--muted); }
.fallback-warning strong, .secret-warning strong { color: var(--amber); font: 10px var(--mono); letter-spacing: .08em; }
.request-preview { display: grid; gap: 14px; margin-bottom: 16px; }
.locked-field { display: grid; gap: 7px; padding: 14px; border: 1px solid #28303a; background: #10141a; }
.locked-field strong { color: var(--text); }
.assessment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.assessment-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.assessment-grid .wide-field { grid-column: 1 / -1; }
.badge.pending, .badge.ready { color: var(--amber); border-color: rgba(233, 170, 50, .4); background: rgba(233, 170, 50, .08); }
.badge.suspended { color: #ffb969; border-color: rgba(255, 185, 105, .4); background: rgba(255, 185, 105, .08); }
.badge.rejected, .badge.closed { color: #ee8383; border-color: rgba(238, 131, 131, .35); background: rgba(238, 131, 131, .08); }
.borrower-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-section-head { padding: 18px 20px 0; }
.borrower-account-table { min-width: 940px; }
.borrower-account-table td small { display: block; max-width: 300px; margin-top: 5px; color: var(--faint); }
.small-button { min-height: 32px; padding: 7px 10px; font-size: 9px; }
.borrower-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.borrower-list { display: grid; gap: 0; border-top: 1px solid #202630; }
.borrower-list-row { min-width: 0; padding: 13px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; border-bottom: 1px solid #202630; }
.borrower-list-row > div { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.borrower-list-row > div:last-child { justify-content: flex-end; text-align: right; }
.borrower-list-row strong { overflow-wrap: anywhere; }
.borrower-list-row span, .borrower-list-row small, .borrower-list-row time { color: var(--faint); font-size: 10px; }
.borrower-list-row > div > span:not(.badge) { flex-basis: 100%; }
.request-kind { color: var(--blue) !important; font: 9px var(--mono) !important; letter-spacing: .08em; }
.borrower-modal { width: min(680px, 100%); }
.borrower-secret-modal { width: min(720px, 100%); }
.one-time-secret { padding: 20px; display: grid; gap: 12px; }
.one-time-secret > label { color: var(--muted); font: 10px var(--mono); text-transform: uppercase; }
.secret-value { min-height: 112px; resize: vertical; overflow-wrap: anywhere; font: 12px/1.6 var(--mono); color: var(--green); }
.borrower-login-entry { margin-top: 2px; padding-top: 20px; display: grid; gap: 12px; border-top: 1px solid var(--border); }
.borrower-login-entry > div:first-child { display: grid; gap: 5px; }
.borrower-login-entry > div:first-child > span { color: var(--text); font: 700 13px/1.35 var(--sans); letter-spacing: .035em; text-transform: uppercase; }
.borrower-login-entry > div:first-child > small { color: var(--muted); font: 12px/1.45 var(--sans); }
.borrower-login-entry .button { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.borrower-login-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.borrower-register-button { border-color: var(--amber); color: var(--amber); }
.borrower-register-button:hover { border-color: #ffd17b; background: rgba(245, 166, 35, .1); color: #ffd17b; }

@media (max-width: 1040px) {
  .borrower-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .borrower-columns { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .flow-alternative { align-items: stretch; flex-direction: column; }
  .flow-alternative .button { width: 100%; }
  .assessment-grid { grid-template-columns: 1fr; }
  .assessment-grid .wide-field { grid-column: auto; }
  .borrower-list-row { grid-template-columns: 1fr; }
  .borrower-list-row > div:last-child { justify-content: flex-start; text-align: left; }
  .borrower-stats { grid-template-columns: 1fr; }
  .one-time-secret { padding: 15px; }
}

 
 
 
 

html { font-size: 16px; }

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 4%, rgba(46, 86, 135, .09), transparent 34rem),
    linear-gradient(135deg, #07101c 0%, #08121f 52%, #06101b 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: var(--sans);
  font-size: 14px;
}

button,
[role="button"],
.button,
.refresh-button,
.nav-button,
.filter,
.icon-button,
.text-button,
.inline-link {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.file-button:focus-within {
  outline: 3px solid #ffc052;
  outline-offset: 3px;
}

.app-shell {
  min-height: 100dvh;
  align-items: stretch;
  background: transparent;
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 300px;
  height: 100dvh;
  min-height: 100dvh;
  flex: 0 0 300px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 30, 48, .98), rgba(8, 18, 31, .99)),
    var(--sidebar);
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 36px rgba(0, 0, 0, .12);
}

.brand {
  min-height: 68px;
  padding: 0 24px;
  gap: 13px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 13, 24, .5);
}

.brand-copy,
.brand-wordmark { min-width: 0; }

.brand-copy strong,
.brand-wordmark strong {
  display: block;
  color: var(--text);
  font: 750 18px/1.1 var(--sans);
  letter-spacing: .015em;
  white-space: nowrap;
}

.brand-copy span,
.brand-wordmark span {
  display: block;
  margin-top: 5px;
  color: var(--faint);
  font: 650 10px/1.2 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
}

.nav {
  min-height: 0;
  padding: 14px 10px 22px;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.nav-section {
  padding: 6px 0 18px;
  border-bottom: 1px solid rgba(100, 116, 138, .34);
}

.nav-section:last-child {
  padding-bottom: 6px;
  border-bottom: 0;
}

.nav-section + .nav-section { margin-top: 12px; }

.nav-section-title,
.nav-section-label {
  margin: 0;
  padding: 0 18px 8px;
  color: #a6b5cb;
  font: 700 12px/1.3 var(--sans);
  letter-spacing: .045em;
  text-transform: uppercase;
}

.nav-section-items { display: grid; gap: 3px; }

.nav-button {
  position: relative;
  min-height: 50px;
  padding: 8px 16px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #c6cfdd;
  font-family: var(--sans);
}

.nav-button:hover {
  border-color: rgba(100, 116, 138, .36);
  background: rgba(255, 255, 255, .045);
  color: #fff;
}

.nav-button.active {
  border-color: rgba(100, 116, 138, .38);
  background: linear-gradient(90deg, rgba(39, 57, 80, .92), rgba(28, 43, 62, .82));
  color: #fff;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .13);
}

.nav-button.active::before {
  inset: 4px auto 4px -10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--amber);
}

.nav-icon {
  width: 26px;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #d5deeb;
  font: 700 14px/1 var(--sans);
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nav-button.active .nav-icon { color: var(--amber); }

.nav-label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: 540 15px/1.3 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  min-width: 23px;
  padding: 3px 7px;
  border-radius: 999px;
  font: 800 11px/1.2 var(--mono);
}

.operator { display: none; }

.main {
  width: calc(100% - 300px);
  min-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.utility-bar {
  position: sticky;
  z-index: 25;
  top: 0;
  min-height: 68px;
  padding: 0 28px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 28, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.utility-brand {
  min-width: 0;
  color: var(--text);
  font: 730 18px/1.2 var(--sans);
  letter-spacing: .015em;
}

.utility-brand small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font: 500 12px/1.2 var(--sans);
}

.utility-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.utility-chip,
.utility-account > summary {
  min-height: 44px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: rgba(13, 25, 40, .78);
  color: #dce3ee;
  font: 600 13px/1.2 var(--sans);
  white-space: nowrap;
}

.utility-account {
  position: relative;
  min-width: 190px;
}

.utility-account > summary {
  width: 100%;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}

.utility-account > summary::-webkit-details-marker { display: none; }

.utility-account[open] > summary {
  border-color: var(--amber);
  background: var(--surface-2);
}

.utility-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #101a28;
  box-shadow: var(--shadow);
}

.utility-account-menu a,
.utility-account a {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  border-radius: 5px;
  color: var(--muted);
  text-decoration: none;
}

.utility-account-menu a:hover,
.utility-account a:hover {
  background: var(--surface-3);
  color: var(--text);
}

.content,
.inventory-content {
  width: 100%;
  max-width: none;
  padding: 32px 40px 52px;
}

.page-head,
.workbench-header {
  margin-bottom: 24px;
  align-items: center;
}

.page-title,
.workbench-header h1 {
  margin: 0;
  color: #f7f9fc;
  font: 750 clamp(24px, 2vw, 31px)/1.18 var(--sans);
  letter-spacing: -.018em;
}

.page-subtitle,
.workbench-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font: 450 15px/1.45 var(--sans);
}

.page-tools { gap: 10px; }

.refresh-button,
.button,
.filter,
.field,
.select,
.small-button {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
}

.refresh-button,
.button,
.filter,
.small-button {
  padding: 9px 14px;
  color: #d4dce8;
  letter-spacing: .01em;
}

.refresh-button:hover,
.button:hover,
.filter:hover,
.small-button:hover {
  border-color: #93a2b6;
  background: rgba(255, 255, 255, .055);
  color: #fff;
}

.button.primary {
  border-color: #ffb32c;
  background: linear-gradient(180deg, #ffb52e, #ee9711);
  color: #111721;
  box-shadow: 0 8px 22px rgba(245, 166, 35, .16);
}

.button.primary:hover {
  border-color: #ffd17b;
  background: linear-gradient(180deg, #ffc04d, #f5a623);
  color: #07101c;
}

.button[disabled],
.refresh-button[disabled],
.filter[disabled] {
  opacity: .48;
  box-shadow: none;
}

.field,
.select {
  padding: 10px 13px;
  background: #0e1724;
  color: var(--text);
  font-weight: 450;
}

.field::placeholder { color: #8796ab; opacity: 1; }

.field:focus,
.select:focus {
  border-color: var(--amber);
  background: #111d2c;
}

.server-pill,
.eyebrow,
.badge,
.request-kind,
.history-time,
.activity-row time,
.utility-mono {
  font-family: var(--mono);
}

.server-pill {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 12px;
}

.eyebrow {
  color: #aeb9c9;
  font-size: 11px;
  letter-spacing: .08em;
}

.panel,
.stat,
.review-card,
.history-card,
.form-section,
.locked-field {
  border-color: var(--border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(18, 31, 47, .98), rgba(12, 23, 37, .98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.panel-pad { padding: 20px; }

.stats {
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  min-height: 116px;
  padding: 18px 20px;
}

.stat-value {
  font: 760 32px/1 var(--sans);
  letter-spacing: -.02em;
}

.stat-note {
  color: var(--muted);
  font: 13px/1.35 var(--sans);
}

.dashboard-grid { gap: 18px; }

.action {
  min-height: 62px;
  padding: 12px 14px;
  border-color: var(--border-strong);
  border-radius: 7px;
}

.action strong,
.action small,
.loan strong,
.loan span,
.registration-queue-item strong,
.registration-queue-item small {
  font-family: var(--sans);
}

.action strong { font-size: 14px; }
.action small { font-size: 12px; }
.loan strong { font-size: 14px; }
.loan span { font-size: 12px; }

.empty,
.workbench-empty {
  min-height: 116px;
  padding: 30px 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 14px/1.5 var(--sans);
  text-align: center;
}

.toolbar { gap: 14px; }
.filters { gap: 9px; }
.filter { text-transform: none; }
.search { margin-top: 16px; }

.table-panel {
  margin-top: 16px;
  border-color: var(--border);
  border-radius: 8px;
}

.data-table th {
  padding: 13px 15px;
  border-bottom-color: var(--border);
  color: #aeb9c9;
  font: 700 12px/1.35 var(--sans);
  letter-spacing: .055em;
}

.data-table td {
  padding: 14px 15px;
  border-bottom-color: rgba(57, 72, 91, .68);
  color: #c7d0de;
  font: 14px/1.45 var(--sans);
}

.data-table td strong {
  color: #f2f5fa;
  font: 650 14px/1.4 var(--sans);
}

.data-table td small {
  margin-top: 4px;
  color: var(--muted);
  font: 12px/1.4 var(--sans);
}

.data-table tbody tr:hover { background: rgba(99, 169, 243, .045); }

.row-title {
  min-height: 44px;
  color: var(--text);
  font: 650 14px/1.4 var(--sans);
}

.sort-button { min-height: 36px; }

.icon-button {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-color: var(--border-strong);
  border-radius: 7px;
  font-size: 18px;
}

.text-button {
  min-height: 44px;
  padding: 9px 8px;
  color: #8fc2fa;
  font: 650 13px/1.3 var(--sans);
}

.badge {
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: .035em;
}

.modal,
.drawer {
  border-color: var(--border-strong);
  border-radius: 10px;
  background: #0e1826;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

.overlay-head,
.overlay-actions,
.modal-actions {
  border-color: var(--border);
  background: rgba(13, 24, 38, .97);
}

.overlay-head h2,
.modal h2,
.drawer h2 {
  font-family: var(--sans);
  font-size: 20px;
}

.form-grid label,
.confirm-stack label,
.assessment-grid label,
.login-form label {
  color: #b8c3d2;
  font: 600 13px/1.4 var(--sans);
  text-transform: none;
}

.detail-label { color: var(--muted); font: 13px/1.4 var(--sans); }
.detail-value { color: var(--text); font: 600 14px/1.4 var(--sans); }

 
.workbench-page {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.workbench-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.workbench-header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.workbench-metrics {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.workbench-metric {
  min-height: 110px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(21, 34, 51, .98), rgba(13, 24, 38, .98));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .09);
}

.workbench-metric-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 166, 35, .42);
  border-radius: 9px;
  background: rgba(245, 166, 35, .12);
  color: var(--amber);
  font-size: 25px;
}

.workbench-metric:nth-child(2) .workbench-metric-icon {
  border-color: rgba(255, 102, 102, .42);
  background: rgba(255, 102, 102, .12);
  color: var(--red);
}

.workbench-metric:nth-child(3) .workbench-metric-icon {
  border-color: rgba(121, 207, 105, .42);
  background: rgba(121, 207, 105, .12);
  color: var(--green);
}

.workbench-metric:nth-child(4) .workbench-metric-icon {
  border-color: rgba(99, 169, 243, .42);
  background: rgba(99, 169, 243, .12);
  color: var(--blue);
}

.workbench-metric-copy { min-width: 0; }

.workbench-metric-label,
.workbench-metric span:not(.workbench-metric-icon) {
  display: block;
  color: #d5dce7;
  font: 550 14px/1.3 var(--sans);
}

.workbench-metric-value,
.workbench-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--amber);
  font: 760 31px/1 var(--sans);
}

.workbench-metric:nth-child(2) strong { color: var(--red); }
.workbench-metric:nth-child(3) strong { color: var(--green); }
.workbench-metric:nth-child(4) strong { color: var(--blue); }

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(350px, 38%) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}

.workbench-queue,
.workbench-detail,
.review-pane {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(17, 29, 45, .99), rgba(10, 20, 33, .99));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .11);
}

.workbench-queue > header,
.workbench-detail > header,
.review-pane > header,
.workbench-queue-header,
.workbench-detail-header {
  min-height: 60px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.workbench-queue h2,
.workbench-detail h2,
.review-pane h2 {
  margin: 0;
  color: var(--text);
  font: 700 17px/1.3 var(--sans);
}

.workbench-queue-list {
  display: grid;
  align-content: start;
}

.workbench-queue-item,
.workbench-item {
  position: relative;
  width: 100%;
  min-height: 84px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(57, 72, 91, .76);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.workbench-queue-item:hover,
.workbench-item:hover {
  background: rgba(99, 169, 243, .06);
}

.workbench-queue-item.active,
.workbench-queue-item[aria-current="true"],
.workbench-item.active {
  background: linear-gradient(90deg, rgba(50, 104, 164, .22), rgba(35, 69, 108, .16));
  box-shadow: inset 0 0 0 1px var(--blue);
}

.workbench-queue-item.active::before,
.workbench-queue-item[aria-current="true"]::before,
.workbench-item.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.workbench-item-icon,
.workbench-queue-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: #d6deea;
}

.workbench-queue-item strong,
.workbench-item strong {
  display: block;
  color: #f2f5f9;
  font: 620 14px/1.35 var(--sans);
}

.workbench-queue-item small,
.workbench-item small,
.workbench-item-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 12px/1.35 var(--sans);
}

.workbench-item-id,
.workbench-queue-item code,
.workbench-item code {
  font: 12px/1.3 var(--mono);
}

.workbench-queue-footer {
  min-height: 62px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.review-record-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
}

.review-record-meta > * + * {
  padding-left: 11px;
  border-left: 1px solid var(--border);
}

.review-pane-body,
.workbench-detail-body {
  padding: 12px 14px 0;
}

.review-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.review-diff-column {
  min-width: 0;
  background: rgba(11, 21, 34, .68);
}

.review-diff-column + .review-diff-column {
  border-left: 1px solid var(--border);
}

.review-diff-column > header,
.review-diff-heading {
  min-height: 44px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  color: #b7c2d2;
  font: 600 13px/1.3 var(--sans);
  text-align: center;
}

.review-diff-row {
  min-height: 42px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(106px, 36%) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(57, 72, 91, .55);
}

.review-diff-column .review-diff-row:last-child { border-bottom: 0; }

.review-diff-key {
  min-width: 0;
  color: #9facc0;
  font: 12px/1.35 var(--sans);
}

.review-diff-value {
  min-width: 0;
  color: #eef2f7;
  font: 540 13px/1.35 var(--sans);
  overflow-wrap: anywhere;
}

.review-diff-value code,
.review-diff-value.is-id {
  font-family: var(--mono);
  font-size: 12px;
}

.review-diff-before.changed,
.review-diff-before .changed {
  background: rgba(255, 102, 102, .08);
}

.review-diff-after.changed,
.review-diff-after .changed,
.review-diff-after .review-diff-row.changed {
  background: rgba(121, 207, 105, .12);
}

.review-change-tag {
  justify-self: end;
  padding: 3px 6px;
  border: 1px solid rgba(121, 207, 105, .45);
  border-radius: 4px;
  background: rgba(121, 207, 105, .09);
  color: var(--green);
  font: 700 9px/1.2 var(--mono);
  text-transform: uppercase;
}

.workbench-evidence {
  padding: 16px 6px 14px;
}

.workbench-evidence h3,
.workbench-review-notes h3 {
  margin: 0 0 10px;
  color: #eef2f7;
  font: 650 14px/1.35 var(--sans);
}

.workbench-evidence-list,
.evidence-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-chip {
  min-height: 54px;
  min-width: 0;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: rgba(20, 34, 52, .74);
  color: var(--text);
  text-decoration: none;
}

.evidence-chip:hover {
  border-color: var(--blue);
  background: rgba(99, 169, 243, .08);
}

.evidence-chip strong {
  display: block;
  overflow: hidden;
  font: 550 12px/1.25 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-chip small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 10px/1.25 var(--sans);
}

.workbench-review-notes { padding: 0 6px 16px; }

.workbench-actions,
.review-actionbar {
  min-height: 72px;
  margin-top: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(180px, 1.1fr) minmax(130px, .7fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: rgba(9, 18, 30, .82);
}

.workbench-actions .button,
.review-actionbar .button {
  width: 100%;
  min-height: 48px;
  font-size: 14px;
}

@media (max-width: 1320px) {
  .content,
  .inventory-content { padding: 28px 30px 44px; }
  .utility-bar { padding-right: 24px; padding-left: 30px; }
  .workbench-metrics { gap: 12px; }
  .workbench-metric { padding: 15px; gap: 12px; }
  .workbench-layout { grid-template-columns: minmax(320px, 36%) minmax(0, 1fr); gap: 12px; }
  .workbench-evidence-list,
  .evidence-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .utility-brand { display: none; }
  .workbench-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-layout { grid-template-columns: minmax(290px, 34%) minmax(0, 1fr); }
  .review-record-meta > *:not(:first-child) { display: none; }
}

@media (max-width: 1024px) {
  .app-shell { display: block; }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  }

  .brand { min-height: 68px; padding: 0 20px; }
  .menu-toggle { display: grid; place-items: center; }

  .nav {
    display: none;
    max-height: calc(100dvh - 68px);
    padding: 12px;
  }

  .nav.open { display: grid; }

  .nav-section {
    padding: 6px 0 12px;
    border-bottom: 1px solid rgba(100, 116, 138, .34);
  }

  .nav-section-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-button.active::before { left: -12px; }
  .mobile-logout { display: grid; }

  .main { width: 100%; min-height: calc(100dvh - 68px); }

  .utility-bar {
    position: relative;
    min-height: 58px;
    padding: 7px 20px;
  }

  .utility-meta { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .utility-account { margin-left: auto; }
  .content, .inventory-content { padding: 26px 22px 40px; }

  .workbench-layout { grid-template-columns: 1fr; }
  .workbench-queue { max-height: 520px; overflow-y: auto; }
}

@media (max-width: 780px) {
  .main { padding: 0; }
  .content, .inventory-content { padding: 22px 16px 36px; }
  .utility-bar { padding: 7px 16px; }
  .utility-chip:nth-of-type(2),
  .utility-chip:nth-of-type(3) { display: none; }
  .utility-account { min-width: 160px; }

  .page-head,
  .workbench-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-tools,
  .workbench-header-meta { width: 100%; justify-content: flex-start; }
  .registration-queue-list { grid-template-columns: 1fr; }

  .data-table tr { border-bottom-color: var(--border); }
  .data-table td { font-size: 14px; }
  .data-table td::before { color: var(--faint); font-size: 11px; }

  .review-diff { grid-template-columns: 1fr; }
  .review-diff-column + .review-diff-column { border-top: 1px solid var(--border); border-left: 0; }
  .workbench-evidence-list,
  .evidence-list { grid-template-columns: 1fr; }
  .workbench-actions,
  .review-actionbar { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .brand-copy strong, .brand-wordmark strong { font-size: 16px; }
  .nav-section-items { grid-template-columns: 1fr; }
  .utility-chip:first-child { display: inline-flex; }
  .utility-account { min-width: 0; flex: 1 1 auto; }
  .utility-account > summary { overflow: hidden; text-overflow: ellipsis; }
  .workbench-metrics, .stats { grid-template-columns: 1fr; }
  .workbench-metric { min-height: 96px; }
  .workbench-queue-item, .workbench-item { grid-template-columns: 38px minmax(0, 1fr); }
  .workbench-queue-item > .badge,
  .workbench-item > .badge { grid-column: 2; justify-self: start; }
  .review-diff-row { grid-template-columns: 1fr; gap: 4px; }
  .workbench-queue > header,
  .workbench-detail > header,
  .review-pane > header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .content,
  .toast,
  .drawer,
  .overlay { animation: none !important; }
}

 
.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
}

.utility-bar {
  grid-column: 1 / -1;
  grid-row: 1;
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  top: 68px;
  height: calc(100dvh - 68px);
  min-height: 0;
}

.sidebar.nav-groups {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar.nav-groups > .nav { flex: 1 1 auto; }

.main {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
}

.utility-brand {
  width: 300px;
  flex: 0 0 300px;
  display: flex;
  align-items: center;
}

.utility-brand > strong {
  overflow: hidden;
  font: 750 20px/1.15 var(--sans);
  letter-spacing: .015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility-bar > .menu-toggle { display: none; }

.utility-chip > .nav-icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
}

.utility-account > summary > .nav-icon {
  width: 22px;
  min-width: 22px;
  height: 22px;
}

.utility-account-menu > strong,
.utility-account-menu > span {
  display: block;
  padding: 5px 10px;
}

.utility-account-menu > strong {
  color: var(--text);
  font-size: 14px;
}

.utility-account-menu > span {
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.workbench-metric > .nav-icon {
  width: 54px;
  min-width: 54px;
  height: 54px;
  padding: 12px;
  border: 1px solid rgba(245, 166, 35, .42);
  border-radius: 9px;
  background: rgba(245, 166, 35, .12);
  color: var(--amber);
}

.workbench-metric-corrections > .nav-icon {
  border-color: rgba(255, 102, 102, .42);
  background: rgba(255, 102, 102, .12);
  color: var(--red);
}

.workbench-metric-approvals > .nav-icon {
  border-color: rgba(121, 207, 105, .42);
  background: rgba(121, 207, 105, .12);
  color: var(--green);
}

.workbench-metric-exceptions > .nav-icon {
  border-color: rgba(99, 169, 243, .42);
  background: rgba(99, 169, 243, .12);
  color: var(--blue);
}

.workbench-metric > span > small {
  display: block;
  color: #d5dce7;
  font: 550 14px/1.3 var(--sans);
}

.workbench-metric > span > strong {
  display: block;
  margin-top: 5px;
  color: inherit;
  font: 760 31px/1 var(--sans);
}

.workbench-metric-pending > span > strong { color: var(--amber); }
.workbench-metric-corrections > span > strong { color: var(--red); }
.workbench-metric-approvals > span > strong { color: var(--green); }
.workbench-metric-exceptions > span > strong { color: var(--blue); }

.workbench-queue-item,
.workbench-item {
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
}

.workbench-queue-item > .nav-icon-chevron,
.workbench-item > .nav-icon-chevron {
  width: 18px;
  min-width: 18px;
  height: 18px;
  color: #a9b6c8;
}

.workbench-item-copy { min-width: 0; }

.workbench-item-copy > span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #bec8d6;
  font: 12px/1.35 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-item-status {
  padding: 5px 7px;
  border: 1px solid rgba(245, 166, 35, .45);
  border-radius: 5px;
  background: rgba(245, 166, 35, .08);
  color: var(--amber);
  font: 700 9px/1.2 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
}

.workbench-item.is-selected,
.workbench-item[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(50, 104, 164, .22), rgba(35, 69, 108, .16));
  box-shadow: inset 0 0 0 1px var(--blue);
}

.workbench-item.is-selected::before,
.workbench-item[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.workbench-item.is-selected .workbench-item-status,
.workbench-item[aria-pressed="true"] .workbench-item-status {
  border-color: rgba(99, 169, 243, .48);
  background: rgba(99, 169, 243, .1);
  color: var(--blue);
}

.workbench-task.is-overdue .workbench-item-icon {
  border-color: rgba(255, 102, 102, .5);
  background: rgba(255, 102, 102, .1);
  color: var(--red);
}

.workbench-task.is-overdue .workbench-item-status {
  border-color: rgba(255, 102, 102, .48);
  background: rgba(255, 102, 102, .1);
  color: var(--red);
}

.workbench-queue > footer {
  min-height: 60px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.workbench-detail-header {
  align-items: center;
}

.workbench-detail-header .eyebrow { margin-bottom: 3px; }

.workbench-detail-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
}

.workbench-detail-meta > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.workbench-detail-meta > * + * {
  padding-left: 11px;
  border-left: 1px solid var(--border);
}

.workbench-detail-meta .nav-icon {
  width: 17px;
  min-width: 17px;
  height: 17px;
}

.workbench-detail-body { padding: 12px 14px 0; }

 
.review-diff {
  display: block;
  overflow: hidden;
}

.review-diff-row {
  min-height: 44px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(112px, 27%) minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.review-diff-row > * {
  min-width: 0;
  padding: 9px 12px;
  display: flex;
  align-items: center;
}

.review-diff-row > * + * { border-left: 1px solid rgba(57, 72, 91, .62); }

.review-diff-header {
  min-height: 47px;
  background: rgba(24, 38, 56, .72);
}

.review-diff-header > * {
  color: #c0cad8;
  font: 650 12px/1.25 var(--sans);
}

.review-diff-header small {
  margin-left: 4px;
  color: #9eabc0;
  font: 10px/1.2 var(--sans);
}

.review-diff-key { color: #a9b5c7; }

.review-diff-after {
  position: relative;
  padding-right: 72px !important;
}

.review-diff-row.is-changed .review-diff-before {
  background: rgba(255, 102, 102, .055);
}

.review-diff-row.is-changed .review-diff-after {
  background: rgba(121, 207, 105, .12);
}

.review-diff-updated {
  position: absolute;
  right: 8px;
  padding: 3px 5px;
  border: 1px solid rgba(121, 207, 105, .42);
  border-radius: 4px;
  background: rgba(121, 207, 105, .08);
  color: var(--green);
  font: 700 8px/1.2 var(--mono);
  text-transform: uppercase;
}

.review-diff-details > .review-diff-header {
  padding: 13px 14px;
  display: block;
}

.review-diff-details > .review-diff-header h3 {
  margin: 0;
  color: var(--text);
  font: 650 15px/1.3 var(--sans);
}

.review-diff-details > .review-diff-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.review-diff-details dl { margin: 0; }

.review-diff-details .review-diff-row {
  grid-template-columns: minmax(130px, 28%) minmax(0, 1fr);
}

.review-diff-details dd { margin: 0; }

.workbench-source-link {
  min-height: 44px;
  margin: 0 6px 14px;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #75b7fa;
  font: 620 13px/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.workbench-source-link:hover { color: #b5d8fc; }

.workbench-review-form {
  margin: 0 -14px;
  padding-top: 0;
  display: block;
  border-top: 1px solid var(--border);
}

.workbench-review-notes {
  padding: 14px 20px;
  display: grid;
  gap: 8px;
  color: #d5dce7;
  font: 600 13px/1.35 var(--sans);
}

.workbench-review-notes > span small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 450;
}

.workbench-review-notes textarea { min-height: 76px; resize: vertical; }

.workbench-review-history {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 24, 38, .72);
}

.workbench-review-history > summary {
  min-height: 48px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  color: #cbd4e0;
  font: 600 13px/1.35 var(--sans);
  cursor: pointer;
}

.workbench-review-history[open] > summary { border-bottom: 1px solid var(--border); }
.workbench-review-history .review-history-list { padding: 14px; }

@media (max-width: 1180px) {
  .utility-brand { width: 250px; flex-basis: 250px; }
  .utility-brand > strong { font-size: 18px; }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 68px auto minmax(0, 1fr);
  }

  .utility-bar { grid-column: 1; grid-row: 1; }
  .sidebar {
    position: sticky;
    grid-column: 1;
    grid-row: 2;
    top: 68px;
    width: 100%;
    height: auto;
    min-height: 0;
  }
  .main { grid-column: 1; grid-row: 3; }
  .utility-brand { width: auto; flex: 0 1 auto; }
  .utility-bar > .menu-toggle { display: grid; place-items: center; order: -1; margin: 0; }
}

@media (max-width: 780px) {
  .workbench-detail-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .review-diff { overflow-x: auto; }
  .review-diff-row { min-width: 590px; grid-template-columns: 130px 230px 230px; }
  .review-diff-details .review-diff-row { min-width: 0; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .utility-brand > strong { display: none; }
  .workbench-queue-item,
  .workbench-item { grid-template-columns: 38px minmax(0, 1fr) 18px; }
  .workbench-item-status { grid-column: 2; justify-self: start; }
  .workbench-queue-item > .nav-icon-chevron,
  .workbench-item > .nav-icon-chevron { grid-column: 3; grid-row: 1 / span 2; }
}

 
.main { min-height: calc(100dvh - 68px); }

.source-record-highlight {
  scroll-margin: 92px;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: rgba(99, 169, 243, .1) !important;
  box-shadow: inset 4px 0 0 var(--blue);
}

.actionable-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}

.actionable-empty strong { color: var(--text); font: 650 17px/1.35 var(--sans); }
.actionable-empty span { max-width: 560px; color: var(--muted); font: 14px/1.5 var(--sans); }
.actionable-empty .button { margin-top: 4px; }

.workbench-queue > footer {
  justify-content: space-between;
  gap: 14px;
}

.workbench-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workbench-pagination > span { white-space: nowrap; }
.workbench-pagination .text-button { min-height: 40px; padding: 7px 9px; }
.text-button[disabled] { opacity: .38; cursor: not-allowed; }

.review-diff-after { padding-right: 12px !important; }
.review-diff-row.is-changed .review-diff-after { padding-right: 72px !important; }

.review-actionbar .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.review-actionbar .button .nav-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
}

.sort-button { min-height: 44px; }
.inventory-table input[type="checkbox"] { width: 22px; height: 22px; }

.count-resolve-button {
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 6px;
  font: 700 12px/1.3 var(--sans);
}

.activity-row { min-height: 64px; padding: 12px 2px; }
.activity-row strong { font: 650 14px/1.4 var(--sans); }
.activity-row span { font: 12px/1.5 var(--sans); }
.activity-row time { font: 12px/1.45 var(--sans); }

.history-card { padding: 18px; }
.history-title strong { font: 650 15px/1.4 var(--sans); }
.history-meta, .history-person, .history-purpose { font-family: var(--sans); line-height: 1.5; }
.history-meta { font-size: 12px; }
.history-person { font-size: 14px; }
.history-purpose { font-size: 13px; }
.history-time { font: 12px/1.45 var(--sans); }

.overlay-head p,
.section-heading p,
.manual-logbook-card header p,
.form-section-head p,
.registration-review-summary span,
.workflow-alert span { font: 13px/1.5 var(--sans); }

.form-grid label small,
.request-summary small,
.stock-request-copy > span,
.stock-request-copy small,
.stock-request-actions time { font: 12px/1.45 var(--sans); }

.stock-request-copy strong { font: 650 14px/1.4 var(--sans); }
.stock-request-copy p { font-size: 13px; }
.stock-request-actions .button { min-height: 44px; font-size: 13px; }

.count-resolution { font: 13px/1.5 var(--sans); }
.count-item { min-height: 68px; }
.count-item strong { font: 650 14px/1.4 var(--sans); }
.count-item span, .count-item small { font: 12px/1.45 var(--sans); }

.toast { font: 14px/1.45 var(--sans); }

@media (max-width: 1024px) {
  .utility-bar { position: sticky; top: 0; }
  .workbench-queue { max-height: none; overflow: visible; }
}

@media (max-width: 780px) {
  .borrower-account-table { width: 100%; min-width: 0 !important; }
  .borrower-account-table.operations-table { min-width: 0 !important; }
  .borrower-account-table .operations-actions { width: 100%; }
  .review-diff-column + .review-diff-column {
    border-top: 0;
    border-left: 1px solid rgba(57, 72, 91, .62);
  }
  .workbench-queue > footer { align-items: flex-start; flex-direction: column; }
  .workbench-pagination { width: 100%; justify-content: space-between; }
}

@media (max-width: 460px) {
  .modal,
  .drawer { border-radius: 0; }
}

 
.status-tabs .filter span { font-size: 11px; }
.inventory-summary, .pagination { font: 12px/1.4 var(--sans); }
.overlay-head p { font-size: 13px; }
.detail-status strong { font: 650 14px/1.4 var(--sans); }
.detail-status > span, .condition-text { font: 12px/1.5 var(--sans); }
.record-grid dt { font: 650 12px/1.4 var(--sans); }
.record-grid dd { font: 600 14px/1.5 var(--sans); }
.record-section h3, .detail-subsection h4, .detail-subheading h4, .detail-history-group h4 { font: 700 12px/1.4 var(--sans); }
.restricted-note { font: 12px/1.5 var(--sans); }
.workflow-alert strong { font: 700 12px/1.35 var(--sans); }
.attachment-row strong { font: 650 14px/1.4 var(--sans); }
.attachment-row span { font: 12px/1.45 var(--sans); }
.detail-asset-line, .detail-serial { font-size: 12px !important; }
.detail-asset-line strong { font-size: 13px; }
.detail-heading-chips .badge, .condition-chip { font-size: 11px; }
.detail-readiness-grid span, .section-kicker { font-size: 12px; }
.detail-readiness-grid strong { font: 650 15px/1.4 var(--sans); }
.detail-readiness-grid small { font-size: 12px; }
.detail-custody span { font: 700 11px/1.35 var(--sans); }
.detail-custody strong { font: 650 14px/1.4 var(--sans); }
.detail-custody small { font: 12px/1.45 var(--sans); }
.detail-section-head h3 { font: 700 17px/1.35 var(--sans); }
.detail-section-head p { font-size: 13px; }
.document-title strong, .record-list-row strong { font: 650 14px/1.4 var(--sans); }
.document-filename, .document-meta, .record-list-row > div span, .record-tag { font: 12px/1.45 var(--sans); }
.record-empty strong { font: 650 14px/1.4 var(--sans); }
.record-empty span { font-size: 12px; }
.detail-action-note { font-size: 12px; }
.form-section-head h3 { font: 700 14px/1.4 var(--sans); }
.form-section-head p { font-size: 12px; }
.registration-review-summary strong { font: 650 14px/1.4 var(--sans); }
.approval-checklist legend { font: 700 12px/1.4 var(--sans); }
.approval-checklist li { font: 12px/1.45 var(--sans); }
.approval-checklist li strong { font-size: 11px; }
.registration-file-button, .registration-upload-button { min-height: 44px; font-size: 12px; }
.registration-file-name { font: 12px/1.4 var(--sans); }
.verification-check input { width: 22px; height: 22px; }
.verification-check span { font: 13px/1.5 var(--sans); }
.secure-file-label .field::file-selector-button { min-height: 40px; font: 650 12px/1.3 var(--sans); }
.request-summary span { font: 700 11px/1.35 var(--sans); }
.request-summary strong { font: 700 16px/1.35 var(--sans); }
.review-card h2, .review-history-card h3, .manual-logbook-card h2 { font: 650 15px/1.4 var(--sans); }
.review-card header time, .review-history-card > footer { font: 12px/1.45 var(--sans); }
.review-event-meta strong { font: 650 14px/1.4 var(--sans); }
.review-event-meta span { font: 12px/1.5 var(--sans); }
.review-decision-form label { font: 600 13px/1.4 var(--sans); text-transform: none; }
.count-metrics span { font: 650 12px/1.35 var(--sans); }
.count-metrics strong { font-family: var(--sans); }

 
.verified-borrower-card {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  border: 1px solid rgba(245, 166, 35, .62);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(245, 166, 35, .1), rgba(16, 26, 40, .96) 54%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .2);
}

.verified-borrower-card.return-tone {
  border-color: rgba(99, 169, 243, .58);
  border-left-color: var(--blue);
  background: linear-gradient(135deg, rgba(99, 169, 243, .1), rgba(16, 26, 40, .96) 54%);
}

.verified-borrower-photo {
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(245, 166, 35, .78);
  border-radius: 5px;
  background: #070d15;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.return-tone .verified-borrower-photo { border-color: rgba(99, 169, 243, .78); }
.verified-borrower-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.verified-borrower-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.verified-borrower-kicker { color: var(--amber); font: 700 10px/1.3 var(--mono); letter-spacing: .11em; }
.return-tone .verified-borrower-kicker { color: var(--blue); }
.verified-borrower-copy h2 { margin: 0; overflow-wrap: anywhere; color: var(--text); font: 700 clamp(20px, 4vw, 28px)/1.15 var(--mono); }
.verified-borrower-fields { margin: 2px 0 0; display: grid; gap: 7px; }
.verified-borrower-fields > div { min-width: 0; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.verified-borrower-fields dt { color: var(--faint); font: 700 9px/1.4 var(--mono); letter-spacing: .08em; }
.verified-borrower-fields dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font: 650 13px/1.4 var(--sans); }
.verified-photo-meta { margin-top: 3px; color: var(--green); font: 700 9px/1.4 var(--mono); letter-spacing: .07em; }
.verified-identity-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(73, 182, 117, .5);
  border-radius: 999px;
  background: rgba(73, 182, 117, .1);
  color: #79d79d;
  font: 700 10px/1 var(--mono);
  letter-spacing: .07em;
}
.verified-identity-status.inactive { border-color: rgba(239, 98, 98, .5); background: rgba(239, 98, 98, .1); color: #ff9a9a; }

 
.ammunition-movement-modal { width: min(100%, 840px); }
.ammunition-movement-form { padding: 20px 24px; }
.ammunition-movement-form > .form-grid { gap: 16px 20px; }

.ammunition-identity-panel {
  min-width: 0;
  padding: 17px;
  display: grid;
  gap: 13px;
  border: 1px solid rgba(245, 166, 35, .45);
  border-left: 4px solid var(--amber);
  border-radius: 7px;
  background: rgba(245, 166, 35, .045);
}

.ammunition-identity-panel.return-tone {
  border-color: rgba(99, 169, 243, .45);
  border-left-color: var(--blue);
  background: rgba(99, 169, 243, .045);
}

.ammunition-identity-panel > header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ammunition-identity-panel > header > div { min-width: 0; }
.ammunition-identity-panel > header .eyebrow { display: block; margin-bottom: 4px; }
.ammunition-identity-panel h3 { margin: 0; color: var(--text); font: 700 16px/1.35 var(--sans); }
.ammunition-identity-copy { margin: 0; color: var(--muted); font: 12px/1.5 var(--sans); }

.ammunition-identity-required,
.ammunition-identity-ready {
  min-height: 25px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(245, 166, 35, .45);
  border-radius: 999px;
  background: rgba(245, 166, 35, .08);
  color: #ffc052;
  font: 700 9px/1 var(--mono);
  letter-spacing: .08em;
}

.ammunition-identity-ready { border-color: rgba(73, 182, 117, .5); background: rgba(73, 182, 117, .1); color: #79d79d; }
.ammunition-identity-panel.return-tone .ammunition-identity-required { border-color: rgba(99, 169, 243, .48); background: rgba(99, 169, 243, .09); color: #8fc2fa; }

.ammunition-identity-scanner { padding: 3px 0 1px; }
.ammunition-identity-scanner .scan-area { gap: 12px; }
.ammunition-identity-scanner .scanner { width: min(100%, 330px); }
.ammunition-identity-scanner .scanner-tools,
.ammunition-identity-scanner .scan-form { width: min(100%, 500px); }
.ammunition-identity-scanner .scan-security { margin-top: -2px; font: 11px/1.45 var(--sans); }

.scanner.scanner-blue { border-color: rgba(88, 166, 231, .5); background: rgba(88, 166, 231, .025); }
.scanner.scanner-blue .scan-line { background: var(--blue); box-shadow: 0 0 8px rgba(88, 166, 231, .55); }
.scanner.scanner-blue .scanner-glyph { color: var(--blue); }

.ammunition-verified-identity { display: grid; gap: 13px; }
.ammunition-identity-panel .verified-borrower-card { box-shadow: none; }
.ammunition-identity-panel .identity-confirmation { display: flex; color: var(--text); text-transform: none; }
.ammunition-identity-panel.return-tone .identity-check { border-color: rgba(99, 169, 243, .4); border-left-color: var(--blue); background: rgba(99, 169, 243, .055); }
.ammunition-identity-panel.return-tone .identity-check strong { color: var(--blue); }
.ammunition-identity-actions { display: flex; justify-content: flex-end; }
.ammunition-identity-actions .button { min-height: 38px; }

.ammunition-movement-modal .modal-actions { margin-right: -24px; margin-left: -24px; padding-right: 24px; padding-left: 24px; }

@media (max-width: 560px) {
  .verified-borrower-card { grid-template-columns: 1fr; }
  .verified-borrower-photo { width: min(100%, 240px); justify-self: center; }
  .verified-borrower-copy { text-align: center; }
  .verified-borrower-fields > div { grid-template-columns: 1fr; gap: 2px; }
  .ammunition-movement-form { padding: 16px; }
  .ammunition-identity-panel { padding: 14px; }
  .ammunition-identity-panel > header { align-items: flex-start; }
  .ammunition-identity-actions .button { width: 100%; }
  .ammunition-movement-modal .modal-actions { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
}

 
.ammunition-receive-modal {
  width: min(100%, 760px);
}

.ammunition-receive-modal .overlay-head {
  min-height: 0;
  padding: 18px 24px;
}

.ammunition-receive-modal .overlay-head h2 {
  font: 700 20px/1.3 var(--mono);
}

.ammunition-receive-modal .overlay-head p {
  font: 11px/1.5 var(--mono);
}

.ammunition-receive-form {
  padding: 18px 24px 20px;
}

.ammunition-receive-sections {
  display: grid;
  gap: 18px;
}

.ammunition-receive-section {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.ammunition-receive-section h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #b7c4d5;
  font: 700 10px/1.35 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ammunition-receive-section h3::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: rgba(100, 116, 138, .38);
}

.ammunition-storage-section {
  padding-top: 17px;
  border-top: 1px solid rgba(57, 72, 91, .7);
}

.ammunition-receive-grid {
  gap: 13px 18px;
}

.ammunition-receive-modal .form-grid label {
  gap: 6px;
  color: #c3cddd;
  font: 500 12px/1.4 var(--mono);
}

.ammunition-receive-modal .field,
.ammunition-receive-modal .select {
  min-height: 42px;
  font: 400 12px/1.35 var(--mono);
}

.ammunition-receive-modal .field-label {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ammunition-receive-modal .optional-marker {
  color: #8796ab;
  font: 700 9px/1.35 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ammunition-receive-modal .form-grid label > small:not(.optional-marker) {
  color: #8e9db1;
  font: 10px/1.45 var(--mono);
}

.ammunition-optional-details {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(57, 72, 91, .86);
  border-radius: 7px;
  background: rgba(8, 17, 29, .42);
}

.ammunition-optional-details summary {
  position: relative;
  min-height: 52px;
  padding: 11px 44px 11px 14px;
  display: grid;
  align-content: center;
  gap: 3px;
  color: #c3cddd;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ammunition-optional-details summary::-webkit-details-marker {
  display: none;
}

.ammunition-optional-details summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--muted);
  font: 400 20px/1 var(--mono);
  transform: translateY(-50%);
}

.ammunition-optional-details[open] summary::after {
  content: "\2212";
}

.ammunition-optional-details summary:hover {
  background: rgba(255, 255, 255, .025);
}

.ammunition-optional-details summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.ammunition-optional-details summary > span {
  font: 700 10px/1.35 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ammunition-optional-details summary > small {
  color: #8796ab;
  font: 10px/1.4 var(--mono);
}

.ammunition-optional-details[open] summary {
  border-bottom: 1px solid rgba(57, 72, 91, .72);
}

.ammunition-optional-grid {
  padding: 15px;
  gap: 13px 18px;
}

.ammunition-receive-modal .modal-actions {
  margin: 18px -24px -20px;
  padding-right: 24px;
  padding-left: 24px;
}

.ammunition-receive-modal .modal-actions .button {
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 620px) {
  .ammunition-receive-grid,
  .ammunition-optional-grid {
    grid-template-columns: 1fr;
  }

  .ammunition-receive-form {
    padding: 16px 16px 18px;
  }

  .ammunition-receive-modal .overlay-head {
    padding: 15px 16px;
  }

  .ammunition-receive-modal .modal-actions {
    margin: 16px -16px -18px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .ammunition-optional-details summary > small {
    max-width: 34ch;
  }
}

 
.analytics-dashboard {
  --analytics-card: #1a1a19;
  --analytics-border: #353532;
  --analytics-grid: #2c2c2a;
  --analytics-label: #898781;
  --analytics-copy: #c3c2b7;
  display: grid;
  gap: 18px;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.analytics-kpi {
  min-width: 0;
  min-height: 118px;
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--analytics-border);
  border-radius: 8px;
  background: var(--analytics-card);
}

.analytics-kpi-label,
.analytics-toolbar-label {
  color: var(--analytics-copy);
  font: 700 11px/1.35 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.analytics-kpi-value {
  overflow-wrap: anywhere;
  color: #fff;
  font: 760 clamp(25px, 2.2vw, 34px)/1 var(--sans);
  letter-spacing: -.025em;
}

.analytics-kpi-note {
  color: var(--analytics-label);
  font: 12px/1.4 var(--sans);
}

.analytics-toolbar {
  min-height: 66px;
  padding: 11px 12px 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--analytics-border);
  border-radius: 8px;
  background: var(--analytics-card);
}

.analytics-toolbar p {
  margin: 4px 0 0;
  color: var(--analytics-label);
  font: 12px/1.4 var(--sans);
}

.analytics-range {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.analytics-range-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #494944;
  border-radius: 6px;
  background: transparent;
  color: var(--analytics-copy);
  font: 700 10px/1 var(--mono);
  letter-spacing: .035em;
  cursor: pointer;
}

.analytics-range-button:hover:not(:disabled) {
  border-color: #77776f;
  background: rgba(255, 255, 255, .035);
  color: #fff;
}

.analytics-range-button[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber);
  color: #111;
}

.analytics-range-button:disabled {
  opacity: .58;
  cursor: wait;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.analytics-chart-card {
  min-width: 0;
  grid-column: span 6;
  padding: 18px;
  border: 1px solid var(--analytics-border);
  border-radius: 8px;
  background: var(--analytics-card);
}

.analytics-chart-card[data-chart-card="dashboard-weapons-status"] { grid-column: span 4; }
.analytics-chart-card[data-chart-card="dashboard-issues-returns"] { grid-column: span 8; }
.analytics-chart-card[data-chart-card="dashboard-inventory-composition"] { grid-column: 1 / -1; }

.analytics-chart-head {
  min-height: 58px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.analytics-chart-head h2 {
  margin: 0;
  color: #fff;
  font: 700 16px/1.3 var(--sans);
}

.analytics-chart-head p {
  max-width: 62ch;
  margin: 5px 0 0;
  color: var(--analytics-label);
  font: 12px/1.45 var(--sans);
}

.analytics-chart-total {
  min-height: 19px;
  flex: 0 0 auto;
  color: var(--analytics-copy);
  font: 700 10px/1.3 var(--mono);
  letter-spacing: .04em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.analytics-chart-secondary {
  margin: -2px 0 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-left: 2px solid var(--amber);
  background: rgba(255, 255, 255, .025);
}

.analytics-chart-secondary span {
  color: var(--analytics-label);
  font: 700 10px/1.35 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.analytics-chart-secondary strong {
  color: #fff;
  font: 720 18px/1.2 var(--sans);
  white-space: nowrap;
}

.analytics-chart-frame {
  position: relative;
  min-height: 290px;
  height: 290px;
}

.analytics-chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.analytics-chart-card canvas[hidden] { display: none !important; }

.analytics-chart-state {
  position: absolute;
  inset: 0;
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed var(--analytics-grid);
  border-radius: 6px;
  color: var(--analytics-label);
  font: 13px/1.5 var(--mono);
  text-align: center;
}

.analytics-chart-state[hidden] { display: none !important; }
.analytics-chart-state.is-error { border-color: rgba(208, 59, 59, .66); color: #e66767; }

.analytics-chart-source {
  margin: 13px 0 0;
  color: var(--analytics-label);
  font: 10px/1.4 var(--mono);
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1500px) {
  .analytics-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .analytics-chart-card,
  .analytics-chart-card[data-chart-card="dashboard-weapons-status"],
  .analytics-chart-card[data-chart-card="dashboard-issues-returns"] { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-toolbar { align-items: flex-start; flex-direction: column; }
  .analytics-range { width: 100%; }
  .analytics-range-button { flex: 1 1 0; }
  .analytics-chart-head { min-height: 0; flex-direction: column; }
  .analytics-chart-total { text-align: left; }
  .analytics-chart-frame { min-height: 270px; height: 270px; }
}

@media (max-width: 480px) {
  .analytics-kpis { grid-template-columns: 1fr; }
  .analytics-kpi { min-height: 104px; }
  .analytics-chart-card { padding: 15px; }
  .analytics-chart-frame { min-height: 250px; height: 250px; }
}
