:root {
  color-scheme: light;
  --primary: #0b2b52;
  --primary-2: #15436f;
  --accent: #2477e3;
  --success: #159a63;
  --warning: #d78b05;
  --danger: #cf3e48;
  --violet: #6c47d9;
  --background: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #13213c;
  --muted: #68758a;
  --line: #dfe5ed;
  --shadow: 0 8px 28px rgba(19, 33, 60, 0.08);
  --shadow-soft: 0 3px 12px rgba(19, 33, 60, 0.07);
  --radius: 16px;
  --radius-small: 11px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--background); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.68; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.45rem, 4vw, 1.9rem); line-height: 1.15; margin-bottom: 4px; letter-spacing: -0.025em; }
h2 { font-size: 1.05rem; margin-bottom: 10px; }
h3 { font-size: 0.98rem; margin-bottom: 4px; }
small { color: var(--muted); }
.icon { flex: none; }

.app-shell { min-height: 100vh; }
.app-main { width: min(100%, 1120px); margin: 0 auto; padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; min-height: 50px; }
.page-title-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.page-title-wrap p { color: var(--muted); font-size: 0.84rem; margin: 0; }

.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); box-shadow: 0 -8px 24px rgba(19, 33, 60, .06); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; color: #8995a7; text-decoration: none; font-size: .67rem; font-weight: 650; }
.nav-item.active { color: var(--primary); }
.nav-item.active::before { content: ""; position: absolute; width: 28px; height: 3px; margin-top: -7px; border-radius: 0 0 6px 6px; background: var(--accent); }

