:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #172337;
  --muted: #748094;
  --line: #e5eaf1;
  --blue: #235ce9;
  --blue-dark: #184ac9;
  --blue-soft: #edf3ff;
  --green: #168467;
  --green-soft: #eaf7f1;
  --orange: #ac6a10;
  --orange-soft: #fff5e6;
  --red: #c54a49;
  --red-soft: #fff0ef;
  --radius: 14px;
  --shadow: 0 4px 20px rgb(24 40 72 / 3%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding: 100px 0 180px; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button, [role="button"], summary { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:not(:disabled), a, summary { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #86a8ff; outline-offset: 3px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.4; }
[hidden] { display: none !important; }
.icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.icon svg, svg.icon { width: 24px; height: 24px; }
.muted, .text-muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; }
.main-shell { grid-column: 2; min-width: 0; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 224px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); padding: 30px 18px 20px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 34px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { display: block; font-size: 23px; font-weight: 760; letter-spacing: 2px; line-height: 1.15; }
.brand-sub { display: block; color: var(--muted); font-size: 12px; letter-spacing: 1px; margin-top: 5px; }
.sidebar nav { display: grid; gap: 9px; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 52px; padding: 12px 16px; border: 0; background: transparent; border-radius: 10px; font-size: 15px; font-weight: 550; color: #657187; text-align: left; text-decoration: none; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item:hover { background: #f5f7fb; text-decoration: none; color: var(--text); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 680; }
.nav-item .nav-count { margin-left: auto; padding: 0 7px; border-radius: 6px; background: #dfe9ff; color: var(--blue); font-size: 12px; }
.sidebar-footer { margin-top: auto; padding: 20px 13px 2px; color: #8a94a5; font-size: 13px; }
.sidebar-footer .footer-label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-weight: 600; color: #68768a; }
.sidebar-footer p { margin: 0; line-height: 1.8; }
.topbar { height: 80px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 90%); }
.breadcrumb { color: #8a94a5; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.breadcrumb strong { color: #445168; font-weight: 550; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.identity-select { min-height: 44px; max-width: 220px; padding: 8px 34px 8px 12px; color: #4d5d74; font-size: 14px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23748094' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px !important; }
.prototype-badge { padding: 4px 9px; font-size: 12px; font-weight: 600; color: #64748b; background: #f1f4f8; border: 1px solid #e7ebf1; border-radius: 6px; white-space: nowrap; }
.page-container { max-width: 1192px; padding: 30px 36px 50px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { font-size: 28px; letter-spacing: -.6px; font-weight: 720; margin: 0 0 7px; }
.page-heading p { margin: 0; font-size: 14px; color: var(--muted); }
.eyebrow { color: #8b97aa; font-size: 11px; letter-spacing: 1.8px; font-weight: 650; margin-bottom: 7px; }
.heading-actions { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.receive-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 24px; }
.receive-form { min-width: 0; }
.context-panel { display: grid; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-header { display: flex; align-items: center; gap: 12px; padding: 22px 24px 0; }
.card-header > :last-child:not(.btn) { min-width: 0; }
.section-icon, .step-number { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.section-icon svg { width: 20px; height: 20px; }
.step-number { font-size: 14px; font-weight: 700; }
.card-title { margin: 0; font-size: 17px; font-weight: 680; }
.card-desc { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 22px 24px 24px; }
.card-header + .card-body { padding-top: 20px; }
.card .card { box-shadow: none; }
.context-panel .card { margin: 0; }
.context-panel .card-header { padding: 20px 20px 0; }
.context-panel .card-body { padding: 17px 20px 20px; }
.context-panel .card-title { font-size: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; background: #fff; font-size: 15px; line-height: 1.5; font-weight: 600; text-align: center; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:not(:disabled):hover { background: var(--blue-dark); border-color: var(--blue-dark); box-shadow: 0 3px 10px rgb(35 92 233 / 15%); }
.btn-secondary { border-color: #dce3ee; color: #43516a; background: #fff; }
.btn-secondary:not(:disabled):hover { background: #f7f9fc; border-color: #b9c8e0; }
.btn-ghost { border-color: transparent; background: transparent; color: #6d7b90; }
.btn-ghost:not(:disabled):hover { background: #f0f4fa; color: var(--blue); }
.btn-danger { background: var(--red-soft); border-color: #f7d8d6; color: #b54340; }
.btn-danger:not(:disabled):hover { background: #ffe4e2; border-color: #efc0bd; }
.btn-success { color: #fff; background: var(--green); border-color: var(--green); }
.btn-success:not(:disabled):hover { background: #106d55; border-color: #106d55; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; padding: 14px 22px; font-size: 16px; }
.btn-sm { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.capture-primary { width: 100%; display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 88px; padding: 18px 24px; border: 1px solid var(--blue); border-radius: 12px; background: var(--blue); color: white; font-size: 19px; font-weight: 650; text-align: left; }
.capture-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.capture-primary svg { width: 30px; height: 30px; }
.capture-primary small { display: block; color: #cfddff; font-size: 13px; font-weight: 400; margin-top: 2px; }
.capture-secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.capture-secondary { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 58px; padding: 12px 14px; border: 1px solid #dfe6f0; border-radius: 10px; background: #fff; color: #4b5c76; font-weight: 550; font-size: 15px; }
.capture-secondary:hover { background: #f6f9ff; border-color: #b4c7ed; color: var(--blue); }
.capture-secondary svg { width: 21px; height: 21px; }
.capture-hint { margin: 12px 0 0; text-align: center; font-size: 12px; color: #8994a7; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .field-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; color: #4c5c73; }
.field input, .field select, .field textarea, .search-input, input.text-input { width: 100%; min-width: 0; min-height: 52px; border: 1px solid #dfe5ee; border-radius: 9px; padding: 12px 14px; color: var(--text); background-color: #fff; font-size: 16px; line-height: 1.5; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #a3adbd; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { outline: none; border-color: #7398f3; box-shadow: 0 0 0 3px rgb(35 92 233 / 8%); }
.field input[readonly] { background: #f6f8fb; color: #6f7c91; }
.field-full { grid-column: 1 / -1; }
.optional { font-size: 12px; font-weight: 400; color: #98a2b1; }
.required { color: var(--red); }
.field-help { font-size: 12px; color: #8b96a7; margin: 0; }
.field-error { color: var(--red); font-size: 13px; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.reason-box { padding: 16px; background: #fff8ee; border: 1px solid #f6e4c7; border-radius: 10px; margin-top: 14px; }
.reason-box .field textarea { min-height: 80px; background: #fff; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 17px 0; }
.image-tile { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f6f8fb; }
.image-tile > img, .image-tile > button > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-tile > button:not(.image-remove) { width: 100%; padding: 0; border: 0; background: transparent; }
.image-remove { position: absolute; z-index: 2; top: 3px; right: 3px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; color: white; background: rgb(23 35 55 / 62%); }
.image-remove svg { width: 18px; height: 18px; }
.image-remove:hover { background: rgb(23 35 55 / 85%); }
.image-caption { font-size: 11px; padding: 6px 9px; color: #738099; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-grid.large { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.image-grid + .field-grid { margin-top: 18px; }
.image-preview { display: block; max-width: 100%; max-height: 76dvh; object-fit: contain; margin: auto; border-radius: 8px; }
.item-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 16px; }
.item-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.item-header h3 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 15px; font-weight: 650; }
.item-number { display: inline-flex; width: 25px; height: 25px; align-items: center; justify-content: center; background: #eff3f9; border-radius: 7px; color: #65768f; font-size: 12px; font-weight: 650; }
.quantity-control { display: inline-grid; grid-template-columns: 48px 58px 48px; width: max-content; border: 1px solid #dfe5ee; border-radius: 9px; overflow: hidden; height: 52px; }
.quantity-control button { border: none; background: #f8fafd; font-size: 23px; font-weight: 400; color: #5a6a84; min-height: 48px; }
.quantity-control button:hover { background: #eaf0fb; color: var(--blue); }
.quantity-control input { padding: 0; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 50px; border-radius: 0; appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.condition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.condition-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 13px 7px; min-height: 88px; background: #fff; border: 1px solid #dfe5ee; border-radius: 10px; font-size: 14px; font-weight: 550; color: #6e7c91; text-align: center; cursor: pointer; }
.condition-option svg { width: 23px; height: 23px; }
.condition-option:hover { background: #f8fafd; border-color: #bcc9dc; }
.condition-option.selected { box-shadow: inset 0 0 0 1px currentColor; }
.condition-option.selected.resell, .condition-option.resell:has(input:checked) { color: #168467; border-color: #32a485; background: var(--green-soft); }
.condition-option.selected.damage, .condition-option.damage:has(input:checked) { color: #a96a14; border-color: #dba349; background: var(--orange-soft); }
.condition-option.selected.reject, .condition-option.reject:has(input:checked) { color: #bd4a48; border-color: #dd7874; background: var(--red-soft); }
.condition-option input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.condition-option:has(input:focus-visible) { outline: 3px solid #86a8ff; outline-offset: 3px; }
.condition-option .check-mark { position: absolute; top: 6px; right: 7px; font-size: 12px; }
.add-item { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; border: 1px dashed #b8c8e2; background: #f9fbff; color: var(--blue); border-radius: 10px; font-size: 15px; font-weight: 550; }
.add-item:hover { background: var(--blue-soft); border-color: #7c9fe6; }
.add-item svg { width: 20px; height: 20px; }
details.more-fields { border-top: 1px solid var(--line); margin-top: 22px; }
details.more-fields > summary { min-height: 55px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #75839a; cursor: pointer; list-style: none; }
details.more-fields > summary::-webkit-details-marker { display: none; }
details.more-fields > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-left: auto; margin-right: 4px; margin-top: -4px; }
details.more-fields[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
details.more-fields[open] > .field-grid { padding-bottom: 6px; }
.save-bar { position: sticky; z-index: 25; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 2px; padding: 17px 0 12px; background: rgb(244 246 249 / 96%); backdrop-filter: blur(10px); }
.save-bar .save-status { color: #8b97a9; font-size: 12px; }
.save-bar .save-actions { display: flex; gap: 10px; }
.save-bar > .btn { flex: 1; }
.save-bar .btn-primary { min-width: 190px; }
.mobile-nav { display: none; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; }
.summary-row > :first-child { color: #8290a5; }
.summary-row > :last-child { text-align: right; color: #4c5c73; font-weight: 500; }
.summary-row + .summary-row { border-top: 1px solid #f0f3f7; }
.tip-list { list-style: none; margin: 0; padding: 0; color: #7b899e; font-size: 13px; }
.tip-list li { display: flex; gap: 9px; margin: 0 0 13px; }
.tip-list li:last-child { margin-bottom: 0; }
.tip-list li::before { content: ""; flex-shrink: 0; width: 4px; height: 4px; border-radius: 50%; background: #b7c5dc; margin-top: 9px; }
.recent-mini { display: flex; gap: 10px; padding: 13px 0; align-items: center; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.recent-mini:last-child { border: 0; padding-bottom: 0; }
.recent-mini .mini-image { display: flex; align-items: center; justify-content: center; width: 39px; height: 43px; background: #f1f5fb; color: #7d91b2; border-radius: 8px; flex-shrink: 0; }
.recent-mini p { margin: 0; font-size: 13px; font-weight: 550; }
.recent-mini small { font-size: 11px; color: #97a1b1; }
.recent-mini > .badge { margin-left: auto; }
.empty-mini { padding: 12px 0; font-size: 13px; color: #98a2b2; }
.notice, .duplicate-alert { display: flex; align-items: flex-start; gap: 10px; border-radius: 9px; padding: 12px 14px; font-size: 13px; margin: 14px 0; line-height: 1.65; }
.notice svg, .duplicate-alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.notice p, .duplicate-alert p { margin: 0; }
.notice-warning, .duplicate-alert { background: #fff7e9; border: 1px solid #f5e6cb; color: #9c742d; }
.notice-info { background: #f0f5ff; border: 1px solid #e0eaff; color: #6380af; }
.notice-success { background: var(--green-soft); border: 1px solid #d3eddf; color: var(--green); }
.duplicate-alert { display: block; }
.duplicate-alert .btn { margin: 8px 6px 0 0; min-height: 40px; padding: 7px 12px; font-size: 13px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 9px; border-radius: 6px; font-size: 12px; line-height: 1.5; font-weight: 550; white-space: nowrap; }
.tone-green { color: #168467; background: #eaf7f1; }
.tone-blue { color: #3970d1; background: #edf3ff; }
.tone-orange { color: #ad782d; background: #fff3df; }
.tone-red { color: #c05d58; background: #fff0ef; }
.tone-gray { color: #7c889a; background: #f0f3f7; }
.tone-purple { color: #8d68bf; background: #f2edfa; }

.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 23px 6px; margin-bottom: 24px; }
.stat-item { padding: 0 24px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-value { display: block; color: #263650; font-size: 29px; line-height: 1.2; font-weight: 680; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat-label { display: block; color: #8a96a8; font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 20px; }
.toolbar .search-input { flex: 1; min-width: 220px; max-width: 370px; min-height: 48px; padding-left: 15px; font-size: 14px; background: #fff; }
.search-wrap { position: relative; min-width: 220px; flex: 1; max-width: 370px; }
.search-wrap .search-input { padding-left: 44px; max-width: none; }
.search-wrap > svg { position: absolute; top: 15px; left: 15px; width: 19px; height: 19px; color: #9aa6b8; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; background: transparent; border-radius: 8px; font-size: 14px; color: #78869b; }
.filter-chip:hover { background: #eaf0fa; color: var(--blue); }
.filter-chip.active { color: var(--blue); font-weight: 600; border-color: #d8e3fc; background: #fff; }
.filter-chip small { color: inherit; font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.record-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; white-space: nowrap; }
.record-table th { padding: 15px 18px; font-size: 12px; font-weight: 550; color: #8a96a8; background: #fafbfe; border-bottom: 1px solid var(--line); }
.record-table td { padding: 19px 18px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.record-table tbody tr:last-child td { border-bottom: 0; }
.record-table tbody tr:hover { background: #fbfcff; }
.record-table .record-title { margin: 0 0 3px; font-size: 14px; font-weight: 600; color: #3e506a; }
.record-table .record-sub { display: block; font-size: 11px; color: #9aa5b5; }
.record-table .btn { padding: 8px 9px; min-height: 40px; font-size: 13px; }
.record-table .record-thumbnail { width: 42px; height: 46px; object-fit: cover; border-radius: 7px; vertical-align: middle; margin-right: 9px; background: #f0f4fa; }
.record-row { cursor: pointer; }
.record-card-list { display: none; }
.record-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 12px; }
.record-card .record-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.record-card h3 { font-size: 15px; font-weight: 650; margin: 0 0 3px; overflow-wrap: anywhere; }
.record-card small { color: #98a3b4; font-size: 12px; }
.record-card .record-card-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; color: #7c8ba0; font-size: 13px; }
.record-card .record-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #f0f3f7; margin-top: 14px; padding-top: 12px; }
.record-card .record-card-bottom .btn { min-height: 40px; padding: 7px 11px; font-size: 13px; }
.record-card .record-description { color: #66768e; font-size: 14px; margin: 0 0 10px; }
.record-card.merged { opacity: .72; }
.record-checkbox { width: 20px; height: 20px; accent-color: var(--blue); cursor: pointer; }
.record-selection { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 12px; border-radius: 10px; background: var(--blue-soft); color: #486aa8; font-size: 14px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(21 33 54 / 42%); backdrop-filter: blur(3px); }
.modal { width: min(560px, 100%); max-height: min(90dvh, 960px); display: flex; flex-direction: column; background: #fff; border-radius: 17px; box-shadow: 0 18px 70px rgb(12 27 55 / 18%); overflow: hidden; }
.modal-wide { width: min(940px, 100%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 19px; font-weight: 680; }
.modal-header .btn { padding: 8px; width: 44px; min-height: 44px; margin: -6px -9px -6px 0; }
.modal-body { padding: 24px; overflow: auto; overscroll-behavior: contain; min-height: 0; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 17px 24px; border-top: 1px solid var(--line); background: #fbfcfe; }
.modal-footer .btn { min-height: 48px; }
.modal-body > :first-child { margin-top: 0; }
.modal-body > :last-child { margin-bottom: 0; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .68fr); gap: 24px; }
.detail-section { margin-bottom: 24px; min-width: 0; }
.detail-section > h3 { margin: 0 0 13px; font-size: 15px; font-weight: 650; color: #53637a; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 14px; }
.detail-meta dt { color: #96a1b2; font-size: 12px; margin-bottom: 3px; }
.detail-meta dd { margin: 0; color: #51627b; overflow-wrap: anywhere; }
.detail-meta > div { min-width: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item { position: relative; padding: 0 0 22px 21px; margin: 0; border-left: 1px solid #e3eaf5; color: #71819a; font-size: 13px; }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #c6d3e9; box-shadow: 0 0 0 4px #fff; }
.timeline-item:first-child::before { background: #688fe9; }
.timeline-item strong { color: #536780; font-weight: 550; }
.timeline-item p { margin: 3px 0 0; }
.timeline-item time, .timeline-item small { display: block; color: #a0aabc; font-size: 11px; margin-top: 3px; }
.item-line { padding: 16px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.item-line h4 { font-size: 15px; font-weight: 600; margin: 0 0 7px; }
.item-line p { font-size: 13px; color: #8290a5; margin: 6px 0; }
.item-line .image-grid { margin: 12px 0; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.item-line .badge { margin: 0 4px 4px 0; }
.action-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.action-grid .btn { min-height: 43px; padding: 8px 13px; font-size: 13px; }
.toast { position: fixed; z-index: 200; top: 28px; left: 50%; transform: translate(-50%, -15px); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 14px 22px; color: #fff; border-radius: 12px; background: #24344f; box-shadow: 0 8px 30px rgb(22 38 67 / 20%); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #a94442; }
.toast svg { width: 21px; height: 21px; }
.empty-state { padding: 64px 24px; text-align: center; border: 1px dashed #dbe3f0; border-radius: 12px; color: #91a0b5; background: rgb(255 255 255 / 70%); }
.empty-state > svg { width: 45px; height: 45px; color: #becce0; margin-bottom: 14px; }
.empty-state h3 { color: #6b7e99; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }
.preview-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding: 10px 14px; border: 1px solid #e4eaf3; border-radius: 9px; color: #8c99ac; background: #eef2f8; font-size: 12px; }
.preview-notice p { margin: 0; }
.preview-notice button { min-height: 36px; font-size: 12px; padding: 5px 9px; white-space: nowrap; }
.scan-video { display: block; width: 100%; min-height: 260px; max-height: 60dvh; border-radius: 12px; background: #152139; object-fit: cover; }
.scan-container { position: relative; overflow: hidden; border-radius: 12px; }
.scan-overlay { position: absolute; left: 10%; right: 10%; top: 28%; bottom: 28%; border: 2px solid rgb(255 255 255 / 80%); border-radius: 12px; box-shadow: 0 0 0 200px rgb(0 0 0 / 22%); pointer-events: none; }
.scan-overlay::after { content: ""; position: absolute; top: 50%; left: 5%; right: 5%; height: 2px; background: #5ee1b1; box-shadow: 0 0 8px #5ee1b1; }
.scan-help { font-size: 13px; text-align: center; color: #8797ad; margin-top: 13px; }
.progress-line { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: #7487a6; font-size: 12px; }
.progress-line progress { flex: 1; max-width: 170px; height: 5px; appearance: none; border: none; border-radius: 5px; overflow: hidden; background: #e8eef8; }
.progress-line progress::-webkit-progress-bar { background: #e8eef8; }
.progress-line progress::-webkit-progress-value { background: #6792f2; border-radius: 5px; }
.progress-line progress::-moz-progress-bar { background: #6792f2; }
.merge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.merge-choice, .merge-item { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fafcff; min-width: 0; }
.merge-choice h3, .merge-item h4 { font-size: 14px; font-weight: 600; margin: 0 0 9px; }
.merge-choice p, .merge-item p { color: #8090a7; font-size: 13px; margin: 4px 0; overflow-wrap: anywhere; }
.merge-choice.selected { border-color: #85a6ee; background: var(--blue-soft); }
.merge-choice label { display: flex; align-items: center; gap: 9px; min-height: 48px; cursor: pointer; font-size: 14px; }
.merge-choice input[type="radio"] { width: 19px; height: 19px; accent-color: var(--blue); }
.merge-item { margin-top: 12px; background: #fff; }
.merge-item select { width: 100%; min-height: 48px; padding: 10px 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background-color: #fff; font-size: 14px; color: #5a6c88; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: #8493a9; font-size: 14px; }
.spinner { display: inline-block; flex-shrink: 0; width: 18px; height: 18px; border: 2px solid #d9e4f7; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1500px) {
  .page-container { padding-top: 36px; }
  .receive-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; }
}
@media (max-width: 1150px) and (min-width: 761px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { width: 192px; padding-left: 13px; padding-right: 13px; }
  .brand { padding-left: 8px; gap: 9px; }
  .brand-name { font-size: 21px; }
  .brand-sub { font-size: 10px; letter-spacing: .5px; }
  .topbar { padding: 0 25px; }
  .page-container { padding: 26px 25px 40px; }
  .receive-layout { grid-template-columns: minmax(0, 1fr); }
  .context-panel { display: none; }
  .toolbar { gap: 10px; }
  .filter-tabs { gap: 3px; }
  .filter-chip { padding: 8px 10px; }
  .stat-item { padding: 0 18px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 75px; scroll-padding-bottom: 220px; }
  body { font-size: 16px; }
  .app-shell { display: block; min-width: 0; }
  .main-shell { min-width: 0; width: 100%; }
  .sidebar { display: none; }
  .topbar { height: 64px; padding: 0 16px; gap: 10px; background: #fff; }
  .breadcrumb { font-size: 14px; gap: 8px; font-weight: 650; color: #22334f; }
  .breadcrumb > span:not(:last-child) { display: none; }
  .breadcrumb strong { color: #31476a; font-weight: 650; }
  .top-actions { gap: 7px; }
  .identity-select { max-width: 154px; font-size: 12px; min-height: 48px; padding-left: 9px; padding-right: 28px !important; background-position: right 7px center; }
  .prototype-badge { padding: 3px 6px; font-size: 10px; border-radius: 5px; }
  .page-container { padding: 22px 16px 210px; max-width: 100%; }
  .page-heading { gap: 12px; margin-bottom: 20px; align-items: center; }
  .page-heading h1 { font-size: 25px; margin-bottom: 6px; letter-spacing: -.5px; }
  .page-heading p { font-size: 13px; line-height: 1.6; }
  .eyebrow { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 5px; }
  .heading-actions { padding-top: 0; gap: 5px; flex-shrink: 0; }
  .heading-actions .btn { padding: 10px 11px; min-height: 48px; font-size: 13px; }
  .heading-actions .btn svg { width: 18px; height: 18px; }
  .receive-layout { display: block; }
  .context-panel { display: none; }
  .card { border-radius: 13px; margin-bottom: 16px; box-shadow: none; }
  .card-header { gap: 10px; padding: 18px 17px 0; }
  .card-title { font-size: 17px; }
  .card-desc { font-size: 12px; }
  .card-body { padding: 18px 17px; }
  .card-header + .card-body { padding-top: 18px; }
  .step-number, .section-icon { width: 34px; height: 34px; border-radius: 9px; }
  .capture-primary { min-height: 96px; padding: 18px 13px; font-size: 19px; gap: 12px; border-radius: 11px; }
  .capture-primary svg { width: 30px; height: 30px; }
  .capture-primary small { font-size: 12px; margin-top: 3px; }
  .capture-secondary-row { gap: 10px; margin-top: 10px; }
  .capture-secondary { min-height: 60px; padding: 12px 6px; gap: 7px; font-size: 15px; }
  .capture-secondary svg { width: 21px; height: 21px; }
  .capture-hint { font-size: 11px; line-height: 1.6; }
  .field-grid { gap: 16px 12px; }
  .field label, .field-label { font-size: 14px; }
  .field input, .field select, .field textarea, .search-input { font-size: 16px; min-height: 54px; padding: 13px 12px; }
  .field textarea { min-height: 96px; }
  .field-help { font-size: 11px; }
  .optional { font-size: 11px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
  .image-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-remove { width: 48px; height: 48px; top: 1px; right: 1px; }
  .image-caption { font-size: 10px; }
  .item-card { padding: 15px; margin-bottom: 14px; border-radius: 10px; }
  .item-header { margin-bottom: 14px; }
  .item-header h3 { font-size: 15px; }
  .item-header .btn { min-height: 48px; padding: 7px 8px; font-size: 12px; }
  .condition-grid { gap: 7px; }
  .condition-option { min-height: 100px; font-size: 13px; gap: 9px; padding: 13px 3px; border-radius: 9px; line-height: 1.5; overflow-wrap: anywhere; }
  .condition-option svg { width: 24px; height: 24px; }
  .reason-box { padding: 13px; }
  .add-item { min-height: 58px; }
  .quantity-control { grid-template-columns: 48px 54px 48px; height: 54px; }
  .quantity-control input { min-height: 52px; }
  details.more-fields { margin-top: 18px; }
  details.more-fields > summary { min-height: 58px; font-size: 14px; }
  .save-bar { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); margin: 0; box-shadow: 0 -3px 16px rgb(30 46 75 / 3%); }
  .save-bar .save-status { display: none; }
  .save-bar .save-actions { width: 100%; display: grid; grid-template-columns: 1fr 1.45fr; gap: 10px; }
  .save-bar .btn { min-height: 56px; padding: 14px 9px; font-size: 15px; border-radius: 10px; flex: 1; }
  .save-bar .btn-primary { min-width: 0; }
  .save-bar .btn svg { width: 18px; height: 18px; }
  .mobile-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(68px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid #edf0f5; }
  .mobile-nav .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px; min-height: 66px; height: 66px; border-radius: 0; font-size: 11px; font-weight: 500; color: #8b98ac; }
  .mobile-nav .nav-item svg { width: 22px; height: 22px; }
  .mobile-nav .nav-item.active { background: transparent; color: var(--blue); font-weight: 650; }
  .mobile-nav .nav-item:hover { background: #f7faff; }
  .mobile-nav .nav-count { display: none; }
  .notice, .duplicate-alert { padding: 11px 12px; font-size: 12px; }
  .badge { font-size: 11px; padding: 4px 7px; }
  .stats-strip { padding: 17px 0; margin-bottom: 19px; border-radius: 11px; }
  .stat-item { padding: 0 10px; text-align: center; }
  .stat-value { font-size: 23px; margin-bottom: 5px; }
  .stat-label { font-size: 11px; line-height: 1.5; }
  .toolbar { display: block; margin-bottom: 16px; }
  .toolbar .search-input, .toolbar .search-wrap { max-width: 100%; min-width: 0; width: 100%; }
  .toolbar .search-input { min-height: 52px; font-size: 15px; }
  .search-wrap > svg { top: 17px; }
  .filter-tabs { flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 13px -1px 0; padding: 0 1px 3px; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; min-height: 48px; padding: 10px 13px; font-size: 13px; }
  .table-wrap { display: none; }
  .record-card-list { display: block; }
  .record-card { border-radius: 11px; }
  .record-card .record-card-bottom .btn { min-height: 48px; padding: 10px 13px; }
  .record-selection { align-items: flex-start; flex-wrap: wrap; padding: 12px; font-size: 13px; }
  .record-selection .btn { min-height: 48px; font-size: 13px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 18px 18px 0 0; }
  .modal-header { padding: 18px 18px; gap: 8px; }
  .modal-header h2 { font-size: 18px; }
  .modal-header .btn { width: 48px; min-height: 48px; }
  .modal-body { padding: 20px 18px; }
  .modal-footer { padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 9px; }
  .modal-footer .btn { flex: 1; font-size: 15px; min-height: 54px; padding: 12px 10px; }
  .detail-layout { display: block; }
  .detail-section { margin-bottom: 25px; }
  .detail-meta { gap: 14px 12px; }
  .detail-meta dt { font-size: 12px; }
  .detail-meta dd { font-size: 14px; }
  .item-line { padding: 14px; }
  .item-line .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .action-grid .btn { min-height: 50px; font-size: 14px; padding: 10px 7px; }
  .toast { top: 78px; width: max-content; font-size: 13px; padding: 13px 16px; border-radius: 10px; }
  .preview-notice { padding: 9px 11px; font-size: 10px; margin-bottom: 18px; line-height: 1.65; }
  .preview-notice button { font-size: 10px; padding: 5px 7px; min-height: 48px; }
  .empty-state { padding: 45px 20px; }
  .merge-grid { grid-template-columns: 1fr; gap: 10px; }
  .merge-choice, .merge-item { padding: 14px; }
  .merge-item select { min-height: 52px; font-size: 16px; }
  .scan-video { min-height: 330px; max-height: 56dvh; }
}
@media (max-width: 374px) {
  .page-container { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .prototype-badge { display: none; }
  .identity-select { max-width: 145px; }
  .card-header { padding-left: 14px; padding-right: 14px; }
  .card-body { padding-left: 14px; padding-right: 14px; }
  .item-card { padding: 12px; }
  .condition-grid { gap: 5px; }
  .condition-option { font-size: 12px; }
  .capture-primary { font-size: 18px; }
  .capture-secondary { font-size: 14px; }
  .field-grid { gap: 14px 9px; }
  .save-bar { padding-left: 12px; padding-right: 12px; }
  .stat-item { padding: 0 7px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .save-bar, .heading-actions, .preview-notice, .toolbar, .modal-footer, .action-grid { display: none !important; }
  body, .main-shell { background: #fff; }
  .app-shell, .receive-layout, .detail-layout { display: block; }
  .page-container { padding: 0; max-width: 100%; }
  .card { box-shadow: none; break-inside: avoid; }
  .table-wrap { display: block; overflow: visible; }
  .record-card-list { display: none; }
}
@media (max-width: 760px) {
  .page-heading .eyebrow { display: none; }
  .page-heading > div:first-child { flex: 1 1 130px; }
  .page-heading p { display: none; }
  .page-heading { margin-bottom: 16px; align-items: center; }
  .page-heading h1 { margin: 0; }
  .quantity-line { gap: 8px; }
  .quantity-line .quantity-control { max-width: none; }
  .quantity-line .quantity-control input { width: 100%; min-width: 0; }
}

/* Components aligned with the live application markup. */
.mobile-brand { display: none; }
.sidebar-label { padding: 0 16px; margin: 2px 0 13px; font-size: 12px; color: #9aa5b5; letter-spacing: 1px; }
.sidebar .brand { color: var(--text); text-decoration: none; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar-footer { padding: 23px 10px 2px; border-top: 1px solid #edf1f6; }
.footer-symbol { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; margin-bottom: 12px; border-radius: 9px; background: #f1f6fd; color: #96a9c6; }
.footer-symbol svg { width: 19px; height: 19px; }
.sidebar-footer > strong { display: block; font-size: 13px; color: #61738d; font-weight: 600; margin-bottom: 5px; }
.sidebar-footer > p { font-size: 12px; color: #96a2b4; }
.sidebar-footer > .btn { justify-content: flex-start; padding: 9px 0; margin-top: 12px; color: #7d91af; font-size: 12px; }
.brand-sub span, .brand-sub .block, span.block { display: block; }
.identity-label { display: flex; align-items: center; min-width: 0; }
.identity-select { font-size: 14px; }
.preview-notice { display: block; width: 100%; padding: 10px 36px; margin: 0; border-radius: 0; border: 0; border-bottom: 1px solid #e4eaf3; background: #edf2fa; color: #7f91ac; font-size: 12px; }
.section-eyebrow { margin-bottom: 13px; font-size: 12px; letter-spacing: 1px; font-weight: 600; color: #95a2b5; }
.section-title { margin: 25px 0 13px; font-size: 15px; color: #4e6380; font-weight: 650; }
.subtle-divider { height: 1px; background: #eef1f6; margin: 22px 0; }
.card-header > .optional, .card-header > .badge { margin-left: auto; flex-shrink: 0; }
.capture-primary strong { display: block; font-size: inherit; font-weight: 650; }
.capture-secondary-row + .field { margin-top: 19px; }
.image-caption { display: block; }
.image-open { display: block; width: 100%; padding: 0; border: 0; background: #f2f5fa; border-radius: 9px; overflow: hidden; cursor: zoom-in; }
.image-open img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-tile .image-open { border-radius: 0; }
.full-image { display: block; max-width: 100%; max-height: 74dvh; width: auto; height: auto; object-fit: contain; margin: 0 auto 12px; border-radius: 9px; }
.quantity-line { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 20px 0 23px; }
.quantity-line > label { font-size: 14px; font-weight: 550; color: #4c5c73; }
.quantity-line .quantity-control { flex: 0 0 auto; }
.condition-fieldset { border: 0; padding: 0; margin: 0 0 19px; min-width: 0; }
.condition-fieldset > legend { padding: 0; margin: 0; font-size: 14px; font-weight: 550; color: #4c5c73; }
.condition-fieldset > legend .optional { margin-left: 7px; }
.condition-option { gap: 5px; min-height: 108px; padding: 14px 5px; }
.condition-option strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; }
.condition-option small { display: block; color: #98a4b6; font-size: 12px; font-weight: 400; line-height: 1.5; }
.condition-option > svg { margin-bottom: 3px; }
.condition-option.selected small { color: currentColor; opacity: .7; }
.selected-check { position: absolute; top: 7px; right: 8px; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: currentColor; font-size: 0; }
.selected-check::after { content: ""; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.extra-details.more-fields { margin-top: 0; border-top: 0; }
.extra-details.more-fields > summary { padding: 17px 24px; min-height: 64px; }
.extra-details.more-fields > summary > span:first-child { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 550; color: #62738b; }
.extra-details.more-fields > summary > .optional { margin-left: auto; margin-right: 8px; }
.extra-details.more-fields > summary::after { margin-left: 0; }
.extra-details.more-fields > .card-body { padding-top: 5px; }
.draft-status { display: inline-flex; align-items: center; gap: 7px; color: #94a1b5; font-size: 12px; min-width: 0; }
.draft-status svg { width: 17px; height: 17px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 48px; padding: 8px 5px; border: 0; border-radius: 6px; color: var(--blue); background: transparent; font-size: 14px; font-weight: 500; text-align: center; }
.text-button:hover { background: #f0f5ff; }
.text-button.muted { color: #91a0b7; }
.duplicate-alert { display: flex; }
.duplicate-alert .text-button { font-size: 13px; padding-left: 0; min-height: 44px; }
.recent-mini { display: flex; justify-content: space-between; text-align: left; width: 100%; border: 0; border-radius: 0; border-bottom: 1px solid #edf1f7; padding: 13px 0; background: transparent; min-height: 64px; color: #9aabc4; }
.recent-mini > span { display: block; min-width: 0; }
.recent-mini strong { display: block; font-size: 13px; color: #5e718f; font-weight: 550; margin-bottom: 3px; }
.recent-mini small { display: block; font-size: 12px; color: #9ca9bb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.recent-mini:hover { background: #f9fbff; }
.ledger-card { overflow: hidden; }
.ledger-card .toolbar { padding: 20px 22px 0; margin-bottom: 15px; gap: 12px; }
div.search-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 50px; flex: 1; min-width: 0; max-width: 450px; width: auto; }
div.search-input:focus-within { border-color: #7398f3; box-shadow: 0 0 0 3px rgb(35 92 233 / 8%); }
div.search-input > svg { width: 20px; height: 20px; color: #9ba9be; }
div.search-input > input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 0; border: 0; border-radius: 0; outline: 0; background: transparent; font-size: 16px; color: var(--text); }
div.search-input > input::placeholder { color: #a4afbf; }
.result-count { color: #9ba7b9; font-size: 12px; margin-left: auto; }
.ledger-card > .filter-tabs { padding: 0 22px 13px; border-bottom: 1px solid var(--line); }
.ledger-card > .filter-tabs .filter-chip { min-height: 44px; }
.ledger-card > .filter-tabs .filter-chip.active { border-color: transparent; background: #edf3ff; }
.ledger-card .table-wrap { border: 0; border-radius: 0; }
.record-table th { font-size: 12px; }
.record-table td { font-size: 14px; padding: 17px 14px; }
.record-table .check-cell { padding-left: 20px; padding-right: 3px; width: 45px; }
.check-cell input, .record-select input { width: 18px; height: 18px; margin: 0; vertical-align: middle; accent-color: var(--blue); cursor: pointer; }
.record-link { display: block; padding: 4px 0; border: 0; background: none; font-size: 14px; color: #45628e; font-weight: 600; text-align: left; }
.record-link:hover { color: var(--blue); text-decoration: underline; }
.cell-sub { font-size: 12px; color: #9aa7ba; margin-top: 4px; }
.product-cell { display: flex; align-items: center; gap: 11px; min-width: 140px; max-width: 250px; }
.product-cell > img, .product-placeholder { width: 48px; height: 48px; flex-shrink: 0; object-fit: cover; border-radius: 8px; background: #f1f5fa; }
.product-placeholder { display: flex; align-items: center; justify-content: center; color: #a5b7d0; }
.product-cell > span:not(.product-placeholder) { min-width: 0; }
.product-cell strong { display: block; font-size: 14px; font-weight: 550; color: #52667f; white-space: normal; line-height: 1.55; }
.product-cell small { display: block; margin-top: 4px; font-size: 12px; color: #99a7b9; }
.date-cell { color: #8f9eb2; font-size: 12px !important; }
.ledger-footnote { margin: 15px 0 0; font-size: 12px; color: #9aa6b8; }
.stat-value { margin-top: 9px; margin-bottom: 0; }
.stat-value small { font-size: 12px; color: #a4afc0; font-weight: 400; margin-left: 6px; }
.stat-orange { color: #b88338; }
.stat-green { color: #269579; }
.stat-red { color: #c96f6d; }
.stat-blue { color: #537fd8; }
.selection-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 22px; border-bottom: 1px solid #e0e8f8; color: #6c85af; background: #f2f6ff; font-size: 14px; }
.selection-bar > .btn { min-height: 44px; padding: 8px 13px; font-size: 13px; }
.selection-bar > .text-button { margin-left: auto; }
.record-select { display: flex; align-items: center; gap: 8px; min-height: 32px; min-width: 0; }
.record-select > strong { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; color: #45628e; }
.record-card-main { display: block; text-align: left; width: 100%; border: 0; padding: 4px 0; background: transparent; min-height: 60px; }
.record-card-main > span { display: block; font-size: 15px; color: #5f728c; }
.record-card-main > small { display: block; margin-top: 5px; color: #99a7bc; font-size: 12px; }
.record-card-bottom > span { color: #9aa8bb; font-size: 12px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-heading h3 { margin: 2px 0 5px; font-size: 22px; color: #415b7b; overflow-wrap: anywhere; }
.detail-heading p { margin: 0; color: #93a1b6; font-size: 12px; }
.detail-item { padding: 16px; border: 1px solid #e5ebf3; border-radius: 10px; margin: 0 0 13px; }
.detail-item .item-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0; border: 0; border-radius: 0; margin: 0 0 9px; }
.detail-item .item-line > strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; min-width: 0; }
.detail-item p.detail-meta { display: block; font-size: 12px; color: #99a7ba; margin: 0 0 12px; }
.detail-data-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 13px; padding: 10px 0; border-bottom: 1px solid #eff2f7; font-size: 13px; }
.detail-data-row > span { color: #98a7bc; }
.detail-data-row > strong { font-weight: 500; color: #5c708e; overflow-wrap: anywhere; }
.detail-data-row:last-child { border: 0; }
.item-note { font-size: 14px; line-height: 1.75; color: #71849e; padding: 10px 12px; background: #f7f9fc; border-radius: 7px; margin: 13px 0; }
.detail-images { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); }
.timeline-item > span { display: block; color: #a0aabc; margin-top: 5px; font-size: 12px; }
.timeline-item > strong { font-size: 14px; }
.ocr-result { padding: 14px; background: #f7f9fc; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; color: #7689a5; }
.dialog-desc { color: #7a8da8; font-size: 14px; line-height: 1.85; }
.modal-body > .field + .field { margin-top: 18px; }
.about-content p { color: #7286a3; font-size: 14px; line-height: 1.9; margin-bottom: 17px; }
.scan-frame { position: relative; border-radius: 12px; overflow: hidden; }
.icon-button { min-width: 48px; min-height: 48px; }
.eyebrow, .brand-sub, .prototype-badge, .capture-hint, .field-help, .optional, .image-caption, .stat-label, .filter-chip small, .record-table .record-sub, .record-card small, .detail-meta dt, .timeline-item time, .timeline-item small, .preview-notice button, .recent-mini small { font-size: 12px; }
.card-desc, .tip-list, .summary-row, .record-table, .record-card-meta { font-size: 14px; }

@media (max-width: 1150px) and (min-width: 761px) {
  .preview-notice { padding-left: 25px; padding-right: 25px; }
  .draft-status { flex: 1; }
  .save-bar .save-actions { flex-shrink: 0; }
  .save-bar .btn { min-width: 0; padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 760px) {
  .breadcrumb { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; color: #304d76; font-size: 20px; letter-spacing: 1px; }
  .mobile-brand > svg { width: 24px; height: 24px; color: var(--blue); }
  .topbar { gap: 9px; }
  .top-actions { min-width: 0; gap: 6px; }
  .identity-select { max-width: 151px; font-size: 12px; }
  .prototype-badge { font-size: 12px; padding: 3px 5px; }
  .preview-notice { padding: 8px 16px; font-size: 12px; line-height: 1.7; }
  .page-container { padding-top: 23px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .page-heading > div:first-child { flex: 1 1 200px; min-width: 0; }
  .page-heading .heading-actions { flex-wrap: wrap; }
  .page-heading p, .card-desc { font-size: 14px; }
  .eyebrow { display: block; font-size: 12px; }
  .heading-actions .btn { font-size: 14px; }
  .card-header { flex-wrap: wrap; }
  .card-header > .optional { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .field-help, .optional, .image-caption, .stat-label, .capture-hint { font-size: 12px; }
  .condition-option { min-height: 120px; padding: 14px 3px; gap: 7px; }
  .condition-option strong { font-size: 14px; font-weight: 600; line-height: 1.5; }
  .condition-option small { font-size: 12px; line-height: 1.5; }
  .selected-check { top: 5px; right: 6px; width: 15px; height: 15px; }
  .quantity-line { margin-top: 18px; margin-bottom: 22px; }
  .quantity-line label { font-size: 14px; }
  .quantity-line .quantity-control { max-width: 50%; }
  .condition-fieldset { margin-bottom: 19px; }
  .extra-details.more-fields > summary { padding: 17px; }
  .extra-details.more-fields > summary > .optional { font-size: 12px; }
  .draft-status { display: none; }
  .mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; min-height: 67px; width: 100%; border: 0; border-radius: 0; background: #fff; color: #8a9bb4; font-size: 12px; font-weight: 500; }
  .mobile-nav-item > svg { width: 22px; height: 22px; }
  .mobile-nav-item.active { color: var(--blue); font-weight: 650; }
  .mobile-nav-item:hover { background: #f7faff; }
  .text-button, .duplicate-alert .text-button { min-height: 48px; font-size: 14px; }
  .duplicate-alert { font-size: 14px; }
  .notice { flex-wrap: wrap; font-size: 14px; }
  .ledger-card { border: 0; background: transparent; overflow: visible; }
  .ledger-card .toolbar { padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
  div.search-input, .toolbar div.search-input { max-width: none; min-width: 0; flex: 1 1 100%; width: 100%; background: #fff; padding: 0 12px; min-height: 52px; }
  div.search-input > input { min-height: 50px; font-size: 16px; }
  .result-count { font-size: 12px; margin-top: 2px; margin-left: 0; }
  .ledger-card > .filter-tabs { padding: 0 0 13px; margin: 0 0 0; border: 0; }
  .ledger-card > .filter-tabs .filter-chip { min-height: 48px; font-size: 14px; padding-left: 12px; padding-right: 12px; }
  .ledger-card > .filter-tabs .filter-chip.active { background: #fff; border-color: #dce5f5; }
  .stat-label { font-size: 12px; }
  .stat-value { margin-top: 9px; }
  .stat-value small { font-size: 12px; margin-left: 3px; }
  .record-card-top { align-items: center !important; }
  .record-select { min-height: 44px; }
  .record-card .record-card-top { margin-bottom: 3px; }
  .record-select > strong { font-size: 14px; }
  .record-card .badge { font-size: 12px; }
  .record-card-main { min-height: 65px; padding: 5px 0; }
  .record-card-main > span { font-size: 15px; }
  .record-card-main > small { font-size: 12px; }
  .record-card-bottom { margin-top: 9px !important; padding-top: 5px !important; }
  .record-card-bottom > span { font-size: 12px; }
  .selection-bar { padding: 12px; margin-bottom: 12px; border: 1px solid #dce6fa; border-radius: 9px; gap: 8px; }
  .selection-bar > .btn { min-height: 48px; font-size: 14px; }
  .ledger-footnote { font-size: 12px; }
  .detail-heading { gap: 10px; align-items: flex-start; }
  .detail-heading > div { min-width: 0; }
  .detail-heading h3 { font-size: 20px; }
  .detail-heading .badge { font-size: 12px; }
  .detail-item { padding: 14px; }
  .detail-item .item-line { flex-wrap: wrap; gap: 6px; }
  .detail-item .item-line > strong { font-size: 15px; }
  .detail-item .badge { font-size: 12px; }
  .detail-item p.detail-meta { font-size: 12px; }
  .detail-data-row { grid-template-columns: 78px minmax(0, 1fr); font-size: 14px; padding: 11px 0; }
  .timeline-item > strong { font-size: 14px; }
  .timeline-item > span { font-size: 12px; }
  .detail-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-image { max-height: 69dvh; }
  .merge-item select { font-size: 16px; }
  .dialog-desc, .about-content p { font-size: 14px; }
}
@media (max-width: 374px) {
  .prototype-badge { display: none; }
  .identity-select { max-width: 154px; }
  .preview-notice { padding-left: 12px; padding-right: 12px; }
  .condition-option { min-height: 126px; padding-left: 3px; padding-right: 3px; }
  .condition-option strong { font-size: 14px; }
  .condition-option small { font-size: 12px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 21px; }
  .stat-value small { display: none; }
  .save-bar .save-actions { grid-template-columns: 1fr 1.55fr; gap: 8px; }
  .save-bar .btn { padding-left: 6px; padding-right: 6px; font-size: 14px; }
  .save-bar .btn > svg { display: none; }
  .capture-secondary { font-size: 14px; gap: 5px; }
}
@media (pointer: coarse) {
  button, .text-button, .btn, .filter-chip { min-height: 48px; }
  .image-remove { width: 48px; height: 48px; }
}
@media print {
  .preview-notice, .mobile-brand, .selection-bar, .text-button, .mobile-nav-item { display: none !important; }
}

/* Compact receiving flow: one screen of essential actions. */
.route-receive .page-container { max-width: 816px; padding: 20px 28px 36px; }
.route-receive .preview-notice { display: none; }
.compact-receive { width: 100%; max-width: 760px; margin: 0 auto; }
.compact-receive.receive-layout, .compact-receive .receive-layout { display: block; }
.compact-receive .receive-form, .compact-form { width: 100%; max-width: 760px; margin: 0 auto; min-width: 0; }
.compact-receive .context-panel { display: none; }
.compact-form .compact-card { margin: 0 0 10px; border-radius: 11px; box-shadow: none; overflow: hidden; }
.compact-card .card-header { min-height: 40px; padding: 8px 12px; gap: 8px; border-bottom: 1px solid #edf0f5; }
.compact-card .card-header .card-title { font-size: 16px; font-weight: 650; line-height: 1.5; }
.compact-card .card-header .step-number, .compact-card .card-header .card-desc { display: none; }
.compact-card .card-body, .compact-card .card-header + .card-body { padding: 12px; }
.compact-form .label-add-btn, .compact-form .product-add-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-width: 0; min-height: 56px; padding: 12px 16px; border: 1px solid var(--blue); border-radius: 9px; color: #fff; background: var(--blue); font-size: 16px; line-height: 1.5; font-weight: 600; }
.compact-form .label-add-btn:hover, .compact-form .product-add-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.compact-form .label-add-btn svg, .compact-form .product-add-btn svg { width: 23px; height: 23px; }
.compact-form .product-add-btn { min-height: 52px; color: #48658d; background: #f4f7fd; border-color: #dce5f3; font-weight: 550; }
.compact-form .product-add-btn:hover { color: var(--blue); border-color: #9db7ea; background: var(--blue-soft); }
.compact-form .label-inline { display: flex; align-items: center; gap: 9px; min-width: 0; }
.compact-form .label-inline .label-add-btn { flex: 1; width: auto; min-height: 56px; }
.compact-form .label-inline .image-grid { flex: 0 1 auto; width: auto; max-width: min(50%, 216px); margin: 0; }
.compact-form .image-grid { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; margin: 8px 0; padding-bottom: 1px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.compact-form .image-tile { flex: 0 0 64px; width: 64px; min-width: 64px; height: 64px; border-radius: 8px; background: #f0f4fa; }
.compact-form .image-tile .image-open, .compact-form .image-tile .image-open img, .compact-form .image-tile > img { display: block; width: 64px; height: 64px; min-height: 64px; aspect-ratio: 1; object-fit: cover; }
.compact-form .image-caption { display: none; }
.compact-form .image-remove { width: 48px; height: 48px; min-height: 48px; top: -5px; right: -5px; justify-content: flex-end; align-items: flex-start; padding: 8px; border-radius: 0; background: transparent; }
.compact-form .image-remove::before { content: ""; position: absolute; right: 6px; top: 6px; width: 21px; height: 21px; border-radius: 50%; background: rgb(26 43 70 / 65%); }
.compact-form .image-remove svg { position: relative; z-index: 1; width: 17px; height: 17px; }
.compact-form .waybill-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; margin-top: 9px; }
.compact-form .waybill-row .field { gap: 0; }
.compact-form .waybill-row input { min-height: 48px; height: 48px; padding: 10px 11px; font-size: 16px; border-radius: 8px; }
.compact-form .waybill-row input#carrier { padding-left: 9px; padding-right: 9px; }
.compact-form .compact-ocr { margin-top: 5px; border-top: 0; }
.compact-form .compact-ocr > summary { min-height: 40px; padding: 7px 0; font-size: 14px; color: #8191a9; gap: 7px; }
.compact-form .compact-ocr > .field { padding-bottom: 5px; }
.compact-form .compact-ocr textarea { min-height: 96px; font-size: 16px; }
.compact-form .compact-ocr .field-help { font-size: 12px; }
.compact-form .progress-line { margin: 6px 0; font-size: 12px; }
.compact-form .progress-line svg { width: 16px; height: 16px; }
.compact-form .duplicate-alert { margin: 7px 0 0; padding: 9px 10px; font-size: 13px; }
.compact-form .duplicate-alert p { display: none; }
.compact-form .duplicate-alert .text-button { padding: 4px 0; min-height: 40px; font-size: 14px; }
.compact-form .compact-item { padding: 0; border: 0; border-radius: 0; margin: 0; }
.compact-form .compact-item + .compact-item { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.compact-form .item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin: -3px 0 8px; }
.compact-form .item-top h3 { min-width: 0; display: flex; align-items: center; gap: 5px; margin: 0; font-size: 15px; font-weight: 600; color: #4e6380; }
.compact-form .item-top .item-number { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.compact-form .item-top .quantity-control { margin-left: auto; flex-shrink: 0; grid-template-columns: 48px 42px 48px; height: 48px; border-radius: 8px; }
.compact-form .item-top .quantity-control button { min-height: 46px; height: 46px; font-size: 21px; }
.compact-form .item-top .quantity-control input { min-height: 46px; height: 46px; padding: 0; font-size: 16px; }
.compact-form .item-top .text-button { min-height: 48px; padding: 8px 3px; font-size: 14px; flex-shrink: 0; }
.compact-form .compact-item > .field { margin: 8px 0; gap: 5px; }
.compact-form .compact-item > .field > label { font-size: 14px; }
.compact-form .compact-item textarea[data-item-field="description"] { display: block; min-height: 48px; height: 48px; padding: 11px 12px; resize: vertical; line-height: 1.5; font-size: 16px; border-radius: 8px; }
.compact-form .compact-item .condition-fieldset { margin: 8px 0 0; }
.compact-form .compact-item .condition-fieldset > legend { font-size: 14px; }
.compact-form .compact-item .condition-fieldset > legend.sr-only { font-size: 14px; }
.compact-form .compact-item .condition-grid { gap: 7px; margin-top: 5px; }
.compact-form .compact-item .condition-option { min-height: 64px; height: 64px; padding: 7px 3px; gap: 4px; border-radius: 8px; }
.compact-form .compact-item .condition-option > svg { width: 20px; height: 20px; margin: 0; }
.compact-form .compact-item .condition-option strong { font-size: 14px; line-height: 1.4; font-weight: 550; }
.compact-form .compact-item .condition-option small { display: none; }
.compact-form .compact-item .selected-check { width: 13px; height: 13px; top: 4px; right: 4px; }
.compact-form .compact-item .selected-check::after { width: 5px; height: 3px; }
.compact-form .item-notes { margin-top: 4px; border: 0; }
.compact-form .item-notes > summary { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 0; font-size: 14px; color: #8b99af; cursor: pointer; list-style: none; }
.compact-form .item-notes > summary::-webkit-details-marker { display: none; }
.compact-form .item-notes > summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; margin-right: 4px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.compact-form .item-notes[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.compact-form .item-notes .field { margin-bottom: 8px; }
.compact-form .item-notes textarea { min-height: 60px; height: 60px; font-size: 16px; padding: 10px 11px; }
.compact-form .reason-box { margin-top: 8px; padding: 10px; border-radius: 8px; }
.compact-form .reason-box textarea { min-height: 60px; height: 60px; }
.compact-form .notice { margin: 7px 0; padding: 8px 10px; font-size: 13px; }
.compact-form .add-item { min-height: 48px; margin-top: 8px; border-radius: 8px; padding: 10px; font-size: 14px; }
.compact-form .add-item svg { width: 18px; height: 18px; }
.compact-form .compact-extras { margin-top: 0; border: 0; }
.compact-form .compact-extras > summary { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.compact-form .compact-extras > summary > span:first-child { font-size: 14px; }
.compact-form .compact-extras > summary svg { width: 18px; height: 18px; }
.compact-form .compact-extras > .card-body { padding: 4px 12px 12px; }
.compact-form .compact-extras .field-grid { gap: 12px; }
.compact-form .compact-extras input, .compact-form .compact-extras select { min-height: 48px; font-size: 16px; }
.compact-form .compact-save { padding: 10px 0 0; margin: 0; gap: 8px; }
.compact-form .compact-save .draft-status { display: none; }
.compact-form .compact-save .save-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.compact-form .compact-save .btn { width: 100%; min-width: 0; min-height: 56px; padding: 14px 10px; font-size: 16px; }
.photo-source-options { display: grid; gap: 10px; }
.photo-source-options .btn { min-height: 56px; font-size: 16px; }

@media (max-width: 760px) {
  .route-receive .topbar { height: 56px; }
  .route-receive .page-container { padding: 10px 12px 150px; max-width: 100%; }
  .route-receive .mobile-brand { font-size: 19px; gap: 7px; }
  .route-receive .mobile-brand > svg { width: 21px; height: 21px; }
  .route-receive .prototype-badge { display: none; }
  .route-receive .identity-select { min-height: 48px; max-width: 156px; }
  .compact-receive { max-width: 100%; }
  .compact-form .compact-card { margin-bottom: 10px; border-radius: 10px; }
  .compact-card .card-header { min-height: 40px; padding: 8px 12px; flex-wrap: nowrap; }
  .compact-card .card-header .card-title { font-size: 16px; }
  .compact-card .card-body, .compact-card .card-header + .card-body { padding: 12px; }
  .compact-form .label-add-btn { min-height: 56px; padding: 12px; font-size: 16px; }
  .compact-form .product-add-btn { min-height: 52px; padding: 11px 12px; font-size: 16px; }
  .compact-form .label-inline { gap: 8px; }
  .compact-form .label-inline .image-grid { max-width: 45%; }
  .compact-form .label-inline .label-add-btn { padding-left: 7px; padding-right: 7px; font-size: 15px; }
  .compact-form .label-inline .label-add-btn svg { width: 21px; height: 21px; }
  .compact-form .image-grid { gap: 7px; margin-top: 7px; margin-bottom: 7px; }
  .compact-form .waybill-row { grid-template-columns: minmax(0, 1fr) 96px; gap: 7px; margin-top: 8px; }
  .compact-form .waybill-row input { font-size: 16px; min-height: 48px; height: 48px; padding-left: 10px; padding-right: 10px; }
  .compact-form .compact-ocr { margin-top: 4px; }
  .compact-form .compact-ocr > summary { min-height: 40px; font-size: 14px; }
  .compact-form .compact-item { padding: 0; margin: 0; border: 0; }
  .compact-form .compact-item + .compact-item { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
  .compact-form .item-top { min-height: 48px; margin: -3px 0 7px; gap: 7px; }
  .compact-form .item-top h3 { font-size: 14px; white-space: nowrap; }
  .compact-form .item-top .quantity-control { grid-template-columns: 48px 36px 48px; max-width: none; height: 48px; }
  .compact-form .item-top .quantity-control button { min-height: 46px; height: 46px; }
  .compact-form .item-top .quantity-control input { min-height: 46px; height: 46px; font-size: 16px; }
  .compact-form .compact-item > .field { margin: 7px 0; }
  .compact-form .compact-item textarea[data-item-field="description"] { height: 48px; min-height: 48px; font-size: 16px; }
  .compact-form .compact-item .condition-fieldset { margin-top: 7px; margin-bottom: 0; }
  .compact-form .compact-item .condition-grid { gap: 6px; margin-top: 5px; }
  .compact-form .compact-item .condition-option { height: 64px; min-height: 64px; padding: 7px 3px; gap: 4px; }
  .compact-form .compact-item .condition-option strong { font-size: 14px; }
  .compact-form .compact-item .condition-option small { display: none; }
  .compact-form .item-notes { margin-top: 4px; }
  .compact-form .item-notes > summary { min-height: 40px; font-size: 14px; padding: 7px 0; }
  .compact-form .compact-extras > summary { min-height: 44px; padding: 10px 12px; }
  .compact-form .compact-save { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); min-height: 72px; margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 98%); }
  .compact-form .compact-save .save-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .compact-form .compact-save .btn { min-height: 56px; height: 56px; font-size: 16px; padding: 12px 7px; }
  .compact-form .compact-save .btn svg { width: 18px; height: 18px; }
  .route-receive .mobile-nav { height: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .route-receive .mobile-nav-item { min-height: 55px; height: 55px; gap: 2px; padding: 4px; font-size: 12px; }
  .route-receive .mobile-nav-item > svg { width: 18px; height: 18px; }
}
@media (max-width: 374px) {
  .route-receive .topbar { padding-left: 12px; padding-right: 12px; }
  .route-receive .identity-select { max-width: 146px; }
  .compact-form .item-top { gap: 5px; }
  .compact-form .item-top h3 { font-size: 14px; }
  .compact-form .item-top .quantity-control { grid-template-columns: 48px 32px 48px; }
  .compact-form .compact-item .condition-grid { gap: 5px; }
  .compact-form .compact-item .condition-option { min-height: 64px; height: 64px; }
  .compact-form .compact-item .condition-option strong { font-size: 14px; }
  .compact-form .label-inline .label-add-btn { font-size: 14px; gap: 6px; }
  .compact-form .compact-save .btn { font-size: 15px; padding-left: 5px; padding-right: 5px; }
  .compact-form .compact-save .btn svg { display: none; }
}

.topbar { height: 56px; }
.capture-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capture-menu.two-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-form .duplicate-alert.compact-duplicate { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 48px; padding: 0 8px; }
.compact-form .duplicate-alert.compact-duplicate > .text-button { margin: 0 0 0 auto; min-height: 48px; padding: 6px; }
.capture-menu.capture-menu-item, .capture-menu.item-menu, .capture-menu.two-columns, .capture-menu:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.capture-menu > .btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; min-height: 78px; padding: 13px 7px; font-size: 15px; border-radius: 10px; }
.capture-menu > .btn svg { width: 25px; height: 25px; }
.compact-form .item-top .quantity-control { height: 50px; }
.compact-form .item-top .quantity-control button, .compact-form .item-top .quantity-control input { height: 48px; min-height: 48px; }
@media (max-width: 760px) {
  .capture-menu { gap: 8px; }
  .capture-menu > .btn { min-height: 78px; padding: 12px 5px; font-size: 14px; }
  .compact-form .item-top .quantity-control { height: 50px; }
  .compact-form .item-top .quantity-control button, .compact-form .item-top .quantity-control input { height: 48px; min-height: 48px; }
}

/* Inline duplicate handling for a parcel being received. */
.compact-form .compact-duplicate { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 9px; margin: 7px 0 0; overflow: hidden; border: 1px solid #dce7fa; border-radius: 8px; background: #f2f6ff; color: #6b86b0; font-size: 14px; }
.compact-form .compact-duplicate > svg { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.compact-form .compact-duplicate > button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 5px; min-height: 48px; padding: 8px 4px; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--blue); font-size: 14px; font-weight: 550; line-height: 1.4; white-space: nowrap; }
.compact-form .compact-duplicate > .duplicate-count { justify-content: flex-start; margin-right: auto; color: #6983ad; font-weight: 500; }
.compact-form .compact-duplicate > button:hover { background: #e8effd; }
.compact-form .compact-duplicate > button svg { width: 17px; height: 17px; }
.receipt-match-list { display: grid; gap: 8px; }
.receipt-match { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 76px; padding: 12px; border: 1px solid #e1e7f0; border-radius: 9px; background: #fff; text-align: left; color: #5a6e8b; }
.receipt-match:hover { border-color: #a3bce9; background: #f7faff; }
.receipt-match > :first-child { min-width: 0; }
.receipt-match strong { display: block; color: #465f80; font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.receipt-match small { display: block; margin-top: 4px; color: #93a2b7; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.receipt-match > .badge { flex-shrink: 0; font-size: 12px; }
.receipt-match > .icon { flex-shrink: 0; width: 19px; height: 19px; color: #9aafcd; }
.receipt-merge-summary { padding: 0; margin: 0 0 14px; color: #6e819d; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.receipt-merge-summary p { margin: 6px 0; font-size: 14px; }
.receipt-merge-summary strong { color: #4b6485; font-weight: 600; }
.receipt-merge-summary .badge { margin: 0 5px 3px 0; font-size: 12px; vertical-align: middle; }
.receipt-merge-options .field { margin: 12px 0; }
.receipt-merge-options .field label { font-size: 14px; }
.receipt-merge-options input, .receipt-merge-options select, .receipt-merge-options textarea { font-size: 16px; }
.receipt-new-summary { margin: 12px 0; padding: 12px; border: 1px solid #dce7fa; border-radius: 9px; background: #f1f6ff; color: #6784af; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.receipt-new-summary p { margin: 4px 0; }
.receipt-new-summary strong { color: #4b6a97; font-weight: 600; }
@media (max-width: 760px) {
  .compact-form .compact-duplicate { gap: 6px; padding: 0 7px; min-height: 48px; }
  .compact-form .compact-duplicate > svg { width: 17px; height: 17px; flex-basis: 17px; }
  .compact-form .compact-duplicate > button { min-height: 48px; font-size: 14px; padding: 8px 3px; }
  .receipt-match { min-height: 76px; padding: 12px; gap: 10px; }
  .receipt-match strong { font-size: 14px; }
  .receipt-match small { font-size: 12px; }
  .receipt-merge-summary, .receipt-new-summary { font-size: 14px; }
  .receipt-merge-options .field { margin: 12px 0; }
}
@media (max-width: 374px) {
  .compact-form .compact-duplicate { gap: 4px; padding: 0 5px; }
  .compact-form .compact-duplicate > button { padding-left: 2px; padding-right: 2px; }
  .compact-form .compact-duplicate > svg { width: 16px; height: 16px; flex-basis: 16px; }
}
@media (max-width: 760px) {
  .page-heading .eyebrow, .page-heading p { display: none; }
  .page-heading > div:first-child { flex: 1 1 130px; }
  .page-heading { margin-bottom: 16px; align-items: center; }
  .page-heading h1 { margin: 0; }
  .quantity-line { gap: 8px; }
  .quantity-line .quantity-control { max-width: none; }
}
.tone-slate { background: #f0f3f7; color: #64748b; }
.tone-amber { background: #fff4df; color: #a76512; }
.compact-form .compact-duplicate { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 10px; }
.compact-form .compact-duplicate > strong { font-size: 14px; font-weight: 500; }
.compact-form .compact-duplicate > .text-button { margin: 0 0 0 auto; min-height: 48px; padding: 7px; }
