:root {
  color-scheme: dark;
  --cx-orange: #e65d04;
  --cx-orange-flame: #f48c06;
  --cx-black: #1c1c1c;
  --cx-page: #1a1a1a;
  --cx-surface-1: #242424;
  --cx-surface-2: #2e2e2e;
  --cx-surface-3: #383838;
  --cx-danger: #d63b3b;
  --cx-warning: #e6a817;
  --cx-success: #2e9e5b;
  --cx-info: #3b82d6;
  --cx-text: #f0f0f0;
  --cx-secondary: #a7a7a7;
  --cx-muted: #696969;
  --cx-border: rgba(255, 255, 255, 0.08);
  --cx-border-strong: rgba(255, 255, 255, 0.15);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Roboto", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.view { display: none; }
.view.active { display: block; }

html, body { min-height: 100%; margin: 0; background: var(--cx-page); }

body { color: var(--cx-text); overscroll-behavior-y: none; }

button, input, select, textarea { font: inherit; }
button, a, select, label, input[type="checkbox"], input[type="radio"] { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), select:not(:disabled), label, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cx-orange-flame); outline-offset: 2px; }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: "Montserrat", system-ui, sans-serif; }
.mono { font-family: "Roboto Mono", ui-monospace, monospace; }

.app-shell { min-height: 100dvh; padding-bottom: calc(78px + var(--safe-bottom)); }
.page { width: min(100%, 760px); margin: 0 auto; padding: 0 16px 28px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(26,26,26,.94); border-bottom: 1px solid var(--cx-border);
  backdrop-filter: blur(16px);
}
.topbar-inner { width: min(100%, 760px); margin: auto; min-height: 48px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark { width: 33px; height: 33px; border: 2px solid var(--cx-orange); border-radius: 6px; display: grid; place-items: center; color: var(--cx-orange); font-family: "Montserrat"; font-weight: 800; }
.brand-copy { min-width: 0; }
.brand-name { font: 800 17px/1 "Montserrat"; letter-spacing: -.4px; }
.brand-context { color: var(--cx-secondary); font-size: 11px; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--cx-border-strong); background: var(--cx-surface-2); color: var(--cx-text); border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.demo-banner { margin: 14px 0 18px; border: 1px solid rgba(230,168,23,.34); background: rgba(230,168,23,.09); color: #f2c65c; padding: 9px 11px; border-radius: 6px; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.35; }
.demo-banner svg { flex: 0 0 auto; margin-top: 1px; }
.demo-banner strong { color: #ffe091; }

.page-heading { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 18px; }
.page-heading .back { margin-left: -7px; }
.page-heading h1 { font-size: 22px; line-height: 1.2; letter-spacing: -.4px; }
.page-heading p { color: var(--cx-secondary); font-size: 13px; margin-top: 5px; line-height: 1.35; }
.heading-copy { flex: 1; min-width: 0; }
.eyebrow { color: var(--cx-orange-flame); font: 700 10px/1 "Montserrat"; text-transform: uppercase; letter-spacing: 1.1px; margin-bottom: 7px; }

.section { margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-heading h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .55px; }
.section-heading .link-btn { color: var(--cx-orange-flame); }
.section-note { color: var(--cx-secondary); font-size: 12px; line-height: 1.45; margin: -3px 0 12px; }

.icon { width: 20px; height: 20px; display: inline-block; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 27px; height: 27px; }

.icon-btn, .back { border: 0; background: transparent; color: var(--cx-secondary); width: 40px; height: 40px; border-radius: 6px; padding: 0; display: grid; place-items: center; }
.icon-btn:active, .back:active { background: var(--cx-surface-2); }
.link-btn { border: 0; padding: 4px; background: transparent; color: var(--cx-secondary); font-size: 12px; font-weight: 700; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action { min-height: 132px; border-radius: 10px; border: 1px solid var(--cx-border); padding: 16px; color: var(--cx-text); text-align: left; position: relative; overflow: hidden; }
.quick-action::after { content:""; width: 84px; height: 84px; border-radius: 50%; position: absolute; right: -27px; bottom: -30px; background: rgba(255,255,255,.04); }
.quick-action.in { background: linear-gradient(145deg, rgba(230,93,4,.25), var(--cx-surface-1) 65%); border-color: rgba(230,93,4,.35); }
.quick-action.out { background: linear-gradient(145deg, rgba(59,130,214,.18), var(--cx-surface-1) 65%); border-color: rgba(59,130,214,.28); }
.quick-action .action-icon { width: 39px; height: 39px; border-radius: 7px; display: grid; place-items: center; margin-bottom: 14px; }
.quick-action.in .action-icon { color: #ff9a52; background: rgba(230,93,4,.16); }
.quick-action.out .action-icon { color: #75acf0; background: rgba(59,130,214,.14); }
.quick-action strong { display: block; font: 700 15px "Montserrat"; }
.quick-action span { display: block; margin-top: 5px; font-size: 11px; color: var(--cx-secondary); }

.kpi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--cx-border); border-radius: 8px; overflow: hidden; background: var(--cx-border); }
.kpi { background: var(--cx-surface-1); padding: 13px 10px; min-width: 0; }
.kpi-label { color: var(--cx-secondary); font-size: 9px; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font: 700 16px/1.25 "Montserrat"; margin-top: 6px; }
.kpi-unit { color: var(--cx-secondary); font-size: 9px; margin-left: 2px; }
.kpi.good .kpi-value { color: #65c78b; }
.kpi.warn .kpi-value { color: #f0bd49; }

.card { background: var(--cx-surface-1); border: 1px solid var(--cx-border); border-radius: 8px; }
.task-card { width: 100%; color: var(--cx-text); text-align: left; padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--cx-border); background: var(--cx-surface-1); border-radius: 8px; margin-bottom: 8px; }
.task-icon { width: 39px; height: 39px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center; background: var(--cx-surface-2); color: var(--cx-secondary); }
.task-icon.orange { background: rgba(230,93,4,.12); color: #fb9852; }
.task-icon.blue { background: rgba(59,130,214,.12); color: #6da7ec; }
.task-main { min-width: 0; flex: 1; }
.task-title { font: 600 13px "Montserrat"; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { color: var(--cx-secondary); font-size: 11px; margin-top: 5px; display: flex; gap: 7px; flex-wrap: wrap; }
.task-chevron { color: var(--cx-muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 7px; font-size: 9px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .45px; white-space: nowrap; }
.badge.orange { color: #ffa466; background: rgba(230,93,4,.14); }
.badge.blue { color: #83b7f5; background: rgba(59,130,214,.14); }
.badge.green { color: #69ce91; background: rgba(46,158,91,.14); }
.badge.yellow { color: #f0c454; background: rgba(230,168,23,.14); }
.badge.red { color: #ee7979; background: rgba(214,59,59,.14); }
.badge.gray { color: #b5b5b5; background: rgba(255,255,255,.07); }

.bottom-nav { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--cx-border); background: rgba(30,30,30,.97); backdrop-filter: blur(16px); padding-bottom: var(--safe-bottom); }
.nav-inner { width: min(100%, 760px); margin: auto; height: 68px; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav-item { border: 0; background: transparent; color: var(--cx-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; font-size: 9px; font-weight: 700; }
.nav-item.active { color: var(--cx-orange-flame); }
.nav-item .icon { width: 21px; height: 21px; }

.steps { display: grid; grid-template-columns: repeat(var(--step-count, 4), 1fr); gap: 5px; margin: 2px 0 20px; }
.step { height: 4px; border-radius: 9px; background: var(--cx-surface-3); }
.step.done { background: var(--cx-orange); }
.step.active { background: var(--cx-orange-flame); box-shadow: 0 0 0 1px rgba(244,140,6,.2); }
.step-caption { display: flex; justify-content: space-between; gap: 8px; color: var(--cx-secondary); font-size: 11px; margin: -9px 0 18px; }
.step-caption strong { color: var(--cx-text); font-family: "Montserrat"; }

.form-card { padding: 15px; margin-bottom: 10px; }
.form-title { font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.form-title .icon { color: var(--cx-orange-flame); }
.weigh-progress { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: start; margin: 2px 0 17px; }
.weigh-progress-step { width: 72px; text-align: center; color: var(--cx-muted); }
.weigh-progress-step > span { width: 25px; height: 25px; margin: 0 auto 6px; border-radius: 50%; background: var(--cx-surface-3); color: var(--cx-secondary); display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.weigh-progress-step strong { display: block; color: var(--cx-secondary); font-size: 9px; line-height: 1.2; }
.weigh-progress-step small { display: block; margin-top: 3px; font-size: 8px; }
.weigh-progress-step.done > span { background: rgba(46,158,91,.17); color: #69ce91; }
.weigh-progress-step.done strong { color: #9edbb5; }
.weigh-progress-step.active > span { background: var(--cx-orange); color: white; }
.weigh-progress-step.active strong { color: var(--cx-text); }
.weigh-progress-line { height: 2px; background: var(--cx-surface-3); margin-top: 12px; }
.weigh-progress-line.done { background: var(--cx-success); }
.weigh-event { border: 1px solid var(--cx-border); background: rgba(255,255,255,.025); border-radius: 7px; padding: 12px; margin-bottom: 9px; }
.weigh-event-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; }
.weigh-event-number { width: 23px; height: 23px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(230,93,4,.14); color: var(--cx-orange-flame); font: 700 10px "Montserrat"; }
.weigh-event-head > div { min-width: 0; flex: 1; }
.weigh-event-head strong { display: block; font-size: 11px; line-height: 1.25; }
.weigh-event-head small { display: block; color: var(--cx-secondary); margin-top: 4px; font-size: 9px; line-height: 1.35; }
.weigh-event .field { margin-bottom: 0; }
.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; color: #d0d0d0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .68px; margin: 0 0 7px; }
.field-label small { color: var(--cx-muted); font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.field input, .field select, .field textarea, .scan-input { appearance: none; width: 100%; border: 1px solid var(--cx-border-strong); color: var(--cx-text); background: var(--cx-surface-2); border-radius: 6px; min-height: 46px; padding: 11px 12px; font-size: 14px; }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.field select { background-image: linear-gradient(45deg,transparent 50%,#888 50%),linear-gradient(135deg,#888 50%,transparent 50%); background-position: calc(100% - 17px) 20px,calc(100% - 12px) 20px; background-size:5px 5px,5px 5px;background-repeat:no-repeat; padding-right: 34px; }
.field input::placeholder, .field textarea::placeholder { color: #6d6d6d; }
.field-hint { display: block; color: var(--cx-secondary); font-size: 10px; line-height: 1.35; margin-top: 6px; }
.field-error { color: #f47777; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-prefix { position: relative; }
.field-prefix input { padding-right: 42px; }
.field-prefix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--cx-secondary); font-size: 11px; pointer-events: none; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { min-height: 55px; border: 1px solid var(--cx-border-strong); background: var(--cx-surface-2); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; justify-content: center; color: var(--cx-secondary); font-size: 11px; line-height: 1.2; }
.choice span strong { color: var(--cx-text); font-size: 11px; }
.choice input:checked + span { border-color: var(--cx-orange); background: rgba(230,93,4,.1); color: #f3b184; box-shadow: inset 0 0 0 1px rgba(230,93,4,.2); }

.toggle-row { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--cx-border); padding: 10px 0; }
.toggle-row:first-child { border-top: 0; padding-top: 0; }
.toggle-copy strong { display: block; font-size: 12px; }
.toggle-copy small { display: block; color: var(--cx-secondary); margin-top: 4px; font-size: 10px; line-height: 1.3; }
.switch { width: 42px; height: 24px; flex: 0 0 auto; position: relative; }
.switch input { opacity: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: var(--cx-surface-3); transition: .2s; }
.switch span::after { content:""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #aaa; transition: .2s; }
.switch input:checked + span { background: var(--cx-orange); }
.switch input:checked + span::after { transform: translateX(18px); background: white; }

.sticky-actions { position: sticky; z-index: 15; bottom: calc(68px + var(--safe-bottom)); margin: 20px -16px -28px; padding: 11px 16px; background: rgba(26,26,26,.96); border-top: 1px solid var(--cx-border); backdrop-filter: blur(12px); display: grid; grid-template-columns: auto 1fr; gap: 9px; }
.sticky-actions.single { grid-template-columns: 1fr; }
.btn { min-height: 46px; border: 1px solid transparent; border-radius: 6px; padding: 10px 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; }
.btn-primary { background: var(--cx-orange); color: #fff; }
.btn-primary:active { background: #c95003; }
.btn-secondary { background: var(--cx-surface-2); color: var(--cx-text); border-color: var(--cx-border-strong); }
.btn-ghost { background: transparent; color: var(--cx-secondary); border-color: var(--cx-border); }
.btn-danger { background: rgba(214,59,59,.12); color: #f27c7c; border-color: rgba(214,59,59,.3); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: 10px; }

.summary-list { padding: 4px 14px; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--cx-border); }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--cx-secondary); font-size: 11px; }
.summary-row strong { text-align: right; font-size: 12px; max-width: 60%; }
.total-box { border: 1px solid rgba(230,93,4,.28); background: rgba(230,93,4,.08); border-radius: 8px; padding: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 0; }
.total-box span { color: #eeb185; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.total-box strong { font: 700 20px "Roboto Mono"; }
.total-box small { font-size: 10px; color: var(--cx-secondary); }

.unit-card { padding: 12px; margin-bottom: 8px; display: flex; gap: 11px; align-items: flex-start; }
.unit-select { width: 21px; height: 21px; accent-color: var(--cx-orange); margin: 2px 0 0; flex: 0 0 auto; }
.unit-main { min-width: 0; flex: 1; }
.unit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.unit-code { color: var(--cx-orange-flame); font: 600 11px "Roboto Mono"; }
.unit-material { margin-top: 6px; font: 600 12px "Montserrat"; line-height: 1.3; }
.unit-meta { display: flex; flex-wrap: wrap; gap: 7px 10px; color: var(--cx-secondary); font-size: 10px; margin-top: 7px; }
.unit-actions { display: flex; gap: 6px; margin-top: 10px; }

.search-box { display: flex; gap: 8px; margin-bottom: 13px; }
.search-wrap { position: relative; flex: 1; }
.search-wrap .icon { position: absolute; left: 12px; top: 13px; color: var(--cx-muted); }
.search-wrap input { width: 100%; min-height: 44px; border: 1px solid var(--cx-border-strong); border-radius: 6px; background: var(--cx-surface-1); color: var(--cx-text); padding: 10px 10px 10px 39px; }
.filter-button { width: 44px; border: 1px solid var(--cx-border-strong); border-radius: 6px; background: var(--cx-surface-1); color: var(--cx-secondary); display: grid; place-items: center; }
.filter-button.active { color: var(--cx-orange-flame); border-color: var(--cx-orange); }

.scan-hero { border: 1px solid rgba(230,93,4,.25); background: radial-gradient(circle at 50% 30%, rgba(230,93,4,.16), transparent 55%), var(--cx-surface-1); border-radius: 10px; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; overflow: hidden; position: relative; }
.scan-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-shade { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.scan-frame { width: 180px; height: 126px; position: relative; z-index: 2; margin-bottom: 18px; }
.scan-frame::before, .scan-frame::after, .scan-frame span::before, .scan-frame span::after { content:""; position:absolute; width: 29px; height: 29px; border-color: var(--cx-orange-flame); border-style: solid; }
.scan-frame::before { left:0; top:0; border-width:3px 0 0 3px; }
.scan-frame::after { right:0; top:0; border-width:3px 3px 0 0; }
.scan-frame span::before { left:0; bottom:0; border-width:0 0 3px 3px; }
.scan-frame span::after { right:0; bottom:0; border-width:0 3px 3px 0; }
.scan-line { position: absolute; left: 7px; right: 7px; top: 50%; height: 1px; background: var(--cx-orange-flame); box-shadow: 0 0 8px var(--cx-orange); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(-44px); opacity:.35 } 50% { transform: translateY(44px); opacity:1 } }
.scan-copy { position: relative; z-index: 2; }
.scan-copy h2 { font-size: 15px; }
.scan-copy p { color: var(--cx-secondary); font-size: 11px; line-height: 1.4; margin: 7px auto 14px; max-width: 280px; }
.scan-copy .btn { min-height: 40px; }
.manual-scan { margin-top: 11px; display: flex; gap: 8px; }
.manual-scan .scan-input { min-width: 0; flex: 1; min-height: 44px; }
.manual-scan .btn { min-height: 44px; flex: 0 0 auto; }

.camera-error { color: #f0c454; font-size: 11px; margin-top: 8px; }

.success-panel { text-align: center; padding: 25px 16px; }
.success-icon { width: 65px; height: 65px; border-radius: 50%; background: rgba(46,158,91,.13); color: #64cd8d; display: grid; place-items: center; margin: 0 auto 15px; }
.success-icon .icon { width: 34px; height: 34px; stroke-width: 2.5; }
.success-panel h2 { font-size: 19px; }
.success-panel p { color: var(--cx-secondary); font-size: 12px; line-height: 1.5; margin: 8px auto 0; max-width: 340px; }
.folio { color: var(--cx-orange-flame); font: 600 15px "Roboto Mono"; margin-top: 11px; }

.print-job { padding: 13px; display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.print-icon { width: 39px; height: 39px; border-radius: 6px; display: grid; place-items: center; background: var(--cx-surface-2); color: var(--cx-secondary); flex: 0 0 auto; }
.print-main { flex: 1; min-width: 0; }
.print-main strong { font-size: 12px; display: block; }
.print-main small { color: var(--cx-secondary); display: block; margin-top: 4px; font-size: 10px; }

.feedback-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.feedback-type { border: 1px solid var(--cx-border); background: var(--cx-surface-1); color: var(--cx-secondary); border-radius: 8px; min-height: 77px; padding: 11px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left; }
.feedback-type .icon { width: 23px; height: 23px; }
.feedback-type strong { color: var(--cx-text); font-size: 11px; }
.feedback-type.missing .icon { color: #72aaf0; }
.feedback-type.extra .icon { color: #f1c354; }
.feedback-type.confusing .icon { color: #ed7c7c; }
.feedback-type.idea .icon { color: #6dcc93; }
.finding-card { padding: 13px; margin-bottom: 8px; }
.finding-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.finding-head time { color: var(--cx-muted); font-size: 9px; }
.finding-card p { font-size: 12px; line-height: 1.45; margin-top: 9px; }
.finding-card small { color: var(--cx-secondary); font-size: 10px; margin-top: 8px; display: block; }

.empty { text-align: center; padding: 32px 20px; color: var(--cx-secondary); }
.empty .icon { width: 34px; height: 34px; color: var(--cx-muted); margin-bottom: 10px; }
.empty h3 { color: var(--cx-text); font-size: 13px; }
.empty p { font-size: 11px; line-height: 1.4; margin-top: 6px; }

.more-list { overflow: hidden; }
.more-row { width: 100%; border: 0; border-bottom: 1px solid var(--cx-border); background: transparent; color: var(--cx-text); min-height: 54px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 13px; }
.more-row:last-child { border-bottom: 0; }
.more-row .icon:first-child { color: var(--cx-secondary); }
.more-row span { flex: 1; font-size: 12px; }
.more-row small { color: var(--cx-secondary); font-size: 10px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: flex-end; justify-content: center; padding-top: var(--safe-top); }
.modal { width: min(100%, 620px); max-height: 92dvh; background: var(--cx-surface-1); border: 1px solid var(--cx-border-strong); border-radius: 14px 14px 0 0; overflow: auto; box-shadow: 0 -20px 60px rgba(0,0,0,.35); }
.modal-handle { width: 39px; height: 4px; border-radius: 5px; background: var(--cx-surface-3); margin: 8px auto 3px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--cx-border); position: sticky; top: 0; background: rgba(36,36,36,.97); z-index: 2; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head h2 { font-size: 16px; }
.modal-head p { color: var(--cx-secondary); font-size: 11px; margin-top: 5px; }
.modal-content { padding: 16px; }
.modal-actions { position: sticky; bottom: 0; padding: 11px 16px calc(11px + var(--safe-bottom)); border-top: 1px solid var(--cx-border); background: rgba(36,36,36,.98); display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.label-sheet { background: white; color: #111; width: 100%; max-width: 440px; aspect-ratio: 4/3; margin: 0 auto; padding: 16px; border-radius: 3px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr 42px auto; gap: 7px 12px; }
.label-brand { font: 800 18px "Montserrat"; }
.label-brand span { color: #d95300; }
.label-kind { text-align: right; font: 700 8px "Montserrat"; text-transform: uppercase; letter-spacing: .7px; align-self: center; }
.label-material { grid-column: 1/2; font: 800 16px/1.15 "Montserrat"; border-top: 2px solid #111; padding-top: 7px; }
.label-weight { font: 800 15px "Roboto Mono"; text-align: right; border-top: 2px solid #111; padding-top: 7px; }
.label-weight small { display: block; margin-bottom: 3px; font: 700 6px "Montserrat"; letter-spacing: .35px; }
.label-weight span { display: block; }
.label-data { grid-column: 1/3; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; font-size: 8px; }
.label-data b { display:block; font-size: 10px; margin-top: 1px; }
.code-demo { grid-row: 4; grid-column: 1/3; display: flex; padding: 3px 5px; border: 1px solid #111; justify-content: center; align-items: stretch; overflow: hidden; }
.code-demo i { display: block; flex: 0 0 var(--w,1px); background:#111; }
.code-demo i.gap { background: transparent; }
.label-id { border-top: 1px solid #111; padding-top: 5px; font: 700 9px "Roboto Mono"; }
.label-demo { text-align: right; font-size: 7px; font-weight: 700; color: #777; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(84px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px); width: calc(100% - 32px); max-width: 500px; padding: 12px 14px; border-radius: 7px; background: #f0f0f0; color: #202020; box-shadow: 0 12px 35px rgba(0,0,0,.35); display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; opacity: 0; animation: toast-in .25s forwards; pointer-events: none; }
.toast .icon { color: #21864a; flex:0 0 auto; }
@keyframes toast-in { to { opacity:1; transform:translateX(-50%) translateY(0); } }

.insight-callout { border-left: 3px solid var(--cx-info); background: rgba(59,130,214,.09); border-radius: 0 6px 6px 0; padding: 11px 12px; color: #b9d6f8; font-size: 11px; line-height: 1.45; }
.insight-callout.orange { border-color: var(--cx-orange); background: rgba(230,93,4,.09); color: #efbd9a; }
.separator { height: 1px; background: var(--cx-border); margin: 14px 0; }
.inline-info { display: flex; align-items: flex-start; gap: 8px; color: var(--cx-secondary); font-size: 10px; line-height: 1.4; }
.inline-info .icon { flex: 0 0 auto; }

@media (min-width: 640px) {
  .page { padding-left: 24px; padding-right: 24px; }
  .sticky-actions { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .quick-action { min-height: 145px; }
  .feedback-types { grid-template-columns: repeat(4, 1fr); }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 14px; max-height: 88dvh; }
}

@media print {
  body * { visibility: hidden !important; }
  .printable-label, .printable-label * { visibility: visible !important; }
  .printable-label { position: fixed; inset: 0; width: 100%; height: 100%; display: grid; place-items: center; background: white; }
  .printable-label .no-print, .printable-label .no-print * { display: none !important; visibility: hidden !important; }
  .printable-label .modal-content { padding: 0; width: 100%; }
  .printable-label #reprint-field { display: none !important; }
  .label-sheet { width: 100mm; height: 75mm; max-width: none; aspect-ratio: auto; }
  @page { size: 100mm 75mm; margin: 0; }
}

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