/* RackApp prototype · screen-specific styles for the inspector and warehouse apps. */
.lead { font-size: 16.5px; color: var(--ink-2); }
.center { text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.row--top { align-items: flex-start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.disclosure { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 15px; padding: 0; align-self: flex-start; }
.ticks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.kv--small { font-size: 13.5px; gap: 4px 12px; }
.field-err { color: var(--red); font-size: 13.5px; font-weight: 600; }
.link-btn--danger { color: var(--red); align-self: flex-start; }
.selectable { user-select: all; font-size: 17px; font-weight: 600; }
.due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.due--red { color: var(--red); }
.due--amber { color: var(--amber); }
.due--muted { color: var(--ink-3); font-weight: 500; }
.confirmed { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.ref--demo { background: var(--surface-3); color: var(--ink); border-style: dashed; font-weight: 600; }
.lr-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }

/* welcome: a blueprint of racking on gentian blue, the one bold moment */
.scr--welcome { background: var(--app-bg); }
.welcome-art { flex: none; height: 36%; min-height: 200px; background: var(--accent); overflow: hidden; }
.welcome-art svg { display: block; width: 100%; height: 100%; }
.wa-up { fill: var(--accent-ink); opacity: 0.92; }
.wa-beam { fill: var(--accent-ink); opacity: 0.6; }
.wa-load { fill: none; stroke: var(--accent-ink); stroke-width: 1.5; opacity: 0.35; }
.wa-floor { fill: var(--accent-ink); opacity: 0.92; }
.welcome-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px var(--gr) 24px var(--gl); display: flex; flex-direction: column; gap: 18px; }
.welcome-brand { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.welcome-title { font-family: var(--font-display); font-size: 38px; line-height: 1.02; font-weight: 600; }
.welcome-lead { color: var(--ink-2); font-size: 16.5px; }
.welcome-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--ink-3); }
.welcome-facts span { display: inline-flex; align-items: center; gap: 6px; }

