:root {
  --ink: #080808;
  --muted: #696970;
  --paper: #f5f5f7;
  --card: #ffffff;
  --line: #dedee2;
  --green: #111111;
  --green-dark: #000000;
  --mint: #ededf0;
  --orange: #9b5d18;
  --red: #a33b35;
  --success: #167052;
  --success-soft: #e1f2eb;
  --focus: #c8dcff;
  --font-sans: "ALS Sirius", "ALS Sirius VF", "ALS Sirius Pro", Onest, Manrope, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 14px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.topbar { min-height: 70px; display: flex; align-items: center; gap: 28px; padding: 10px max(24px, calc((100vw - 1320px) / 2)); background: rgba(243,244,239,.94); border-bottom: 1px solid rgba(20,36,29,.09); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 19px var(--font-sans); white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--green-dark); }
.topnav { display: flex; align-items: center; gap: 4px; flex: 1; }
.topnav a, .top-link { color: var(--muted); padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 650; font-size: 13px; white-space: nowrap; }
.topnav a:hover, .top-link:hover { background: var(--card); color: var(--ink); }
.top-actions, .hero-actions, .form-actions { display: flex; align-items: center; gap: 9px; }
.top-actions form { margin: 0; }

.primary, .secondary, .ghost { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 11px 15px; text-decoration: none; cursor: pointer; font-weight: 700; font-size: 13px; border: 1px solid transparent; }
.primary { background: var(--green-dark); color: #fff; box-shadow: 0 7px 20px rgba(24,63,50,.14); }
.secondary, .ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.primary:hover { background: #245944; }
.secondary:hover, .ghost:hover { border-color: #bdc9c1; }
.secondary.active-filter { color: #fff; background: var(--green); border-color: var(--green); }
.full { width: 100%; }
.center { text-align: center; }

.page-shell { width: min(100%, 1320px); margin: 0 auto; padding: 48px 26px 72px; }
.narrow-shell { width: min(100%, 1000px); }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.hero-row.compact { margin-bottom: 24px; }
.hero-row h1, .form-card h1, .auth-card h1 { margin: 0 0 8px; font: 650 clamp(30px, 4vw, 45px) var(--font-sans); letter-spacing: -.04em; }
.hero-row.compact h1 { font-size: clamp(29px, 3.5vw, 40px); }
.eyebrow { margin: 0 0 7px; color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
.muted { margin: 0; color: var(--muted); }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.summary-card { min-height: 150px; display: flex; flex-direction: column; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 17px; }
.summary-card.featured { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.summary-card span { color: var(--muted); font-weight: 700; }
.summary-card.featured span, .summary-card.featured small { color: #b9cbc2; }
.summary-card strong { margin-top: auto; font: 650 34px var(--font-sans); letter-spacing: -.04em; }
.summary-card small { margin-top: 3px; color: var(--muted); }

.content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-top: 14px; }
.panel, .table-card, .form-card, .auth-card, .guide-card { background: var(--card); border: 1px solid var(--line); border-radius: 17px; }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .guide-card h2, .table-head h2 { margin: 0; font: 650 20px var(--font-sans); }
.panel-head a { color: var(--green); font-weight: 750; text-decoration: none; }
.movement-row { display: flex; align-items: center; gap: 13px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.movement-row:last-child { border-bottom: 0; }
.movement-icon { flex: 0 0 36px; height: 36px; display: grid; place-items: center; color: var(--green); background: var(--mint); border-radius: 11px; font-weight: 800; }
.movement-icon.out { color: var(--red); background: #f6e4e1; }
.movement-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.movement-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-copy span, .movement-amount span { color: var(--muted); font-size: 11px; }
.movement-amount { display: flex; flex-direction: column; align-items: end; gap: 3px; white-space: nowrap; }
.empty { padding: 55px 20px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); text-align: center; }
.empty strong { color: var(--ink); }
.quick-link { display: flex; align-items: center; gap: 13px; padding: 17px 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
.quick-link:last-child { border-bottom: 0; }
.quick-link b, .step { width: 31px; height: 31px; display: grid; place-items: center; background: var(--mint); color: var(--green); border-radius: 50%; }
.quick-link span { display: flex; flex-direction: column; gap: 3px; }
.quick-link small { color: var(--muted); }

.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 11px; margin-bottom: 15px; }
.zone-card { display: flex; flex-direction: column; padding: 17px; min-height: 115px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.zone-card > span { width: fit-content; padding: 4px 8px; color: var(--green); background: var(--mint); border-radius: 7px; font-weight: 800; }
.zone-card strong { margin-top: auto; }
.zone-card small { color: var(--muted); margin-top: 3px; }
.zone-card.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(29,108,77,.09); }
.empty-card { padding: 30px; background: var(--card); border: 1px dashed #bcc8c0; border-radius: 14px; color: var(--muted); }

.topology-card { margin-bottom: 14px; }
.compact-button { padding: 8px 11px; }
.tree-node { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; min-width: 240px; }
.tree-node.depth-1 { padding-left: 24px; }
.tree-node.depth-2 { padding-left: 48px; }
.tree-node.depth-3 { padding-left: 72px; }
.tree-node small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-kind { padding: 4px 7px; color: var(--green); background: var(--mint); border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; text-align: right; white-space: nowrap; }
.row-actions a { color: var(--green); font-weight: 750; text-decoration: none; }
.row-actions .icon-action { flex: 0 0 32px; width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; color: #080808; background: var(--mint); border: 1px solid rgba(0,0,0,.1); border-radius: 9px; cursor: pointer; }
.row-actions .icon-action:hover { color: #fff; background: #080808; }
.row-actions .icon-action.disabled { color: #99999f; background: #ededf0; cursor: not-allowed; opacity: .68; }
.row-actions .icon-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-actions .barcode-icon svg { fill: currentColor; stroke: none; }
.row-actions .marketplace-label-action { position: relative; }
.row-actions .marketplace-label-action small { position: absolute; right: -4px; bottom: -4px; min-width: 19px; padding: 2px 3px; color: #fff; background: #080808; border: 2px solid #fff; border-radius: 6px; font-size: 7px; font-weight: 800; line-height: 1; text-align: center; }
.row-actions .marketplace-label-action.wb small { background: #6b28a8; }
.row-actions .marketplace-label-action.ozon small { background: #1650b8; }
.row-actions .danger-link, .danger-link { color: var(--red); }
.locations-card { margin-top: 14px; }

.table-card { overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.table-head span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; background: #f8f9f6; color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td { padding: 14px 16px; border-top: 1px solid var(--line); }
tbody tr:hover { background: #fbfcfa; }
.address { display: inline-flex; padding: 5px 8px; background: #edf2ee; border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.status { display: inline-flex; color: var(--green); background: var(--mint); padding: 4px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.muted-status { color: var(--muted); background: #ecefeb; }
.row-action { text-align: right; white-space: nowrap; }
.row-action a { color: var(--green); font-weight: 750; text-decoration: none; }
.empty-cell { padding: 50px 20px; color: var(--muted); text-align: center; }
.table-note { color: var(--muted); font-size: 11px; }
.marketplace-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.marketplace-badge { display: inline-flex; padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.marketplace-badge.wb { color: #6b28a8; background: #f0e5fa; }
.marketplace-badge.ozon { color: #1650b8; background: #e5edff; }
.product-photo-cell { width: 82px; padding-top: 8px; padding-bottom: 8px; }
.product-photo { display: block; width: 58px; height: 58px; object-fit: contain; background: #f7f9f6; border: 1px solid var(--line); border-radius: 10px; }
.product-photo-button { display: block; padding: 0; background: transparent; border: 0; border-radius: 10px; cursor: zoom-in; }
.product-photo-button:hover .product-photo, .product-photo-button:focus-visible .product-photo { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,111,83,.13); }
.product-photo-button:focus-visible { outline: none; }

.filterbar { display: flex; gap: 9px; margin-bottom: 14px; }
.filterbar input { flex: 1; }
.filterbar input, .filterbar select, .stack-form input, .stack-form select, .stack-form textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fafbf8; border: 1px solid var(--line); border-radius: 10px; }
.filterbar select { width: 220px; }
.filterbar input:focus, .filterbar select:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { outline: 2px solid #bdd9ca; border-color: var(--green); }

.form-shell, .auth-shell { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px 20px; }
.form-card, .auth-card { width: min(100%, 650px); padding: 31px; box-shadow: 0 22px 60px rgba(20,36,29,.07); }
.auth-card { width: min(100%, 450px); }
.auth-card.wide { width: min(100%, 600px); }
.back { width: min(100%, 650px); margin-bottom: 13px; color: var(--muted); text-decoration: none; }
.stack-form { margin-top: 24px; }
.stack-form p { display: flex; flex-direction: column; gap: 7px; margin: 0 0 15px; }
.stack-form label { font-size: 12px; font-weight: 750; }
.stack-form .helptext { color: var(--muted); font-size: 11px; }
.stack-form .helptext ul { margin: 4px 0 0; padding-left: 18px; }
.errorlist { color: var(--red); margin: 0 0 5px; padding-left: 18px; }
.form-actions { justify-content: end; margin-top: 22px; }
.delete-object { padding: 14px; color: var(--ink); background: #f6e4e1; border-radius: 10px; font-weight: 750; }
.delete-actions { margin-top: 28px; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 15px; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 10px; cursor: pointer; font-weight: 750; }

.counterparty-shell { justify-content: flex-start; }
.counterparty-card, .wide-form { width: min(100%, 940px); }
.counterparty-form fieldset { margin: 24px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 13px; }
.counterparty-form legend { padding: 0 8px; font: 650 17px var(--font-sans); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field label { font-size: 12px; font-weight: 750; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fafbf8; border: 1px solid var(--line); border-radius: 10px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid #bdd9ca; border-color: var(--green); }
.field-wide { grid-column: 1 / -1; }
.input-action { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px; }
.input-action .secondary { white-space: nowrap; }
.checkbox-field { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.checkbox-field input { width: auto; }
.privacy-note { margin: 16px 0 0; padding: 12px 14px; color: var(--muted); background: #f8f9f6; border-radius: 9px; font-size: 11px; line-height: 1.5; }
.fieldset-note { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.marketplace-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.marketplace-connect { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 17px; background: #fafbf8; border: 1px solid var(--line); border-radius: 12px; }
.marketplace-connect-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.marketplace-connect-head > div { display: flex; flex-direction: column; gap: 3px; }
.marketplace-connect-head strong { font: 700 18px var(--font-sans); }
.marketplace-connect-head span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.switch-control { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 92px; cursor: pointer; text-align: center; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-slider { position: relative; width: 45px; height: 25px; background: #cdd5d0; border-radius: 20px; transition: .2s; }
.switch-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(20,36,29,.25); transition: .2s; }
.switch-control input:checked + .switch-slider { background: var(--green); }
.switch-control input:checked + .switch-slider::after { transform: translateX(20px); }
.switch-control input:focus-visible + .switch-slider { outline: 3px solid #bdd9ca; }
.switch-control b { font-size: 10px; }
.credential-state { padding: 8px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.credential-state.ok { color: var(--green); background: var(--mint); }
.clear-secret { display: flex; align-items: center; gap: 7px; color: var(--red); font-size: 11px; }
.clear-secret input { width: auto; }
.sync-state, .sync-error { margin: 0; font-size: 11px; line-height: 1.45; }
.sync-state { color: var(--muted); }
.sync-error { padding: 8px 10px; color: var(--red); background: #f6e4e1; border-radius: 8px; }
.marketplace-sync { width: 100%; margin-top: auto; }
.marketplace-sync:disabled { cursor: not-allowed; opacity: .48; }
.wb-supply-start { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 300px; margin: 0; }
.wb-supply-start select { min-width: 102px; padding: 8px 28px 8px 9px; font-size: 11px; }
.wb-supply-start button { white-space: nowrap; }
.wb-supply-start label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.wb-supply-start label input { width: 16px; height: 16px; accent-color: var(--green); }
.fbs-sync-grid { margin-bottom: 14px; }
.fbs-sync-grid form { margin: 0; }
.fbs-sync-grid .sync-state[href] { color: var(--green); font-weight: 700; text-decoration: none; }
.auto-sync-badge { padding: 5px 8px; color: var(--green); background: var(--mint); border-radius: 999px; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.auto-sync-badge.off { color: var(--muted); background: #ecefeb; }
.compact-service { min-height: 70px; padding: 12px; }
.service-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.service-mode-card { position: relative; display: flex; align-items: flex-start; gap: 11px; min-height: 92px; padding: 15px; background: #fafbf8; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.service-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.service-mode-card > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.service-mode-card strong { font: 700 16px var(--font-sans); }
.service-mode-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.service-mode-check { flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid #abb9b0; border-radius: 6px; background: #fff; }
.service-mode-card input:checked + .service-mode-check { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 4px #fff; }
.service-mode-card input:focus-visible + .service-mode-check { outline: 3px solid #bdd9ca; }
.service-badges { display: flex; flex-wrap: wrap; gap: 5px; min-width: 110px; }
.service-badges span { display: inline-flex; padding: 4px 7px; color: var(--green); background: var(--mint); border-radius: 6px; font-size: 10px; font-weight: 800; white-space: nowrap; }

.inventory-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.inventory-summary article { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; }
.inventory-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.inventory-summary strong { font: 700 28px var(--font-sans); }
.package-summary { grid-template-columns: repeat(4, 1fr); }
.packaging-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); align-items: start; }
.compact-form-card { width: 100%; }
.compact-form-card h2 { margin: 0 0 7px; font: 800 25px var(--font-sans); }
.inline-note { display: block; margin-top: 3px; color: var(--muted); }
.link-button { padding: 0; color: var(--ink); background: transparent; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.danger-link { color: var(--red); }
.row-actions form { margin: 0; }
.package-chip { display: inline-flex; margin: 2px 3px 2px 0; padding: 5px 7px; color: #18181a; background: #ededf0; border-radius: 7px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.receipt-total { display: flex; flex-direction: column; gap: 4px; margin-top: 19px; padding: 17px; background: #ededf0; border: 1px solid rgba(0,0,0,.08); border-radius: 13px; }
.receipt-total span, .receipt-total small { color: var(--muted); font-size: 11px; }
.receipt-total strong { font: 800 20px var(--font-sans); }
.package-breakdown { display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.package-breakdown small { color: var(--muted); }
.filter-check { display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; background: #fff; border: 1px solid var(--line); border-radius: 12px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.filter-check input { flex: 0; width: auto; accent-color: #080808; }
.muted-status { color: var(--muted); }
.opened-status { color: #7d531f; background: #f4eadc; }
.integration-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 14px 16px; color: var(--green-dark); background: var(--mint); border: 1px solid #c8ded1; border-radius: 12px; }
.integration-note span { color: var(--muted); line-height: 1.5; }
.section-heading { margin-top: 20px; padding-left: 0; padding-right: 0; border-bottom: 0; }
.order-stage-tabs { display: flex; gap: 5px; margin: 16px 0 0; padding: 5px; overflow-x: auto; background: #e9eee9; border-radius: 12px; }
.order-stage-tabs a { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 135px; padding: 11px 15px; color: var(--muted); border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 750; white-space: nowrap; }
.order-stage-tabs a.active { color: var(--green-dark); background: var(--card); box-shadow: 0 2px 8px rgba(20,36,29,.08); }
.order-stage-tabs b { min-width: 23px; padding: 3px 6px; color: inherit; background: rgba(24,63,50,.08); border-radius: 999px; text-align: center; font-size: 9px; }
.orders-registry { margin-top: 10px; }
.bulk-order-bar { display: flex; align-items: center; gap: 18px; margin-bottom: 9px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; }
.bulk-order-bar label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; cursor: pointer; }
.bulk-order-bar input, .orders-table .check-column input { width: 18px; height: 18px; accent-color: var(--green); }
.bulk-order-bar > span { color: var(--muted); font-size: 11px; }
.bulk-order-bar > [data-selected-count] { margin-left: auto; }
.bulk-order-scope { font-weight: 700; }
.bulk-delivery-mode select { width: auto; min-width: 150px; padding: 8px 30px 8px 10px; font-size: 11px; }
.bulk-order-bar button { min-width: 190px; }
.bulk-order-bar button:disabled { cursor: not-allowed; opacity: .45; }
.orders-table [data-order-checkbox]:disabled { cursor: not-allowed; opacity: .28; }
.fbs-marketplace-filter { display: inline-flex; gap: 5px; margin-left: auto; padding: 5px; background: #e7e7ea; border: 1px solid rgba(0,0,0,.06); border-radius: 13px; }
.fbs-marketplace-filter a { min-width: 62px; padding: 9px 12px; color: #4f4f55; border-radius: 9px; text-align: center; text-decoration: none; font-size: 11px; font-weight: 800; }
.fbs-marketplace-filter a.active { color: #fff; background: #080808; box-shadow: 0 5px 13px rgba(0,0,0,.14); }
.fbs-marketplace-filter a.wb.active { background: #6b28a8; }
.fbs-marketplace-filter a.ozon.active { background: #1650b8; }
.orders-table { min-width: 1040px; }
.orders-table .check-column { width: 42px; min-width: 42px; padding-left: 15px; padding-right: 6px; text-align: center; }
.orders-table tbody tr:has([data-order-checkbox]:checked) { background: #f1f8f3; }
.fbs-order-cell { min-width: 170px; }
.fbs-order-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.fbs-order-heading > strong { font-size: 14px; white-space: nowrap; }
.fbs-order-heading .marketplace-badge { padding: 3px 6px; border: 1px solid currentColor; border-radius: 6px; font-size: 9px; }
.fbs-order-cell > .table-note { display: block; margin-top: 3px; }
.fbs-order-age { display: inline-flex; align-items: center; margin-top: 7px; padding: 5px 8px; border-radius: 7px; }
.fbs-order-age strong { color: inherit; font-size: 11px; line-height: 1; white-space: nowrap; }
.fbs-order-age.age-fresh { color: #149653; background: #dff5e8; }
.fbs-order-age.age-warning { color: #f07755; background: #fff0dc; }
.fbs-order-age.age-overdue { color: #c63f4d; background: #fde5e8; }
.fbs-order-age.age-stopped { color: #777487; background: #ededf2; }
.registry-requirements { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 90px; }
.registry-requirements span { color: var(--muted); font-size: 9px; }
.registry-requirements span.attention { padding: 4px 6px; color: #8b551d; background: #fff0d8; border-radius: 6px; font-weight: 750; }
.api-sync-details { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.api-sync-details > summary { padding: 15px 17px; color: var(--green); cursor: pointer; font-size: 12px; font-weight: 750; }
.api-sync-details .marketplace-settings { padding: 0 14px 14px; }
.fbs-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(390px, 1fr)); gap: 12px; }
.fbs-order-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 15px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.fbs-order-card > img { width: 104px; height: 104px; object-fit: contain; background: #f8f9f6; border: 1px solid var(--line); border-radius: 11px; }
.fbs-order-body { min-width: 0; }
.fbs-order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.fbs-order-body h3 { margin: 9px 0 4px; font: 650 16px/1.35 var(--font-sans); }
.fbs-order-body p { margin: 0; color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.order-meta-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.order-meta-badges b { padding: 5px 7px; color: var(--green); background: var(--mint); border-radius: 6px; font-size: 9px; }
.order-meta-badges b.attention { color: #8b551d; background: #fff0d8; }
.fbs-order-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 11px; border-top: 1px solid var(--line); }
.fbs-order-action a { min-width: 150px; text-align: center; }
.empty-card { grid-column: 1 / -1; padding: 40px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.narrow-page { max-width: 980px; }
.pick-order-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: center; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; }
.pick-order-card img { width: 150px; height: 150px; object-fit: contain; background: #f8f9f6; border: 1px solid var(--line); border-radius: 12px; }
.pick-order-card > div { min-width: 0; }
.pick-order-card span { color: var(--muted); font-size: 11px; }
.pick-order-card h2 { margin: 7px 0; font: 650 24px/1.25 var(--font-sans); }
.pick-order-card code { color: var(--muted); }
.shipment-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.shipment-choice-grid > a { display: flex; flex-direction: column; gap: 5px; padding: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.shipment-choice-grid > a:hover { border-color: var(--green); }
.shipment-choice-grid span, .shipment-choice-grid small { color: var(--muted); font-size: 10px; }
.shipment-choice-grid b:last-child { margin-top: 8px; color: var(--green); font-size: 11px; }
.pick-create-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.inline-form { display: inline-flex; margin: 0; }
.shipment-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.shipment-progress article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; background: #7bd3ff; border: 1px solid rgba(0,0,0,.09); border-radius: 13px; }
.shipment-progress span { color: #080808; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.shipment-progress strong { color: #080808; font: 800 22px var(--font-sans); white-space: nowrap; }
.fbs-box-panel { margin-top: 15px; }
.fbs-box-panel .panel-head > div { display: flex; flex-direction: column; gap: 4px; }
.fbs-box-panel .panel-head span { color: var(--muted); font-size: 11px; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; padding: 14px; }
.box-grid article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; background: #f8f9f6; border: 1px solid var(--line); border-radius: 11px; }
.box-grid article > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.box-grid span, .box-grid small { color: var(--muted); font-size: 10px; }
.box-grid strong { overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.box-grid a { color: var(--green); font-size: 11px; font-weight: 750; white-space: nowrap; }
.table-product { display: flex; align-items: center; gap: 9px; min-width: 240px; }
.table-product img { flex: 0 0 46px; width: 46px; height: 46px; object-fit: contain; background: #f8f9f6; border: 1px solid var(--line); border-radius: 7px; }
.table-product > span { display: flex; flex-direction: column; gap: 3px; }
.table-product small { color: var(--muted); font-size: 10px; }
.supply-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; padding: 20px; }
.supply-panel > div { display: flex; flex-direction: column; gap: 5px; }
.supply-panel span { color: var(--muted); font-size: 11px; }
.supply-panel strong { font: 650 21px ui-monospace, SFMono-Regular, Menlo, monospace; }
.dispatch-form { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }
.dispatch-form span { color: var(--muted); font-size: 11px; }
.dispatch-form button:disabled { cursor: not-allowed; opacity: .45; }
.scan-shell { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; padding: 45px 20px; }
.scan-card { width: min(100%, 680px); padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 60px rgba(20,36,29,.07); }
.scan-card h1 { margin: 0 0 8px; font: 650 clamp(31px, 5vw, 48px) var(--font-sans); letter-spacing: -.04em; }
.scan-card.chz-step { border-color: #dba968; box-shadow: 0 0 0 3px rgba(219,169,104,.16), 0 22px 60px rgba(20,36,29,.07); }
.scan-form { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.scan-input input { min-height: 58px; font: 600 20px ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-product { display: flex; align-items: center; gap: 13px; padding: 13px; background: #f8f9f6; border-radius: 12px; }
.scan-product img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.scan-product div { display: flex; flex-direction: column; gap: 4px; }
.scan-product span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-label-option { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: start; padding: 13px 14px; background: #f2f2f4; border: 1px solid var(--line); border-radius: 12px; }
.scan-label-option input { grid-row: 1 / 3; width: 19px; height: 19px; margin: 1px 0 0; accent-color: #080808; }
.scan-label-option label { font-weight: 800; cursor: pointer; }
.scan-label-option span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.scan-label-option.unavailable { grid-template-columns: 1fr; opacity: .58; }
.verify-shell { gap: 14px; }
.verification-card { border-color: #9ccfe8; }
.verification-progress { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; padding: 14px 16px; background: #e4f6ff; border-radius: 12px; }
.verification-progress strong { color: #080808; font: 800 26px var(--font-sans); }
.verification-progress span { color: var(--muted); font-size: 11px; }
.verification-ready { display: block; margin-top: 14px; text-align: center; }
.verification-orders { width: min(100%, 980px); }
.chz-table-card { margin-top: 10px; }
.chz-code { display: inline-block; max-width: 330px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.chz-table-card form { margin: 0; }
.chz-table-card .attention { color: #8b551d; background: #fff0d8; }
.pick-list-page { background: #e9e9ec; }
.pick-list-sheet { width: min(100%, 210mm); min-height: 297mm; margin: 24px auto; padding: 14mm 13mm; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.14); }
.pick-list-toolbar { display: flex; justify-content: space-between; gap: 10px; margin: -7mm 0 9mm; }
.pick-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 5mm; border-bottom: .6mm solid #080808; }
.pick-list-head p { margin: 0 0 2mm; font-size: 8pt; font-weight: 800; letter-spacing: .06em; }
.pick-list-head h1 { margin: 0; font-size: 25pt; }
.pick-list-head > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 1mm; }
.pick-list-head span { color: var(--muted); font-size: 8pt; }
.pick-list-summary { display: flex; flex-wrap: wrap; gap: 3mm 8mm; margin: 4mm 0; padding: 3mm 4mm; background: #f2f2f4; border-radius: 2mm; font-size: 9pt; }
.pick-list-summary .shortage { color: #9b3d20; }
.pick-list-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8pt; }
.pick-list-table th { padding: 2.5mm 2mm; border-bottom: .4mm solid #080808; text-align: left; font-size: 7pt; text-transform: uppercase; }
.pick-list-table th:nth-child(1) { width: 24mm; }
.pick-list-table th:nth-child(3) { width: 24mm; }
.pick-list-table th:nth-child(4) { width: 36mm; }
.pick-list-table th:nth-child(5) { width: 17mm; }
.pick-list-table td { padding: 3mm 2mm; border-bottom: .2mm solid #bfc0c3; vertical-align: top; }
.pick-list-table td > strong, .pick-list-table td > small, .pick-list-table td > code { display: block; }
.pick-list-table td > small { margin-top: .8mm; color: #555; }
.pick-list-table td > code { margin-top: 1mm; overflow-wrap: anywhere; font-size: 6.5pt; }
.pick-list-table .same-location { color: #777; }
.pick-list-table .pick-quantity { font-size: 11pt; font-weight: 850; white-space: nowrap; }
.pick-list-table tr.pick-shortage td { color: #8d351d; background: #fff0e7; }
.pick-check-box { display: block; width: 8mm; height: 8mm; margin: 0 auto; border: .45mm solid #080808; }
.pick-list-footer { display: flex; justify-content: space-between; gap: 12mm; margin-top: 7mm; color: #555; font-size: 7pt; }
.pick-list-footer strong { color: #080808; white-space: nowrap; }
.wb-pick-list-sheet { padding: 12mm 13mm; font-family: Arial, sans-serif; color: #111; }
.wb-pick-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12mm; margin-bottom: 2mm; }
.wb-pick-list-head p { margin: 0 0 1mm; font-size: 8.5pt; }
.wb-pick-list-head h1 { margin: 0 0 1.5mm; font: 700 14.5pt/1.1 Arial, sans-serif; }
.wb-pick-list-head span { display: block; font-size: 8.5pt; }
.wb-partners-logo { display: flex; align-items: baseline; margin: 0 2mm 4mm 0; white-space: nowrap; letter-spacing: -.06em; }
.wb-partners-logo b { color: #7b2be2; font: 800 23pt/1 Arial, sans-serif; }
.wb-partners-logo strong { color: #080808; font: 700 20pt/1 Arial, sans-serif; }
.wb-pick-list-warning { margin: 3mm 0; padding: 2.5mm 3mm; color: #7c4616; background: #fff0d8; border: .2mm solid #e8c894; border-radius: 1.5mm; font-size: 8pt; }
.wb-label-print-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: stretch; gap: 2.5mm; margin: 3.5mm 0; padding: 3mm; background: #f6f6f8; border: .2mm solid #d9d9df; border-radius: 2.5mm; }
.wb-label-print-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2mm; align-items: center; padding: 2.3mm 2.6mm; background: #fff; border: .2mm solid #dedee4; border-radius: 2mm; cursor: pointer; }
.wb-label-print-option input { width: 4.5mm; height: 4.5mm; margin: 0; accent-color: #8d39f6; }
.wb-label-print-option span { display: flex; min-width: 0; flex-direction: column; gap: .8mm; }
.wb-label-print-option strong { font-size: 7.5pt; line-height: 1.15; }
.wb-label-print-option small { color: #696976; font-size: 6.3pt; line-height: 1.2; }
.wb-label-print-option em { margin-left: 1mm; padding: .7mm 1.3mm; color: #586fd9; background: #e7ebff; border-radius: 1.2mm; font-size: 5.8pt; font-style: normal; white-space: nowrap; }
.wb-label-print-option em.required { color: #eb724f; background: #ffead1; }
.wb-label-print-option.unavailable { opacity: .58; cursor: not-allowed; }
.wb-label-print-panel > button { min-width: 36mm; padding: 0 4mm; white-space: nowrap; }
.wb-pick-list-table { width: 100%; border-collapse: collapse; table-layout: fixed; font: 400 7pt/1.25 Arial, sans-serif; }
.wb-pick-list-table th, .wb-pick-list-table td { padding: 2mm .8mm; border: .25mm solid #96969f; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.wb-pick-list-table th { color: #111; background: #f3f3f5; font-size: 6.5pt; font-weight: 700; line-height: 1.1; letter-spacing: 0; text-transform: none; }
.wb-pick-list-table th:nth-child(1) { width: 19mm; }
.wb-pick-list-table th:nth-child(2) { width: 14mm; }
.wb-pick-list-table th:nth-child(3) { width: 20mm; }
.wb-pick-list-table th:nth-child(4) { width: 42mm; }
.wb-pick-list-table th:nth-child(5) { width: 13mm; }
.wb-pick-list-table th:nth-child(6) { width: 20mm; }
.wb-pick-list-table th:nth-child(7) { width: 29mm; }
.wb-pick-list-table th:nth-child(8) { width: 27mm; }
.wb-pick-list-table td:nth-child(1) { font-size: 6.8pt; white-space: nowrap; }
.wb-pick-list-table th:nth-child(5), .wb-pick-list-table td:nth-child(5) { text-align: center; }
.wb-pick-list-table tbody tr { min-height: 21mm; }
.wb-pick-list-table tbody tr:nth-child(odd) { background: #f7f7f9; }
.wb-pick-photo { padding: 1.2mm !important; text-align: center !important; }
.wb-pick-photo img { display: block; width: 13mm; height: 15mm; margin: 0 auto; object-fit: contain; background: #fff; }
.wb-pick-sticker { font-size: 10.5pt; white-space: nowrap; }
.wb-pick-sticker b { font-weight: 800; }
.wb-product-groups { display: grid; gap: 3mm; margin-top: 4mm; }
.wb-product-group { overflow: hidden; background: #fff; border: .25mm solid #dedee4; border-radius: 2.5mm; }
.wb-product-group > summary { display: grid; grid-template-columns: 8mm 18mm 20mm minmax(0, 1fr) 29mm; align-items: center; gap: 2.5mm; min-height: 27mm; padding: 3mm; cursor: pointer; list-style: none; }
.wb-product-group > summary::-webkit-details-marker { display: none; }
.wb-group-toggle { display: grid; width: 8mm; height: 8mm; place-items: center; background: #f0f0f4; border-radius: 1.6mm; font-size: 13pt; font-weight: 700; transition: transform .15s ease; }
.wb-product-group:not([open]) .wb-group-toggle { transform: rotate(-90deg); }
.wb-group-quantity { font-size: 12pt; white-space: nowrap; }
.wb-group-photo img { display: block; width: 18mm; height: 20mm; object-fit: contain; background: #fff; }
.wb-group-product { display: flex; min-width: 0; flex-direction: column; gap: 1mm; }
.wb-group-product > b { font-size: 10pt; line-height: 1.2; }
.wb-group-product small { color: #737381; font-size: 7pt; line-height: 1.25; }
.wb-group-product > span { display: flex; flex-wrap: wrap; gap: 1mm; }
.wb-group-product em { padding: .7mm 1.2mm; color: #fff; background: #555561; border-radius: 1mm; font-size: 6.3pt; font-style: normal; }
.wb-group-complete, .wb-order-check { display: flex; align-items: center; justify-content: flex-end; gap: 1.5mm; color: #555561; font-size: 7pt; white-space: nowrap; }
.wb-group-complete { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-self: stretch; padding: 2mm; border: .2mm solid #e2e2e8; border-radius: 2mm; }
.wb-group-complete > span { display: flex; flex-direction: column; gap: .7mm; }
.wb-group-complete b { color: #555561; font-size: 7pt; }
.wb-group-complete small { color: #7b7b88; font-size: 6.5pt; }
.wb-group-complete input, .wb-order-check input { width: 4.5mm; height: 4.5mm; margin: 0; accent-color: #8d39f6; }
.wb-group-orders { border-top: .2mm solid #e4e4e9; }
.wb-group-order { display: grid; grid-template-columns: minmax(0, 1fr) 52mm 27mm; align-items: center; gap: 3mm; min-height: 14mm; padding: 2.5mm 4mm 2.5mm 26.5mm; border-bottom: .2mm solid #ececf0; }
.wb-group-order:last-child { border-bottom: 0; }
.wb-group-order > span:first-child { color: #50505a; font-size: 11pt; letter-spacing: .02em; }
.wb-group-order > span:first-child b { margin-right: 1.5mm; color: #737381; }
.wb-group-order > small { color: #737381; font-size: 6.7pt; }
.sticker-page { min-height: 100vh; background: #e9ede8; }
.sticker-stage { width: min(100%, 760px); margin: 0 auto; padding: 36px 20px; }
.sticker-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.print-sticker { width: 75mm; min-height: 50mm; display: flex; flex-direction: column; align-items: center; margin: 0 auto; padding: 4mm; color: #000; background: #fff; border: 1px solid #c8cec9; text-align: center; }
.sticker-brand { width: 100%; padding-bottom: 2mm; border-bottom: .4mm solid #000; font-size: 7pt; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.print-sticker h1 { margin: 2.2mm 0 0; font: 800 15pt var(--font-sans); }
.print-sticker p { margin: 1mm 0 1.5mm; font-size: 8pt; }
.sticker-primary { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9pt; }
.print-sticker > span { margin-top: .7mm; font-size: 7pt; }
.print-sticker img { width: 100%; height: 15mm; margin-top: 2mm; object-fit: fill; }
.print-sticker code { margin-top: .7mm; font-size: 8pt; font-weight: 800; }
.sticker-warning { width: min(100%, 75mm); margin: 13px auto 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.marketplace-product-sticker-stage { width: min(100%, 620px); }
.marketplace-product-sticker { box-sizing: border-box; width: 58mm; height: 40mm; display: flex; flex-direction: column; align-items: stretch; margin: 0 auto; padding: 2.4mm 3mm 2mm; overflow: hidden; color: #000; background: #fff; border: 1px solid #c8cec9; font-family: var(--font-sans); }
.marketplace-product-sticker header, .marketplace-product-sticker footer { display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.marketplace-product-sticker header { min-height: 5mm; padding-bottom: 1mm; border-bottom: .35mm solid #000; font-size: 7pt; }
.marketplace-product-sticker header strong { font-size: 9pt; text-transform: uppercase; }
.marketplace-product-sticker.wb header strong { color: #6b28a8; }
.marketplace-product-sticker.ozon header strong { color: #1650b8; }
.marketplace-product-sticker header span, .marketplace-product-sticker footer span { max-width: 34mm; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-product-sticker h1 { height: 6mm; margin: 1mm 0 .5mm; overflow: hidden; font: 750 7pt/1.15 var(--font-sans); text-align: center; }
.marketplace-product-sticker img { width: 100%; height: 14mm; object-fit: fill; }
.marketplace-product-sticker code { margin-top: .3mm; font: 800 7.5pt/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-align: center; }
.marketplace-product-sticker footer { margin-top: auto; padding-top: .7mm; border-top: .25mm solid #000; font-size: 5.5pt; }

.topology-form-shell { align-items: stretch; width: min(100%, 1180px); margin: 0 auto; }
.wide-back { width: 100%; }
.topology-form-layout { display: grid; grid-template-columns: minmax(0, 650px) minmax(330px, 1fr); align-items: start; gap: 18px; }
.topology-guide { position: sticky; top: 92px; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 22px 60px rgba(20,36,29,.05); }
.diagram-head h2 { margin: 0 0 7px; font: 650 25px var(--font-sans); }
.warehouse-diagram { margin-top: 22px; padding: 16px; background: #eef2ed; border-radius: 14px; }
.diagram-zone { padding: 11px; color: #fff; background: var(--green-dark); border-radius: 11px; font-weight: 800; }
.diagram-row { margin-top: 9px; padding: 10px; color: var(--ink); background: #cfe2d7; border-radius: 9px; }
.diagram-section { margin-top: 8px; padding: 9px; background: #fff; border: 2px solid #80a892; border-radius: 8px; }
.diagram-tier { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 5px; margin-top: 8px; }
.diagram-tier em, .diagram-tier b { padding: 8px 6px; border-radius: 6px; font-size: 10px; font-style: normal; text-align: center; }
.diagram-tier em { color: #fff; background: var(--green); }
.diagram-tier b { color: var(--green-dark); background: var(--mint); border: 1px solid #c6ddcf; }
.muted-tier { opacity: .58; }
.diagram-address { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 12px 14px; background: #f8f9f6; border: 1px solid var(--line); border-radius: 10px; }
.diagram-address small { color: var(--muted); }
.diagram-address strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.diagram-example { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.import-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 14px; margin-top: 14px; }
.import-card { width: 100%; }
.guide-card { padding: 25px; }
.guide-card .step { margin-bottom: 10px; }
.guide-card p { color: var(--muted); line-height: 1.55; }
.guide-card hr { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.columns-list { display: flex; flex-wrap: wrap; gap: 6px; }
.columns-list code { padding: 5px 7px; background: #edf2ee; border-radius: 6px; }
.small-note { font-size: 12px; }
.messages { width: min(100%, 1320px); margin: 16px auto -24px; padding: 0 26px; }
.message { padding: 12px 14px; background: var(--mint); color: var(--green-dark); border: 1px solid #c8ded1; border-radius: 10px; }
.message.error { background: #f6e4e1; color: var(--red); border-color: #e8c7c2; }
.site-footer { width: min(100%, 1320px); margin: 0 auto; padding: 22px 26px 38px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

/* Monochrome workspace inspired by Tasty Coffee's typography and spacing. */
body {
  min-height: 100vh;
  background: var(--paper);
}

.topbar {
  min-height: 76px;
  background: rgba(245,245,247,.91);
  border-bottom-color: rgba(0,0,0,.09);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.brand {
  gap: 11px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.brand-mark {
  color: #fff;
  background: #080808;
  border: 1px solid #080808;
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(77,72,109,.16);
}

.topnav a, .top-link {
  color: #424247;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.topnav a:hover, .top-link:hover { color: #000; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.07); }

.primary, .secondary, .ghost, .danger-button {
  min-height: 42px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.primary {
  color: #fff;
  background: #080808;
  border-color: #050505;
  box-shadow: 0 10px 24px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.12);
}

.primary:hover { background: #242424; transform: translateY(-1px); box-shadow: 0 13px 28px rgba(0,0,0,.2); }
.secondary, .ghost { color: #0a0a0a; background: rgba(255,255,255,.84); border-color: rgba(0,0,0,.13); }
.secondary:hover, .ghost:hover { border-color: #080808; transform: translateY(-1px); }
.secondary.active-filter { color: #fff; background: #080808; border-color: #080808; }

.hero-row h1, .form-card h1, .auth-card h1, .scan-card h1 {
  color: #000;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
  text-transform: uppercase;
}

.hero-row h1 { font-size: clamp(38px, 5.1vw, 62px); }
.hero-row.compact h1 { font-size: clamp(35px, 4.4vw, 54px); }
.panel-head h2, .guide-card h2, .table-head h2, .diagram-head h2, .counterparty-form legend {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -.025em;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 9px 5px;
  color: #080808;
  background: #e7e7ea;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 999px;
  letter-spacing: .115em;
}

.muted { line-height: 1.55; }
.page-shell { padding-top: 54px; }

.panel, .table-card, .form-card, .auth-card, .guide-card, .summary-card, .zone-card, .marketplace-connect,
.service-mode-card, .pick-order-card, .shipment-choice-grid > a, .fbs-order-card, .scan-card, .api-sync-details {
  border-color: rgba(0,0,0,.1);
  box-shadow: 0 12px 34px rgba(0,0,0,.045);
}

.panel, .table-card, .form-card, .auth-card, .guide-card, .summary-card { border-radius: 22px; }
.form-card, .auth-card, .scan-card { box-shadow: 0 24px 70px rgba(0,0,0,.09); }
.auth-card, .form-card { background: #fff; }

.summary-card { min-height: 166px; padding: 23px; overflow: hidden; }
.summary-card:nth-child(2), .summary-card:nth-child(3), .summary-card:nth-child(4) { background: #fff; }
.summary-card.featured { color: #fff; background: #080808; border-color: #050505; box-shadow: 0 18px 38px rgba(0,0,0,.17); }
.summary-card.featured span, .summary-card.featured small { color: #d2d2d6; }
.summary-card strong, .inventory-summary strong { font-family: var(--font-sans); font-weight: 800; }

.inventory-summary article {
  min-height: 88px;
  background: #fff;
  border-color: rgba(0,0,0,.1);
  border-radius: 17px;
  box-shadow: 0 9px 28px rgba(0,0,0,.04);
}
.inventory-summary article:nth-child(2), .inventory-summary article:nth-child(3) { background: #fff; }
.fbs-summary article,
.fbs-summary article:nth-child(2),
.fbs-summary article:nth-child(3) {
  color: #000;
  background: #7bd3ff;
  border-color: rgba(0,0,0,.12);
}
.fbs-summary span {
  color: #000;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}
.fbs-summary strong { color: #000; }
.fbs-page, .fbs-page button, .fbs-page input, .fbs-page select, .fbs-page textarea, .fbs-page table {
  font-family: var(--font-sans);
}
.fbs-page .fbs-summary span {
  font-size: 12px;
  line-height: normal;
  text-transform: none;
}
.fbs-page .fbs-summary strong { font-size: 28px; }
.fbs-page .orders-table th, .fbs-page .shipment-orders-table th { padding: 10px 9px; }
.fbs-page .orders-table td, .fbs-page .shipment-orders-table td { padding: 10px 9px; font-size: 13px; }
.fbs-page .fbs-order-heading > strong { font-size: 13px; }
.fbs-page .fbs-order-body p, .fbs-page .scan-product span { font-family: var(--font-sans); }

.integration-note, .message {
  color: #080808;
  background: #ededf0;
  border-color: rgba(0,0,0,.1);
  box-shadow: inset 0 1px rgba(255,255,255,.5), 0 10px 26px rgba(72,74,106,.07);
}
.integration-note span { color: #4f4f55; }
.message.error { color: var(--red); background: #f6e4e1; }

.movement-icon, .quick-link b, .step, .zone-card > span, .node-kind, .service-badges span,
.order-meta-badges b, .status {
  color: #0a0a0a;
  background: var(--mint);
}
.movement-icon.out { color: var(--red); background: #f6e4e1; }
.status { border: 1px solid rgba(0,0,0,.07); }
.credential-state.ok, .auto-sync-badge { color: var(--success); background: var(--success-soft); }

.zone-card, .marketplace-connect, .service-mode-card, .shipment-choice-grid > a, .fbs-order-card {
  background: #fff;
  border-radius: 17px;
}
.zone-card:nth-child(3n+2), .service-mode-card:nth-child(3n+2),
.zone-card:nth-child(3n+3), .service-mode-card:nth-child(3n+3) { background: #fff; }
.zone-card.active, .shipment-choice-grid > a:hover { border-color: #080808; box-shadow: 0 0 0 2px rgba(0,0,0,.06), 0 12px 30px rgba(0,0,0,.06); }

.order-stage-tabs { padding: 6px; background: #e7e7ea; border: 1px solid rgba(0,0,0,.06); border-radius: 16px; }
.order-stage-tabs a { border-radius: 12px; }
.order-stage-tabs a.active { color: #fff; background: #080808; box-shadow: 0 7px 18px rgba(0,0,0,.17); }
.order-stage-tabs a.active b { background: rgba(255,255,255,.16); }

th { color: #58585e; background: #f0f0f2; font-family: var(--font-sans); font-weight: 800; letter-spacing: .075em; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f7f7f8; }
.orders-table tbody tr:has([data-order-checkbox]:checked) { background: #ededf0; }

.filterbar input, .filterbar select, .stack-form input, .stack-form select, .stack-form textarea,
.form-field input, .form-field select, .form-field textarea {
  min-height: 44px;
  color: #080808;
  background: rgba(255,255,255,.82);
  border-color: rgba(0,0,0,.13);
  border-radius: 12px;
}
.filterbar input:focus, .filterbar select:focus, .stack-form input:focus, .stack-form select:focus,
.stack-form textarea:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 3px solid rgba(200,220,255,.72);
  border-color: #080808;
}

.switch-control input:checked + .switch-slider { background: #080808; }
.switch-control input:focus-visible + .switch-slider, .service-mode-card input:focus-visible + .service-mode-check { outline-color: var(--focus); }
.service-mode-card input:checked + .service-mode-check { border-color: #080808; background: #080808; }

.warehouse-diagram { background: #ededf0; }
.diagram-zone { background: #080808; }
.diagram-row { background: rgba(255,255,255,.56); border: 1px solid rgba(0,0,0,.1); }
.diagram-section { border-color: #080808; }
.diagram-tier em { color: #fff; background: #080808; }
.diagram-tier b { color: #080808; background: rgba(255,255,255,.62); border-color: rgba(0,0,0,.12); }

.site-footer { color: #707077; border-top-color: rgba(0,0,0,.1); }

@media (prefers-reduced-motion: reduce) {
  .primary, .secondary, .ghost, .danger-button { transition: none; }
  .primary:hover, .secondary:hover, .ghost:hover { transform: none; }
}

@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; gap: 8px 18px; }
  .topnav { order: 3; width: 100%; overflow-x: auto; }
  .top-actions { margin-left: auto; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .inventory-summary { grid-template-columns: 1fr; }
  .content-grid, .import-grid { grid-template-columns: 1fr; }
  .topology-form-layout { grid-template-columns: 1fr; }
  .topology-guide { position: static; }
  .active-storage-box { grid-template-columns: 1fr; }
  .active-storage-box .hero-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .page-shell { padding: 31px 15px 50px; }
  .topbar { padding: 10px 15px; }
  .top-actions .top-link { display: none; }
  .hero-row { align-items: stretch; flex-direction: column; }
  .hero-actions { flex-wrap: wrap; }
  .hero-actions a { flex: 1; white-space: nowrap; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 126px; }
  .filterbar { flex-direction: column; }
  .filterbar select { width: 100%; }
  .fbs-marketplace-filter { width: 100%; margin-left: 0; }
  .fbs-marketplace-filter a { flex: 1; }
  .form-card, .auth-card, .guide-card { padding: 23px 18px; }
  .counterparty-form fieldset { padding: 16px 13px; }
  .field-grid { grid-template-columns: 1fr; }
  .service-mode-grid { grid-template-columns: 1fr; }
  .marketplace-settings { grid-template-columns: 1fr; }
  .field-wide, .checkbox-field { grid-column: auto; }
  .input-action { grid-template-columns: 1fr; }
  .movement-row { padding: 14px 15px; }
  .movement-amount span { display: none; }
  .row-actions { min-width: 250px; justify-content: flex-start; }
  .tree-node.depth-1 { padding-left: 14px; }
  .tree-node.depth-2 { padding-left: 28px; }
  .tree-node.depth-3 { padding-left: 42px; }
  .site-footer { flex-direction: column; padding: 20px 15px 32px; }
  .integration-note, .dispatch-form, .supply-panel { align-items: stretch; flex-direction: column; }
  .scan-card { padding: 24px 18px; }
  .fbs-order-grid { grid-template-columns: 1fr; }
  .fbs-order-card { grid-template-columns: 82px minmax(0, 1fr); }
  .fbs-order-card > img { width: 82px; height: 82px; }
  .pick-order-card { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
  .pick-order-card img { width: 90px; height: 90px; }
  .bulk-order-bar { align-items: stretch; flex-wrap: wrap; }
  .bulk-order-bar > [data-selected-count] { margin-left: 0; }
  .bulk-order-scope { width: 100%; }
  .bulk-order-bar button { width: 100%; }
}

.select-column { width: 42px; text-align: center; }
.select-column input { width: 17px; height: 17px; accent-color: #080808; cursor: pointer; }
.address-print-bar { position: sticky; z-index: 12; bottom: 16px; display: flex; align-items: center; gap: 14px; width: min(100% - 24px, 720px); margin: 18px auto 0; padding: 12px 13px 12px 18px; color: #fff; background: #080808; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.address-print-bar[hidden] { display: none; }
.address-print-bar span { font-weight: 800; white-space: nowrap; }
.address-print-bar small { flex: 1; color: #cfcfd4; }
.address-print-bar .primary { color: #080808; background: #fff; box-shadow: none; }
.address-label-page { background: #e9e9ec; }
.address-label-stage { width: min(100%, 980px); margin: 0 auto; padding: 32px 20px 56px; }
.address-label-stage .sticker-toolbar { align-items: center; }
.address-label-stage .sticker-toolbar > span { color: var(--muted); font-weight: 750; }
.address-label-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.address-label-sticker { width: 60mm; height: 40mm; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; padding: 2.5mm; color: #000; background: #fff; border: 1px solid #c8c8cc; text-align: center; overflow: hidden; }
.address-label-sticker h1 { max-width: 100%; margin: 0 0 1.5mm; font: 800 18pt/1 var(--font-sans); letter-spacing: -.03em; white-space: nowrap; }
.address-label-sticker img { width: 25mm; height: 25mm; object-fit: contain; }
.hero-actions form { margin: 0; }
.products-table tbody tr.stock-mismatch td { background: #fff1df; }
.products-table tbody tr.stock-mismatch:hover td { background: #ffe9ce; }
.products-table tbody tr.stock-mismatch td:first-child { box-shadow: inset 4px 0 #c46a13; }
.products-table th { padding: 10px 9px; }
.products-table td { padding: 10px 9px; font-size: 13px; }
.products-table .product-photo-cell { width: 64px; padding: 7px 6px 7px 10px; }
.products-table .product-photo { width: 52px; height: 52px; }
.product-code-cell { min-width: 126px; }
.product-code-cell > strong, .product-code-cell > small { display: block; }
.product-code-cell > small { margin-top: 2px; color: var(--muted); }
.product-source-badges { margin-top: 6px; }
.product-name-cell { min-width: 160px; max-width: 245px; }
.product-client-cell { min-width: 105px; max-width: 155px; }
.product-packaging-cell { min-width: 96px; max-width: 145px; }
.products-table .package-chip { padding: 4px 6px; }
.product-row-actions { min-width: 0; gap: 6px; }
.products-table .row-actions .icon-action { flex-basis: 30px; width: 30px; height: 30px; }
.products-table .row-actions .delete-icon { color: var(--red); background: #f6e4e1; }
.products-table .row-actions .delete-icon:hover { color: #fff; background: var(--red); }
.stock-quantity { min-width: 78px; white-space: nowrap; }
.stock-quantity strong, .stock-quantity small { display: block; }
.stock-reserved { min-width: 120px; }
.stock-reserved strong { color: #9b4c08; }
.stock-reserved small { margin-top: 3px; color: var(--muted); }
.stock-available strong { color: var(--success); }
.stock-available small { margin-top: 3px; color: var(--muted); }
.stock-difference { margin-top: 4px; color: #9b4c08; font-weight: 800; }
.stock-equal { margin-top: 4px; color: var(--success); font-weight: 750; }
.marketplace-stock-cell { min-width: 108px; }
.marketplace-stock-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 6px; }
.marketplace-stock-row + .marketplace-stock-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.marketplace-stock-row strong { display: inline; }
.marketplace-stock-row small { grid-column: 1 / -1; margin-top: 0; }
.marketplace-stock-row .marketplace-badge { justify-self: start; padding: 3px 6px; }
.image-modal-open { overflow: hidden; }
.product-image-modal[hidden] { display: none; }
.product-image-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(8,8,8,.76); backdrop-filter: blur(5px); }
.product-image-modal-card { position: relative; width: min(92vw, 920px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px; background: #fff; border-radius: 18px; box-shadow: 0 28px 90px rgba(0,0,0,.35); }
.product-image-modal-card img { display: block; max-width: 100%; width: auto; max-height: calc(90vh - 100px); object-fit: contain; border-radius: 12px; }
.product-image-modal-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-image-modal-close { position: absolute; z-index: 1; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(8,8,8,.78); border: 0; border-radius: 50%; font: 500 27px/1 var(--font-sans); cursor: pointer; }
.product-image-modal-close:hover, .product-image-modal-close:focus-visible { background: #080808; outline: 3px solid rgba(255,255,255,.7); }
.stock-visibility-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 11px; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; white-space: nowrap; }
.stock-visibility-toggle > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.stock-visibility-toggle > span.active { color: var(--ink); }
.stock-visibility-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stock-toggle-slider { position: relative; flex: 0 0 42px; width: 42px; height: 23px; background: #cfcfd4; border-radius: 999px; transition: .2s; }
.stock-toggle-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.22); transition: .2s; }
.stock-visibility-toggle input:checked + .stock-toggle-slider { background: #080808; }
.stock-visibility-toggle input:checked + .stock-toggle-slider::after { transform: translateX(19px); }
.stock-visibility-toggle input:focus-visible + .stock-toggle-slider { outline: 3px solid var(--focus); }
.marketplace-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 12px; white-space: nowrap; }
.marketplace-filter label { cursor: pointer; }
.marketplace-filter input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.marketplace-filter span { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 32px; padding: 6px 10px; color: var(--muted); background: #ededf0; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 850; transition: .15s ease; }
.marketplace-filter input:checked + span.wb { color: #6b28a8; background: #f0e5fa; border-color: #dfc8f2; }
.marketplace-filter input:checked + span.ozon { color: #1650b8; background: #e5edff; border-color: #c9d8ff; }
.marketplace-filter input:focus-visible + span { outline: 3px solid var(--focus); }

.receipt-filterbar { align-items: center; }
.receipt-filterbar .order-stage-tabs { flex: 1; margin: 0; }
.receipt-period-tabs a { min-width: 105px; }
.receipt-summary { grid-template-columns: repeat(4, 1fr); }
.receipt-history-card, .receipt-comparison { margin-top: 15px; }
.receipt-history-card a { color: var(--ink); font-weight: 800; text-decoration: none; }
.receipt-hero .status { padding: 8px 12px; }
.receipt-hero .hero-actions form { margin: 0; }
.receipt-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr); gap: 14px; margin-top: 15px; align-items: start; }
.receipt-box-workspace { margin-top: 15px; }
.active-storage-box { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px; padding: 20px 22px; background: #e4f6ff; border: 1px solid #9ccfe8; border-radius: 18px; }
.active-storage-box h2 { margin: 3px 0 5px; }
.active-storage-box p { margin: 0; }
.active-storage-box-stats { display: flex; gap: 10px; }
.active-storage-box-stats span { display: flex; min-width: 85px; flex-direction: column; gap: 3px; padding: 10px 12px; color: var(--muted); background: #fff; border-radius: 11px; font-size: 10px; }
.active-storage-box-stats b { color: var(--ink); font-size: 19px; }
.active-storage-box .hero-actions form { display: flex; gap: 8px; }
.empty-box-state { grid-template-columns: minmax(0, 1fr) auto; background: #f6f6f7; border-color: var(--line); }
.empty-box-state form { min-width: 230px; }
.box-action-status { min-height: 15px; margin: 7px 0 0 !important; color: var(--muted); font-size: 10px; text-align: center; }
.active-storage-box-contents { padding: 14px 18px 16px; background: #fff; border: 1px solid #9ccfe8; border-top: 0; border-radius: 0 0 18px 18px; }
.active-storage-box + .active-storage-box-contents { margin-top: -14px; padding-top: 28px; }
.active-box-content-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.active-box-content-head h3 { margin: 2px 0 0; font-size: 15px; }
.active-box-content-head > strong { font-size: 18px; white-space: nowrap; }
.active-box-content-list { display: grid; max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.active-box-content-list article { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.active-box-content-list article:last-child { border-bottom: 0; }
.active-box-content-list img { width: 46px; height: 46px; object-fit: contain; background: #f4f4f5; border-radius: 8px; }
.active-box-content-list article div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.active-box-content-list article div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-box-content-list article div span { color: var(--muted); font-size: 10px; }
.active-box-content-list article > b { font-size: 14px; white-space: nowrap; }
.active-box-empty { margin: 0; padding: 18px; color: var(--muted); text-align: center; }
.receipt-boxes-card { margin-top: 18px; }
.placement-result { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 18px 20px; color: #103c2d; background: #dff4e8; border: 1px solid #aad8bd; border-radius: 16px; }
.placement-result p, .placement-result h2 { margin: 0; }
.placement-result strong { font-size: 24px; }
.box-placement-workspace { margin-bottom: 18px; }
.small-summary-value { max-width: 190px; overflow: hidden; text-overflow: ellipsis; font-size: 18px !important; white-space: nowrap; }
.box-event-card { margin-top: 18px; }
.muted-row { opacity: .58; }
.box-billing-table details summary { color: var(--green); font-weight: 800; cursor: pointer; }
.box-billing-table details small { display: block; max-width: 240px; margin-top: 6px; color: var(--muted); line-height: 1.45; }
.receipt-scan-card { width: 100%; }
.receipt-scan-card .integration-note { margin: 18px 0 0; }
.receipt-scan-card .integration-note strong { white-space: nowrap; }
.receipt-last-scan { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; margin: 20px 0 4px; padding: 16px; background: #f1f7f3; border: 2px solid #82b99e; border-radius: 15px; box-shadow: 0 10px 28px rgba(29,108,77,.08); }
.receipt-last-scan > img { width: 170px; height: 170px; grid-row: 1 / 3; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.receipt-last-scan-info { min-width: 0; }
.receipt-last-scan-info .eyebrow { margin-bottom: 5px; color: var(--success); }
.receipt-last-scan-info h2 { margin: 0; font: 750 24px/1.12 var(--font-sans); overflow-wrap: anywhere; }
.receipt-last-scan-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.receipt-last-scan-meta strong { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt-last-scan-check { margin: 13px 0 8px; font-weight: 800; }
.receipt-last-scan-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.receipt-last-scan-result strong { color: var(--success); font-size: 17px; }
.receipt-last-scan-result code, .receipt-last-scan-result span { color: var(--muted); font-size: 10px; }
.receipt-last-scan > form { grid-column: 2; margin: 0; }
.receipt-last-scan > form button { width: 100%; min-height: 40px; }
.receipt-quantity-field input { max-width: 190px; min-height: 46px; }
.receipt-guide { position: sticky; top: 92px; }
.receipt-guide h2 { margin: 0; }
.receipt-guide ol { margin: 18px 0; padding-left: 22px; color: var(--muted); line-height: 1.8; }
.receipt-guide > p:last-child { margin-bottom: 0; padding-top: 15px; border-top: 1px solid var(--line); }
.receipt-lines-table { min-width: 880px; }
.receipt-result { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.receipt-result.matched { color: var(--success); background: var(--success-soft); }
.receipt-result.shortage { color: #8a541c; background: #fff0da; }
.receipt-result.excess { color: #984123; background: #fbe4dd; }
.receipt-result.unplanned { color: var(--muted); background: #ededf0; }
.receipt-line-shortage td { background: #fffaf1; }
.receipt-line-excess td { background: #fff5f1; }
.receipt-line-shortage td:first-child { box-shadow: inset 4px 0 #c18434; }
.receipt-line-excess td:first-child { box-shadow: inset 4px 0 #b95b36; }
.receipt-scan-reversed { opacity: .52; }
.receipt-scan-reversed td { background: #f2f2f4; }
.receipt-history-card .row-action form { margin: 0; }

.stocktake-summary { grid-template-columns: repeat(4, 1fr); }
.stocktake-mode { font-size: 18px !important; }
.stocktake-hero .hero-actions form, .stocktake-location-progress form, .stocktake-bottom-bar form { margin: 0; }
.stocktake-address-panel { display: grid; grid-template-columns: minmax(300px, 1fr) auto minmax(260px, .7fr); align-items: end; gap: 14px; margin-bottom: 15px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.stocktake-address-scan { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin: 0; }
.stocktake-address-scan .form-field { margin: 0; }
.stocktake-address-select { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.stocktake-address-select label { font-size: 11px; font-weight: 750; }
.stocktake-address-select select { min-height: 44px; }
.stocktake-or { align-self: center; padding-bottom: 12px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.stocktake-location-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 15px 0 10px; padding: 16px 18px; color: #fff; background: #080808; border-radius: 14px; }
.stocktake-location-head h2 { margin: 0; color: #fff; font-size: 30px; }
.stocktake-location-head .eyebrow { color: #aeb0b5; }
.stocktake-location-progress { display: flex; align-items: center; gap: 12px; }
.stocktake-location-progress span { color: #d8d8dc; font-size: 11px; font-weight: 700; }
.stocktake-location-progress .secondary { color: #080808; background: #fff; }
.stocktake-lines-card { margin-top: 15px; }
.stocktake-lines-table { min-width: 920px; }
.stocktake-lines-table tr.stocktake-mismatch td { background: #fff7ed; }
.stocktake-lines-table tr.stocktake-mismatch td:first-child { box-shadow: inset 4px 0 #b95b36; }
.stocktake-bottom-bar { position: sticky; z-index: 11; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 14px 16px 14px 20px; color: #fff; background: #080808; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.2); }
.stocktake-bottom-bar > div { display: flex; flex-direction: column; gap: 3px; }
.stocktake-bottom-bar span { color: #cfcfd4; font-size: 10px; }
.stocktake-bottom-bar .status { color: #fff; background: rgba(255,255,255,.12); }
.stocktake-status-recount, .stocktake-status-review { color: #8a541c; background: #fff0da; }
.stocktake-status-completed { color: var(--success); background: var(--success-soft); }
.stocktake-status-cancelled { color: var(--muted); background: #ededf0; }
.empty-state { margin: 15px 0; padding: 32px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.empty-state h2 { margin: 0 0 7px; }
.empty-state p { margin: 0; color: var(--muted); }

@media (max-width: 980px) {
  .receipt-workspace { grid-template-columns: 1fr; }
  .receipt-guide { position: static; }
  .receipt-summary { grid-template-columns: 1fr 1fr; }
  .stocktake-summary { grid-template-columns: 1fr 1fr; }
  .stocktake-address-panel { grid-template-columns: 1fr; align-items: stretch; }
  .stocktake-or { padding: 0; text-align: center; }
}

@media (max-width: 680px) {
  .receipt-summary { grid-template-columns: 1fr; }
  .receipt-filterbar { align-items: stretch; }
  .receipt-filterbar .order-stage-tabs { width: 100%; }
  .receipt-last-scan { grid-template-columns: 112px minmax(0, 1fr); padding: 12px; }
  .receipt-last-scan > img { width: 112px; height: 112px; grid-row: auto; }
  .receipt-last-scan-info h2 { font-size: 19px; }
  .receipt-last-scan-check, .receipt-last-scan-result span { display: none; }
  .receipt-last-scan > form { grid-column: 1 / -1; }
  .stocktake-summary { grid-template-columns: 1fr; }
  .stocktake-address-scan { grid-template-columns: 1fr; }
  .stocktake-location-head, .stocktake-location-progress, .stocktake-bottom-bar { align-items: stretch; flex-direction: column; }
  .stocktake-bottom-bar button { width: 100%; }
}

@page { size: 75mm 50mm; margin: 0; }
@media print {
  body.sticker-page { background: #fff; }
  .sticker-stage { width: 75mm; margin: 0; padding: 0; }
  .sticker-toolbar, .sticker-warning { display: none !important; }
  .print-sticker { width: 75mm; min-height: 50mm; border: 0; }
  .marketplace-product-sticker-stage { width: 58mm; }
  .marketplace-product-sticker { width: 58mm; height: 40mm; border: 0; }
  body.address-label-page { background: #fff; }
  .address-label-stage { width: 60mm; margin: 0; padding: 0; }
  .address-label-stage .sticker-toolbar, .address-label-stage .sticker-warning { display: none !important; }
  .address-label-list { display: block; }
  .address-label-sticker { width: 60mm; height: 40mm; min-height: 40mm; border: 0; break-after: page; page-break-after: always; }
  .address-label-sticker:last-child { break-after: auto; page-break-after: auto; }
  body.pick-list-page { background: #fff; }
  .pick-list-sheet { width: 100%; min-height: auto; margin: 0; padding: 0; box-shadow: none; }
  .pick-list-toolbar { display: none !important; }
  .pick-list-table tr { break-inside: avoid; page-break-inside: avoid; }
  .wb-pick-list-sheet { padding: 0; }
  .wb-pick-list-warning, .wb-label-print-panel { display: none !important; }
  .wb-pick-list-table thead { display: table-header-group; }
  .wb-pick-list-table tr { break-inside: avoid; page-break-inside: avoid; }
  .wb-product-group > summary, .wb-group-order { break-inside: avoid; page-break-inside: avoid; }
  .wb-product-group { overflow: visible; break-inside: auto; page-break-inside: auto; }
  .wb-product-group:not([open]) > .wb-group-orders { display: block; }
}

/* Keep marketplace snapshot actions readable at desktop and mobile widths. */
.product-hero { flex-wrap: wrap; }
.product-hero .hero-actions { flex-wrap: wrap; align-items: flex-start; }
.product-stock-pull { max-width: 240px; }
.product-stock-pull small { display: block; margin-top: 6px; line-height: 1.4; }
.product-stock-pull button:disabled { cursor: not-allowed; opacity: .5; }
