/* NX-1086 P5: PickSense Pick screens. Tokens carried from the signed-off v7 mock
   (_ops/NX-1086-evidence/signed-off). Dark first, light mode via [data-theme].
   Fonts: Montserrat and JetBrains Mono are used when installed on the device;
   no external CDN is ever loaded (font files are not yet served by the app). */
@font-face { font-family: 'Montserrat'; src: local('Montserrat'), local('Montserrat Regular'); font-weight: 400 700; }
@font-face { font-family: 'JetBrains Mono'; src: local('JetBrains Mono'), local('JetBrainsMono-Regular'); font-weight: 400 700; }

:root, [data-theme="dark"] {
  --primary-solid: #c23e14;
  --bg-sunken: #141414; --bg-page: #1a1a1a; --bg-surface: #242424;
  --bg-raised: #2e2e2e; --bg-hover: #404040;
  --text-primary: #d4d4d4; --text-secondary: #a0a0a0; --text-heading: #ffffff;
  --border-default: #7a7a7a; --border-subtle: #404040;
  --success: #10b981; --on-success: #042f22;
  --warning: #f59e0b; --warning-bg: rgba(245,158,11,0.15); --on-warning: #1a1300;
  --danger-strong: #c62828; --on-danger: #ffffff;
  --info: #4A9EFF; --info-bg: rgba(74,158,255,0.15);
  --selected-bg: #3a3a3a; --selected-border: #ffffff;
  --focus-ring: #ff7a4d;
  --touch: 56px; --gap: 16px;
}
[data-theme="light"] {
  --primary-solid: #c23e14;
  --bg-sunken: #efefef; --bg-page: #f5f5f5; --bg-surface: #ffffff;
  --bg-raised: #ffffff; --bg-hover: #ebebeb;
  --text-primary: #1f1f1f; --text-secondary: #5f5f5f; --text-heading: #000000;
  --border-default: #808080; --border-subtle: #cccccc;
  --success: #10b981; --on-success: #042f22;
  --warning: #f59e0b; --warning-bg: rgba(245,158,11,0.12); --on-warning: #1a1300;
  --danger-strong: #b91c1c; --on-danger: #ffffff;
  --info: #1D4ED8; --info-bg: rgba(74,158,255,0.12);
  --selected-bg: #ececeb; --selected-border: #1f1f1f;
  --focus-ring: #c23e14;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-page); min-height: 100%; }
body { font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif; color: var(--text-primary); font-size: 16px; line-height: 1.5; }
button, input { font-family: inherit; font-size: inherit; color: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: 12px 24px; background: var(--bg-sunken); border-bottom: 1px solid var(--border-subtle); min-height: 64px; }
.topbar .who { font-weight: 700; color: var(--text-heading); }
/* NX-1307 P4: the BeeCon logo has black wordmark text, unreadable on the
   dark theme's sunken background - a light chip keeps it legible in both
   themes without changing the topbar layout. */
.topbar .who.brand { display: flex; align-items: center; background: #f5f5f5; border-radius: 6px; padding: 3px 8px; line-height: 0; }
.brand-logo { display: block; height: 30px; width: 88px; }
.topbar .right { display: flex; align-items: center; gap: var(--gap); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 16px; font-size: 14px; font-weight: 700; border: 1px solid var(--border-default); }
.chip.saving { background: var(--info-bg); color: var(--text-heading); }
.chip.problem { background: var(--warning-bg); color: var(--text-heading); }
.theme-toggle { min-height: var(--touch); min-width: var(--touch); padding: 0 16px; border-radius: 8px; background: transparent; border: 2px solid var(--border-default); cursor: pointer; }

.screen { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: var(--gap); }
.step { font-size: 36px; line-height: 1.2; font-weight: 700; color: var(--text-heading); }
.step.small { font-size: 26px; }
.sub { font-size: 18px; color: var(--text-secondary); }
.loc-code { display: block; font-size: 40px; font-weight: 700; color: var(--text-heading); }
.progress { font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 16px; }
.batch-named { background: var(--bg-sunken); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 16px; font-size: 18px; color: var(--text-heading); }
.batch-named .mono { font-size: 28px; font-weight: 700; display: block; }
.note { padding: 12px 16px; border-radius: 8px; background: var(--warning-bg); border: 1px solid var(--warning); color: var(--text-heading); }
.error-note { padding: 12px 16px; border-radius: 8px; border: 2px solid var(--danger-strong); color: var(--text-heading); }
/* Review F8: distinct amber/warning styling from .error-note (red) - the
   office-not-updated warning is a "tell someone" note, not a hard failure. */
.warning-note { padding: 12px 16px; border-radius: 8px; border: 2px solid var(--warning); background: var(--warning-bg); color: var(--text-heading); }

.stack { display: flex; flex-direction: column; gap: var(--gap); }
.spacer { flex: 1; }
.actions { display: flex; flex-direction: column; gap: var(--gap); margin-top: auto; }
.actions.spaced { gap: 32px; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--touch); padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 18px; text-align: center; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--primary-solid); color: #ffffff; border-color: var(--primary-solid); }
.btn-secondary { background: var(--bg-raised); color: var(--text-heading); border-color: var(--border-default); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn[disabled] { cursor: not-allowed; background: transparent; border: 2px dashed var(--border-subtle); color: var(--text-secondary); }
.btn-primary[disabled] { background: var(--bg-raised); border-color: var(--border-default); color: var(--text-secondary); }
.reason { font-size: 14px; color: var(--text-secondary); text-align: center; }

.choice { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: var(--touch); padding: 12px 24px; border-radius: 8px; border: 2px solid var(--border-default); background: var(--bg-raised); color: var(--text-heading); font-weight: 700; font-size: 18px; text-align: left; cursor: pointer; }
.choice[aria-selected="true"] { background: var(--selected-bg); border-color: var(--selected-border); }
.choice[aria-disabled="true"] { cursor: not-allowed; border-style: dashed; color: var(--text-secondary); background: transparent; }
.choice .meta { display: block; font-weight: 400; font-size: 14px; color: var(--text-secondary); }

.scan-field { width: 100%; min-height: var(--touch); padding: 12px 16px; border-radius: 8px; border: 2px solid var(--border-default); background: var(--bg-sunken); color: var(--text-heading); font-size: 24px; }
.scan-hint { font-size: 14px; color: var(--text-secondary); }

.line-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.line-row .name { font-weight: 700; color: var(--text-heading); }
.status { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 16px; border: 1px solid var(--border-default); }
.status.done { background: var(--success); color: var(--on-success); border-color: var(--success); }
.status.now { border-color: var(--primary-solid); color: var(--text-heading); }

.result-panel { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--gap); padding: 32px; text-align: center; }
.result-panel.good { background: var(--success); color: var(--on-success); }
.result-panel.bad { background: var(--danger-strong); color: var(--on-danger); }
/* NX-1214 P2: step 2 of the not-oldest flow - amber warning, distinct from
   the red 'wrong'/'not the oldest' style (.result-panel.bad) - this is a
   "tell someone and carry on" screen, not a hard refusal. */
.result-panel.warning { background: var(--warning); color: var(--on-warning); }
.result-panel .big { font-size: 48px; font-weight: 700; line-height: 1.2; }
.result-panel .tick { font-size: 96px; line-height: 1; }
.result-panel .stack { width: 100%; max-width: 520px; }
.result-panel .scan-field { max-width: 520px; background: rgba(0,0,0,0.25); border-color: #ffffff; color: #ffffff; }
.result-panel.bad :focus-visible { outline-color: #ffffff; }
.result-panel.good :focus-visible { outline-color: #042f22; }
.result-panel.warning :focus-visible { outline-color: var(--on-warning); }
.result-panel .btn { max-width: 520px; }
.result-panel .choice { max-width: 520px; margin: 0 auto; }
.result-panel.bad .btn-ghost { border-color: #ffffff; color: #ffffff; }
.result-panel.warning .btn-ghost { border-color: var(--on-warning); color: var(--on-warning); }
.sound-note { font-size: 14px; opacity: 0.85; }

.saved-state { display: flex; flex-direction: column; gap: 8px; }
.saved-state .state { font-size: 28px; font-weight: 700; color: var(--text-heading); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid var(--border-default); border-top-color: var(--primary-solid); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 12px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-panel .scan-field::placeholder { color: rgba(255,255,255,0.8); }

/* NX-1262: the warehouse jobs beside Pick (public/warehouse.js). */
a.btn { text-decoration: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 16px; font-weight: 700; color: var(--text-heading); }
.row-buttons { display: flex; gap: 8px; }
.row-buttons .btn { width: auto; min-width: 72px; padding: 8px 16px; font-size: 16px; }
.state { font-size: 20px; font-weight: 700; color: var(--text-heading); }