.upload { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 64px; border: var(--bw) dashed var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.upload-img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--surface-2); }
.upload-mono { width: 48px; height: 48px; flex: none; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.radio-cards { display: flex; flex-direction: column; gap: 10px; }
.radio-card { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px; min-height: 56px; border-radius: 14px; border: var(--bw) solid var(--line-strong); background: var(--surface); color: var(--ink); text-align: left; font: inherit; }
.radio-card .grow { display: flex; flex-direction: column; gap: 2px; }
.radio-card b { font-weight: 600; }
.radio-dot { flex: none; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 1px; background: var(--surface); }
.radio-card.is-on { border-color: var(--accent); background: var(--accent-soft); }
.radio-card.is-on .radio-dot { border: 7px solid var(--accent); }
.ack-box { padding: 16px; border-radius: 14px; background: var(--surface); border: var(--bw) solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; line-height: 1.5; }
.ack-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.ack-title .ico { color: var(--accent); }

/* today + sites */
.resume { gap: 14px; }
.resume-site { font-family: var(--font-display); font-size: 27px; font-weight: 600; line-height: 1.05; }
.resume-cta { pointer-events: none; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 92px; border-radius: 14px; border: var(--bw) solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-align: left; }
.quick .ico { color: var(--accent); }
.quick:hover { border-color: var(--accent-line); }
.search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: var(--bw) solid var(--line-strong); background: var(--surface); color: var(--ink-3); }
.search:focus-within { border-color: var(--accent); }
.search-input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 44px; font-size: 16px; outline: none; color: var(--ink); }
.miniplan { display: flex; flex-direction: column; gap: 4px; }
.mp-row { display: flex; align-items: center; gap: 8px; }
.mp-label { width: 18px; flex: none; font: 600 12px var(--font-mono); color: var(--ink-3); }
.mp-bays { display: flex; gap: 2px; overflow: hidden; }
.mp-bay { width: 14px; height: 14px; flex: none; border-radius: 3px; background: var(--surface-3); }
.mp-bay--done { background: var(--accent-line); }
.mp-bay--green { background: var(--green-fill); }
.mp-bay--amber { background: var(--amber-fill); }
.mp-bay--red { background: var(--red-fill); }
.site-due { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.1; }
.site-last { text-align: right; }
.layout-stats { gap: 6px 16px; font-size: 14px; color: var(--ink-2); }
.layout-stats b { font-size: 21px; color: var(--ink); font-family: var(--font-display); }
.mini-stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.mini-stepper .icon-btn { width: 40px; height: 40px; }
.mini-val { min-width: 28px; text-align: center; font-weight: 700; }
.code-sample { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.preview { gap: 10px; }
.rule-row { align-items: center; }
.limit-input { display: flex; align-items: center; gap: 6px; flex: none; }
.limit-input .input { width: 86px; min-height: 44px; font-size: 18px; }

/* report preview inside the phone */
.doc-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px var(--gr) 4px var(--gl); background: var(--surface-2); border-bottom: var(--bw) solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.doc-hash { display: inline-flex; align-items: center; gap: 6px; }
.scr-body--doc { background: var(--surface-3); padding-left: 10px; padding-right: 10px; }
.doc-frame { border-radius: 8px; overflow: hidden; }

/* start */
.precheck { gap: 10px; padding: 14px; }
.precheck-q { font-weight: 600; line-height: 1.35; }

/* walk */
.walk-progress { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.walk-progress b { font-size: 18px; }
.walk-tools { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 10px var(--gr) 10px var(--gl); background: var(--app-bg); border-bottom: var(--bw) solid var(--line); }
.walk-body { gap: 12px; padding-top: 12px; }
.row-sec { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; overflow: hidden; flex: none; }
.row-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; min-height: 62px; background: none; border: 0; text-align: left; color: var(--ink); font: inherit; }
.row-letter { width: 40px; height: 40px; flex: none; border-radius: 9px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 23px; }
.row-title { display: block; font-weight: 600; }
.row-sub { display: block; font-size: 13.5px; color: var(--ink-3); }
.bay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 2px 12px 14px; }
.bay-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; min-height: 64px; padding: 8px 9px; border-radius: 12px; border: var(--bw) solid var(--line-strong); background: var(--surface); color: var(--ink); text-align: left; font: inherit; }
.bay-tile:hover { border-color: var(--accent); }
.bt-code { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1; }
.bt-state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; min-height: 18px; }
.bt-recheck { position: absolute; top: 6px; right: 6px; color: var(--accent); }
.bay-tile--todo { border-style: dashed; }
.bay-tile--ok { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.bay-tile--ok .bt-state { color: var(--accent); }
.bay-tile--ni { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface-3) 6px 12px); border-color: var(--line); color: var(--ink-2); }
.bay-tile--found.bay-tile--green { background: var(--green-soft); border-color: var(--green-line); }
.bay-tile--found.bay-tile--amber { background: var(--amber-soft); border-color: var(--amber-line); }
.bay-tile--found.bay-tile--red { background: var(--red-soft); border-color: var(--red-line); }
.plan { padding: 12px; }
.plan-grid { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.plan-row { display: flex; align-items: center; gap: 8px; }
.plan-label { width: 18px; flex: none; font: 700 13px var(--font-mono); color: var(--ink-2); }
.plan-bays { display: flex; gap: 3px; }
.plan-bay { width: 22px; height: 30px; flex: none; padding: 0; border-radius: 4px; border: var(--bw) solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--accent); }
.plan-bay--todo { border-style: dashed; }
.plan-bay--ok { background: var(--accent-soft); border-color: var(--accent-line); }
.plan-bay--ni { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--surface-3) 3px 6px); color: var(--ink-3); }
.plan-bay--found.plan-bay--green { background: var(--green-soft); border-color: var(--green-line); }
.plan-bay--found.plan-bay--amber { background: var(--amber-soft); border-color: var(--amber-line); }
.plan-bay--found.plan-bay--red { background: var(--red-soft); border-color: var(--red-line); }
.plan-bay.is-dim { opacity: 0.28; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.plan-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pl { width: 12px; height: 15px; border-radius: 3px; border: var(--bw) solid var(--line-strong); display: inline-block; box-sizing: border-box; }
.pl--todo { border-style: dashed; }
.pl--ok { background: var(--accent-soft); border-color: var(--accent-line); }
.pl--ni { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--surface-3) 3px 6px); }