.button { min-height: 46px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; font-weight: 750; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.button:active { transform: translateY(1px); }
.button.primary { color: #fff; background: var(--primary); box-shadow: 0 6px 18px rgba(11, 43, 82, .18); }
.button.primary:hover { background: var(--primary-2); }
.button.secondary { color: var(--primary); border: 1px solid var(--line); background: #fff; }
.button.danger { color: #fff; background: var(--danger); }
.button.compact { min-height: 40px; padding: 8px 13px; font-size: .87rem; }
.button.full { width: 100%; }
.button.prominent { min-height: 52px; margin-bottom: 12px; font-size: .98rem; }
.grow { flex: 1; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 11px; color: var(--primary); background: transparent; }
.icon-button:hover { background: #edf2f7; }
.text-button { border: 0; background: none; color: var(--accent); display: inline-flex; align-items: center; gap: 3px; font-weight: 750; }
.danger-text { color: var(--danger); }
.success-text { color: var(--success) !important; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
.kpi-card { position: relative; min-height: 119px; display: flex; flex-direction: column; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; width: 72px; height: 72px; right: -28px; top: -28px; border-radius: 50%; background: currentColor; opacity: .05; }
.kpi-card small { font-size: .76rem; font-weight: 700; color: var(--text); margin-top: 8px; }
.kpi-card strong { margin-top: 4px; font-size: 1.35rem; letter-spacing: -.03em; }
.kpi-card em { margin-top: 2px; color: var(--muted); font-size: .68rem; font-style: normal; }
.kpi-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: currentColor; }
.kpi-icon .icon { color: #fff; }
.kpi-blue { color: #2477e3; }
.kpi-amber { color: #d78b05; }
.kpi-teal { color: #159a63; }
.kpi-violet { color: #6c47d9; }

.shortcut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 24px; }
.shortcut { min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 14px; color: var(--primary); background: var(--surface); font-size: .78rem; font-weight: 750; }
.shortcut:hover { border-color: #b8c7d9; background: #fbfdff; }

.section-block { margin-top: 22px; }
.section-heading { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.section-heading a { color: var(--accent); font-size: .82rem; font-weight: 700; text-decoration: none; }
.list-card, .menu-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-soft); }
.recent-row { width: 100%; min-height: 69px; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 8px; padding: 11px 12px; border: 0; border-bottom: 1px solid #edf1f5; color: var(--text); text-align: left; background: #fff; }
.recent-row:last-child { border-bottom: 0; }
.recent-row > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.recent-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-value { align-items: flex-end; }

.search-box { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: var(--surface); box-shadow: var(--shadow-soft); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 119, 227, .12); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.filter-row { display: flex; gap: 8px; margin: 10px 0 15px; }
.scrollable { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-select { min-height: 45px; border: 1px solid var(--line); border-radius: 12px; padding: 0 34px 0 12px; color: var(--text); background: var(--surface); }

.entity-list, .orders-list, .shipments-list, .detail-list, .line-list { display: grid; gap: 10px; margin-top: 13px; }
.entity-card { min-height: 89px; display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.entity-card.muted, .product-card.muted { opacity: .68; }
.entity-avatar, .shipment-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; color: var(--accent); background: #eaf3ff; font-weight: 800; }
.entity-main { flex: 1; min-width: 0; }
.entity-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.entity-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-main p { margin: 2px 0; color: var(--muted); font-size: .82rem; }
.entity-main small { font-size: .72rem; }
.entity-actions { display: flex; flex-direction: column; }

.badge { width: fit-content; display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 8px; font-size: .68rem; font-weight: 760; white-space: nowrap; }
.badge-success { color: #087342; background: #d9f6e8; }
.badge-warning { color: #9d6200; background: #fff0cb; }
.badge-info { color: #155eb7; background: #dcecff; }
.badge-danger { color: #a62934; background: #fee2e5; }
.badge-neutral { color: #566274; background: #edf0f4; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.product-image-wrap { width: 100%; aspect-ratio: 1.25 / 1; overflow: hidden; background: #eef1f5; }
.product-image { width: 100%; height: 100%; object-fit: cover; }
.image-placeholder { display: grid; place-items: center; color: #64758a; background: linear-gradient(145deg, #eef2f7, #dde5ee); font-weight: 800; }
.product-body { padding: 11px; }
.product-body .entity-title { align-items: flex-start; }
.product-body h3 { margin: 0; font-size: .86rem; }
code { color: #64758a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.product-body p { margin: 5px 0; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.product-footer > span { display: flex; }
.product-footer .icon-button { width: 34px; height: 34px; }

.order-card { width: 100%; display: block; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-align: left; background: var(--surface); box-shadow: var(--shadow-soft); }
.order-card-top, .order-card-top > div { display: flex; justify-content: space-between; gap: 8px; }
.order-card-top > div { width: 100%; }
.order-card-top span { color: var(--muted); font-size: .72rem; font-weight: 500; }
.order-card h3 { margin: 8px 0 3px; }
.order-card p { margin: 0 0 9px; color: var(--muted); font-size: .8rem; }
.order-card p span { margin: 0 4px; }
.supply-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; font-size: .74rem; }
.supply-row strong { color: var(--accent); }
.progress-track { position: relative; height: 6px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e7ebf0; }
.progress-track span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.progress-allocated { background: #68a9f6; }
.progress-received { background: var(--success); }
.progress-caption { display: block; margin-top: 6px; font-size: .66rem; }

.shipment-card { width: 100%; min-height: 104px; display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-align: left; background: var(--surface); box-shadow: var(--shadow-soft); }
.shipment-main { flex: 1; min-width: 0; }
.shipment-main p { margin: 5px 0 2px; font-size: .82rem; }
.shipment-main small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field { display: grid; gap: 6px; min-width: 0; }
.field-label { color: #39465b; font-size: .76rem; font-weight: 750; }
.field-label em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea, .money-input { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--text); background: #fff; transition: border .15s, box-shadow .15s; }
.field input, .field select { padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 119, 227, .12); }
.field small { font-size: .67rem; }
.money-input { display: flex; align-items: center; padding-left: 11px; }
.money-input span { color: var(--muted); }
.money-input input { min-height: 44px; border: 0; box-shadow: none !important; padding-left: 6px; }
.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 10px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section, .summary-card, .supply-card, .notes-card, .identity-card, .about-card { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.form-section > h2, .summary-card > h2, .notes-card > h2 { margin-bottom: 14px; }
.page-form { padding-bottom: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.form-actions.two > * { flex: 1; }
.inline-actions { display: flex; gap: 6px; }

.image-picker { display: grid; justify-items: center; gap: 8px; padding: 13px; border: 1px dashed #b8c5d4; border-radius: 13px; background: #f8fafc; }
.image-picker.horizontal { grid-template-columns: 94px 1fr; justify-items: start; align-items: center; }
.image-picker small { display: block; margin-top: 5px; }
.image-preview { width: 92px; height: 92px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; color: var(--muted); background: #e9eef4; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

.line-editor { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.line-editor-head { display: grid; grid-template-columns: 31px 1fr 40px; align-items: center; gap: 9px; margin-bottom: 12px; }
.line-editor-head strong, .line-editor-head small { display: block; }
.line-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--primary); font-size: .75rem; font-weight: 800; }
.line-editor .field { margin-top: 10px; }
.line-total { display: flex; justify-content: space-between; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .8rem; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
.summary-grid > div { display: flex; flex-direction: column; gap: 4px; }
.summary-grid strong { color: var(--primary); font-size: 1.03rem; }
.summary-grid small { font-size: .68rem; }
.sticky-actions { position: sticky; z-index: 15; bottom: calc(70px + env(safe-area-inset-bottom)); display: flex; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(19,33,60,.14); }

.identity-card { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.identity-card h2 { margin: 3px 0; }
.identity-card p { margin: 0; color: var(--muted); font-size: .75rem; }
.status-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.status-controls.single { grid-template-columns: 1fr auto; }
.detail-line { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.product-thumb { width: 60px; height: 60px; flex: none; object-fit: cover; border-radius: 12px; }
.detail-line-main { flex: 1; min-width: 0; }
.detail-line-main p { margin: 3px 0 8px; color: var(--muted); font-size: .72rem; }
.detail-line-main > small { display: block; margin-top: 6px; }
.metrics-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.metrics-row span { color: var(--muted); font-size: .65rem; }
.metrics-row strong { display: block; color: var(--text); font-size: .74rem; }
.supply-card { margin-top: 11px; }
.supply-card > small { display: block; margin-top: 7px; }
.linked-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.linked-row { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; background: #fff; }
.linked-row:last-child { border-bottom: 0; }
.linked-row > span:first-child { display: flex; align-items: center; gap: 9px; }
.linked-row strong, .linked-row small { display: block; }
.notes-card { margin-top: 11px; }
.notes-card p { margin: 0; color: #465267; white-space: pre-wrap; }
.muted-copy { color: var(--muted); }

.provider-control { display: grid; gap: 7px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: #566274; background: #fff; font-size: .8rem; font-weight: 700; }
.segmented input:checked + span { color: #fff; border-color: var(--primary); background: var(--primary); }
.allocation-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) 72px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.allocation-main { min-width: 0; }
.allocation-main p { margin: 3px 0; color: var(--muted); font-size: .72rem; }
.allocation-main > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allocation-metrics { display: flex; gap: 13px; margin-top: 9px; }
.allocation-metrics span { color: var(--muted); font-size: .61rem; }
.allocation-metrics strong { display: block; color: var(--text); font-size: .8rem; }
.quantity-picker { display: grid; gap: 4px; text-align: center; color: var(--muted); font-size: .65rem; }
.quantity-picker input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-weight: 800; }
.shipment-hero { height: 190px; margin-bottom: 11px; overflow: hidden; border-radius: var(--radius); background: #e9eef4; }
.shipment-hero img { width: 100%; height: 100%; object-fit: cover; }
.allocated-pill { min-width: 59px; padding: 7px; border-radius: 10px; text-align: center; background: #eaf3ff; }
.allocated-pill small, .allocated-pill strong { display: block; }
.allocated-pill strong { color: var(--accent); }
.info-banner { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; padding: 11px 12px; border: 1px solid #c8def9; border-radius: 12px; color: #235a96; background: #edf6ff; }
.info-banner p { margin: 0; font-size: .74rem; }

.menu-row { width: 100%; min-height: 74px; display: grid; grid-template-columns: 46px minmax(0, 1fr) 22px; align-items: center; gap: 10px; padding: 12px; border: 0; color: var(--text); text-align: left; background: #fff; }
.menu-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--accent); background: #eaf3ff; }
.menu-row strong, .menu-row small { display: block; }
.menu-row small { margin-top: 3px; }
.about-card { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; }
.app-mark { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 15px; color: #fff; background: var(--primary); }
.about-card h2 { margin: 2px 0 5px; }
.about-card p { margin-bottom: 8px; color: var(--muted); font-size: .8rem; }

.empty-state { display: grid; justify-items: center; padding: 34px 18px; border: 1px dashed #bdc8d5; border-radius: var(--radius); text-align: center; background: rgba(255,255,255,.6); }
.empty-state h3 { margin: 10px 0 5px; }
.empty-state p { max-width: 320px; margin: 0 0 13px; color: var(--muted); font-size: .8rem; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: var(--accent); background: #eaf3ff; }
.loading { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.spinner { width: 22px; height: 22px; display: inline-block; border: 3px solid #dce4ed; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
.spinner.small { width: 17px; height: 17px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { display: flex; gap: 10px; padding: 15px; border: 1px solid #f1bbc0; border-radius: var(--radius); color: #9e2d36; background: #fff0f1; }
.error-panel h3 { margin-bottom: 4px; }
.error-panel p { margin: 0; font-size: .82rem; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 10px 10px 0; background: rgba(10, 26, 48, .52); backdrop-filter: blur(3px); }
.modal-panel { width: min(100%, 540px); max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; background: var(--surface); box-shadow: 0 -16px 50px rgba(10, 26, 48, .25); animation: slideUp .2s ease-out; }
.modal-wide { width: min(100%, 700px); }
.modal-content { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-header h2 { margin-bottom: 4px; font-size: 1.25rem; }
.modal-header p { margin: 0; color: var(--muted); font-size: .77rem; }
@keyframes slideUp { from { transform: translateY(25px); opacity: 0; } }
.confirm-dialog { padding: 5px 2px; text-align: center; }
.confirm-dialog h2 { margin: 12px 0 7px; font-size: 1.25rem; }
.confirm-dialog p { margin: 0 0 18px; color: var(--muted); }
.confirm-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto; border-radius: 18px; color: var(--warning); background: #fff0cb; }
.confirm-icon.danger { color: var(--danger); background: #fee2e5; }

#toast-root { position: fixed; z-index: 200; top: calc(12px + env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 24px), 430px); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; padding: 12px 14px; border-radius: 13px; color: #fff; box-shadow: 0 12px 35px rgba(10,26,48,.22); transform: translateY(-12px); opacity: 0; transition: .2s; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast-success { background: #116a49; }
.toast-error { background: #a92d37; }

@media (max-width: 590px) {
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .status-controls { grid-template-columns: 1fr 1fr; }
  .status-controls .button { grid-column: 1 / -1; }
  .status-controls.single { grid-template-columns: 1fr auto; }
  .status-controls.single .button { grid-column: auto; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .inline-actions { flex-direction: column-reverse; }
  .inline-actions .button { min-height: 36px; }
}

@media (min-width: 760px) {
  .app-main { padding: 30px 24px 102px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .orders-list, .shipments-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { left: 50%; right: auto; width: min(680px, calc(100% - 28px)); bottom: 12px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 18px; padding: 7px; box-shadow: var(--shadow); }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal-panel { border-radius: 22px; }
  .modal-content { padding: 22px; }
  .shipment-hero { height: 280px; }
}

@media (min-width: 1040px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
