/* iOS-inspired operational surfaces: content remains opaque and readable;
   translucency is reserved for persistent navigation and floating controls. */
:root {
  --bg:#f2f2f7; --surface:#fff; --ink:#1c1c1e; --muted:#62626a;
  --blue:#007aff; --blue-wash:#e8f2ff; --line:#e5e5ea;
  --surface-secondary:#f8f8fa; --subtle:#6b6b73; --glass:rgba(247,247,251,.84);
  --shadow:0 1px 2px rgba(28,28,30,.04);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","Microsoft YaHei UI",sans-serif;
}
body {background:var(--bg);color:var(--ink)}
.sidebar {background:var(--glass);border-color:var(--line);backdrop-filter:blur(24px) saturate(1.5)}
.topbar {position:sticky;top:0;z-index:5;background:var(--glass);backdrop-filter:blur(24px) saturate(1.5);border-bottom:1px solid var(--line)}
.top-actions {display:flex;align-items:center;gap:20px}
.theme-button {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--glass);color:var(--subtle);font-size:12px;font-weight:550}
.theme-button:hover {color:var(--blue);background:var(--surface)}
.theme-button .icon {width:16px;height:16px}
.mobile-logout {display:none}
.page-heading h1 {font-size:32px;letter-spacing:-.025em}
.summary-strip {background:var(--surface);border:0;box-shadow:var(--shadow);border-radius:16px}
.metric-label,.summary-status small,.sidebar-label {color:var(--subtle)}
.order-panel {background:transparent;border:0;box-shadow:none;overflow:visible}
.list-toolbar {background:var(--surface);border:0;border-radius:14px;padding:16px 18px;margin-bottom:12px;box-shadow:var(--shadow)}
#workspace .order-date-picker {position:relative;flex:none}
#workspace .order-date-picker summary {list-style:none;cursor:pointer;display:flex;align-items:center;gap:5px;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:13px;white-space:nowrap}
#workspace .order-date-picker summary::-webkit-details-marker {display:none}
#workspace .order-date-picker summary:focus-visible {outline:2px solid #b95439;outline-offset:2px}
#workspace .order-date-popover {position:absolute;right:0;top:calc(100% + 8px);z-index:50;width:min(360px,calc(100vw - 32px));padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:0 12px 36px rgba(45,35,27,.2)}
#workspace .order-date-picker.opens-up .order-date-popover {top:auto;bottom:calc(100% + 8px)}
#workspace .order-date-popover strong {font-size:14px}
#workspace .order-date-presets {display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
#workspace .order-date-presets button,#workspace .order-date-actions [data-date-clear] {min-height:34px;padding:6px 10px;border-radius:9px;background:var(--surface-secondary);color:var(--ink);font-size:12px}
#workspace .order-date-fields {display:grid;grid-template-columns:1fr 1fr;gap:10px}
#workspace .order-date-fields label {display:grid;gap:6px;color:var(--muted);font-size:12px}
#workspace .order-date-fields input {min-width:0;width:100%;min-height:38px;padding:7px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink)}
#workspace .order-date-popover [role=alert] {margin:6px 0;color:var(--red);font-size:12px}
#workspace .order-date-actions {display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px}
#workspace .order-date-popover {max-height:calc(100vh - 110px);overflow:auto;overscroll-behavior:contain}
#workspace .order-calendar-heading {display:flex;align-items:baseline;justify-content:space-between;gap:8px}
#workspace .order-calendar-heading span {font-size:11px;color:var(--muted)}
#workspace .order-calendar-month {display:flex;align-items:center;justify-content:space-between;margin:4px 0 7px}
#workspace .order-calendar-month button {width:36px;height:36px;border-radius:50%;background:transparent;color:var(--ink);font-size:23px;line-height:1}
#workspace .order-month-input {width:150px;border:0;background:transparent;color:var(--ink);text-align:center;font-size:14px;font-weight:700}
#workspace .order-calendar-sr {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#workspace .order-calendar-weekdays,#workspace .order-calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}
#workspace .order-calendar-weekdays {margin-bottom:4px;color:var(--muted);font-size:11px}
#workspace .order-calendar-weekdays span:first-child,#workspace .order-calendar-weekdays span:last-child {color:#26a86b}
#workspace .order-calendar-grid {position:relative;isolation:isolate}
#workspace .order-calendar-day {position:relative;z-index:1;display:grid;place-items:center;min-width:0;height:40px;padding:0;background:transparent;color:var(--ink);font-size:13px;font-weight:550}
#workspace .order-calendar-range-band {position:absolute;z-index:0;height:36px;background:#d9f6e5;pointer-events:none;transform-origin:left center}
#workspace .order-calendar-number {position:relative;display:grid;place-items:center;width:36px;height:36px;border-radius:50%}
#workspace .order-calendar-day:is(.range-start,.range-end) .order-calendar-number {background:#26c878;color:#fff;font-weight:700}
#workspace .order-calendar-day.today:not(.range-start):not(.range-end) .order-calendar-number {box-shadow:inset 0 0 0 1px #2bba75}
#workspace .order-calendar-day:focus-visible {outline:2px solid #278d5e;outline-offset:-2px;border-radius:8px}
@media(hover:hover) and (pointer:fine){#workspace .order-calendar-day:hover .order-calendar-number {box-shadow:inset 0 0 0 1px #26c878}#workspace .order-calendar-month button:hover {background:var(--surface-secondary)}}
#workspace .order-calendar-selection {display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;padding:12px 2px 4px;border-top:1px solid var(--line)}
#workspace .order-calendar-selection div {display:grid;gap:3px;min-width:0}
#workspace .order-calendar-selection div:last-child {text-align:right}
#workspace .order-calendar-selection div span {color:var(--muted);font-size:11px}
#workspace .order-calendar-selection strong {font-size:12px;white-space:nowrap}
#workspace .order-calendar-selection small {padding:3px 7px;border-radius:999px;background:#dff8e9;color:#168b52;font-size:11px;white-space:nowrap}
html[data-theme="dark"] #workspace .order-calendar-range-band {background:#245b42}
html[data-theme="dark"] #workspace .order-calendar-selection small {background:#245b42;color:#b9f7d4}
@media(max-width:640px){
 #workspace .order-date-picker summary {max-width:53vw;font-size:12px;padding:7px}
 #workspace .order-date-label {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #workspace .order-date-popover,#workspace .order-date-picker.opens-up .order-date-popover {position:fixed;left:16px;right:16px;top:50%;bottom:auto;width:auto;max-width:none;transform:translateY(-50%)}
}
.segmented {background:#e9e9ee}
.segmented button {min-height:34px;color:#52525b;font-size:12px}
.segmented .selected {color:var(--ink)}
.search-field, select {background:var(--surface-secondary);border-color:var(--line)}
.search-field input {color:var(--ink);font-size:12px}
.search-field .icon {color:var(--subtle)}
.orders-list {display:grid;gap:12px}
.order-entry {background:var(--surface);border:0;border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.order-entry-head {display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 22px 14px}
.order-ident {display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.order-id-label {font-size:12px;color:var(--subtle)}
.order-number {font-size:15px;font-weight:650;letter-spacing:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.order-ident .badge {font-size:11px;font-weight:550;padding:5px 9px;border-radius:8px}
.order-total {flex-shrink:0;text-align:right;display:grid;gap:4px}
.order-total>span {font-size:11px;color:var(--subtle)}
.order-total strong {font-size:16px;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.order-total small {font-size:11px;font-weight:500}
.order-context {display:flex;flex-wrap:wrap;gap:8px 22px;padding:0 22px 15px;color:var(--subtle);font-size:12px;line-height:1.5}
.order-context b {font-weight:500;color:var(--ink);margin-left:4px;overflow-wrap:anywhere}
.order-products {border-top:1px solid var(--line)}
.order-detail-grid {display:grid;grid-template-columns:minmax(220px,27%) minmax(0,1fr);border-top:1px solid var(--line)}
.recipient-panel {padding:20px 22px;background:var(--surface-secondary);border-right:1px solid var(--line);min-width:0}
.detail-title {display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--subtle);font-size:12px;font-weight:600;margin-bottom:13px}
.recipient-name {font-size:14px;line-height:1.6;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.masked-note {margin-bottom:8px;color:#965506;font-size:12px;line-height:1.5}
.recipient-address,.recipient-phone {margin-top:8px;color:var(--ink);font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.detail-placeholder {font-size:12px;line-height:1.6;color:var(--subtle)}
.copy-detail {border:0;background:none;color:var(--blue);font-size:12px;min-height:32px;padding:4px 0 4px 8px}
.order-detail-main {min-width:0}
.order-detail-main .order-products {border-top:0}
.logistics-panel,.ship-panel {border-top:1px solid var(--line);padding:16px 22px}
.shipment-list {display:grid;gap:10px}
.logistics-status {font-weight:500;font-size:11px;color:var(--subtle);overflow-wrap:anywhere;text-align:right}
.shipment-row {display:flex;gap:8px 18px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--ink)}
.tracking-number {font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ship-heading {display:flex;align-items:center;justify-content:space-between;gap:18px}
.ship-heading>div {display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.ship-heading strong {font-size:13px}
.ship-heading span,.ship-form-note {font-size:12px;color:var(--subtle)}
.ship-open {min-height:36px;padding:8px 14px;white-space:nowrap}
.ship-form {display:grid;grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(160px,1fr) auto;gap:12px;align-items:end;margin-top:16px}
.ship-form label {display:grid;gap:8px;font-size:12px;font-weight:550;color:var(--subtle);min-width:0}
.ship-form label span {font-size:11px;font-weight:400}
.ship-form input,.ship-form select {width:100%;max-width:none;min-width:0;min-height:40px;border:1px solid var(--line);border-radius:9px;padding:10px;background:var(--surface-secondary);color:var(--ink);font-size:12px}
.ship-controls {display:flex;align-items:center;justify-content:flex-end;gap:12px;white-space:nowrap}
.ship-form-note,.ship-form-error {grid-column:1/-1;margin:0;line-height:1.6}
.ship-route-hint {grid-column:1/-1;margin:0;color:#805109;font-size:12px;line-height:1.6}
html[data-theme="dark"] .ship-route-hint {color:#ffd08a}
.ship-form-error {font-size:12px;color:#b32d38}
.ship-form-error:empty {display:none}
.ship-result {display:flex;justify-content:space-between;gap:8px 20px;flex-wrap:wrap;color:var(--subtle);font-size:12px;line-height:1.6}
.ship-result strong {font-weight:600;color:var(--ink)}
.ship-result.warning strong {color:#965506}
.order-item {display:grid;grid-template-columns:68px minmax(0,1fr) auto;gap:16px;align-items:center;padding:17px 22px}
.order-item+.order-item {border-top:1px solid var(--line)}
.product-thumb {width:68px;height:68px;position:relative;display:grid;place-items:center;background:var(--surface-secondary);color:#8e8e93;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.product-thumb .icon {width:25px;height:25px}
.product-thumb img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff}
.product-content {min-width:0}
.product-name {font-size:14px;line-height:1.55;font-weight:550;color:var(--ink);overflow-wrap:anywhere}
.product-meta {display:flex;flex-wrap:wrap;gap:6px 20px;margin-top:9px;font-size:12px;line-height:1.5;color:var(--subtle)}
.product-meta b {font-weight:500;color:#45454f;overflow-wrap:anywhere}
.product-meta .sku-missing {color:#a15d06}
.product-meta .inventory-state.matched b {color:#147044;font-weight:650;font-variant-numeric:tabular-nums}
.product-meta .inventory-state.stock-zero,.product-meta .inventory-state.stock-zero b {color:#b63832;font-weight:650}
.product-meta .inventory-state.unmatched {color:#965506}
.product-meta .inventory-state.unavailable {color:var(--subtle)}
.product-meta .inventory-stale {color:var(--subtle);font-weight:400}
.inventory-map {padding:0;background:none;color:var(--blue);font:inherit;text-decoration:none}
.inventory-map:hover {text-decoration:underline}
.inventory-map:focus-visible {outline:2px solid var(--blue);outline-offset:3px;border-radius:2px}
.inventory-modal {width:570px}
.modal-body .inventory-map-context {margin-bottom:15px;line-height:1.7;color:var(--subtle);overflow-wrap:anywhere}
.inventory-map-context strong {color:var(--ink);font-size:13px}
.modal-body .inventory-map-warning {color:#965506;margin:0 0 12px;font-size:12px}
.modal-body label.inventory-search {margin-bottom:12px}
.inventory-options {max-height:280px;overflow-y:auto;border:1px solid var(--line);border-radius:10px;background:var(--surface-secondary)}
.modal-body label.inventory-option {display:flex;align-items:flex-start;gap:10px;margin:0;padding:11px 12px;cursor:pointer;font-weight:400}
.inventory-option+.inventory-option {border-top:1px solid var(--line)}
.modal-body .inventory-option input {display:block;width:auto;flex:none;margin:3px 0 0;accent-color:var(--blue)}
.inventory-option span {min-width:0;overflow-wrap:anywhere;line-height:1.5}
.inventory-option strong {display:block;color:var(--ink);font-weight:550}
.inventory-option small {display:block;color:var(--subtle);font-size:11px}
.modal-body label.inventory-option.is-disabled {cursor:not-allowed;opacity:.65}
.modal-body .inventory-no-results {margin:0;padding:16px 12px;color:var(--subtle)}
.product-quantity {display:grid;gap:5px;text-align:right;align-self:center;min-width:50px}
.product-quantity span {font-size:11px;color:var(--subtle)}
.product-quantity strong {font-size:15px;font-weight:650;font-variant-numeric:tabular-nums}
.missing-product {padding:22px;color:var(--subtle);font-size:13px}
.list-footer {margin-top:12px;background:var(--surface);border:0;border-radius:14px;padding:12px 18px;color:var(--subtle);font-size:12px}
.pagination .icon-button {width:38px;height:38px}
.empty {background:var(--surface);border-radius:16px}
.footnote {font-size:11px;color:var(--subtle)}
.grouped-card,.shop-card {background:var(--surface);border-color:var(--surface);box-shadow:var(--shadow)}
.primary,.secondary,.text-button,.account,.nav {min-height:40px}
.secondary {color:#35465e;border-color:var(--line)}
.secondary:hover {background:var(--surface-secondary)}
.nav {color:#515966}
.nav:not(.active):hover {background:#e9e9ef}
.muted,.form-help,.section-intro,.shop-card small {color:var(--subtle)}
.grouped-card input,.modal-body input,.auth-card input {background:var(--surface-secondary);border-color:var(--line);color:var(--ink)}
input::placeholder {color:#71717a;opacity:1}
.settings-copy,.section-title {color:var(--subtle)}
.icon-button {background:var(--surface-secondary);color:var(--subtle)}
.badge {color:#54545e;background:#eeeeF2}
.badge.green {color:#187146;background:#e7f6ed}
.badge.orange {color:#965506;background:#fff2dc}
.badge.blue {color:#0758a8;background:#e7f2ff}
.badge.red {color:#a3353a;background:#ffebec}
dialog {background:var(--surface);color:var(--ink);border:1px solid var(--line)}
dialog::backdrop {background:rgba(10,15,25,.52)}
.auth-stage {background:var(--bg)}
.auth-card {background:var(--surface);border-color:var(--surface);box-shadow:var(--shadow)}

html[data-theme="dark"] {
  --bg:#000; --surface:#1c1c1e; --ink:#f5f5f7; --muted:#b3b3bd;
  --blue:#0a84ff; --blue-wash:#102b48; --line:#3a3a3c;
  --surface-secondary:#2c2c2e; --subtle:#b1b1ba; --glass:rgba(28,28,30,.82);
  --shadow:none;
}
html[data-theme="dark"] .brand small, html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .top-date, html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .auth-footer {color:#b1b1ba}
html[data-theme="dark"] .breadcrumb b, html[data-theme="dark"] .sync-note,
html[data-theme="dark"] .nav, html[data-theme="dark"] .account {color:#e5e5ea}
html[data-theme="dark"] .nav.active {background:#0a84ff;color:#fff}
html[data-theme="dark"] .nav:not(.active):hover {background:#303034}
html[data-theme="dark"] .avatar {background:#36363a;color:#e5e5ea}
html[data-theme="dark"] .summary-strip>div {border-color:var(--line)}
html[data-theme="dark"] .summary-status,html[data-theme="dark"] .section-title,
html[data-theme="dark"] .grouped-card label,html[data-theme="dark"] .modal-body label,
html[data-theme="dark"] .auth-card label {color:#e5e5ea}
html[data-theme="dark"] .segmented {background:#303034}
html[data-theme="dark"] .segmented button {color:#c7c7cc}
html[data-theme="dark"] .segmented .selected {background:#66666d;color:#fff;box-shadow:none}
html[data-theme="dark"] .secondary {background:#2c2c2e;border-color:#48484a;color:#f2f2f7}
html[data-theme="dark"] .secondary:hover {background:#3a3a3c}
html[data-theme="dark"] .primary {background:#0a84ff;color:#fff}
html[data-theme="dark"] .product-meta b {color:#e5e5ea}
html[data-theme="dark"] .product-meta .sku-missing {color:#ffc56d}
html[data-theme="dark"] .product-meta .inventory-state.matched b {color:#7addaa}
html[data-theme="dark"] .product-meta .inventory-state.stock-zero,html[data-theme="dark"] .product-meta .inventory-state.stock-zero b {color:#ffaaa5}
html[data-theme="dark"] .product-meta .inventory-state.unmatched {color:#ffd08a}
html[data-theme="dark"] .modal-body .inventory-map-warning {color:#ffd08a}
html[data-theme="dark"] .inventory-modal .secondary {background:#2c2c2e;border-color:#48484a;color:#f5f5f7}
html[data-theme="dark"] .inventory-modal .secondary:hover {background:#3a3a3c}
html[data-theme="dark"] .badge {background:#36363b;color:#e5e5ea}
html[data-theme="dark"] .badge.green {background:#173b2b;color:#82d8a4}
html[data-theme="dark"] .badge.orange {background:#4a3519;color:#ffd08a}
html[data-theme="dark"] .badge.blue {background:#173654;color:#9dcbff}
html[data-theme="dark"] .badge.red {background:#52282a;color:#ffb3b7}
html[data-theme="dark"] input::placeholder {color:#b1b1ba}
html[data-theme="dark"] .search-field,html[data-theme="dark"] select,
html[data-theme="dark"] .grouped-card input,html[data-theme="dark"] .modal-body input,
html[data-theme="dark"] .auth-card input {background:#2c2c2e;border-color:#48484a;color:#f5f5f7}
html[data-theme="dark"] .shop-card h3,html[data-theme="dark"] .user-row,
html[data-theme="dark"] .empty h2 {color:#f5f5f7}
html[data-theme="dark"] .empty p {color:#b1b1ba}
html[data-theme="dark"] .empty-icon {background:#173654;color:#9dcbff;box-shadow:none}
html[data-theme="dark"] .empty-steps b {background:#3a3a3c;color:#e5e5ea}
html[data-theme="dark"] .notice {background:#42331b;border-color:#73572a;color:#ffdb9c}
html[data-theme="dark"] .shop-error,html[data-theme="dark"] .error-text {color:#ffadaf!important}
html[data-theme="dark"] .theme-button {color:#e5e5ea;border-color:#48484a}
html[data-theme="dark"] .theme-button:hover {background:#3a3a3c}
html[data-theme="dark"] .product-thumb {background:#2c2c2e;color:#b1b1ba}
html[data-theme="dark"] .text-button {color:#64acff}
html[data-theme="dark"] .ship-form-error {color:#ffadaf}
html[data-theme="dark"] .ship-result.warning strong {color:#ffd08a}
html[data-theme="dark"] .masked-note {color:#ffd08a}
html[data-theme="dark"] .ship-form input,html[data-theme="dark"] .ship-form select {background:#2c2c2e;border-color:#48484a;color:#f5f5f7}

@media(max-width:1100px) {
  .order-detail-grid {grid-template-columns:minmax(190px,30%) minmax(0,1fr)}
  .ship-form {grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px) {
  .shell {display:block;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .sidebar {inset:auto 0 0;width:auto;height:auto;min-height:0;flex-direction:row;justify-content:center;padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px));border-right:0;border-top:1px solid var(--line)}
  .sidebar .brand,.sidebar-label,.sidebar-bottom {display:none}
  .sidebar nav {display:flex;width:min(100%,420px);justify-content:space-around;gap:6px}
  .nav {flex:1;min-height:56px;margin:0;padding:6px;display:flex;flex-direction:column;justify-content:center;gap:3px;font-size:10px;line-height:1.2;text-align:center}
  .nav .icon {width:21px;height:21px}
  .nav.active {background:var(--blue-wash);color:var(--blue);box-shadow:none}
  html[data-theme="dark"] .nav.active {background:#173654;color:#9dcbff}
  main {width:100%;margin:0}
  .topbar {height:58px;padding:0 18px}
  .top-actions {gap:8px}
  .theme-button {min-height:44px}
  .mobile-logout {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 3px;background:none;color:var(--blue);font-size:12px}
  .main-content {padding:22px 16px}
  .page-heading {margin-bottom:22px}
  .page-heading h1 {font-size:30px}
  .heading-actions {padding-top:18px}
  .summary-strip {padding:20px 16px}
  .summary-strip>div {padding:0 12px}
  .summary-strip strong {font-size:24px}
  .metric-label {font-size:11px}
  .list-toolbar {padding:13px;gap:12px}
  .segmented button {font-size:11px;min-height:38px}
  .filters {flex-wrap:nowrap}
  .search-field {min-height:42px;min-width:0}
  .search-field input {min-width:0}
  .filters select {min-height:42px;max-width:105px}
  .order-entry-head {padding:16px 16px 12px;align-items:flex-start;gap:10px}
  .order-ident {gap:6px 8px}
  .order-number {font-size:14px}
  .order-total strong {font-size:15px}
  .order-context {padding:0 16px 13px;gap:6px 14px;font-size:12px}
  .order-item {grid-template-columns:56px minmax(0,1fr);gap:12px;padding:15px 16px;align-items:start}
  .product-thumb {width:56px;height:56px;border-radius:10px}
  .product-name {font-size:13px;line-height:1.5}
  .product-meta {font-size:12px;gap:5px 12px;margin-top:7px}
  .product-quantity {grid-column:2;text-align:left;display:flex;align-items:baseline;gap:7px}
  .product-quantity span {font-size:11px}
  .product-quantity strong {font-size:13px}
  .list-footer {margin-bottom:4px}
  .footnote {font-size:12px}
  .primary,.secondary,.text-button {min-height:44px}
  .modal-header .icon-button {width:44px;height:44px}
  .pagination .icon-button {width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce) {* {animation:none!important;transition:none!important}}
.inventory-page-toolbar {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px;margin-bottom:12px;background:var(--surface);border-radius:14px;box-shadow:var(--shadow)}
.inventory-page-toolbar strong {font-size:15px;font-weight:650}
.inventory-page-toolbar p {margin:5px 0 0;color:var(--subtle);font-size:12px}
.inventory-page-toolbar .search-field {width:280px;flex:none}
.inventory-page-toolbar .search-field input {width:100%;font-size:12px}
.inventory-table-wrap {background:var(--surface);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}
.inventory-table {width:100%;border-collapse:collapse;table-layout:fixed}
.inventory-table th,.inventory-table td {padding:15px 22px;text-align:left;border-bottom:1px solid var(--line);font-size:13px}
.inventory-table td {color:var(--ink)}
.inventory-table th {color:var(--subtle);font-weight:500;font-size:12px;background:var(--surface-secondary)}
.inventory-table th:first-child {width:40%}.inventory-table th:nth-child(2) {width:42%}.inventory-table th:last-child {width:18%}
.inventory-table td:nth-child(2) {color:var(--subtle);overflow-wrap:anywhere}
.inventory-table tbody tr:last-child td {border-bottom:0}
.inventory-quantity {font-variant-numeric:tabular-nums;font-weight:650}
.inventory-quantity.stock-zero {color:var(--red)}
.inventory-page-empty {margin:0;padding:45px 22px;text-align:center;color:var(--subtle);font-size:13px}

/* Desktop order reading: distinguish the order, product, and fulfilment levels
   without hiding any of the information needed to process an order. */
#workspace #orders-page .orders-list {gap:14px}
#workspace #orders-page .order-entry-head {padding:18px 22px 13px}
#workspace #orders-page .order-ident {gap:10px 11px}
#workspace #orders-page .order-id-label {font-size:12px;font-weight:500}
#workspace #orders-page .order-number {font-size:16px;line-height:1.3;font-weight:650;letter-spacing:-.01em}
#workspace #orders-page .order-ident .badge {font-size:12px;font-weight:550;line-height:1.25;padding:5px 9px}
#workspace #orders-page .order-total {gap:3px}
#workspace #orders-page .order-total>span {font-size:12px;line-height:1.35}
#workspace #orders-page .order-total strong {font-size:18px;line-height:1.2;font-weight:650;letter-spacing:-.015em}
#workspace #orders-page .order-total small {font-size:12px;font-weight:550;letter-spacing:0}
#workspace #orders-page .order-context {padding:0 22px 16px;gap:7px 24px;font-size:12px;line-height:1.55}
#workspace #orders-page .order-context b {font-weight:550}
#workspace #orders-page .recipient-panel {padding:20px 22px}
#workspace #orders-page .detail-title {font-size:12px;line-height:1.4;font-weight:600;margin-bottom:14px}
#workspace #orders-page .recipient-name {font-size:14px;line-height:1.5;font-weight:650}
#workspace #orders-page .recipient-address,#workspace #orders-page .recipient-phone {font-size:13px;line-height:1.65}
#workspace #orders-page .recipient-phone {font-variant-numeric:tabular-nums}
#workspace #orders-page .masked-note,#workspace #orders-page .detail-placeholder {font-size:12px;line-height:1.6}
#workspace #orders-page .copy-detail {font-size:12px;font-weight:550}
#workspace #orders-page .order-item {gap:17px;padding:17px 22px}
#workspace #orders-page .product-name {font-size:15px;line-height:1.5;font-weight:600;letter-spacing:-.005em}
#workspace #orders-page .product-meta {gap:5px 18px;margin-top:8px;font-size:12px;line-height:1.55}
#workspace #orders-page .product-meta b {font-weight:550}
#workspace #orders-page .product-quantity span {font-size:12px}
#workspace #orders-page .product-quantity strong {font-size:16px;line-height:1.3;font-weight:650}
#workspace #orders-page .logistics-panel,#workspace #orders-page .ship-panel {padding:16px 22px}
#workspace #orders-page .logistics-status,#workspace #orders-page .ship-heading span,#workspace #orders-page .ship-form-note {font-size:12px;line-height:1.5}
#workspace #orders-page .shipment-row,#workspace #orders-page .ship-heading strong {font-size:13px;line-height:1.5}
#workspace #orders-page .ship-form label,#workspace #orders-page .ship-form input,#workspace #orders-page .ship-form select {font-size:13px}

/* Inventory is a desktop reading surface: keep names and complete SKUs
   legible while preserving the spreadsheet's original stock values. */
#workspace #inventory-page .inventory-page-toolbar {gap:24px;align-items:center;padding:22px 28px;margin-bottom:0;border-radius:16px 16px 0 0;background:rgba(224,232,221,.78);box-shadow:none;backdrop-filter:blur(22px) saturate(120%);-webkit-backdrop-filter:blur(22px) saturate(120%)}
#workspace #inventory-page .inventory-page-toolbar strong {display:block;color:var(--ink);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:-.015em}
#workspace #inventory-page .inventory-page-toolbar p {margin:5px 0 0;color:var(--subtle);font-size:13px;line-height:1.45}
#workspace #inventory-page .inventory-page-toolbar .search-field {width:min(340px,38%);min-height:42px;flex:none;border:1px solid rgba(80,111,87,.22);border-radius:10px;background:rgba(245,248,239,.48)}
#workspace #inventory-page .inventory-page-toolbar .search-field input {width:100%;min-width:0;font-size:14px;line-height:1.4;color:var(--ink)}
#workspace #inventory-page .inventory-page-toolbar .search-field .icon {width:17px;height:17px;color:var(--subtle)}
#workspace #inventory-page .inventory-table-wrap {border-radius:0 0 16px 16px;background:rgba(236,239,230,.95);box-shadow:var(--shadow)}
#workspace #inventory-page .inventory-table {table-layout:fixed;white-space:normal}
#workspace #inventory-page .inventory-table th,#workspace #inventory-page .inventory-table td {padding:17px 28px;text-align:left;vertical-align:middle;white-space:normal;overflow-wrap:anywhere;line-height:1.5;border-bottom:1px solid var(--line)}
#workspace #inventory-page .inventory-table th {padding-top:12px;padding-bottom:12px;background:rgba(94,120,100,.09);color:var(--subtle);font-size:12px;font-weight:600;letter-spacing:.01em}
#workspace #inventory-page .inventory-table th:first-child {width:48%}
#workspace #inventory-page .inventory-table th:nth-child(2) {width:35%}
#workspace #inventory-page .inventory-table th:last-child {width:17%}
#workspace #inventory-page .inventory-table th:last-child,#workspace #inventory-page .inventory-table td:last-child {text-align:right}
#workspace #inventory-page .inventory-table td {color:var(--ink);font-size:14px}
#workspace #inventory-page .inventory-table td:first-child {font-size:15px;font-weight:500}
#workspace #inventory-page .inventory-table td:nth-child(2) {color:var(--subtle);font-size:13px;font-weight:500;letter-spacing:.005em;font-variant-numeric:tabular-nums}
#workspace #inventory-page .inventory-table tbody tr {cursor:default}
#workspace #inventory-page .inventory-table tbody tr:hover {background:rgba(87,119,91,.045)}
#workspace #inventory-page .inventory-table tbody tr:last-child td {border-bottom:0}
#workspace #inventory-page .inventory-quantity {display:inline-block;max-width:100%;font-size:18px;font-weight:600;line-height:1.35;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#workspace #inventory-page .inventory-quantity.stock-zero {color:#b52e36}
#workspace #inventory-page .inventory-page-empty {margin:0;padding:52px 24px;color:var(--subtle);font-size:14px;line-height:1.6}
#workspace #inventory-page .notice {padding:13px 16px;margin:0 0 12px;font-size:13px;line-height:1.6}
#workspace #inventory-page .footnote {margin:16px 4px;color:var(--subtle);font-size:12px;line-height:1.5}
html[data-theme="dark"] #workspace #inventory-page .inventory-quantity.stock-zero {color:#ffaaa5}
html[data-theme="dark"] #workspace #inventory-page .inventory-page-toolbar {background:rgba(55,72,60,.72)}
html[data-theme="dark"] #workspace #inventory-page .inventory-page-toolbar .search-field {background:rgba(24,39,29,.55);border-color:rgba(183,211,187,.2)}
html[data-theme="dark"] #workspace #inventory-page .inventory-table-wrap {background:rgba(45,58,49,.96)}
html[data-theme="dark"] #workspace #inventory-page .inventory-table th {background:rgba(19,31,24,.34)}
html[data-theme="dark"] #workspace #inventory-page .inventory-table tbody tr:hover {background:rgba(190,218,190,.055)}
@media (prefers-reduced-transparency:reduce) {
  #workspace #inventory-page .inventory-page-toolbar {background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}
  #workspace #inventory-page .inventory-table-wrap {background:var(--surface)}
  html[data-theme="dark"] #workspace #inventory-page .inventory-page-toolbar,html[data-theme="dark"] #workspace #inventory-page .inventory-table-wrap {background:var(--surface)}
}