/* bay */
.bay-code { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; }
.appbar-title .bay-code { font-size: 36px; }
.bay-meta { gap: 8px 12px; font-size: 14px; }
.bay-status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 13.5px; background: var(--surface-2); border: var(--bw) solid var(--line); color: var(--ink-2); }
.bay-status--ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.bay-status--findings { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.bay-status--not_inspected { background: var(--surface-3); }
.recheck { gap: 10px; border-style: dashed; border-color: var(--line-strong); }
.finding-card { gap: 8px; }
.bay-empty { display: flex; flex-direction: column; gap: 8px; padding: 4px 18px; }
.bay-actions { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px var(--gr) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gl); background: var(--appbar); border-top: var(--bw) solid var(--line); }
.bay-actions .row > .btn:last-child { flex: none; width: 64px; padding: 0; }

/* add finding */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.step button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 2px 0; min-height: 48px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.step-n { width: 26px; height: 26px; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); font-size: 12.5px; }
.step.is-on button { color: var(--accent); }
.step.is-on .step-n { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.step.is-done button { color: var(--ink-2); }
.step.is-done .step-n { border-color: var(--accent); color: var(--accent); }
.step button:disabled { cursor: default; }
.diagram-card { gap: 8px; padding: 12px; }
.picked { text-align: center; font-size: 15.5px; min-height: 22px; }
.picked-head { font-size: 17px; }
.dmg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dmg { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: var(--bw) solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; text-align: left; font-size: 15px; line-height: 1.2; }
.dmg.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.measure { gap: 10px; }
.measure-row { display: flex; align-items: center; gap: 10px; }
.measure-row .input--xl { flex: 1; min-width: 0; }
.measure-unit { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink-2); }
.howto { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.howto-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.suggest { gap: 12px; }
.suggest--green { border-color: var(--green-line); }
.suggest--amber { border-color: var(--amber-line); }
.suggest--red { border-color: var(--red-line); background: var(--red-soft); }
.suggest-class { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.05; }
.suggest--green .suggest-class { color: var(--green); }
.suggest--amber .suggest-class { color: var(--amber); }
.suggest--red .suggest-class { color: var(--red); }
.evidence-head { gap: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-cell { position: relative; display: block; aspect-ratio: 1; max-width: 100%; padding: 0; border-radius: 12px; overflow: hidden; border: var(--bw) solid var(--line); background: var(--photo-bg); }
.photo-edit { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.photo-add { aspect-ratio: 1; max-width: 100%; box-sizing: border-box; border-radius: 12px; border: var(--bw) dashed var(--line-strong); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; color: var(--accent); font-weight: 600; font-size: 13.5px; text-align: center; cursor: pointer; }
.annot-box { position: relative; width: 100%; max-width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; touch-action: none; cursor: crosshair; background: var(--photo-bg); }
.photo-big { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--photo-bg); }

/* red alert */
.scr--red { background: var(--red-fill); color: var(--on-status); }
.red-top { flex: none; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px var(--gr) 18px var(--gl); }
.red-close { position: absolute; top: 8px; right: 8px; color: var(--on-status); }
.red-close:hover { background: color-mix(in srgb, var(--on-status) 16%, transparent); color: var(--on-status); }
.red-octagon { width: 64px; height: 64px; color: var(--on-status); }
.red-title { font-family: var(--font-display); font-size: 34px; line-height: 1.02; font-weight: 700; }
.red-where { font-size: 17px; font-weight: 600; }
.red-where .bay-code { font-size: 24px; }
.red-what { opacity: 0.92; }
.red-body { background: var(--app-bg); color: var(--ink); border-radius: 22px 22px 0 0; gap: 14px; padding-top: 18px; }
.red-list { display: flex; flex-direction: column; gap: 8px; }
.red-step { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--red-line); background: var(--surface); font-weight: 600; font-size: 16.5px; cursor: pointer; }
.red-step .check { width: 28px; height: 28px; accent-color: var(--red-fill); }
.red-step.is-done { border-color: var(--line); color: var(--ink-2); }
.red-card { gap: 10px; }
.red-bar { background: var(--red-fill); border-top: 0; }
.red-bar .btn--secondary { background: transparent; color: var(--on-status); border-color: var(--on-status); }

/* signing + signed */
.signing { padding: 22px var(--gr) calc(26px + env(safe-area-inset-bottom, 0px)) var(--gl); gap: 14px; }
.signing-row { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.signing-dot { width: 18px; height: 18px; flex: none; box-sizing: border-box; border-radius: 50%; border: 3px solid var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.signing-dot.is-done { animation: none; background: var(--accent); border-color: var(--accent); }
.signing-dot.is-wait { animation: none; border-color: var(--line-strong); }
.signed-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 8px 4px; }
.signed-seal { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 8px var(--accent-soft); }
.signed-num { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: 0.02em; margin-top: 8px; }
.signed-hash { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: var(--bw) solid var(--line); margin-top: 6px; }
.signed-hash .code { font-size: 14px; }

/* QR scan: always a dark camera view */
.scr--dark { background: var(--ph-dark); color: var(--on-status); }
.scan-view { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; background: linear-gradient(180deg, var(--ph-dark), var(--ph-floor)); }
.scan-close { position: absolute; top: 10px; right: 10px; color: var(--on-status); }
.scan-close:hover { background: color-mix(in srgb, var(--on-status) 16%, transparent); color: var(--on-status); }
.scan-frame { position: relative; width: 240px; height: 240px; max-width: 100%; }
.scan-frame span { position: absolute; width: 44px; height: 44px; border: 0 solid var(--on-status); }
.scan-frame span:nth-child(1) { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 14px; }
.scan-frame span:nth-child(2) { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 14px; }
.scan-frame span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 14px; }
.scan-frame span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 14px; }
.scan-frame i { position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; background: var(--annot); box-shadow: 0 0 12px var(--annot); animation: scanline 1.6s ease-in-out infinite alternate; }
.scan-frame i.is-found { animation: none; top: 50%; }
@keyframes scanline { from { top: 12%; } to { top: 88%; } }
.scan-hint { color: var(--on-status); font-weight: 600; font-size: 16px; }
.scan-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 330px; padding: 14px; border-radius: 16px; background: var(--surface); color: var(--ink); }
.scan-result .bay-code { font-size: 30px; }
.scan-bar { background: var(--ph-dark); border-top: 0; }
.scan-bar .input { flex: 1; min-width: 0; }

/* labels */
.label-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 6px; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); aspect-ratio: 63.5 / 38.1; max-width: 100%; box-sizing: border-box; }
.lp-code { font-family: var(--font-display); font-weight: 700; font-size: 50px; line-height: 0.95; }
.lp-site { font-size: 13px; font-weight: 600; margin-top: 6px; }
.lp-small { font-size: 11px; color: var(--paper-ink-2); margin-top: 2px; }

/* warehouse app */
.check-due { gap: 10px; }
.check-due-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.05; }
.prow { gap: 12px; padding: 12px; }
.prow--ok { border-color: var(--accent-line); }
.prow--issue { border-color: var(--amber-line); background: var(--amber-soft); }
.prow-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ok-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; }
.stop-card { gap: 10px; }
.stop-title { font-size: 20px; color: var(--red); }
