:root {
  color-scheme: light;
  --ink: #12151a;
  --muted: #687381;
  --line: #d9e0e7;
  --soft: #f5f5f7;
  --panel: #ffffff;
  --blue: #0071e3;
  --green: #0f9f7a;
  --charcoal: #202833;
  --shadow: 0 22px 70px rgba(21, 31, 44, .1);
}

.saved-address-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 247, 250, 0.72);
  padding: 12px;
}

.saved-address-row.hidden {
  display: none;
}

.address-book-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 247, 250, 0.7);
}

.address-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.address-book-head h3 {
  margin: 0;
  font-size: 18px;
}

.address-book-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.address-book-list {
  display: grid;
  gap: 12px;
}

.address-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.address-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.address-card-grid label:nth-last-child(-n + 2) {
  grid-column: span 2;
}

.address-default-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.address-default-toggle input {
  accent-color: var(--blue);
}

.address-remove-button {
  justify-self: end;
}

.address-empty {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

@media (max-width: 760px) {
  .address-book-head,
  .address-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .address-card-grid,
  .address-card-grid label:nth-last-child(-n + 2) {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .site-header .mobile-nav-toggle .mobile-nav-icon {
    display: block !important;
    visibility: visible !important;
    width: 18px !important;
    height: 18px !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: none;
  }

  .site-header .mobile-nav-toggle .mobile-nav-menu-icon {
    display: block !important;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle .mobile-nav-menu-icon {
    display: none !important;
  }

  .site-header .mobile-nav-toggle .mobile-nav-close-icon {
    display: none !important;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle .mobile-nav-close-icon {
    display: block !important;
  }

  .site-header {
    position: sticky;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas: "brand menu tools";
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    overflow: visible;
  }

  .site-header .brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header .header-tools {
    grid-area: tools;
    justify-self: end;
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    overflow: visible;
  }

  .site-header > .language-switch {
    grid-area: tools;
    justify-self: end;
  }

  .mobile-nav-toggle {
    grid-area: menu;
    justify-self: end;
    display: inline-grid;
    place-items: center;
    gap: 3px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(29, 29, 31, .28);
    border-radius: 11px;
    background: rgba(251, 251, 253, .3);
    box-shadow: none;
    cursor: pointer;
    color: #1d1d1f;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus-visible {
    background: rgba(29, 29, 31, .08);
    border-color: rgba(29, 29, 31, .48);
    outline: none;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle {
    background: #1d1d1f;
    border-color: #1d1d1f;
    color: #fff;
  }

  .mobile-nav-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity .18s ease, transform .18s ease;
  }

  .mobile-nav-close-icon {
    display: none;
  }

  .site-header.mobile-nav-open .mobile-nav-menu-icon {
    display: none;
  }

  .site-header.mobile-nav-open .mobile-nav-close-icon {
    display: block;
  }

  .site-header .main-nav {
    position: absolute;
    top: calc(100% + 7px);
    left: 10px;
    right: 10px;
    z-index: 60;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-height: min(72vh, 520px);
    min-width: 0;
    width: calc(100vw - 20px);
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(210, 218, 226, .82);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 60px rgba(18, 24, 31, .16);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease;
  }

  .site-header.mobile-nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .site-header .main-nav a,
  .site-header .nav-preview-wrap > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(245, 245, 247, .82);
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
  }

  .site-header .main-nav a:active,
  .site-header .nav-preview-wrap > a:active {
    background: rgba(0, 113, 227, .12);
    color: var(--blue);
  }

  .site-header .nav-preview-wrap {
    display: block;
    min-height: 0;
  }

  .site-header .nav-hover-preview {
    display: none;
  }

  .account-menu.logged-in > .nav-icon:not(.account-center-shortcut) {
    display: none;
  }

  .site-header .nav-icon {
    max-width: 88px;
    min-width: 28px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header .currency-unit {
    max-width: 92px;
    min-height: 26px;
    padding: 4px 8px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
  }

  .site-header .language-button {
    width: 52px;
    max-width: 52px;
    min-height: 28px;
    padding: 5px 8px;
    justify-content: center;
  }

  .site-header .language-button span {
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 8px;
  }

  .site-header .brand-text {
    display: none;
  }

  .site-header .brand-mark {
    width: 17px;
    height: 20px;
  }

  .site-header .header-tools {
    gap: 5px;
  }

  .site-header .currency-unit {
    display: none;
  }

  .site-header .language-button {
    width: 52px;
    max-width: 52px;
    justify-content: center;
  }

  .site-header .nav-icon {
    max-width: 70px;
  }

  .site-header .language-button span {
    display: none;
  }
}

/* Final mobile inventory-nav sizing override. */
@media (max-width: 880px) {
  .inventory-nav {
    box-sizing: border-box;
    align-items: center;
    align-content: center;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .inventory-nav button,
  .inventory-nav button.active {
    flex: 0 0 108px;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
  }

  .inventory-nav button b {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  .inventory-nav button small { display: none; }
}

/* Inventory mobile navigation uses equal-width tabs so the active tab never
   expands with its label and its text stays centered vertically. */
@media (max-width: 880px) {
  .inventory-nav button,
  .inventory-nav button.active {
    flex: 0 0 108px;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
  }

  .inventory-nav button b {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  .inventory-nav button small {
    display: none;
  }
}

/* Standalone chip inventory and supplier reconciliation workspace. */
.inventory-body {
  min-height: 100vh;
  margin: 0;
  color: #1c2934;
  background: #eef3f1;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.inventory-body *,
.inventory-body *::before,
.inventory-body *::after {
  box-sizing: border-box;
}

.inventory-body button,
.inventory-body input,
.inventory-body select {
  font: inherit;
}

.inventory-shell {
  min-height: 100vh;
}

.inventory-login {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(560px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 30px;
  border: 1px solid #d6e0dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(21, 41, 37, .1);
}

.inventory-login-header {
  display: flex;
  align-items: center;
  gap: 20px;
  grid-column: 1 / -1;
}

.inventory-login-mark,
.inventory-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  background: #146c5a;
  font-size: 24px;
  font-weight: 800;
}

.inventory-kicker {
  margin: 0 0 5px;
  color: #5b7180;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.inventory-login h1,
.inventory-page-head h1,
.inventory-modal-head h2 {
  margin: 0;
  color: #172b39;
  letter-spacing: 0;
}

.inventory-login h1 {
  font-size: 30px;
  line-height: 1.1;
}

.inventory-login p:not(.inventory-kicker) {
  margin: 5px 0 0;
  color: #70808b;
  font-size: 14px;
}

.inventory-login form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 12px;
  border-top: 1px solid #e1e9e5;
  padding-top: 21px;
}

.inventory-bootstrap-panel {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(14, 116, 144, .16), rgba(15, 23, 42, .72));
}
.inventory-bootstrap-panel h2 { margin: .35rem 0 .45rem; }
.inventory-bootstrap-panel p { color: var(--muted, #94a3b8); line-height: 1.6; }
.inventory-bootstrap-badge { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; color: #bae6fd; background: rgba(14, 165, 233, .18); font-size: .75rem; font-weight: 700; }
.inventory-bootstrap-fixed { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: .45rem .8rem; align-items: center; margin: .9rem 0; padding: .75rem .9rem; border-radius: 12px; background: rgba(15, 23, 42, .65); }
.inventory-bootstrap-fixed span { color: var(--muted, #94a3b8); font-size: .82rem; }
.inventory-bootstrap-fixed strong { color: #f8fafc; letter-spacing: .02em; }
.inventory-bootstrap-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .8rem; margin: .8rem 0 1rem; }
.inventory-bootstrap-options label { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border: 1px solid rgba(148, 163, 184, .16); border-radius: 10px; }
.inventory-bootstrap-options input { width: auto; }
.account-fixed-badge { display: inline-flex; padding: .28rem .55rem; border-radius: 999px; color: #fde68a; background: rgba(180, 83, 9, .2); font-size: .78rem; white-space: nowrap; }
.setup-guide-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.setup-guide-steps article { display: grid; gap: .25rem; padding: .75rem .85rem; border: 1px solid rgba(148, 163, 184, .16); border-radius: 12px; background: rgba(15, 23, 42, .48); }
.setup-guide-steps article b { color: #bae6fd; font-size: .86rem; }
.setup-guide-steps article span { color: var(--muted, #94a3b8); font-size: .82rem; line-height: 1.5; }
.inventory-setup-guide-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }

.system-initialize-card { border-color: rgba(248, 113, 113, .35); }
.system-initialize-warning { margin: .9rem 0; padding: .85rem 1rem; border-radius: 12px; color: #fecaca; background: rgba(127, 29, 29, .22); line-height: 1.65; }
.system-initialize-form { display: grid; gap: .75rem; }

.inventory-login form .button {
  width: 100%;
  min-height: 42px;
  margin-top: 3px;
}

.inventory-login-error {
  min-height: 18px;
  margin: 0 !important;
  color: #b42318 !important;
  font-size: 12px !important;
}

.account-role-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.account-role-summary span {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid #d9e3df;
  border-radius: 7px;
  padding: 12px;
  color: #74827f;
  background: #fff;
  font-size: 11px;
}

.account-role-summary b {
  color: #263d36;
  font-size: 13px;
}

.account-role {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 7px;
  color: #245c4e;
  background: #e6f3ee;
  font-size: 10px;
  font-weight: 800;
}

.account-role.finance { color: #275d81; background: #e7f1f8; }
.account-role.order { color: #275d81; background: #e7f1f8; }
.account-role.admin { color: #794e18; background: #f8eedf; }
.account-role.unknown { color: #65736e; background: #edf1ef; }

.account-enabled-field {
  align-content: start;
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #cbd7d1;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
}

.inventory-body .account-toggle input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  margin: 0;
  accent-color: #146c5a;
  box-shadow: none;
}

.account-toggle b {
  color: #344a43;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.system-management-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
  gap: 14px;
}

.system-management-layout .inventory-section {
  margin: 0;
}

.system-backup-card {
  grid-column: 1 / -1;
}

.system-status-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.system-status-detail > div {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid #dce6e1;
  border-radius: 7px;
  padding: 12px;
  background: #f7faf8;
}

.system-status-detail span {
  color: #7a8984;
  font-size: 11px;
}

.system-status-detail strong {
  color: #274239;
  font-size: 13px;
  line-height: 1.45;
}

.system-settings-form {
  display: grid;
  gap: 12px;
}

.system-settings-form > label:not(.system-switch-row),
.system-maintenance-time-grid label {
  display: grid;
  gap: 6px;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
}

.system-settings-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid #cbd7d1;
  border-radius: 6px;
  padding: 9px 10px;
  color: #1b2a35;
  background: #fff;
}

.system-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  border: 1px solid #d8e3de;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f8fbf9;
}

.system-switch-row > span {
  display: grid;
  gap: 4px;
}

.system-switch-row b {
  color: #263e36;
  font-size: 13px;
}

.system-switch-row small {
  color: #7b8884;
  font-size: 11px;
  font-weight: 500;
}

.inventory-body .system-switch-row input[type="checkbox"] {
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  border: 0;
  padding: 0;
  accent-color: #146c5a;
  cursor: pointer;
}

.system-maintenance-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.system-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.system-backup-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.system-backup-summary span {
  border: 1px solid #dce5e1;
  border-radius: 6px;
  padding: 7px 10px;
  color: #71807b;
  background: #f7faf8;
  font-size: 11px;
}

.system-backup-summary b {
  margin-left: 4px;
  color: #27453b;
}

.system-backup-table {
  min-width: 1040px;
}

.system-backup-table td:first-child strong,
.system-backup-table td:first-child small {
  display: block;
}

.system-backup-media-warning {
  display: block;
  margin-top: 4px;
  color: #ad4b35 !important;
  font-size: 10px;
}

.system-backup-table td:first-child small {
  margin-top: 4px;
  color: #8a9692;
  font-size: 10px;
}

.inventory-user-badge {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0 5px 10px;
  border: 1px solid #dce6e1;
  border-radius: 6px;
  padding: 9px 10px;
  background: #f3f8f6;
}

.inventory-user-badge span {
  color: #155f50;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-user-badge small {
  color: #81908e;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.inventory-body [data-roles][hidden] {
  display: none !important;
}

.inventory-body[data-inventory-role="warehouse"] .inventory-overview-grid {
  grid-template-columns: 1fr;
}

.inventory-body[data-inventory-role="warehouse"] .inventory-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-login label,
.inventory-filter-bar label,
.inventory-reconcile-controls label,
.inventory-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
}

.inventory-body input,
.inventory-body select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd7d1;
  border-radius: 6px;
  padding: 7px 9px;
  outline: none;
  color: #1b2a35;
  background: #fff;
}

.inventory-body input:focus,
.inventory-body select:focus {
  border-color: #146c5a;
  box-shadow: 0 0 0 3px rgba(20, 108, 90, .12);
}

.inventory-app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.inventory-sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid #d6e0dc;
  padding: 18px 13px;
  background: #fbfdfc;
}

.inventory-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 7px 23px;
  color: #182b38;
  text-decoration: none;
}

.inventory-brand-mark {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.inventory-brand span:last-child {
  display: grid;
  gap: 1px;
}

.inventory-brand b {
  font-size: 17px;
}

.inventory-brand small {
  color: #74828b;
  font-size: 11px;
}

.inventory-nav {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 3px;
}

.inventory-nav > span {
  margin: 16px 9px 5px;
  color: #8a999d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.inventory-nav button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: #55666e;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.inventory-nav button b {
  color: inherit;
  font-size: 13px;
}

.inventory-nav button small {
  color: #869399;
  font-size: 10px;
}

.inventory-nav button.active {
  color: #fff;
  background: #146c5a;
  box-shadow: 0 5px 12px rgba(20, 108, 90, .18);
}

.inventory-nav button.active small {
  color: rgba(255, 255, 255, .72);
}

.return-original-order {
  display: grid;
  gap: 2px;
  min-width: 150px;
  max-width: 260px;
  color: #52656c;
  line-height: 1.35;
}

.return-original-order strong {
  color: #245e51;
  font-size: 12px;
  white-space: nowrap;
}

.return-original-order small {
  overflow: hidden;
  color: #7a898e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-original-order.empty {
  display: inline-block;
  min-width: 0;
  color: #9aa6a9;
  font-size: 11px;
}

.inventory-sidebar-bottom {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  margin-top: auto;
  border-top: 1px solid #e1e8e4;
  padding: 13px 7px 2px;
}

.inventory-sidebar-bottom button,
.inventory-sidebar-bottom a {
  border: 0;
  padding: 7px 2px;
  color: #64747d;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.inventory-version {
  display: block;
  margin-top: 3px;
  color: #a0aaa6;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  user-select: none;
}

.inventory-sidebar-bottom .inventory-guide-link {
  color: #1f6f5b;
}

.inventory-sidebar-bottom .inventory-guide-link:hover {
  color: #114d40;
  background: #edf7f2;
}

.inventory-dev-watermark {
  position: fixed;
  left: 50%;
  bottom: 6px;
  z-index: 20;
  transform: translateX(-50%);
  color: #9aa8a3;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  opacity: .38;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.inventory-content {
  min-width: 0;
  padding: 32px clamp(18px, 3vw, 44px) 56px;
}

.inventory-sync-status {
  position: fixed;
  top: 12px;
  right: 18px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid #d7e3de;
  border-radius: 999px;
  padding: 5px 10px;
  color: #315149;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 20px rgba(20, 53, 44, .09);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.inventory-sync-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #228767;
  box-shadow: 0 0 0 3px rgba(34, 135, 103, .12);
}

.inventory-sync-status.syncing i,
.inventory-sync-status.updating i {
  background: #2878b7;
  box-shadow: 0 0 0 3px rgba(40, 120, 183, .12);
  animation: inventory-sync-pulse 1s ease-in-out infinite;
}

.inventory-sync-status.stale {
  border-color: #efc8c3;
  color: #a33b31;
  background: #fff7f6;
}

.inventory-sync-status.stale i {
  background: #c84437;
  box-shadow: 0 0 0 3px rgba(200, 68, 55, .12);
}

.inventory-body button[data-inventory-sync-locked="true"] {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(.18);
}

@keyframes inventory-sync-pulse {
  50% { opacity: .35; transform: scale(.78); }
}

.inventory-access-denied {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.inventory-access-denied[hidden] {
  display: none !important;
}

.inventory-access-denied-card {
  width: min(560px, 100%);
  border: 1px solid #d7e1dc;
  border-radius: 16px;
  padding: 42px 36px;
  background: #fbfdfc;
  text-align: center;
}

.inventory-access-denied-card h1 {
  margin: 8px 0 10px;
  color: #243b35;
  font-size: 26px;
}

.inventory-access-denied-card p:not(.inventory-kicker) {
  margin: 0 0 22px;
  color: #6a7a74;
}

.audit-log-filters {
  grid-template-columns: minmax(150px, .8fr) minmax(140px, .7fr) minmax(185px, .9fr) minmax(185px, .9fr) minmax(230px, 1.3fr) auto auto;
}

.audit-log-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 12px;
  color: #6a7a74;
  font-size: 12px;
}

.audit-log-summary b { color: #263d37; }

.audit-action {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  color: #53645e;
  background: #edf1ef;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.audit-action.login { color: #17634f; background: #e6f5ef; }
.audit-action.login_failed { color: #9b3d32; background: #fbecea; }
.audit-action.logout { color: #53645e; background: #edf1ef; }
.audit-action.create { color: #17634f; background: #e6f5ef; }
.audit-action.update,
.audit-action.confirm { color: #315f86; background: #eaf2f8; }
.audit-action.delete { color: #a13f34; background: #fbecea; }
.audit-action.upload { color: #74568f; background: #f2ecf7; }
.audit-detail { min-width: 260px; line-height: 1.55; }
.audit-log-table td:first-child { min-width: 150px; }
.audit-log-table td:last-child { min-width: 130px; color: #6f7e79; font-size: 12px; }

.inventory-view {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.inventory-page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.inventory-page-head h1 {
  font-size: 30px;
  line-height: 1.14;
}

.inventory-page-head p:not(.inventory-kicker) {
  margin: 7px 0 0;
  color: #647781;
  font-size: 13px;
}

.inventory-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-body .button {
  border-radius: 6px;
}

.inventory-body .button.primary {
  border-color: #146c5a;
  background: #146c5a;
}

.inventory-body .button.primary:hover {
  background: #0e5b4b;
}

.inventory-body .button.danger {
  border-color: #b42318;
  color: #fff;
  background: #b42318;
}

.inventory-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.warehouse-launchpad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.warehouse-launchpad-head {
  display: none;
}

.warehouse-back-button {
  display: inline-block;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
  color: #146c5a;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.inventory-body[data-inventory-role="warehouse"] .inventory-app {
  grid-template-columns: 1fr;
}

.inventory-body[data-inventory-role="warehouse"] .inventory-sidebar,
.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel="overview"] > .inventory-page-head,
.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel="overview"] > .inventory-metrics,
.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel="overview"] > .inventory-overview-grid,
.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel="overview"] > .inventory-recent-section {
  display: none !important;
}

.inventory-body[data-inventory-role="warehouse"] .inventory-content {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel="overview"] {
  width: min(980px, 100%);
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.warehouse-refresh-wrap {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.warehouse-session-actions {
  display: flex !important;
  align-items: center;
  gap: 16px !important;
  margin-left: auto;
}

.warehouse-current-user {
  display: grid;
  gap: 2px;
  max-width: min(360px, 42vw);
  min-width: 96px;
  text-align: right;
}

.warehouse-current-user span {
  color: #263d37;
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.warehouse-current-user small {
  color: #71817c;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.inventory-account-text {
  min-width: 150px;
  max-width: 280px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inventory-account-text strong,
.inventory-account-text small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#auditAccountFilter {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
}

.warehouse-refresh-wrap small {
  color: #7b8a86;
  font-size: 10px;
  white-space: nowrap;
}

.warehouse-refresh-wrap .button {
  min-width: 82px;
}

.warehouse-launchpad-head > div {
  display: grid;
  gap: 3px;
}

.warehouse-launchpad-head strong {
  color: #17312b;
  font-size: 24px;
}

.warehouse-launchpad-head small {
  color: #74847f;
  font-size: 12px;
}

.inventory-body[data-inventory-role="warehouse"] [data-inventory-panel]:not([data-inventory-panel="overview"]) {
  align-self: start;
  width: min(1440px, 100%);
}

.warehouse-action {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 122px;
  border: 1px solid #cadbd4;
  border-radius: 8px;
  padding: 20px;
  color: #17332d;
  background: #fff;
  box-shadow: 0 5px 14px rgba(24, 55, 48, .05);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.warehouse-action:hover {
  border-color: #6eaa98;
  box-shadow: 0 9px 22px rgba(24, 86, 70, .12);
  transform: translateY(-2px);
}

.warehouse-action-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  background: #16705d;
  font-size: 30px;
  font-weight: 600;
}

.warehouse-action-icon svg {
  width: 31px;
  height: 31px;
}

.warehouse-action.stock .warehouse-action-icon {
  color: #23566f;
  background: #dfeff5;
}

.warehouse-action.outbound .warehouse-action-icon {
  color: #97401c;
  background: #ffeadb;
}

.warehouse-action.usage .warehouse-action-icon {
  color: #674b08;
  background: #fff0b8;
}

.warehouse-action.records .warehouse-action-icon {
  color: #4b5162;
  background: #e9ebf0;
}

.warehouse-action.order-query .warehouse-action-icon {
  color: #305a86;
  background: #e3eef9;
}

.usage-order-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.usage-order-requirements {
  grid-column: span 3;
}

.usage-order-requirements.full {
  grid-column: 1 / -1;
}

.usage-order-image {
  grid-column: span 1;
}

.usage-order-requirements b {
  display: block !important;
  white-space: pre-wrap;
}

.usage-order-image a {
  display: block;
  margin-left: auto;
}

.usage-order-image img {
  display: block;
  width: 58px;
  height: 40px;
  border: 1px solid #d6e1dc;
  border-radius: 5px;
  object-fit: contain;
}

.usage-order-details > div:not(.inventory-empty) {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  padding: 7px 9px;
  background: #f7faf8;
}

.usage-order-details span {
  color: #7a8985;
  font-size: 10px;
  font-weight: 700;
}

.usage-order-details b {
  overflow: hidden;
  color: #283e37;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-order-details .usage-order-id b {
  color: #146c5a;
  font-size: 12px;
}

.usage-order-details .usage-order-metric b {
  font-size: 13px;
}

.usage-order-details .usage-order-remaining {
  border-color: #efd3cc;
  background: #fff7f5;
}

.usage-order-details .usage-order-remaining b {
  color: #b42318;
}

.usage-stock-section {
  margin-top: 18px;
  border-top: 1px solid #e4ebe7;
  padding-top: 16px;
}

.usage-other-stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #146c5a;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.usage-other-stock-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

#usageStockLines {
  display: grid;
  gap: 7px;
}

.usage-stock-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto minmax(110px, .6fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  cursor: pointer;
}

.usage-stock-row.recommended {
  border-color: #83bfae;
  background: #f0faf6;
}
.usage-stock-row.out-of-stock { border-color: #eadfd8; background: #fcf8f5; opacity: .75; }

.usage-stock-row > input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.usage-stock-row strong,
.usage-stock-row small {
  display: block;
}

.usage-stock-row strong {
  color: #293e38;
  font-size: 13px;
}

.usage-stock-row small {
  margin-top: 3px;
  color: #7e8c88;
  font-size: 10px;
}

.usage-stock-count {
  color: #64746f;
  font-size: 11px;
  white-space: nowrap;
}

.usage-stock-count b {
  color: #176c58;
  font-size: 13px;
}

.usage-stock-row input[type="number"] {
  min-height: 34px;
}

.usage-note {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
}

.usage-no-orders {
  margin-top: 14px;
  border: 1px solid #ecd8a5;
  border-radius: 6px;
  padding: 12px;
  color: #805d14;
  background: #fff9e8;
  font-size: 12px;
}

.inventory-item-current {
  display: grid;
  gap: 4px;
  margin-bottom: 17px;
  border: 1px solid #b9d9ce;
  border-radius: 7px;
  padding: 13px;
  background: #f0faf6;
}

.inventory-item-current span,
.inventory-item-current small {
  color: #667b74;
  font-size: 11px;
}

.inventory-item-current strong {
  color: #145f4e;
  font-size: 21px;
}

.inventory-edit-note {
  margin-top: 14px;
  border: 1px solid #ecd8a5;
  border-radius: 6px;
  padding: 10px;
  color: #805d14;
  background: #fff9e8;
  font-size: 11px;
}

.warehouse-action strong,
.warehouse-action small {
  display: block;
}

.warehouse-action strong {
  color: #18332d;
  font-size: 21px;
  line-height: 1.2;
}

.warehouse-action small {
  margin-top: 7px;
  color: #6d7e7a;
  font-size: 12px;
}

.inventory-metric,
.inventory-section,
.inventory-reconcile-card {
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #fff;
}

.inventory-metric {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 100px;
  padding: 14px;
}

.inventory-metric span,
.inventory-reconcile-card span {
  color: #667780;
  font-size: 12px;
  font-weight: 720;
}

.inventory-metric strong,
.inventory-reconcile-card strong {
  color: #172b39;
  font-size: 21px;
  line-height: 1.1;
  white-space: nowrap;
}

.inventory-metric.warn { background: #fff9e8; border-color: #ecd998; }
.inventory-metric.good { background: #effaf4; border-color: #b7dfc6; }
.inventory-metric.blue { background: #eff7fb; border-color: #c4dfe9; }
.inventory-metric.orange { background: #fff5eb; border-color: #eed2ae; }
.inventory-metric.payable { background: #edf8f5; border-color: #a8d7c8; }
.inventory-metric.awaiting-finance { background: #fff9e8; border-color: #ecd998; }
.inventory-metric.low { background: #fff3ee; border-color: #efc1ad; }
.inventory-metric.payment { background: #fff5eb; border-color: #eed2ae; }

.inventory-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.inventory-section {
  min-width: 0;
  padding: 17px;
}

.inventory-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 13px;
}

.inventory-section-head h2 {
  margin: 0;
  color: #1b303e;
  font-size: 16px;
}

.inventory-section-head p {
  margin: 5px 0 0;
  color: #71818a;
  font-size: 12px;
}

.inventory-link-button {
  border: 0;
  padding: 2px 0;
  color: #126756;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.inventory-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.document-row-actions {
  gap: 18px;
}

.stock-detail-toggle {
  display: block;
  margin-top: 5px;
  border: 0;
  padding: 0;
  color: #146c5a;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}

.stock-group-row:has(+ .stock-supplier-detail) td {
  border-bottom-color: #c9dcd5;
  background: #f7fbf9;
}

.stock-supplier-detail td {
  padding: 0 16px 16px;
  background: #f7fbf9;
}

.stock-supplier-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce8e3;
  padding: 13px 0 9px;
  color: #51655e;
  font-size: 12px;
}

.stock-supplier-lines > div {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(76px, .65fr)) minmax(110px, .8fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid #e3ece8;
  color: #63736d;
  font-size: 12px;
}

.stock-supplier-lines > div:last-child { border-bottom: 0; }
.stock-supplier-lines strong,
.stock-supplier-lines small { display: block; }
.stock-supplier-lines small { margin-top: 3px; color: #7b8984; font-size: 11px; }
.stock-supplier-lines b { color: #173f35; white-space: nowrap; }

.supplier-manager-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: #667872;
  font-size: 12px;
}

.supplier-manager-list {
  display: grid;
  border-top: 1px solid #e1e9e5;
}

.supplier-manager-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid #e1e9e5;
  padding: 10px 1px;
}

.supplier-manager-list strong,
.supplier-manager-list small { display: block; }
.supplier-manager-list strong { color: #263d37; font-size: 14px; }
.supplier-manager-list small { margin-top: 4px; color: #76857f; font-size: 11px; }

.inventory-alert-list,
.inventory-record-list,
.inventory-payment-list {
  display: grid;
  gap: 1px;
}

.inventory-alert-list > div,
.inventory-record-list > div,
.inventory-payment-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid #edf1ef;
  padding: 8px 1px;
}

.inventory-alert-list > div {
  grid-template-columns: auto minmax(0, 1fr);
}

.inventory-alert-list strong,
.inventory-record-list strong,
.inventory-payment-list strong {
  display: block;
  color: #293b44;
  font-size: 13px;
}

.inventory-alert-list small,
.inventory-record-list small,
.inventory-payment-list small {
  display: block;
  margin-top: 3px;
  color: #7a888f;
  font-size: 11px;
}

.inventory-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.danger-dot { background: #d92d20; }

.inventory-payable-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 65px;
  border: 0;
  border-top: 1px solid #edf1ef;
  padding: 10px 1px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.inventory-payable-row span {
  min-width: 0;
}

.inventory-payable-row strong {
  display: block;
  overflow: hidden;
  color: #293b44;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-payable-row small {
  display: block;
  margin-top: 4px;
  color: #7a888f;
  font-size: 11px;
}

.inventory-payable-row b {
  color: #a23c15;
  font-size: 14px;
  white-space: nowrap;
}

.inventory-recent-section {
  margin-top: 16px;
}

.inventory-record-type {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 34px;
  padding-inline: 7px;
  height: 24px;
  border-radius: 5px;
  color: #266056;
  background: #e5f4ee;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-record-type.return { color: #a04a1e; background: #fff0e4; }
.inventory-record-type.payment { color: #215c8a; background: #e8f2fa; }

.inventory-record-list b,
.inventory-payment-list b {
  color: #1e7c55;
  font-size: 13px;
  white-space: nowrap;
}

.amount-positive { color: #19724d !important; }
.amount-minus { color: #b0411d !important; }

.inventory-notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: grid;
  gap: 5px;
  width: min(390px, calc(100vw - 32px));
  border: 1px solid #9dd4bc;
  border-radius: 8px;
  padding: 14px 16px;
  color: #204d3f;
  background: #effaf4;
  box-shadow: 0 16px 40px rgba(24, 65, 50, .18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.inventory-notice.show { opacity: 1; transform: translateY(0); }
.inventory-notice strong { font-size: 14px; }
.inventory-notice span { color: #4d6b60; font-size: 12px; }

.inventory-filter-bar,
.inventory-reconcile-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
}

.inventory-reconcile-filter-controls {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) minmax(140px, .8fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(220px, 1.25fr) auto;
  align-items: end;
  flex-wrap: wrap;
}

.inventory-reconcile-filter-controls label {
  width: auto;
  min-width: 0;
  grid-template-rows: 16px 38px;
  row-gap: 6px;
}

.inventory-reconcile-filter-controls label:nth-child(4) {
  width: auto;
}

.inventory-reconcile-filter-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  align-self: start;
  height: 38px;
  /* Skip the label row so the buttons line up with the input controls. */
  margin: 22px 0 0;
}

.inventory-reconcile-filter-actions::before {
  display: none;
}

.inventory-reconcile-filter-actions .button {
  flex: 0 0 auto;
  min-height: 38px;
  height: 38px;
  white-space: nowrap;
}

.inventory-record-filters {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(145px, .6fr) minmax(145px, .6fr) minmax(220px, 1.2fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.inventory-records-section {
  margin-top: 0;
}

.inventory-record-filters label {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
}

.record-query-button {
  align-self: end;
  min-height: 42px;
}

.order-query-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
}

.order-query-filters label {
  flex: 0 0 138px;
}

.order-query-filters .order-filter-capacity {
  flex-basis: 112px;
}

.order-query-filters .order-filter-date {
  flex-basis: 174px;
}

.order-query-filters .record-search-field {
  flex: 0 0 260px;
}

.order-query-filters .record-query-button {
  width: 90px;
  min-height: 38px;
  height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.inventory-form-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #a13f22;
  font-size: 12px;
}

.inventory-records-table {
  min-width: 980px;
}

.inventory-order-query-table {
  min-width: 1930px;
}

.inventory-order-query-table th {
  height: 38px;
  padding-right: 10px;
  padding-left: 10px;
}

.inventory-order-query-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.inventory-order-query-table th:nth-child(1) { min-width: 42px; }
.inventory-order-query-table th:nth-child(2) { min-width: 150px; }
.inventory-order-query-table th:nth-child(3) { min-width: 110px; }
.inventory-order-query-table th:nth-child(4),
.inventory-order-query-table th:nth-child(5),
.inventory-order-query-table th:nth-child(6) { min-width: 78px; }
.inventory-order-query-table th:nth-child(7) { min-width: 190px; }
.inventory-order-query-table th:nth-child(8) { min-width: 74px; }
.inventory-order-query-table th:nth-child(9),
.inventory-order-query-table th:nth-child(10),
.inventory-order-query-table th:nth-child(11),
.inventory-order-query-table th:nth-child(12) { min-width: 102px; }
.inventory-order-query-table th:nth-child(13) { min-width: 190px; }
.inventory-order-query-table th:nth-child(14) { min-width: 150px; }
.inventory-order-query-table th:nth-child(15) { min-width: 70px; }
.inventory-order-query-table th:nth-child(16) { min-width: 126px; }

.order-print-select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.order-print-select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #19755b;
  cursor: pointer;
}

.inventory-order-row td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: top;
}

.order-row-order,
.order-row-product,
.order-row-materials,
.order-row-deadline {
  display: grid;
  gap: 6px;
}

.order-row-order > strong {
  color: #1c3540;
  font-size: 14px;
  letter-spacing: .01em;
}

.order-row-order > small,
.order-row-product small,
.order-row-materials span,
.order-row-progress small {
  color: #77868c;
  font-size: 11px;
  line-height: 1.45;
}

.order-row-requirements {
  display: grid;
  gap: 3px;
  margin-top: 3px;
  padding: 7px 8px;
  border-left: 2px solid #ccdcd5;
  border-radius: 0 5px 5px 0;
  background: #f6f9f7;
}

.order-row-requirements b {
  color: #586b70;
  font-size: 10px;
}

.order-row-requirements span {
  display: -webkit-box;
  overflow: hidden;
  color: #52636c;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-row-product {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.order-row-product > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-row-product b {
  color: #334b56;
  font-size: 13px;
}

.order-row-image {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}

.order-row-materials {
  gap: 5px;
}

.order-row-materials span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row-quantity {
  display: inline-block;
  padding-top: 2px;
  color: #25444d;
  font-size: 13px;
  white-space: nowrap;
}

.order-row-deadline {
  color: #4e6269;
  font-size: 12px;
  line-height: 1.45;
}

.inventory-order-query-table .inventory-row-actions {
  flex-wrap: wrap;
  gap: 7px;
}

.inventory-order-top-scroll {
  position: sticky;
  top: 10px;
  z-index: 6;
  display: block;
  width: 100%;
  height: 18px;
  margin: 0 0 7px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #d5e2dc;
  border-radius: 8px;
  padding: 3px 0;
  background: rgba(247, 250, 248, .96);
  box-shadow: 0 3px 10px rgba(28, 66, 52, .08);
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.inventory-order-top-scroll > div {
  width: 100%;
  height: 1px;
}

.inventory-order-top-scroll::-webkit-scrollbar {
  height: 10px;
}

.inventory-order-top-scroll::-webkit-scrollbar-track {
  border-radius: 6px;
  background: transparent;
}

.inventory-order-top-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  background-clip: padding-box;
  background: #7cae9b;
}

.inventory-order-top-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

/* 仓库订单页恢复为原来的标准表格布局，不再强行压缩全部字段。 */
.inventory-body[data-inventory-role="warehouse"][data-inventory-view="orders"] .inventory-content {
  width: 100%;
  place-items: start center;
  padding: 22px 18px 42px;
}

.inventory-body[data-inventory-role="warehouse"][data-inventory-view="orders"] [data-inventory-panel="orders"] {
  width: 100%;
}

/* 订单管理使用整块工作区，减少大屏两侧留白，让筛选栏和订单表铺满可用区域。 */
.inventory-body[data-inventory-view="orders"] .inventory-content {
  width: 100%;
  max-width: none;
  padding-inline: clamp(14px, 1.5vw, 24px);
}
.inventory-body[data-inventory-view="orders"] [data-inventory-panel="orders"] {
  width: 100%;
  max-width: none;
}
.inventory-body[data-inventory-view="orders"] [data-inventory-panel="orders"] .inventory-section,
.inventory-body[data-inventory-view="orders"] [data-inventory-panel="orders"] .inventory-order-top-scroll {
  width: 100%;
  max-width: none;
}

.order-query-requirements {
  width: 210px;
  max-height: 72px;
  overflow: auto;
  color: #52636c;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.order-query-image {
  display: inline-flex;
  width: 58px;
  height: 58px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce5e0;
  border-radius: 7px;
  background: #f7faf8;
}

.order-query-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-query-empty {
  color: #9aa6ab;
  font-size: 11px;
}

.inventory-records-table .inventory-record-type {
  width: 38px;
}

.inventory-record-type.usage {
  color: #674b08;
  background: #fff0b8;
}

.inventory-filter-bar label:first-child,
.inventory-reconcile-controls label {
  width: min(260px, 100%);
}

.inventory-filter-bar label:nth-child(2) {
  width: min(360px, 100%);
}

.inventory-filter-bar label:last-child {
  width: min(360px, 100%);
}

.inventory-table-shell {
  overflow: auto;
  padding: 0;
}

.inventory-table-shell > .inventory-section-head {
  margin-bottom: 0;
  padding: 17px 17px 13px;
}

.inventory-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  text-align: left;
}

.inventory-table th {
  height: 42px;
  border-bottom: 1px solid #dce5e0;
  padding: 0 14px;
  color: #70818a;
  background: #f7faf8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-table td {
  border-bottom: 1px solid #edf1ef;
  padding: 11px 14px;
  color: #52636c;
  font-size: 12px;
  vertical-align: middle;
}

.inventory-table tbody tr:last-child td { border-bottom: 0; }

.inventory-table td strong {
  display: block;
  color: #263a45;
  font-size: 12px;
}

.inventory-table td small {
  display: block;
  margin-top: 3px;
  color: #89969b;
  font-size: 10px;
}

.inventory-table td b { color: #263a45; }

.inventory-table-empty {
  padding: 40px !important;
  color: #7e8e95 !important;
  text-align: center;
}

.inventory-line-summary {
  display: block;
  min-width: 160px;
  line-height: 1.7;
  white-space: nowrap;
}

.inventory-line-summary b { margin-left: 6px; }

.inventory-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  border-radius: 5px;
  padding: 4px 7px;
  color: #1e734e;
  background: #e7f5ed;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-status.low { color: #a4461d; background: #fff0e5; }

.inventory-status.danger {
  color: #b42318;
  background: #fee4e2;
}

.inventory-complete-button {
  min-height: 28px;
  border: 1px solid #16805f;
  border-radius: 5px;
  padding: 4px 9px;
  color: #fff;
  background: #16805f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.inventory-complete-button:hover {
  background: #0f674d;
}

.complete-order-warning {
  margin-bottom: 14px;
  border: 1px solid #f2d18b;
  border-radius: 7px;
  padding: 10px 12px;
  color: #805400;
  background: #fff8e7;
  font-size: 12px;
  line-height: 1.55;
}

.complete-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.complete-order-grid > div {
  min-width: 0;
  border: 1px solid #e1e9e5;
  border-radius: 7px;
  padding: 10px;
  background: #f8faf9;
}

.complete-order-grid span {
  display: block;
  margin-bottom: 5px;
  color: #7b8c93;
  font-size: 11px;
}

.complete-order-grid strong {
  display: block;
  color: #263a45;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.complete-order-grid .complete-order-wide {
  grid-column: 1 / -1;
}

.complete-order-grid .complete-order-remaining {
  color: #b42318;
}

.complete-order-image {
  display: inline-grid;
  gap: 5px;
  color: #146c5a;
  font-size: 11px;
  text-decoration: none;
}

.complete-order-image img {
  width: 110px;
  height: 80px;
  border: 1px solid #d6e1dc;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.complete-order-empty {
  color: #89969b !important;
}

.complete-order-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  border: 1px solid #cfe0d8;
  border-radius: 7px;
  padding: 11px 12px;
  color: #304a42;
  background: #f2f8f5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.complete-order-check input {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.complete-order-check span {
  min-width: 0;
}

.complete-order-test {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px;
  color: #40525a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.complete-order-test select {
  width: 148px;
  min-width: 148px;
  padding: 6px 8px;
  border: 1px solid #cbd9d3;
  border-radius: 7px;
  background: #fff;
  color: #263a45;
}
.complete-order-status-error { color: #b42318 !important; font-weight: 700; }
.complete-order-status-ok { color: #146c5a !important; }

/* 完成订单核对弹窗：桌面端压缩信息卡片，完整内容一次展示，避免弹窗内部翻页滚动。 */
.complete-order-modal-card {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 15px 18px;
}
.complete-order-modal-card .inventory-modal-head { margin-bottom: 10px; }
.complete-order-modal-card .inventory-modal-head h2 { font-size: 20px; }
.complete-order-modal-card .complete-order-warning { margin-bottom: 9px; padding: 7px 10px; font-size: 11px; line-height: 1.4; }
.complete-order-modal-card .complete-order-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.complete-order-modal-card .complete-order-grid > div { padding: 7px 8px; }
.complete-order-modal-card .complete-order-grid span { margin-bottom: 2px; font-size: 10px; }
.complete-order-modal-card .complete-order-grid strong { font-size: 11px; line-height: 1.35; }
.complete-order-modal-card .complete-order-image img { width: 72px; height: 50px; }
.complete-order-modal-card .complete-order-test { margin: 8px 0 6px; font-size: 12px; }
.complete-order-modal-card .complete-order-check { margin-top: 7px; padding: 8px 10px; font-size: 11px; }
.complete-order-modal-card .inventory-form-status { min-height: 16px; margin: 5px 0 0; font-size: 11px; }
.complete-order-modal-card .inventory-modal-actions { margin-top: 8px; }

@media (max-width: 880px) {
  .complete-order-modal-card {
    width: 100%;
    max-height: min(94dvh, 940px);
    overflow: auto;
  }
}
.form-grid-wide { grid-column: 1 / -1; }
.update-log-latest-card { padding: 0; overflow: hidden; }
.update-log-latest { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:22px 24px; background:linear-gradient(135deg,#eff9f5,#f7fbfa); border:1px solid #d7ebe2; border-radius:12px; }
.update-log-latest h2 { margin:4px 0 8px; color:#1c4c42; font-size:20px; }
.update-log-latest p:not(.inventory-kicker) { margin:0; color:#53676b; line-height:1.65; }
.update-log-latest-meta { display:flex; flex-direction:column; align-items:flex-end; gap:8px; white-space:nowrap; color:#52666b; font-size:12px; }
.update-log-latest-meta strong { color:#1f594c; font-size:14px; }
.update-log-latest-meta span { padding:4px 9px; border-radius:999px; background:#dff2e9; color:#1d6b55; font-weight:700; }
.update-log-list { display:grid; gap:12px; }
.update-log-entry { padding:16px 18px; border:1px solid #e1eae6; border-radius:10px; background:#fff; }
.update-log-entry-head { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.update-log-entry-head > div { display:flex; align-items:center; gap:9px; min-width:0; }
.update-log-entry h3 { margin:0; color:#263a45; font-size:15px; }
.update-log-entry time { color:#718188; font-size:12px; white-space:nowrap; }
.update-log-entry p { margin:10px 0 7px; color:#52666b; line-height:1.6; white-space:pre-wrap; }
.update-log-entry small { color:#8a989c; }
@media (max-width: 600px) { .update-log-latest { flex-direction:column; gap:14px; } .update-log-latest-meta { align-items:flex-start; } .update-log-entry-head { align-items:flex-start; flex-direction:column; gap:7px; } }
.order-chip-test-method {
  display: block;
  margin-top: 3px;
  color: #65777e;
  font-size: 11px;
  white-space: nowrap;
}
.order-detail-modal-card { max-width: 900px; }
.order-detail-grid strong { white-space: pre-wrap; word-break: break-word; }
.order-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.order-sort-button i {
  color: #8aa099;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}
.order-sort-button.active { color: #146c5a; }
.order-sort-button.active i { color: #146c5a; }
.inventory-order-query-table th:has(.order-sort-button) { cursor: pointer; }

.order-countdown {
  display: block;
  margin-top: 5px;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.order-countdown.overdue {
  color: #d92d20;
}

.inventory-category {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 6px;
  color: #37505d;
  background: #edf2f4;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.inventory-category.chip { color: #215c8a; background: #e8f2fa; }
.inventory-category.shell { color: #59636b; background: #eef0f1; }
.inventory-category.lanyard { color: #28704b; background: #e7f4ec; }
.inventory-category.packaging { color: #8b5b20; background: #f8eedf; }
.inventory-category.other { color: #6b4e72; background: #f2eaf4; }

.inventory-reconcile-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

#purchaseOrderMetrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.purchase-order-modal-card {
  width: min(880px, 100%);
}

.inventory-reconcile-card {
  display: grid;
  gap: 9px;
  min-height: 88px;
  padding: 14px;
}

.inventory-reconcile-card.delivery { border-top: 3px solid #259569; }
.inventory-reconcile-card.return { border-top: 3px solid #d67a31; }
.inventory-reconcile-card.payment { border-top: 3px solid #2f79a8; }
.inventory-reconcile-card.payable { border-top: 3px solid #146c5a; background: #f0faf6; }
.inventory-reconcile-card.awaiting-finance { border-top: 3px solid #c88719; background: #fff8e8; }
.inventory-reconcile-card.awaiting-finance strong { color: #9a5b08; }
.inventory-reconcile-card.payable strong { color: #a43f1e; }

.inventory-reconcile-pending-notice {
  display: grid;
  gap: 3px;
  margin: -4px 0 16px;
  border: 1px solid #ead7a8;
  border-left: 4px solid #c88719;
  border-radius: 7px;
  padding: 10px 12px;
  color: #76500d;
  background: #fffaf0;
  font-size: 12px;
}

.inventory-reconcile-pending-notice[hidden] { display: none; }
.inventory-reconcile-pending-notice strong { font-size: 13px; }
.inventory-reconcile-pending-notice span { color: #8b6a2b; }

.inventory-ledger-table { min-width: 850px; }

.reconcile-batch-select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center !important;
}

.reconcile-batch-select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #19755b;
  cursor: pointer;
}

.reconcile-batch-select-cell input:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.inventory-body .reconcile-manual-payment-button {
  border-color: #146c5a;
  color: #fff;
  background: #146c5a;
  box-shadow: 0 5px 12px rgba(20, 108, 90, .16);
}

.inventory-body .reconcile-manual-payment-button:hover {
  border-color: #0e5b4b;
  background: #0e5b4b;
}

.inventory-body .reconcile-batch-payment-button {
  border-color: #c88719;
  color: #8a5a0e;
  background: #fff8e8;
}

.inventory-body .reconcile-batch-payment-button:hover:not(:disabled) {
  border-color: #a96f0e;
  color: #744807;
  background: #ffefc8;
}

.reconcile-batch-payment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 14px;
  color: #5f7377;
  font-size: 12px;
}

.reconcile-batch-payment-summary b {
  margin-left: 4px;
  color: #b3451d;
  font-size: 15px;
}

.reconcile-batch-payment-lines {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 420px);
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 3px;
}

.reconcile-batch-payment-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 12px;
  align-items: center;
  border: 1px solid #dce6e0;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f8fbf9;
}

.reconcile-batch-payment-line strong,
.reconcile-batch-payment-line small {
  display: block;
}

.reconcile-batch-payment-line strong { color: #263d45; font-size: 13px; }
.reconcile-batch-payment-line small { margin-top: 3px; color: #7a898d; font-size: 11px; }
.reconcile-batch-payment-line small:last-child { color: #b3451d; }
.reconcile-batch-payment-line label { display: grid; gap: 5px; }
.reconcile-batch-payment-line label > span { color: #687b80; font-size: 11px; font-weight: 750; }

.inventory-record-notes {
  display: block;
  min-width: 150px;
  color: #73848b;
  font-size: 11px;
  line-height: 1.65;
}

.inventory-payment-section { margin-top: 16px; }

.inventory-settlement-table { min-width: 1040px; }

.settlement-confirm-hint {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  border: 1px solid #d8e5df;
  border-radius: 6px;
  padding: 12px 14px;
  color: #65766f;
  background: #f7fbf9;
  font-size: 12px;
}

.settlement-confirm-hint strong { color: #244e42; font-size: 15px; }
.settlement-confirm-hint span { line-height: 1.45; }
.settlement-blocked { color: #9b5d2f; white-space: nowrap; }
.payment-pending { color: #b3451d !important; font-weight: 800; }
.settlement-pending-finance { color: #a36a14 !important; background: #fff1cc !important; }
.settlement-pending-payment { color: #b3451d !important; background: #ffe9df !important; }

.inventory-delete {
  border: 0;
  padding: 4px 0;
  color: #9a3b20;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
}

.inventory-empty {
  padding: 23px 1px 8px;
  color: #819097;
  font-size: 12px;
}

.inventory-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
}

.inventory-modal.open { display: grid; }

.inventory-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 34, 42, .42);
}

.inventory-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(11, 29, 36, .26);
}

.inventory-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.inventory-modal-head h2 { font-size: 22px; }

.inventory-modal-close,
.inventory-remove-line {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  color: #65757c;
  background: #f1f4f2;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.inventory-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inventory-purchase-order-details {
  margin-top: 12px;
  border: 1px solid #cfe1d9;
  border-radius: 8px;
  padding: 12px 13px;
  background: #f5fbf8;
  color: #48625a;
}

.inventory-purchase-order-details.empty {
  border-style: dashed;
  color: #82918c;
  background: #fafcfb;
  font-size: 12px;
}

.inventory-purchase-order-details-head,
.inventory-purchase-order-meta,
.inventory-purchase-order-lines > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.inventory-purchase-order-details-head {
  padding-bottom: 8px;
  border-bottom: 1px solid #dcebe5;
}

.inventory-purchase-order-details-head strong {
  color: #145f4e;
  font-size: 13px;
}

.inventory-purchase-order-details-head span,
.inventory-purchase-order-meta,
.inventory-purchase-order-lines,
.inventory-purchase-order-note {
  font-size: 11px;
}

.inventory-purchase-order-details-head span {
  color: #60766e;
  text-align: right;
}

.inventory-purchase-order-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px 18px;
  padding: 9px 0;
  color: #71827d;
}

.inventory-purchase-order-meta b {
  color: #304f45;
  font-weight: 800;
}

.inventory-purchase-order-lines {
  display: grid;
  gap: 6px;
  border-top: 1px solid #dcebe5;
  padding-top: 8px;
}

.inventory-purchase-order-lines > div {
  min-width: 0;
}

.inventory-purchase-order-lines > div span {
  min-width: 0;
  overflow: hidden;
  color: #3d5d53;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-purchase-order-lines > div b {
  flex: 0 0 auto;
  color: #688079;
  font-size: 10px;
  font-weight: 700;
}

.inventory-purchase-order-note {
  display: block;
  margin-top: 8px;
  color: #71827d;
}

.inventory-form-grid .inventory-category-field-hidden,
.inventory-form-grid [hidden] {
  display: none !important;
}

.inventory-order-modal-card {
  width: min(1240px, calc(100vw - 32px));
  max-height: min(92vh, 940px);
  overflow: auto;
  padding: 18px 20px 16px;
}

.order-print-modal-card {
  width: min(760px, calc(100vw - 32px));
}

.finance-confirm-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.material-history-modal-card {
  width: min(1220px, calc(100vw - 32px));
  max-height: min(92vh, 940px);
}

.material-history-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(190px, 1.4fr) repeat(4, minmax(112px, 1fr));
  overflow: hidden;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  background: #f7faf8;
}

.material-history-summary > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 82px;
  padding: 12px 14px;
  border-right: 1px solid #dce5e0;
}

.material-history-summary > div:last-child { border-right: 0; }
.material-history-summary span,
.material-history-summary small { color: #718186; font-size: 11px; line-height: 1.45; }
.material-history-summary strong { color: #263a45; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.material-history-section { margin-top: 20px; }

.material-history-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.material-history-section-head h3 { margin: 0; color: #263a45; font-size: 14px; }
.material-history-section-head span { color: #718186; font-size: 12px; }

.material-history-table-shell {
  overflow: auto;
  border: 1px solid #dce5e0;
  border-radius: 6px;
}

.material-history-table { min-width: 1050px; }
.material-history-table td > small,
.material-history-table td > strong { display: block; }
.material-history-table td > small { margin-top: 3px; color: #718186; font-size: 11px; }
.material-history-empty { color: #87949a; }

.material-history-empty-state {
  padding: 24px;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  color: #718186;
  font-size: 13px;
}

.material-gap-intro {
  margin: 0 0 14px;
  color: #65757c;
  font-size: 12px;
  line-height: 1.6;
}

.material-gap-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dce5e0;
  border-radius: 6px;
  overflow: hidden;
  background: #f7faf8;
}

.material-gap-summary span {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 13px 15px;
  border-right: 1px solid #dce5e0;
}

.material-gap-summary span:last-child { border-right: 0; }
.material-gap-summary small { color: #738188; font-size: 11px; }
.material-gap-summary b { color: #263a45; font-size: 18px; }

.material-gap-section { margin-top: 20px; }

.material-gap-section-head { margin-bottom: 9px; }

.material-gap-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.material-gap-section-head h3 {
  margin: 0;
  color: #263a45;
  font-size: 14px;
}

.material-gap-section-head p {
  margin: 4px 0 0;
  color: #77878d;
  font-size: 11px;
  line-height: 1.5;
}

.material-gap-section-count {
  flex: 0 0 auto;
  color: #718186;
  font-size: 12px;
  white-space: nowrap;
}

.material-gap-table-shell {
  overflow: auto;
  border: 1px solid #dce5e0;
  border-radius: 6px;
}

.material-gap-table { min-width: 900px; }
.material-gap-detail-table { min-width: 980px; }
.material-gap-table td > strong,
.material-gap-table td > small,
.material-gap-detail-table td > strong,
.material-gap-detail-table td > small { display: block; }
.material-gap-table td > small,
.material-gap-detail-table td > small {
  margin-top: 3px;
  color: #718186;
  font-size: 11px;
  line-height: 1.35;
}
.material-gap-row-short td { background: #fffaf8; }
.material-gap-row-complete td { color: #687980; }
.material-gap-config-table { min-width: 620px; }
.material-gap-shortage { color: #b42318 !important; }
.material-gap-ok { color: #1f765a !important; }

.material-gap-empty {
  padding: 24px;
  border: 1px solid #c9dfd4;
  border-radius: 6px;
  color: #246652;
  background: #f0faf6;
  font-size: 13px;
}

.material-gap-unconfigured .material-gap-table-shell { border-color: #efd9b4; }
.material-gap-page-content { max-width: 1320px; }

.finance-confirm-hint {
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e7d7ad;
  border-radius: 6px;
  background: #fffaf0;
  color: #725d2b;
  font-size: 13px;
}

.finance-confirm-document {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.finance-confirm-document small,
.finance-confirm-lines small {
  color: #718186;
  font-size: 12px;
}

.finance-confirm-lines {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 420px);
  overflow: auto;
}

.finance-confirm-lines > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .9fr) 100px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  background: #fbfdfc;
}

.finance-confirm-lines > div > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-confirm-lines label {
  display: grid;
  gap: 3px;
}

.finance-confirm-lines label > span {
  color: #718186;
  font-size: 11px;
}

.finance-price-editor,
.inventory-line-price-editor {
  display: grid;
  grid-template-columns: 68px minmax(74px, 1fr);
  gap: 6px;
  min-width: 0;
}

.finance-price-editor select,
.finance-price-editor input,
.inventory-line-price-editor select,
.inventory-line-price-editor input {
  min-width: 0;
}

.inventory-line-purchase-price {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-left: 3px solid #4f8d78;
  padding-left: 9px;
}

.inventory-line-purchase-price small {
  color: #718186;
  font-size: 10px;
  font-weight: 600;
}

.inventory-line-purchase-price strong {
  overflow: hidden;
  color: #234f43;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-confirm-lines [data-finance-line-amount] {
  color: #176b52;
  text-align: right;
}

.document-finance-pending {
  color: #a36a14;
  font-size: 11px;
}

.supplier-credit-hint {
  color: #9a5d17 !important;
  font-size: 11px !important;
}

.reconcile-batch-payment-credit {
  margin: -4px 0 12px;
  border-left: 3px solid #c88719;
  padding: 7px 10px;
  color: #76500d;
  background: #fff8e8;
  font-size: 12px;
}

.reconcile-return-section { margin-top: 16px; }
.reconcile-return-section .inventory-table { min-width: 980px; }
.reconcile-return-filter {
  display: grid;
  grid-template-columns: auto 150px;
  align-items: center;
  gap: 7px;
  min-width: 210px;
  margin-top: 2px;
  color: #65777b;
  font-size: 11px;
  font-weight: 700;
}
.reconcile-return-filter select { min-height: 34px; padding: 6px 28px 6px 9px; font-size: 12px; }
.return-application-usage { display: grid; gap: 3px; min-width: 145px; }
.return-application-usage span { display: grid; gap: 1px; }
.return-application-usage strong { color: #245e51; font-size: 11px; white-space: nowrap; }
.return-application-usage small { color: #7b898d; font-size: 10px; white-space: nowrap; }
.return-application-usage.empty { display: inline-block; min-width: 0; color: #9aa6a9; font-size: 11px; }
.reconcile-batch-return-details {
  display: grid;
  gap: 6px;
  margin: -4px 0 12px;
  padding: 8px 10px;
  border: 1px solid #e4e9dc;
  border-radius: 10px;
  background: #fbfcf5;
}
.reconcile-batch-return-details > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  color: #546b60;
  font-size: 12px;
}
.reconcile-batch-return-details small { color: #89958c; }
.reconcile-batch-return-details b { color: #a14d21; }
.reconcile-available-return-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: -8px;
  padding: 10px 12px;
  border: 1px solid #f0d8a9;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #fff7e4);
}
.reconcile-available-return-card > div { display: grid; gap: 3px; min-width: 0; }
.reconcile-available-return-card strong { color: #80520e; font-size: 13px; }
.reconcile-available-return-card small { color: #9a7a43; font-size: 11px; }
.reconcile-available-return-badge {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: #8e5a0d;
  background: #f7dfad;
  font-size: 10px;
  font-weight: 800;
}

.payment-return-picker {
  display: grid;
  gap: 7px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e2e9df;
  border-radius: 10px;
  background: #fbfcf8;
}
.payment-return-picker > strong { color: #314b42; font-size: 13px; }
.payment-return-picker > small { color: #7d8c86; font-size: 11px; }
.payment-return-picker label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: center; color: #4e625b; font-size: 12px; }
.payment-return-picker label input { accent-color: #19755b; }
.payment-return-picker label span { display: grid; gap: 2px; }
.payment-return-picker label b { color: #344e45; font-size: 12px; }
.payment-return-picker label small { color: #a14d21; font-size: 11px; }
.payment-return-picker.empty { background: #fafafa; }
.settlement-return-picker {
  display: grid;
  gap: 7px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e2e9df;
  border-radius: 10px;
  background: #fbfcf8;
}
.settlement-return-picker > strong { color: #314b42; font-size: 13px; }
.settlement-return-picker > small { color: #7d8c86; }
.settlement-return-picker label { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: #4e625b; font-size: 12px; }
.settlement-return-picker label input { accent-color: #19755b; }
.settlement-return-picker label span { display: grid; gap: 2px; min-width: 0; }
.settlement-return-picker label b { color: #344e45; font-size: 12px; }
.settlement-return-picker label small { color: #8a9990; font-size: 11px; }
.settlement-return-picker label > strong { color: #a14d21; font-size: 12px; white-space: nowrap; }
.settlement-return-picker.empty { background: #fafafa; }

@media (max-width: 560px) {
  .reconcile-batch-payment-line { grid-template-columns: 1fr; gap: 8px; }
  .finance-confirm-lines > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-confirm-lines [data-finance-line-amount] {
    grid-column: 1;
    text-align: left;
  }
}

.order-print-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.order-print-toolbar input[type="search"] {
  width: 100%;
  min-width: 0;
}

.order-print-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #45606a;
  font-size: 13px;
  white-space: nowrap;
}

.order-print-toolbar b {
  min-width: 78px;
  color: #166650;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.order-print-choices {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 470px);
  overflow: auto;
  padding: 2px 3px 2px 0;
}

.order-print-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #d6e1df;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.order-print-choice:has(input:checked) {
  border-color: #6aa993;
  background: #f2faf6;
}

.order-print-choice span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.order-print-choice b {
  color: #1c3941;
  font-size: 14px;
}

.order-print-choice small {
  overflow: hidden;
  color: #647982;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-print-choice em {
  padding: 3px 7px;
  border-radius: 4px;
  background: #eef2f2;
  color: #66777d;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.order-print-choice em.open {
  background: #e8f6ef;
  color: #176b52;
}

@media (max-width: 640px) {
  .order-print-toolbar {
    grid-template-columns: 1fr auto;
  }

  .order-print-toolbar input[type="search"] {
    grid-column: 1 / -1;
  }

  .order-print-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .order-print-choice em {
    grid-column: 2;
    justify-self: start;
  }
}

.inventory-order-modal-card .inventory-modal-head {
  margin-bottom: 14px;
}

.inventory-order-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.order-editor-layout {
  display: grid;
  grid-template-columns: minmax(420px, .96fr) minmax(520px, 1.24fr);
  gap: 14px;
  align-items: start;
}

.order-details-panel,
.order-material-picker {
  border: 1px solid #dce5e0;
  border-radius: 8px;
  background: #f8fbfa;
}

.order-details-panel { padding: 12px; }

.order-details-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  color: #2a3e48;
  font-size: 13px;
}
.order-details-panel-head span { color: #7b898f; font-size: 11px; font-weight: 500; }

.inventory-order-form label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
}

.inventory-order-form label > span:first-child {
  display: flex;
  min-height: 17px;
  align-items: flex-end;
}

.inventory-order-form input,
.inventory-order-form textarea {
  width: 100%;
  border: 1px solid #cbd7d1;
  border-radius: 6px;
  color: #1b2a35;
  background: #fff;
}

.inventory-order-form input {
  height: 40px;
  min-height: 40px;
  padding: 7px 9px;
}

.inventory-order-form input[type="file"] {
  padding: 6px 8px;
}

.inventory-order-form textarea {
  height: 72px;
  min-height: 72px;
  padding: 9px 10px;
  resize: none;
}

.inventory-order-form small {
  min-height: 14px;
  color: #87949a;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.inventory-order-form .order-requirements-field {
  grid-column: 1 / -1;
}

.inventory-order-form .order-id-field { grid-column: span 2; }
.inventory-order-form .order-deadline-field {
  width: calc(100% - 10px);
  justify-self: start;
}
.inventory-order-form .order-image-field { grid-column: 1 / -1; }

.inventory-order-form .order-current-image {
  min-height: 0;
}

.inventory-order-form .order-current-image a {
  color: #146c5a;
  font-weight: 800;
}

.inventory-order-form .inventory-form-status {
  min-height: 16px;
  margin: 6px 0 0;
}

.inventory-order-form .inventory-modal-actions {
  margin-top: 8px;
  padding-top: 13px;
}

.order-material-picker {
  padding: 12px;
}
.order-material-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #2a3e48;
  font-size: 13px;
}
.order-material-picker-head > div { display: grid; gap: 3px; }
.order-material-picker-head span { color: #7b898f; font-size: 11px; font-weight: 500; }
.order-material-picker-head b { color: #146c5a; font-size: 12px; white-space: nowrap; }
.order-material-toolbar {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 9px;
}
.order-material-toolbar input,
.order-material-toolbar select {
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #cbd7d1;
  border-radius: 6px;
  background: #fff;
}
.order-material-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-height: 530px;
  overflow: auto;
  padding-right: 3px;
}
.order-material-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 65px;
  padding: 8px 9px;
  border: 1px solid #e1eae5;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.order-material-choice input { width: 16px !important; height: 16px !important; min-height: 16px !important; margin-top: 2px; }
.order-material-choice b, .order-material-choice small { display: block; }
.order-material-choice b { color: #293e38; font-size: 12px; }
.order-material-choice small { margin-top: 3px; color: #7e8c88; font-size: 10px; font-weight: 500; line-height: 1.35; }
@media (max-width: 1080px) {
  .order-editor-layout { grid-template-columns: 1fr; }
  .order-material-choices { max-height: 360px; }
}
@media (max-width: 700px) {
  .inventory-order-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-order-form .order-id-field { grid-column: 1 / -1; }
  .inventory-order-form .order-deadline-field { width: 100%; }
  .order-material-choices { grid-template-columns: 1fr; }
  .order-material-toolbar { grid-template-columns: 105px minmax(0, 1fr); }
  .order-material-picker-head { display: grid; }
}

.inventory-document-lines {
  margin-top: 20px;
  border-top: 1px solid #e4ebe7;
  padding-top: 17px;
}

.inventory-document-lines-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #2a3e48;
  font-size: 13px;
}

.inventory-document-lines-head span {
  color: #7b898f;
  font-size: 11px;
}

.inventory-document-line {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(74px, .55fr) minmax(150px, 1fr) minmax(100px, .75fr) 30px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inventory-document-line span {
  overflow: hidden;
  color: #2d6b5d;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-document-line.warehouse-line {
  grid-template-columns: minmax(0, 1.8fr) minmax(100px, .7fr) 30px;
}

.inventory-document-line .inventory-remove-line {
  width: 27px;
  height: 27px;
  color: #a64723;
  background: #fff0e7;
}

.inventory-document-line.purchase-order-line {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.35fr) minmax(74px, .55fr) minmax(150px, 1fr) minmax(100px, .75fr) 30px;
}

.purchase-order-linked-order { color: #55736a; }

.inventory-document-lines > .button { margin-top: 12px; }

.inventory-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
  border-top: 1px solid #e4ebe7;
  padding-top: 15px;
}

.document-delete-warning {
  display: grid;
  gap: 5px;
  border: 1px solid #f0c7ba;
  border-radius: 6px;
  padding: 13px 14px;
  color: #7f2f1a;
  background: #fff6f2;
}

.document-delete-warning strong {
  font-size: 14px;
}

.document-delete-warning span {
  color: #8a5a4b;
  font-size: 12px;
  line-height: 1.6;
}

.document-delete-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.document-delete-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #e1e9e5;
  border-radius: 6px;
  padding: 10px;
  background: #fbfdfc;
}

.document-delete-summary span {
  color: #718186;
  font-size: 10px;
}

.document-delete-summary strong {
  overflow: hidden;
  color: #243c47;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .inventory-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .inventory-app { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .inventory-sidebar {
    display: grid;
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    border-right: 0;
    border-bottom: 1px solid #d6e0dc;
    padding: 10px 12px 9px;
    overflow: hidden;
  }
  .inventory-brand { grid-column: 1; grid-row: 1; padding: 3px 5px 8px; }
  .inventory-user-badge { grid-column: 1 / -1; grid-row: 2; margin: 0 4px 8px; }
  .inventory-nav {
    display: flex;
    flex: none;
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    min-width: 0;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 1px 4px 5px;
    scrollbar-width: thin;
    scroll-snap-type: inline proximity;
  }
  .inventory-nav > span { display: none; }
  .inventory-nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 108px;
    min-height: 44px;
    scroll-snap-align: start;
  }
  .inventory-nav button small { display: none; }
  .inventory-sidebar-bottom {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    align-self: center;
    gap: 6px;
    margin: 0;
    border: 0;
    padding: 0 4px 6px 8px;
  }
  .inventory-sidebar-bottom button,
  .inventory-sidebar-bottom a {
    min-height: 34px;
    border: 1px solid #d7e1dc;
    border-radius: 6px;
    padding: 6px 9px;
    background: #fff;
    font-size: 11px;
    white-space: nowrap;
  }

  .inventory-version {
    align-self: center;
    margin-left: 2px;
    white-space: nowrap;
  }
  .inventory-content,
  .inventory-view { width: 100%; min-width: 0; }
  .inventory-content { padding: 22px 16px 38px; }
  .inventory-overview-grid { grid-template-columns: 1fr; }
  .warehouse-launchpad { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .warehouse-action { grid-template-columns: 1fr; min-height: 145px; justify-items: center; text-align: center; }
  .inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-supplier-lines > div { grid-template-columns: minmax(160px, 1.5fr) repeat(2, minmax(80px, .7fr)); }
  .stock-supplier-lines > div > span:nth-child(4),
  .stock-supplier-lines > div > span:nth-child(5) { display: none; }
}

@media (max-width: 620px) {
  .document-delete-summary { grid-template-columns: 1fr; }
  .inventory-login { grid-template-columns: auto minmax(0, 1fr); margin-top: 32px; padding: 22px; }
  .inventory-login form { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .inventory-login form .button { width: 100%; }
  .inventory-page-head { display: grid; gap: 14px; align-items: start; }
  .inventory-head-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    justify-content: stretch;
  }
  .inventory-page-head > .button { width: 100%; }
  .inventory-head-actions .button { width: 100%; }
  .inventory-page-head h1 { font-size: 25px; }
  .inventory-body input,
  .inventory-body select,
  .inventory-body textarea { min-height: 44px; font-size: 16px; }
  .inventory-body .button { min-height: 40px; }
  .inventory-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .warehouse-launchpad { grid-template-columns: 1fr; gap: 9px; }
  .warehouse-action { grid-template-columns: 52px minmax(0, 1fr); min-height: 88px; padding: 14px; justify-items: stretch; text-align: left; }
  .warehouse-action-icon { width: 52px; height: 52px; }
  .inventory-body[data-inventory-role="warehouse"] .inventory-content { padding: 16px; }
  .inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad { grid-template-columns: 1fr; }
  .inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad-head { flex-wrap: wrap; align-items: flex-start; }
  .warehouse-session-actions { width: 100%; margin-left: 0; }
  .warehouse-current-user { text-align: left; }
  .warehouse-refresh-wrap { display: flex !important; margin-left: auto; }
  .warehouse-refresh-wrap > small { display: none; }
  .stock-supplier-detail td { padding-inline: 10px; }
  .stock-supplier-detail-head { align-items: flex-start; }
  .stock-supplier-lines > div { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; }
  .stock-supplier-lines > div > span:not(:first-child) { display: none; }
  .stock-supplier-lines .inventory-row-actions { grid-column: 1 / -1; }
  .inventory-metric { min-height: 88px; padding: 11px; }
  .inventory-metric strong { font-size: 17px; }
  .inventory-filter-bar,
  .inventory-reconcile-controls { display: grid; }
  .inventory-reconcile-filter-controls { grid-template-columns: 1fr; }
  .inventory-reconcile-filter-actions {
    display: flex;
    width: 100%;
    height: auto;
    margin-top: 0;
  }
  .inventory-reconcile-filter-actions::before { display: none; }
  .inventory-reconcile-filter-actions .button {
    flex: 1 1 0;
    height: 40px;
    min-height: 40px;
  }
  .inventory-filter-bar label,
  .inventory-filter-bar label:first-child,
  .inventory-filter-bar label:last-child,
  .inventory-reconcile-controls label { width: 100%; }
  .inventory-reconcile-cards,
  #purchaseOrderMetrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .inventory-reconcile-card { min-height: 78px; padding: 11px; }
  .inventory-reconcile-card strong { font-size: 16px; }
  .inventory-section { padding: 14px; }
  .inventory-table-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .inventory-table th:first-child,
  .inventory-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 0 #e1e8e4;
  }
  .inventory-table th:first-child { z-index: 2; background: #f7faf8; }
  .inventory-table td:first-child { background: #fff; }
  .inventory-table th,
  .inventory-table td { padding-right: 11px; padding-left: 11px; }
  .inventory-row-actions button,
  .inventory-link-button,
  .inventory-delete { min-height: 32px; padding: 6px 3px; }
  .inventory-form-grid { grid-template-columns: 1fr; }
  .material-gap-summary { grid-template-columns: 1fr; }
  .material-gap-summary span { min-height: 58px; border-right: 0; border-bottom: 1px solid #dce5e0; }
  .material-gap-summary span:last-child { border-bottom: 0; }
  .material-history-summary { grid-template-columns: 1fr 1fr; }
  .material-history-summary > div { min-height: 70px; border-bottom: 1px solid #dce5e0; }
  .material-history-summary > div:nth-child(2n) { border-right: 0; }
  .material-history-summary > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .inventory-record-filters { grid-template-columns: 1fr 1fr; }
  .inventory-record-filters .record-search-field { grid-column: 1 / -1; }
  .order-query-filters .record-query-button { width: 90px; }
  .account-role-summary { grid-template-columns: 1fr; }
  .usage-order-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-order-requirements,
  .usage-order-image { grid-column: 1 / -1; }
  .usage-stock-row { grid-template-columns: 18px minmax(0, 1fr); }
  .usage-stock-count,
  .usage-stock-row input[type="number"] { grid-column: 2; }
  .inventory-document-line:not(.warehouse-line) { grid-template-columns: minmax(70px, .45fr) minmax(0, 1fr) 27px; }
  .inventory-document-line:not(.warehouse-line) > [data-line-sku] { grid-column: 1 / 3; grid-row: 1; }
  .inventory-document-line:not(.warehouse-line) > [data-line-quantity] { grid-column: 1; grid-row: 2; }
  .inventory-document-line:not(.warehouse-line) .inventory-line-price-editor,
  .inventory-document-line:not(.warehouse-line) .inventory-line-purchase-price { grid-column: 2 / 4; grid-row: 2; }
  .inventory-document-line:not(.warehouse-line) span { grid-column: 1 / -1; grid-row: 3; text-align: left; }
  .inventory-document-line:not(.warehouse-line) .inventory-remove-line { grid-column: 3; grid-row: 1; }
  .inventory-document-line.warehouse-line { grid-template-columns: minmax(0, 1fr) minmax(80px, .45fr) 27px; }
  .inventory-document-line.warehouse-line .inventory-remove-line { grid-column: 3; grid-row: 1; }
  .inventory-document-line.purchase-order-line { grid-template-columns: minmax(70px, .45fr) minmax(0, 1fr) 27px; }
  .inventory-document-line.purchase-order-line > [data-purchase-sku] { grid-column: 1 / 3; grid-row: 1; }
  .inventory-document-line.purchase-order-line > [data-purchase-production-order] { grid-column: 1 / 3; grid-row: 2; }
  .inventory-document-line.purchase-order-line > [data-purchase-quantity] { grid-column: 1; grid-row: 3; }
  .inventory-document-line.purchase-order-line .inventory-line-price-editor { grid-column: 2 / 4; grid-row: 3; }
  .inventory-document-line.purchase-order-line > [data-purchase-amount] { grid-column: 1 / -1; grid-row: 4; text-align: left; }
  .inventory-document-line.purchase-order-line .inventory-remove-line { grid-column: 3; grid-row: 1; }
  .inventory-document-lines-head { display: grid; }
  .inventory-modal {
    align-items: end;
    padding: 0;
  }
  .inventory-modal-card,
  .inventory-order-modal-card,
  .purchase-order-modal-card {
    width: 100%;
    max-width: none;
    max-height: min(94dvh, 940px);
    border-radius: 8px 8px 0 0;
    padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  }
  .inventory-modal-head {
    position: sticky;
    top: -16px;
    z-index: 4;
    margin: -16px -14px 16px;
    border-bottom: 1px solid #e5ebe8;
    padding: 15px 14px 12px;
    background: #fff;
  }
  .inventory-modal-head h2 { font-size: 20px; }
  .inventory-modal-actions {
    position: sticky;
    bottom: calc(-1 * max(16px, env(safe-area-inset-bottom)));
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px -14px 0;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -8px 18px rgba(25, 48, 41, .07);
  }
  .inventory-modal-actions .button { width: 100%; min-height: 42px; }
  .inventory-notice {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

/* 大屏订单表按比例缩放，优先在一屏内展示全部字段；较低分辨率保留横向滚动。 */
@media (min-width: 1281px) {
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th,
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table td {
    min-width: 0 !important;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 10px;
    overflow-wrap: anywhere;
  }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th { height: 34px; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(1) { width: 8%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(2) { width: 7%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(3) { width: 4%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(4) { width: 5%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(5) { width: 5%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(6) { width: 11%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(7) { width: 5%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(8),
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(9) { width: 5%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(10) { width: 7%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(11) { width: 5%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(12) { width: 12%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(13) { width: 8%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(14) { width: 6%; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table th:nth-child(15) { width: 7%; }
  .inventory-body[data-inventory-view="orders"] .order-query-requirements { width: auto; max-height: 52px; font-size: 10px; }
  .inventory-body[data-inventory-view="orders"] .order-row-deadline { font-size: 10px; }
  .inventory-body[data-inventory-view="orders"] .order-row-quantity { font-size: 11px; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-row td { padding-top: 6px; padding-bottom: 6px; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table .inventory-row-actions { gap: 3px; }
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table .inventory-row-actions button { min-height: 26px; padding: 4px 5px; font-size: 10px; }
}

@media (max-width: 1280px) {
  .inventory-body[data-inventory-view="orders"] .inventory-order-query-table {
    min-width: 1930px;
    table-layout: auto;
  }
}

/* 工作台重新排版：信息分层更清楚，操作入口更容易扫读。 */
.inventory-body [data-inventory-panel="overview"] > .inventory-page-head {
  margin-bottom: 14px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-page-head h1 {
  font-size: 28px;
  letter-spacing: -.02em;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-page-head::after {
  display: none;
  content: none;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-overview-actions-only {
  justify-content: flex-end;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics {
  gap: 12px;
  margin-bottom: 18px;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric {
  min-height: 112px;
  border-radius: 10px;
  padding: 16px 17px;
  box-shadow: 0 4px 14px rgba(26, 61, 49, .04);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric strong {
  font-size: 24px;
}

.inventory-overview-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 18px;
}

.inventory-overview-grid > .inventory-section,
.inventory-recent-section {
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(26, 61, 49, .035);
}

.inventory-overview-status-list {
  display: grid;
  gap: 0;
}

.inventory-overview-status-list > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  border-top: 1px solid #edf2ef;
  padding: 10px 1px;
}

.inventory-overview-status-list > div:first-child { border-top: 0; }
.inventory-overview-status-list strong,
.inventory-overview-status-list small { display: block; }
.inventory-overview-status-list strong { color: #2a3d45; font-size: 12px; }
.inventory-overview-status-list small { margin-top: 4px; color: #7a888f; font-size: 11px; }
.inventory-overview-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #54a57e; }
.inventory-overview-status-dot.warning { background: #d88d26; }
.inventory-overview-status-dot.blue { background: #4c8db4; }
.inventory-overview-status-dot.orange { background: #d77928; }
.inventory-overview-status-dot.danger { background: #c64b3b; }
.inventory-overview-priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #efc1ad;
  border-radius: 999px;
  color: #a4422e;
  background: #fff3ee;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-confirm-message {
  display: grid;
  gap: 7px;
  border: 1px solid #ecd8a5;
  border-radius: 8px;
  padding: 13px 14px;
  color: #6e5a2b;
  background: #fffaf0;
  font-size: 12px;
  line-height: 1.55;
}

.inventory-confirm-message p { margin: 0; }

.inventory-restore-password-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: #4c5e58;
  font-size: 12px;
  font-weight: 800;
}

.inventory-restore-password-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd8d2;
  border-radius: 7px;
  padding: 9px 11px;
  color: #20332d;
  background: #fff;
}

.inventory-restore-password-field input:focus {
  border-color: #9d4a3e;
  outline: 3px solid rgba(157, 74, 62, .1);
}

.inventory-restore-password-field small {
  color: #85928e;
  font-size: 10px;
  font-weight: 500;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad-head {
  margin-bottom: 15px;
  border-bottom: 1px solid #e3ece8;
  padding-bottom: 13px;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-current-user {
  font-size: 16px;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-action {
  position: relative;
  min-height: 128px;
  border-radius: 11px;
  padding: 17px;
  box-shadow: 0 5px 15px rgba(26, 61, 49, .045);
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-action::after {
  position: absolute;
  right: 14px;
  bottom: 11px;
  color: #8da39b;
  content: "→";
  font-size: 17px;
}

.inventory-body[data-inventory-role="warehouse"] .warehouse-action strong { font-size: 18px; }
.inventory-body[data-inventory-role="warehouse"] .warehouse-action small { max-width: 150px; line-height: 1.45; }

/* 工作台统计卡片：用同一套低饱和颜色区分数据类型，避免所有提醒都挤在黄/橙色里。 */
.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--metric-border, #d9e2e0);
  background: var(--metric-bg, #f4f7f7);
  color: var(--metric-ink, #334b52);
  box-shadow: 0 7px 18px rgba(35, 66, 60, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 4px;
  border-radius: inherit;
  background: var(--metric-accent, #789095);
  content: "";
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric::after {
  position: absolute;
  right: -22px;
  top: -30px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--metric-glow, rgba(120, 144, 149, .1));
  content: "";
  pointer-events: none;
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric:hover {
  transform: translateY(-2px);
  border-color: var(--metric-border-hover, var(--metric-accent, #789095));
  box-shadow: 0 10px 22px rgba(35, 66, 60, .09);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric span {
  position: relative;
  z-index: 1;
  color: var(--metric-label, #687b80);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric strong {
  position: relative;
  z-index: 1;
  color: var(--metric-ink, #263d44);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.neutral {
  --metric-bg: #f3f6f6;
  --metric-border: #d9e3e2;
  --metric-border-hover: #aabfc0;
  --metric-accent: #6d858a;
  --metric-label: #62777c;
  --metric-ink: #2e4a50;
  --metric-glow: rgba(109, 133, 138, .12);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.blue {
  --metric-bg: #eef6fc;
  --metric-border: #c9dff0;
  --metric-border-hover: #86b6d8;
  --metric-accent: #3f86b5;
  --metric-label: #52738a;
  --metric-ink: #225e89;
  --metric-glow: rgba(63, 134, 181, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.orange {
  --metric-bg: #fff6ed;
  --metric-border: #f0d6b8;
  --metric-border-hover: #dda86a;
  --metric-accent: #c9792f;
  --metric-label: #8e6847;
  --metric-ink: #a65d1e;
  --metric-glow: rgba(201, 121, 47, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.awaiting-finance {
  --metric-bg: #f5f1fc;
  --metric-border: #d9cef0;
  --metric-border-hover: #b3a0db;
  --metric-accent: #8061b5;
  --metric-label: #71628a;
  --metric-ink: #63469a;
  --metric-glow: rgba(128, 97, 181, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.pending-stock {
  --metric-bg: #fff9e9;
  --metric-border: #efdfad;
  --metric-border-hover: #d8b85d;
  --metric-accent: #bd8a1d;
  --metric-label: #8b7138;
  --metric-ink: #8d6812;
  --metric-glow: rgba(189, 138, 29, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.payment {
  --metric-bg: #fff1ef;
  --metric-border: #edc9c3;
  --metric-border-hover: #d88d82;
  --metric-accent: #c15b4c;
  --metric-label: #93665f;
  --metric-ink: #a64135;
  --metric-glow: rgba(193, 91, 76, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.good {
  --metric-bg: #eef8f2;
  --metric-border: #c7e3d0;
  --metric-border-hover: #8fc4a0;
  --metric-accent: #3c9766;
  --metric-label: #5a8069;
  --metric-ink: #28724a;
  --metric-glow: rgba(60, 151, 102, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.payable {
  --metric-bg: #edf8f5;
  --metric-border: #bfe0d5;
  --metric-border-hover: #76b8a3;
  --metric-accent: #258b72;
  --metric-label: #577c72;
  --metric-ink: #176d59;
  --metric-glow: rgba(37, 139, 114, .13);
}

.inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric.overdue {
  --metric-bg: #fff0f2;
  --metric-border: #efc7cd;
  --metric-border-hover: #d88994;
  --metric-accent: #c04c5c;
  --metric-label: #97626d;
  --metric-ink: #ad3c4d;
  --metric-glow: rgba(192, 76, 92, .14);
}

/* 资源库：芯片资料与订单图片采用轻量卡片，便于快速扫描和复用。 */
.resource-library-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.resource-library-summary > span {
  display: grid;
  gap: 5px;
  min-height: 72px;
  border: 1px solid #d9e4e0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f6faf8;
}
.resource-library-summary small { color: #70827d; font-size: 11px; font-weight: 700; }
.resource-library-summary b { color: #1e5d4f; font-size: 20px; }
.resource-library-summary .resource-library-ready { color: #26825e; font-size: 14px; }
.resource-library-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.resource-library-section { min-width: 0; }
.resource-chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.resource-chip-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e5df;
  border-radius: 10px;
  padding: 13px;
  background: #fbfdfc;
}
.resource-chip-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.resource-chip-card-head > div { display: grid; gap: 3px; min-width: 0; }
.resource-chip-card-head strong { color: #27443d; font-size: 13px; overflow-wrap: anywhere; }
.resource-chip-card-head small { color: #7b8a86; font-size: 11px; overflow-wrap: anywhere; }
.resource-chip-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #246d5c;
  background: #e4f3ec;
  font-size: 15px;
  font-weight: 900;
}
.resource-chip-meta { display: flex; flex-wrap: wrap; gap: 6px; color: #688078; font-size: 11px; }
.resource-chip-meta span { border-radius: 999px; padding: 4px 7px; background: #f0f6f3; }
.resource-chip-card p { margin: 0; color: #71817c; font-size: 11px; line-height: 1.5; }
.resource-card-actions { display: flex; justify-content: flex-end; gap: 8px; }
.resource-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.resource-image-card { display: grid; gap: 8px; min-width: 0; }
.resource-image-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 132px;
  overflow: hidden;
  border: 1px solid #dce7e3;
  border-radius: 9px;
  padding: 0;
  background: #f6f9f8;
  cursor: pointer;
}
.resource-image-preview:hover { border-color: #5eaa91; box-shadow: 0 0 0 3px rgba(94, 170, 145, .12); }
.resource-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.resource-image-card > div { display: grid; gap: 2px; min-width: 0; }
.resource-image-card strong { overflow: hidden; color: #344b49; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-image-card small { overflow: hidden; color: #87938f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.resource-library-empty { grid-column: 1 / -1; min-height: 100px; }
.resource-form-wide { grid-column: 1 / -1; }
.resource-upload-drop { display: grid; gap: 7px; border: 1px dashed #b8d5ca; border-radius: 10px; padding: 18px; background: #f4faf7; }
.resource-upload-drop strong { color: #2d5f51; }
.resource-upload-drop small { color: #71847d; line-height: 1.5; }
.resource-large-preview { display: grid; place-items: center; min-height: 280px; border-radius: 10px; background: #f5f8f7; }
.resource-large-preview img { max-width: 100%; max-height: 62vh; object-fit: contain; }
.order-resource-picker { margin: 0 0 10px; border: 1px solid #d8e7df; border-radius: 8px; padding: 9px; background: #f3faf6; }
.order-resource-picker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.order-resource-picker-head strong { color: #2d6654; font-size: 12px; }
.order-resource-picker-head small { color: #769188; font-size: 10px; }
.order-resource-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.order-resource-choice { display: flex; align-items: center; gap: 8px; min-width: 0; border: 1px solid #d9e7e0; border-radius: 8px; padding: 8px; color: inherit; background: #fff; text-align: left; cursor: pointer; }
.order-resource-choice:hover, .order-resource-choice.selected { border-color: #58a78e; background: #eaf7f1; }
.order-resource-choice > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.order-resource-choice b, .order-resource-choice small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-resource-choice b { color: #2d4c43; font-size: 11px; }
.order-resource-choice small { color: #7b8d87; font-size: 10px; }
.order-resource-choice em { margin-left: auto; color: #36816b; font-size: 10px; font-style: normal; white-space: nowrap; }
.order-resource-badge { margin-left: 3px; border-radius: 999px; padding: 2px 5px; color: #2c8066; background: #e5f4ed; font-size: 9px; font-style: normal; font-weight: 700; }
.order-image-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.order-image-preview-box { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 8px; border: 1px solid #dde8e3; border-radius: 8px; padding: 6px 8px; color: #7b8b86; background: #f7faf9; font-size: 10px; }
.order-image-preview-box img { width: 58px; height: 42px; border-radius: 5px; object-fit: contain; background: #fff; }
.order-image-library { display: grid; gap: 9px; max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid #b8d8cc; border-radius: 8px; padding: 9px; background: #f7fbf9; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.order-image-library[hidden] { display: none !important; }
.order-image-library-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #31544b; }
.order-image-library-head > div { display: grid; gap: 2px; min-width: 0; }
.order-image-library-head strong { color: #1e4d40; font-size: 12px; }
.order-image-library-head small { color: #72837d; font-size: 10px; font-weight: 600; }
.order-image-library-head > span { flex: 0 0 auto; border-radius: 999px; padding: 3px 7px; color: #187057; background: #e4f4ed; font-size: 9px; font-weight: 800; white-space: nowrap; }
.order-image-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 7px; }
.order-image-library-empty { display: grid; justify-items: start; gap: 6px; padding: 7px 3px; color: #60756d; }
.order-image-library-empty strong { color: #38594f; font-size: 12px; }
.order-image-library-empty small { color: #7a8c86; font-size: 10px; line-height: 1.55; }
.order-image-library-card { display: grid; gap: 4px; min-width: 0; border: 1px solid #e0e9e5; border-radius: 7px; padding: 5px; background: #fff; cursor: pointer; text-align: left; }
.order-image-library-card:hover, .order-image-library-card.selected { border-color: #4f9d84; box-shadow: 0 0 0 2px rgba(79, 157, 132, .12); }
.order-image-library-card span { display: grid; place-items: center; height: 58px; border-radius: 4px; background: #f5f8f7; }
.order-image-library-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.order-image-library-card small { overflow: hidden; color: #647972; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .resource-library-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .resource-library-summary { grid-template-columns: 1fr 1fr; }
  .resource-library-summary > span:last-child { grid-column: 1 / -1; }
  .order-resource-choices { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .inventory-overview-grid { grid-template-columns: 1fr; }
  .inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .inventory-body [data-inventory-panel="overview"] > .inventory-page-head { padding: 17px; }
  .inventory-body [data-inventory-panel="overview"] > .inventory-page-head::after { display: none; }
  .inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric { min-height: 92px; padding: 12px; }
  .inventory-body [data-inventory-panel="overview"] > .inventory-metrics .inventory-metric strong { font-size: 18px; }
  .inventory-body[data-inventory-role="warehouse"] .warehouse-launchpad { grid-template-columns: 1fr; }
  .reconcile-return-section .inventory-section-head { flex-wrap: wrap; }
  .reconcile-return-filter { grid-template-columns: auto minmax(0, 1fr); width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
  .inventory-content { padding: 18px 12px 30px; }
  .inventory-sidebar { padding-inline: 8px; }
  .inventory-brand b { font-size: 15px; }
  .inventory-brand-mark { width: 32px; height: 32px; }
  .inventory-user-badge { padding: 7px 9px; }
  .inventory-nav { padding-inline: 0; }
  .inventory-nav button { min-width: 96px; padding-inline: 9px; text-align: center; }
  .inventory-page-head { margin-bottom: 17px; }
  .inventory-page-head h1 { font-size: 23px; }
  .inventory-page-head p:not(.inventory-kicker) { line-height: 1.55; }
  .inventory-metrics,
  .inventory-reconcile-cards,
  #purchaseOrderMetrics { grid-template-columns: 1fr 1fr; }
  .inventory-metric,
  .inventory-reconcile-card { min-height: 78px; }
  .inventory-filter-bar,
  .inventory-reconcile-controls,
  .inventory-record-filters,
  .order-query-filters { grid-template-columns: 1fr; }
  .inventory-record-filters .record-search-field,
  .order-query-filters .record-search-field { grid-column: 1; }
  .order-query-filters label,
  .order-query-filters .order-filter-capacity,
  .order-query-filters .order-filter-date,
  .order-query-filters .record-search-field,
  .order-query-filters .record-query-button,
  .record-query-button { width: 100%; flex-basis: auto; }
  .inventory-section-head { align-items: flex-start; }
  .inventory-record-list > div,
  .inventory-payment-list > div {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .inventory-payment-list .inventory-delete { grid-column: 2 / -1; justify-self: end; }
  .account-role-summary { gap: 7px; }
  .inventory-order-fields,
  .complete-order-grid,
  .usage-order-details,
  .material-history-summary { grid-template-columns: 1fr; }
  .complete-order-grid .complete-order-wide,
  .inventory-order-form .order-id-field,
  .inventory-order-form .order-requirements-field,
  .inventory-order-form .order-image-field,
  .usage-order-requirements,
  .usage-order-image { grid-column: 1; }
  .material-history-summary > div { border-right: 0; border-bottom: 1px solid #dce5e0; }
  .material-history-summary > div:last-child { border-bottom: 0; }
  .supplier-manager-list > div { display: grid; gap: 9px; }
  .supplier-manager-list .inventory-row-actions { justify-self: end; }
  .order-print-toolbar { grid-template-columns: 1fr; }
  .order-print-toolbar input[type="search"] { grid-column: 1; }
  .order-print-toolbar b { min-width: 0; text-align: left; }
  .document-row-actions { flex-wrap: wrap; gap: 10px 16px; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 24px;
  min-height: 44px;
  padding: 0 24px;
  background: rgba(251, 251, 253, .68);
  border-bottom: 1px solid rgba(255, 255, 255, .44);
  box-shadow: 0 1px 18px rgba(17, 24, 39, .06);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.brand-text {
  display: inline;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  white-space: nowrap;
  justify-self: start;
}

.brand-mark {
  width: 23px;
  height: 23px;
  border-radius: 0;
  background: url("/assets/goldenloop-site-logo.svg?v=20260913-logo-4") center / contain no-repeat;
  box-shadow: none;
}

.compact-brand {
  gap: 7px;
  font-size: 12px;
  color: #1d1d1f;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  justify-self: center;
  margin-left: 0;
  color: #1d1d1f;
  font-size: 12px;
  line-height: 1;
}

.mobile-nav-toggle {
  display: none;
}

.nav-preview-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-hover-preview {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100vw;
  padding: 24px max(32px, calc((100vw - 1180px) / 2)) 28px;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
  border-bottom: 1px solid rgba(29, 29, 31, 0.14);
  background: rgba(250, 250, 252, 0.94);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.has-nav-preview:hover .nav-hover-preview,
.has-nav-preview:focus-within .nav-hover-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-preview-inner {
  display: grid;
  grid-template-columns: minmax(220px, 290px) 1fr;
  gap: 34px;
  align-items: start;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.mega-preview-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.nav-hover-preview strong {
  display: block;
  color: #1d1d1f;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0;
}

.nav-hover-preview p {
  margin: 0;
  color: #667180;
  font-size: 14px;
  line-height: 1.45;
}

.nav-hover-action {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 24px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(0, 113, 227, 0.24);
}

.nav-hover-action:hover {
  color: #fff;
  background: #0067d1;
}

.mega-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  column-gap: 28px;
  row-gap: 16px;
}

.mega-product-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-radius: 8px;
  color: #4f5966;
  font-size: 17px;
  line-height: 1.2;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mega-product-link:hover {
  color: #0071e3;
  background: rgba(0, 113, 227, 0.06);
  transform: translateX(3px);
}

.mega-product-image {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.9);
  overflow: hidden;
}

.mega-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.mega-product-placeholder {
  padding: 4px;
  color: #8a93a0;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

@media (max-width: 900px) {
  .system-management-layout {
    grid-template-columns: 1fr;
  }

  .system-backup-card {
    grid-column: auto;
  }

  .system-maintenance-time-grid,
  .system-status-detail {
    grid-template-columns: 1fr;
  }

  .nav-hover-preview {
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 20px 18px 24px;
  }

  .mega-preview-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mega-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mega-product-link {
    grid-template-columns: 46px minmax(0, 1fr);
    font-size: 14px;
  }

  .mega-product-image {
    width: 46px;
    height: 46px;
  }
}

.main-nav a:hover {
  color: inherit;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 24px;
  border: 0;
  color: #1d1d1f;
  background: transparent;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
  margin-left: 4px;
  min-width: max-content;
}

.currency-unit {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 11px;
  color: #5d6672;
  background: rgba(255, 255, 255, .36);
  font-size: 12px;
  white-space: nowrap;
}

.nav-icon .hi-name,
.nav-icon .account-link-text {
  display: inline-flex;
  align-items: center;
}

.nav-icon .hi-name {
  color: #51545a;
}

.nav-icon .account-link-text {
  color: #1d1d1f;
  font-weight: 720;
}

.language-switch {
  position: relative;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(29, 29, 31, .18);
  border-radius: 999px;
  padding: 5px 10px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, .52);
  cursor: pointer;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.flag-icon {
  display: inline-block;
  width: 20px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.fallback-flag {
  display: inline-grid;
  place-items: center;
  box-shadow: none;
  font-size: 14px;
}

.language-button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.language-switch.open .language-button::after {
  transform: translateY(1px) rotate(225deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 156px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
}

.language-switch.open .language-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.language-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: #1d1d1f;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.language-menu button:hover,
.language-menu button.active {
  background: rgba(0, 113, 227, .1);
  color: var(--blue);
}

.account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 2px;
}

.account-center-shortcut {
  display: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 0;
  color: #1d1d1f;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.account-center-shortcut.visible {
  display: inline-flex;
}

.account-center-shortcut::before {
  width: 17px;
  height: 17px;
  content: "";
  background: currentColor;
  mask: url("/assets/account-center.svg") center / contain no-repeat;
  -webkit-mask: url("/assets/account-center.svg") center / contain no-repeat;
}

.account-center-shortcut:hover {
  color: var(--blue);
  background: rgba(0, 113, 227, .1);
  transform: translateY(-1px);
}

.cart-nav-link {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.cart-nav-link img {
  width: 17px;
  height: 17px;
}

.cart-nav-link:hover {
  background: rgba(0, 113, 227, .1);
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -4px;
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.cart-count.empty {
  display: none;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 25;
  display: grid;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
}

.account-menu.open .account-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.account-center-shortcut:hover ~ .account-menu-panel,
.account-menu-panel:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.account-menu:not(.logged-in) .account-menu-panel {
  display: none;
}

.account-menu-panel a,
.account-menu-panel button {
  border: 0;
  border-radius: 8px;
  padding: 10px;
  color: #1d1d1f;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}

.account-menu-panel a:hover,
.account-menu-panel button:hover {
  background: rgba(0, 113, 227, .1);
  color: var(--blue);
}

.hero {
  min-height: calc(100vh - 44px);
  padding: 64px 5vw 0;
  background: var(--soft);
  overflow: hidden;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100vh - 44px);
  place-items: stretch center;
  padding: 0;
  overflow: hidden;
  background: var(--soft);
  text-align: center;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: .32;
}

.home-hero-bg.empty-bg {
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(245,245,247,.72)),
    linear-gradient(120deg, #f5f5f7 0%, #e8edf3 48%, #f8fafc 100%);
  opacity: 1;
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 820px;
  padding: 56px 24px 36px;
}

.home-hero-copy h1 {
  margin-bottom: 12px;
  font-size: clamp(44px, 6vw, 80px);
  line-height: .95;
  font-weight: 700;
}

.home-hero-subtitle {
  color: #6e7784;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}

.home-hero-body {
  max-width: 820px;
  margin: 14px auto 0;
  color: #6e7784;
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.5;
}

.hero-stats-strip {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0;
  padding: 34px 5vw 38px;
  border-radius: 0;
  color: #f5f5f7;
  background: #000;
  box-shadow: none;
}

.hero-stats-strip h2 {
  margin: 0 auto 18px;
  max-width: 980px;
  color: #f5f5f7;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 600;
}

.video-section {
  background: #fff;
  padding-top: 64px;
  padding-bottom: 64px;
}

.video-layout {
  display: grid;
  grid-template-columns: minmax(320px, .58fr) minmax(280px, .42fr);
  gap: 42px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.video-copy {
  align-self: start;
  padding-top: 14px;
}

.video-gallery-row {
  width: min(1180px, 100%);
  margin: 24px auto 0;
}

.video-media-column {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.video-frame {
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
}

.video-frame video,
.video-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.video-copy h2 {
  font-size: clamp(32px, 4vw, 56px);
}

.video-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.production-gallery {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.production-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.production-gallery-head .eyebrow {
  margin: 0;
}

.production-gallery-counter {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.production-gallery-stage {
  position: relative;
  aspect-ratio: 16 / 8.8;
  overflow: hidden;
  border-radius: 8px;
  background: #f2f3f5;
}

.production-gallery-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.production-gallery-stage > img.gallery-transition-next { animation: production-gallery-slide-next 460ms cubic-bezier(.22, .75, .25, 1) both; }
.production-gallery-stage > img.gallery-transition-previous { animation: production-gallery-slide-previous 460ms cubic-bezier(.22, .75, .25, 1) both; }

.production-gallery-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 50%;
  color: #1d1d1f;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  font-size: 23px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.production-gallery-arrow:hover {
  background: #fff;
}

.production-gallery-arrow.previous { left: 12px; }
.production-gallery-arrow.next { right: 12px; }

.production-gallery-thumbs {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8cdd2 transparent;
}

.production-gallery-thumb {
  flex: 0 0 72px;
  width: 72px;
  aspect-ratio: 1.35;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #f2f3f5;
  cursor: pointer;
}

.production-gallery-thumb.active {
  border-color: #1d1d1f;
}

.production-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-launch-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 220px;
  aspect-ratio: 16 / 7;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--video-preview-image), linear-gradient(135deg, #34363b, #111216);
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.video-launch-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .14));
}

.video-launch-card-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.video-play-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding-left: 3px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  font-size: 17px;
  transition: transform .2s ease, background .2s ease;
}

.video-launch-card:hover .video-play-icon,
.video-launch-card:focus-visible .video-play-icon {
  background: rgba(255, 255, 255, .3);
  transform: scale(1.06);
}

.video-launch-card-content strong { font-size: 16px; }
.video-launch-card-content small { max-width: min(520px, 80vw); color: rgba(255, 255, 255, .82); font-size: 13px; }

.video-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.video-modal.open { opacity: 1; pointer-events: auto; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 22, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.video-modal-dialog { position: relative; display: grid; width: min(980px, 100%); gap: 14px; padding: 22px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: #181a1f; box-shadow: 0 28px 80px rgba(0, 0, 0, .32); }
.video-modal-dialog h2 { margin: 0; color: #fff; font-size: 18px; font-weight: 600; }
.video-modal-close { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .1); font-size: 24px; line-height: 1; cursor: pointer; }
.video-modal-content { display: grid; min-height: 180px; max-height: 78vh; place-items: center; overflow: hidden; border-radius: 7px; background: #000; }
.video-modal-embed,
.video-modal-video { display: block; width: 100%; height: min(72vh, 720px); border: 0; object-fit: contain; }
.video-modal-open { overflow: hidden; }

.video-gallery-admin {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.video-gallery-admin .mini-section-title {
  margin: 0;
}

.video-gallery-editor {
  display: grid;
  gap: 7px;
}

.video-gallery-admin-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: end;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.video-gallery-admin-row label {
  min-width: 0;
  margin: 0;
}

.video-gallery-admin-row .check-label {
  align-self: center;
  white-space: nowrap;
}

.video-gallery-admin-index {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

@media (max-width: 680px) {
  .video-gallery-admin-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .video-gallery-admin-row .check-label {
    grid-column: 2;
  }

  .video-gallery-admin-row [data-remove-video-gallery] {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@keyframes production-gallery-fade {
  from { opacity: .48; transform: scale(1.012); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes production-gallery-slide-next {
  from { opacity: 0; transform: translateX(22px) scale(1.012); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes production-gallery-slide-previous {
  from { opacity: 0; transform: translateX(-22px) scale(1.012); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .production-gallery-stage > img { animation: none !important; }
}

.factory-intro-section,
.factory-showcase-section,
.factory-video-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.factory-intro-section {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 84px 0 58px;
}

.factory-intro-copy { max-width: 760px; }
.factory-intro-copy h1 { max-width: 760px; margin: 8px 0 18px; font-size: clamp(42px, 6vw, 76px); line-height: 1.03; letter-spacing: -0.02em; }
.factory-intro-copy > p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.factory-intro-action { flex: 0 0 auto; margin-bottom: 4px; }

.factory-showcase-section,
.factory-video-section { padding: 42px 0 56px; border-top: 1px solid var(--line); }

.factory-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.factory-section-heading h2 { margin: 6px 0 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; }
.factory-gallery-wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.factory-gallery-tile { position: relative; aspect-ratio: 1.42; overflow: hidden; padding: 0; border: 0; border-radius: 6px; background: #f2f3f5; cursor: pointer; }
.factory-gallery-tile::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; transition: border-color .18s ease; pointer-events: none; }
.factory-gallery-tile:hover::after,
.factory-gallery-tile:focus-visible::after,
.factory-gallery-tile.active::after { border-color: #1d1d1f; }
.factory-gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.factory-gallery-tile:hover img { transform: scale(1.035); }
.factory-image-placeholder,
.factory-product-placeholder { display: grid; min-height: 180px; place-items: center; padding: 20px; color: var(--muted); background: #f5f5f7; text-align: center; overflow-wrap: anywhere; }

.factory-lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 28px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.factory-lightbox.open { opacity: 1; pointer-events: auto; }
.factory-lightbox-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 22, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.factory-lightbox-dialog { position: relative; display: grid; width: min(1120px, 100%); height: min(86vh, 820px); place-items: center; }
.factory-lightbox-dialog > img { display: block; max-width: calc(100% - 96px); max-height: calc(100% - 28px); object-fit: contain; border-radius: 6px; box-shadow: 0 24px 70px rgba(0, 0, 0, .34); }
.factory-lightbox-close,
.factory-lightbox-arrow { position: absolute; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; color: #fff; background: rgba(20, 22, 26, .48); font-size: 30px; line-height: 1; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.factory-lightbox-close:hover,
.factory-lightbox-arrow:hover { background: rgba(255, 255, 255, .2); transform: scale(1.04); }
.factory-lightbox-close { top: 0; right: 0; font-size: 28px; }
.factory-lightbox-arrow { top: 50%; transform: translateY(-50%); }
.factory-lightbox-arrow:hover { transform: translateY(-50%) scale(1.04); }
.factory-lightbox-arrow.previous { left: 0; }
.factory-lightbox-arrow.next { right: 0; }
.factory-lightbox-caption { position: absolute; bottom: 0; left: 50%; color: rgba(255, 255, 255, .82); font-size: 13px; font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.factory-lightbox-open { overflow: hidden; }

.factory-video-section { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 42px; align-items: center; }
.factory-video-copy h2 { margin: 7px 0 14px; font-size: clamp(30px, 4vw, 50px); line-height: 1.08; }
.factory-video-copy p:last-child { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.factory-video-frame { min-width: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #f2f3f5; }
.factory-video-frame video,
.factory-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }

.factory-page .main-nav a.active { color: var(--blue); }
.factory-page .text-link { color: var(--blue); font-size: 14px; font-weight: 650; white-space: nowrap; }

@media (max-width: 920px) {
  .factory-intro-section,
  .factory-showcase-section,
  .factory-video-section { width: min(100% - 28px, 720px); }
  .factory-intro-section { display: grid; align-items: start; padding: 56px 0 40px; }
  .factory-intro-copy h1 { font-size: clamp(38px, 9vw, 62px); }
  .factory-video-section { grid-template-columns: 1fr; }
  .factory-gallery-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
}

@media (max-width: 520px) {
  .factory-intro-section,
  .factory-showcase-section,
  .factory-video-section { width: min(100% - 20px, 440px); }
  .factory-section-heading { align-items: start; }
  .factory-section-heading h2 { font-size: 30px; }
  .factory-gallery-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-lightbox { padding: 14px; }
  .factory-lightbox-dialog { height: min(80vh, 620px); }
  .factory-lightbox-dialog > img { max-width: calc(100% - 48px); max-height: calc(100% - 20px); }
  .factory-lightbox-close,
  .factory-lightbox-arrow { width: 36px; height: 36px; }
  .factory-lightbox-close { top: 4px; right: 0; }
  .factory-lightbox-arrow.previous { left: 0; }
  .factory-lightbox-arrow.next { right: 0; }
}

.home-product-sections {
  display: grid;
  gap: 12px;
  background: #fff;
}

.product-feature {
  display: grid;
  min-height: 620px;
  place-items: center;
  padding: 58px 5vw 0;
  overflow: hidden;
  background: var(--soft);
  text-align: center;
}

.product-feature-dark {
  color: #f5f5f7;
  background: #000;
}

.product-feature-copy {
  max-width: 780px;
}

.product-feature-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(38px, 5vw, 64px);
}

.product-feature-copy p {
  color: #6e7784;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
}

.product-feature-dark .product-feature-copy p {
  color: #d2d2d7;
}

.product-feature-media {
  display: grid;
  width: min(100%, 1080px);
  min-height: 360px;
  margin-top: 28px;
  place-items: center;
}

.product-feature-media img {
  width: min(100%, 980px);
  max-height: 560px;
  object-fit: contain;
}

.stats-section {
  background: #fff;
}

.product-grid-section {
  background: #fff;
  width: 100%;
  padding: 12px;
}

.section.product-grid-section {
  padding: 12px;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.grid-product-card {
  position: relative;
  display: grid;
  min-height: 600px;
  overflow: hidden;
  place-items: start center;
  padding: 54px 28px 34px;
  background-color: #f5f5f7;
  background-position: center bottom;
  background-size: cover;
  border-radius: 0;
  text-align: center;
}

.grid-product-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(245, 245, 247, .96) 0%, rgba(245, 245, 247, .72) 30%, rgba(245, 245, 247, .08) 64%, rgba(245, 245, 247, 0) 100%);
  pointer-events: none;
}

.grid-product-card:nth-child(2n)::after,
.grid-product-card:nth-child(3n)::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .56) 0%, rgba(0, 0, 0, .28) 34%, rgba(0, 0, 0, .03) 68%, rgba(0, 0, 0, 0) 100%);
}

.grid-product-empty {
  background:
    linear-gradient(180deg, rgba(245,245,247,.96), rgba(245,245,247,.62) 42%, rgba(245,245,247,.9)),
    #f5f5f7;
}

.grid-product-overlay {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.grid-product-overlay h3 {
  margin-bottom: 6px;
  color: #1d1d1f;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 650;
  line-height: 1.08;
}

.grid-product-overlay p {
  max-width: 460px;
  margin: 0 auto;
  color: #1d1d1f;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
}

.grid-product-card:nth-child(2n) .grid-product-overlay h3,
.grid-product-card:nth-child(2n) .grid-product-overlay p,
.grid-product-card:nth-child(3n) .grid-product-overlay h3,
.grid-product-card:nth-child(3n) .grid-product-overlay p {
  color: #f5f5f7;
}

.grid-product-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.grid-product-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 17px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.grid-product-actions a:first-child {
  color: #fff;
  background: var(--blue);
}

.grid-product-card:nth-child(2n) .grid-product-actions a,
.grid-product-card:nth-child(3n) .grid-product-actions a {
  border-color: rgba(255, 255, 255, .72);
  color: #fff;
}

.grid-product-card:nth-child(2n) .grid-product-actions a:first-child,
.grid-product-card:nth-child(3n) .grid-product-actions a:first-child {
  border-color: #f5f5f7;
  color: #1d1d1f;
  background: #f5f5f7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  display: grid;
  min-height: 84px;
  place-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111;
  text-align: center;
}

.stat-card strong {
  color: #f5f5f7;
  font-size: clamp(26px, 3vw, 38px);
}

.stat-card span {
  color: #a1a1a6;
  font-size: 13px;
  font-weight: 720;
}

.brand-footer {
  padding: 42px 5vw 26px;
  color: #6e6e73;
  background: #f5f5f7;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-main h2 {
  color: #1d1d1f;
  font-size: 32px;
}

.footer-main p {
  margin-bottom: 8px;
}

.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-content: start;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #d2d2d7;
  border-radius: 999px;
  background: #fff;
}

.platform-icon span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1d1d1f;
  font-size: 12px;
  font-weight: 800;
}

.footer-bottom {
  max-width: 1180px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid #d2d2d7;
  font-size: 13px;
}

.hero-copy {
  max-width: 700px;
}

.hero-centered {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-subtitle {
  color: #1d1d1f;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.18;
}

.company-intro {
  max-width: 780px;
  margin: 18px auto 0;
  color: #51545a;
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 720;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: none;
}

.button.ghost {
  color: var(--blue);
  background: transparent;
  border-color: var(--blue);
}

.button.dark-outline {
  color: var(--blue);
  background: transparent;
  border-color: var(--blue);
}

.button.small {
  min-height: 36px;
  padding: 8px 13px;
  font-size: 13px;
}

.button.wide {
  width: 100%;
}

.hero-device {
  display: grid;
  place-items: center;
  margin: 38px auto -18px;
}

.hero-device img {
  width: min(100%, 980px);
  border-radius: 0;
  box-shadow: none;
}

.feature-hero {
  min-height: 680px;
  padding: 62px 5vw 0;
  overflow: hidden;
}

.dark-hero {
  color: #f5f5f7;
  background: #000;
  text-align: center;
}

.dark-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(46px, 6vw, 78px);
}

.dark-hero .hero-subtitle {
  color: #f5f5f7;
}

.dark-product-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 42px;
}

.dark-product-row img {
  width: min(45vw, 620px);
  border-radius: 22px;
  opacity: .96;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 112px;
  justify-content: center;
  padding: 24px 5vw;
  background: #fff;
}

.trust-strip strong {
  font-size: 30px;
}

.trust-strip span {
  color: var(--muted);
}

.section {
  padding: 92px 5vw;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.center-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.intro-section {
  background: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.intro-grid article {
  min-height: 260px;
  padding: 28px;
  border-radius: 8px;
  background: var(--soft);
}

.intro-grid strong {
  display: block;
  margin-bottom: 34px;
  color: var(--blue);
  font-size: 14px;
}

.intro-grid h3 {
  font-size: 25px;
}

.intro-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.factory-section {
  background: var(--soft);
}

.factory-gallery {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 18px;
}

.factory-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 45px rgba(21, 31, 44, .07);
}

.factory-gallery figure:first-child {
  grid-row: span 2;
}

.factory-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.factory-gallery figcaption {
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.home-products {
  background: #fff;
}

.featured-grid {
  display: grid;
  gap: 12px;
}

.featured-panel {
  display: grid;
  grid-template-columns: minmax(280px, .45fr) minmax(360px, .55fr);
  gap: 30px;
  align-items: center;
  min-height: 560px;
  padding: 44px 5vw;
  background: var(--soft);
}

.featured-panel + .featured-panel {
  margin-top: 12px;
}

.featured-dark {
  color: #f5f5f7;
  background: #000;
}

.featured-copy {
  max-width: 560px;
}

.featured-copy h3 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
}

.featured-copy p {
  color: var(--muted);
  font-size: 21px;
  line-height: 1.45;
}

.featured-dark .featured-copy p {
  color: #d2d2d7;
}

.featured-media {
  display: grid;
  min-height: 380px;
  place-items: center;
}

.featured-media img {
  max-width: min(100%, 760px);
  max-height: 520px;
  object-fit: contain;
}

.image-placeholder {
  display: grid;
  width: min(100%, 720px);
  min-height: 420px;
  place-items: center;
  border-radius: 8px;
  color: #9aa3ad;
  background: transparent;
  font-size: 18px;
  font-weight: 720;
}

.featured-dark .image-placeholder {
  color: #a1a1a6;
  background: transparent;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.product-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 45px rgba(21, 31, 44, .07);
}

.product-card {
  overflow: hidden;
  cursor: pointer;
}

.product-card.selected {
  border-color: var(--blue);
  box-shadow: 0 20px 55px rgba(23, 105, 255, .16);
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}

.product-card-content {
  padding: 22px;
}

.home-product-card {
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--soft);
}

.home-product-card img {
  aspect-ratio: 16 / 10;
}

.home-product-card .product-card-content {
  padding: 24px 26px 28px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 720;
}

.product-card h3 {
  margin-bottom: 8px;
  font-size: 23px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: var(--soft);
  font-size: 13px;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(260px, .45fr) minmax(0, .55fr);
  gap: 34px;
  background: #fbfbfd;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(360px, 1fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 44px);
  padding: 72px 5vw 56px;
  background: var(--soft);
  overflow: hidden;
}

.product-hero-copy h1 {
  font-size: clamp(48px, 6vw, 82px);
}

.product-hero-art {
  display: grid;
  place-items: center;
}

.product-hero-art img {
  width: min(100%, 820px);
}

.detail-tabs {
  justify-content: flex-start;
}

.product-config-section {
  background: #fff;
  padding: 42px max(5vw, 28px) 76px;
}

.product-config-section.quote-layout {
  display: block;
}

.product-config-section.hidden {
  display: none;
}

.shop-list-section {
  background: #fff;
  padding-top: 72px;
}

.shop-list-heading {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 28px;
  text-align: center;
}

.shop-list-heading h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
}

.shop-list-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 260px));
  justify-content: center;
  gap: 16px;
}

.shop-product-card {
  display: grid;
  gap: 10px;
  align-items: start;
  position: relative;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.shop-product-card:hover,
.shop-product-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.shop-product-media {
  display: grid;
  gap: 8px;
}

.shop-product-main {
  display: grid;
  min-height: 132px;
  min-width: 0;
  overflow: hidden;
}

.shop-product-card.selected {
  border-color: var(--blue);
  background: #eef6ff;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.shop-product-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f7;
  padding: 10px;
}

.product-photo-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  border-radius: 8px;
  color: #6e7784;
  background: #f5f5f7;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.shop-product-card h3 {
  font-size: 18px;
  line-height: 1.2;
}

.shop-product-card p {
  color: var(--muted);
  line-height: 1.4;
  font-size: 13px;
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-product-hover-preview {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shop-product-card:hover .shop-product-hover-preview,
.shop-product-card:focus-within .shop-product-hover-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.shop-product-hover-preview strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.shop-product-hover-preview p {
  display: block;
  margin: 4px 0 0;
  color: #596574;
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.shop-hover-action {
  justify-self: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 22px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 113, 227, 0.24);
}

.shop-hover-action:hover {
  background: #0067d1;
}

.shop-product-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.shop-product-actions .button {
  min-width: 76px;
  min-height: 34px;
  padding: 7px 13px;
  font-size: 13px;
}

.amazon-order-form {
  display: grid;
  grid-template-columns: minmax(420px, 540px) minmax(430px, 560px);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
  justify-content: center;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.order-product-preview {
  position: sticky;
  top: 58px;
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.order-gallery {
  display: grid;
  gap: 14px;
}

.order-main-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: #f5f5f7;
  cursor: zoom-in;
}

.order-main-image:has(.order-photo-placeholder) {
  cursor: default;
}

.order-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform .2s ease;
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
}

.order-main-image:hover img {
  transform: scale(1.72);
}

.order-photo-placeholder {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 18px;
  font-size: 18px;
}

.order-image-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
}

.order-image-thumbs button,
.mini-image-thumbs button {
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.order-image-thumbs button.active,
.mini-image-thumbs button.active {
  border-color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

.order-image-thumbs img,
.mini-image-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-image-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.mini-image-thumbs button {
  width: 46px;
  height: 42px;
  border-radius: 9px;
}

.mini-image-thumbs button.empty,
.order-image-thumbs button.empty {
  background: #f5f5f7;
  color: #86868b;
  cursor: default;
  overflow: hidden;
}

.mini-image-thumbs button.empty span,
.order-image-thumbs button.empty span {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  padding: 0 3px;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.order-product-preview h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.order-product-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.order-config-main {
  display: grid;
  gap: 10px;
}

.order-config-main .form-grid {
  gap: 8px;
}

.order-config-main .compact-order-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-config-main label {
  gap: 5px;
  margin-bottom: 4px;
}

.order-config-main label > span {
  font-size: 13px;
  font-weight: 700;
}

.order-config-main input,
.order-config-main select,
.order-config-main textarea {
  min-height: 38px;
  padding: 9px 10px;
}

.order-config-main textarea {
  min-height: 74px;
}

.shipping-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 12px;
  background: #fbfbfd;
}

.shipping-fields label {
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
}

.shipping-fields label > span {
  min-height: 20px;
}

.shipping-fields input {
  height: 48px;
}

.shipping-fields .order-field-error {
  min-height: 16px;
  margin-top: 0;
  line-height: 1.25;
}

.quantity-panel {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 12px;
  background: #fbfbfd;
}

.quantity-panel label {
  display: grid;
  gap: 5px;
}

.quantity-discount-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.quantity-discount-hint span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
}

.quantity-discount-hint strong {
  margin: 0 2px;
  color: #b42318;
  font-size: 13px;
}

.service-config-entry {
  display: grid;
}

.service-config-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(0, 113, 227, .28);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff, #fff);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.service-config-button:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(0, 113, 227, .1);
  transform: translateY(-1px);
}

.service-config-button span {
  display: grid;
  gap: 4px;
}

.service-config-button strong {
  font-size: 15px;
  font-weight: 750;
}

.service-config-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.service-config-button img {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  filter: none;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0, 113, 227, .18);
}

.service-config-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.service-config-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.service-config-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(245, 245, 247, .66);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.service-config-dialog {
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
}

.service-config-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.service-config-head strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0;
}

.service-config-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.service-config-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f5f5f7;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.service-config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 14px;
}

.service-config-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.service-config-tab.active {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

.service-config-panes {
  display: grid;
  gap: 12px;
}

.service-config-pane {
  display: grid;
  gap: 12px;
}

.service-config-pane[hidden] {
  display: none;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f5f5f7;
}

.mode-switch.two-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-switch label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-switch span {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.mode-switch input:checked + span {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.mode-panel.hidden {
  display: none;
}

.service-mode-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 12px;
  background: #fbfbfd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mode-panel > small {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(0, 113, 227, .18);
  border-radius: 12px;
  background: #eef6ff;
  color: #0057b8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.service-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-radio-grid label {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
  font-weight: 700;
  cursor: pointer;
}

.service-radio-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.partition-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 10px;
  align-items: end;
}

.check-card,
.check-pill {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfbfd;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.check-card input,
.check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-card:has(input:checked),
.check-pill:has(input:checked) {
  border-color: rgba(0, 113, 227, .72);
  background: linear-gradient(180deg, #edf6ff, #f8fbff);
  color: #0057b8;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, .12), 0 8px 20px rgba(0, 113, 227, .08);
}

.check-card.small {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
}

.partition-capacity-hint {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f5f5f7;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.partition-list {
  display: grid;
  gap: 10px;
}

.partition-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.partition-row-head {
  display: grid;
  gap: 4px;
  align-self: stretch;
  padding: 10px;
  border-radius: 10px;
  background: #f5f5f7;
}

.partition-row-head strong {
  font-size: 13px;
}

.partition-row-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.partition-row-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 130px;
  gap: 8px;
}

.partition-row label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.partition-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.partition-row-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
}

.partition-password-field {
  grid-column: 2;
}

.partition-password-field.hidden {
  display: none;
}

.service-config-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.order-review-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.order-review-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.order-review-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(245, 245, 247, .68);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.order-review-dialog {
  position: relative;
  width: min(860px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
}

.order-review-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.order-review-head strong {
  display: block;
  font-size: 24px;
}

.order-review-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.order-review-content {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.order-review-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
}

.order-review-section h3 {
  margin: 0;
  font-size: 15px;
}

.order-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-review-item {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
}

.order-review-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.order-review-item strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.order-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.design-upload-controls.hidden {
  display: none;
}

.design-upload-controls {
  display: grid;
  gap: 8px;
}

.upload-drop-button {
  display: grid;
  gap: 8px;
  min-height: 88px;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(0, 113, 227, .55);
  border-radius: 14px;
  background: #f5faff;
  color: var(--blue);
  text-align: center;
  font-weight: 750;
  cursor: pointer;
}

.upload-drop-button input[type="file"] {
  min-height: auto;
  padding: 8px;
  background: #fff;
  border-style: solid;
}

.upload-file-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-file-list.hidden,
.upload-file-list:empty {
  display: none;
}

.upload-file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.upload-file-list small {
  color: var(--muted);
  white-space: nowrap;
}

.service-config-pane small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.design-help-check {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.design-help-check input {
  accent-color: var(--blue);
}

.design-help-check span {
  font-size: 14px;
  font-weight: 750;
}

.design-help-check:has(input:checked) {
  border-color: var(--blue);
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
}

.design-message-field {
  margin: 0;
}

.order-note-field {
  margin: 0;
}

.order-buy-box {
  position: static;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 14px;
  background: #fff;
}

.order-buy-box .price-panel {
  grid-template-columns: 1fr;
  margin: 0;
  gap: 0;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 12px;
  overflow: hidden;
}

.order-buy-box .price-panel div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(210, 218, 226, .8);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}

.order-buy-box .price-panel div:last-child {
  border-bottom: 0;
  background: #f5f5f7;
}

.order-buy-box .price-panel strong {
  color: var(--ink);
  font-size: 19px;
  white-space: nowrap;
}

.order-buy-box .price-panel span {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.order-submit-actions {
  display: grid;
  gap: 10px;
}

.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.cart-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(245, 245, 247, .68);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.cart-dialog {
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.cart-head h2 {
  margin: 2px 0 6px;
  font-size: 34px;
}

.cart-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.cart-list {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
}

.cart-item-image {
  display: grid;
  width: 72px;
  height: 60px;
  place-items: center;
  border-radius: 10px;
  background: #f5f5f7;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  overflow: hidden;
}

.cart-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cart-item-price {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f5f5f7;
}

.cart-summary span {
  color: var(--muted);
  font-weight: 720;
}

.cart-summary strong {
  font-size: 24px;
}

.cart-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Product page mobile layout: keep the catalog and configurator inside the
   viewport instead of letting desktop widths squeeze the controls. */
@media (max-width: 620px) {
  .product-config-section {
    padding: 28px 12px 48px;
  }

  .shop-list-section {
    padding: 42px 12px 34px;
  }

  .shop-list-heading {
    width: 100%;
    margin-bottom: 22px;
  }

  .shop-list-heading h1 {
    font-size: 34px;
    overflow-wrap: anywhere;
  }

  .shop-list-heading p:not(.eyebrow) {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .shop-product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .shop-product-card {
    width: 100%;
    padding: 10px;
  }

  .shop-product-main {
    min-height: 0;
  }

  .shop-product-main img,
  .product-photo-placeholder {
    aspect-ratio: 4 / 3;
  }

  .shop-product-card h3 {
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  .shop-product-card p {
    font-size: 12px;
  }

  .shop-product-hover-preview {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .amazon-order-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .order-product-preview {
    width: 100%;
    gap: 11px;
  }

  .order-main-image {
    width: 100%;
    max-height: 58vh;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  .order-main-image img {
    padding: 12px;
  }

  .order-product-preview h3 {
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .order-product-preview p {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .order-image-thumbs {
    justify-content: flex-start;
    gap: 7px;
    min-height: 50px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .order-image-thumbs button {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }

  .order-config-main {
    width: 100%;
    min-width: 0;
    gap: 9px;
  }

  .order-config-main .form-grid,
  .options-grid,
  .shipping-fields,
  .accessory-card-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .option-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .option-chip,
  .option-chip span,
  .option-chip .color-option-content {
    width: 100%;
    min-width: 0;
  }

  .option-chip span {
    min-height: 42px;
    padding: 8px 7px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .option-chip .color-option-content {
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 6px;
  }

  .color-swatch {
    width: 18px;
    height: 18px;
  }

  .color-option-content b,
  .color-option-content em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header .cart-nav-link {
    flex: 0 0 30px;
    width: 30px;
    max-width: 30px;
    overflow: visible;
  }

  .accessory-card {
    min-height: 0;
  }

  .accessories-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .shipping-fields {
    padding: 9px;
    gap: 8px;
  }

  .shipping-fields .featured-span-2 {
    grid-column: auto;
  }

  .shipping-fields input,
  .shipping-fields select,
  .order-config-main input,
  .order-config-main select,
  .order-config-main textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .quantity-panel,
  .order-buy-box {
    padding: 10px;
  }

  .price-panel div,
  .order-buy-box .price-panel div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 9px 10px;
  }

  .order-buy-box .price-panel span {
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .order-buy-box .price-panel strong {
    font-size: 17px;
  }

  .service-config-dialog,
  .order-review-dialog,
  .cart-dialog {
    width: calc(100vw - 20px);
    max-width: none;
    max-height: calc(100dvh - 20px);
    padding: 14px;
    border-radius: 14px;
  }

  .service-config-modal,
  .order-review-modal,
  .cart-modal {
    padding: 10px;
  }

  .service-config-head strong,
  .order-review-head strong {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .service-config-head p,
  .order-review-head p {
    font-size: 12px;
  }

  .service-config-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .service-config-tab {
    min-width: 0;
    padding: 0 5px;
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .mode-switch,
  .mode-switch.two-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-switch:not(.two-mode) label:first-child {
    grid-column: 1 / -1;
  }

  .mode-switch span {
    min-height: 40px;
    padding: 7px 5px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .partition-toolbar,
  .partition-row-fields,
  .partition-row-flags {
    grid-template-columns: minmax(0, 1fr);
  }

  .partition-row-fields,
  .partition-row-flags,
  .partition-password-field {
    grid-column: 1;
  }

  .order-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-review-actions,
  .cart-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-review-actions .button,
  .cart-actions .button,
  .order-submit-actions .button {
    width: 100%;
    min-height: 44px;
  }

  .cart-head {
    gap: 10px;
  }

  .cart-head h2 {
    font-size: 26px;
  }

  .cart-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 9px;
  }

  .cart-item-price {
    grid-column: 2;
    justify-items: start;
  }

  .cart-item-image {
    width: 56px;
    height: 50px;
  }
}

.cart-empty,
.cart-error {
  padding: 18px;
  border-radius: 12px;
  background: #f5f5f7;
  color: var(--muted);
  font-weight: 720;
}

.cart-error {
  margin-bottom: 10px;
  background: #fee4e2;
  color: #b42318;
}

.auth-page,
.account-page {
  background: var(--soft);
  min-height: calc(100vh - 44px);
}

body:has(.auth-page),
body.auth-shell {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .32s ease, transform .32s ease;
}

body.auth-ready:has(.auth-page),
body.auth-shell.auth-ready {
  opacity: 1;
  transform: translateY(0);
}

body.auth-leaving:has(.auth-page),
body.auth-shell.auth-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.auth-hero,
.account-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 52px 5vw 18px;
  text-align: center;
}

.auth-hero h1,
.account-hero h1 {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  text-wrap: balance;
  margin-bottom: 12px;
  font-size: clamp(36px, 4.45vw, 58px);
  line-height: 1.02;
}

.auth-hero p:not(.eyebrow),
.account-hero p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.auth-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 5vw 82px;
}

.compact-auth-hero {
  max-width: 1120px;
  padding-bottom: 12px;
}

.single-auth-wrap {
  display: grid;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 5vw 52px;
}

.single-auth-panel {
  width: 100%;
  padding: 30px;
  border-color: rgba(210, 218, 226, .85);
  box-shadow: 0 18px 42px rgba(21, 31, 44, .08);
}

.auth-switch-text {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-switch-text a {
  color: var(--blue);
  font-weight: 720;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.auth-panel {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-panel h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.auth-panel label {
  margin-bottom: 13px;
}

.auth-panel input,
.auth-panel select {
  min-height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.auth-panel .button.primary {
  min-height: 52px;
  margin-top: 4px;
  border-radius: 16px;
}

.auth-panel .button.primary.is-loading {
  gap: 10px;
  opacity: .88;
  cursor: wait;
  transform: none;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.auth-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, .34);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 28px 80px rgba(21, 31, 44, .18);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.auth-modal-form {
  display: none;
}

.auth-modal-form.active {
  display: grid;
}

.auth-modal-form h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

.auth-modal-form label {
  margin-bottom: 12px;
}

.auth-modal-form input {
  min-height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
}

.auth-modal-form.auth-error input[name="email"],
.auth-modal-form.auth-error input[name="password"] {
  border-color: #1d1d1f;
  box-shadow: 0 0 0 4px rgba(29, 29, 31, .1);
}

.field-error-message {
  min-height: 18px;
  margin: -2px 0 12px;
  color: #b42318;
  font-size: 13px;
  font-weight: 720;
}

.auth-help-line,
.auth-recovery-text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.auth-modal-form:not(.active) .button-spinner {
  display: none;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 720;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #b42318;
}

.floating-contact {
  position: fixed;
  right: 18px;
  top: 46%;
  z-index: 45;
  display: grid;
  gap: 8px;
  width: 184px;
  padding: 14px;
  border: 1px solid rgba(210, 218, 226, .82);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 50px rgba(18, 24, 31, .13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.floating-contact-icon {
  display: grid;
  place-self: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #0071e3, #16a3ff);
  box-shadow: 0 10px 24px rgba(0, 113, 227, .24);
  object-fit: contain;
  object-position: center;
}

.floating-contact.hidden {
  display: none;
}

.floating-contact strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.floating-contact p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.floating-contact-links {
  display: grid;
  gap: 6px;
}

.floating-contact-links a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: #f5f5f7;
  font-size: 12px;
}

.floating-contact-links > a > span:first-child {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.floating-contact-links strong {
  font-size: 12px;
}

.floating-contact-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.floating-contact-copy small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.auth-page),
  .auth-panel input,
  .auth-panel select,
  .button-spinner {
    transition: none;
    animation: none;
  }
}

.account-section {
  padding-top: 20px;
}

.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.account-sidebar {
  align-self: start;
  position: sticky;
  top: 64px;
  padding: 18px;
}

.account-user-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.account-user-card > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1d1d1f;
  font-weight: 800;
}

.account-user-card strong,
.account-user-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-user-card small {
  color: var(--muted);
}

.account-tabs {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.account-tabs a {
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--muted);
  font-weight: 720;
}

.account-tabs a.active {
  color: var(--ink);
  background: var(--soft);
}

.account-content {
  min-width: 0;
}

.account-view {
  display: none;
}

.account-view.active {
  display: grid;
  gap: 18px;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 22px;
  overflow: hidden;
  padding: 0;
}

.status-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0;
}

.status-card {
  display: grid;
  gap: 8px;
  border: 0;
  padding: 22px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.status-card.pending {
  background: #fff8e6;
}

.status-card.active {
  background: #eef6ff;
}

.status-card.completed {
  background: #ecfdf3;
}

.status-card.exception {
  background: #fff1f0;
}

.status-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.status-card strong {
  font-size: 30px;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.profile-overview-grid div {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
}

.profile-overview-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.profile-overview-grid strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.account-summary div {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: #fff;
}

.account-summary span,
.order-detail-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.account-summary strong {
  font-size: 22px;
}

.account-orders {
  display: grid;
  gap: 8px;
  margin: 0;
}

.account-order-card,
.empty-orders {
  padding: 12px 14px;
}

.account-order-card {
  border-left: 5px solid #d2d2d7;
  position: relative;
  padding-bottom: 54px;
}

.account-order-card:has(.status-badge.status-pending) {
  border-left-color: #f5a524;
}

.account-order-card:has(.status-badge.status-active) {
  border-left-color: var(--blue);
}

.account-order-card:has(.status-badge.status-completed) {
  border-left-color: #12a150;
}

.account-order-card:has(.status-badge.status-paused) {
  border-left-color: #f59e0b;
}

.account-order-card:has(.status-badge.status-exception) {
  border-left-color: #d92d20;
}

.account-orders .status-steps {
  display: none;
}

.order-card-heading {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) max-content;
  gap: 14px;
  align-items: center;
}

.account-order-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.order-product-thumb {
  width: 72px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f7;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.order-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.order-product-thumb.large {
  width: 116px;
  border-radius: 18px;
}

.order-card-heading h2 {
  font-size: 22px;
  line-height: 1.15;
}

.order-card-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.order-card-heading small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.order-card-heading > strong {
  color: var(--blue);
}

.order-card-status-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.order-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  position: absolute;
  right: 14px;
  bottom: 12px;
}

.button.ghost.pause-order-button {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
  box-shadow: 0 8px 18px rgba(249, 115, 22, .18);
}

.button.ghost.pause-order-button:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
  box-shadow: 0 10px 22px rgba(234, 88, 12, .22);
}

.button.ghost.resume-order-button {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}

.button.ghost.resume-order-button:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 148, 136, .22);
}

.order-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-reason-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.order-reason-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.order-reason-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, .58);
  backdrop-filter: blur(16px);
}

.order-reason-panel {
  position: relative;
  display: grid;
  width: min(520px, 100%);
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
  transform: translateY(10px) scale(.98);
  transition: transform .2s ease;
}

.order-reason-dialog.open .order-reason-panel {
  transform: translateY(0) scale(1);
}

.order-reason-panel h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.order-reason-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.order-reason-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 720;
}

.order-reason-panel textarea {
  width: 100%;
  resize: vertical;
  min-height: 132px;
}

.reason-error {
  min-height: 18px;
  color: #d92d20;
  font-weight: 720;
}

.order-reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #1d1d1f;
  background: var(--soft);
  white-space: nowrap;
}

.status-badge.status-pending {
  color: #8a4b00;
  background: #fff3cd;
}

.status-badge.status-active {
  color: #084c9e;
  background: #e7f1ff;
}

.status-badge.status-completed {
  color: #067647;
  background: #dcfae6;
}

.status-badge.status-paused {
  color: #92400e;
  background: #fef3c7;
}

.status-badge.status-exception {
  color: #b42318;
  background: #fee4e2;
}

.check-mark {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #12a150;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.order-detail-grid div {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.order-detail-grid p {
  margin-bottom: 0;
  color: var(--ink);
}

.profile-panel,
.orders-toolbar,
.support-panel {
  padding: 24px;
}

.panel-heading,
.orders-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.panel-heading h2,
.orders-toolbar h2,
.support-panel h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 42px);
}

.save-message {
  color: var(--blue);
  font-weight: 720;
}

.profile-form {
  margin-top: 18px;
}

.profile-form .button {
  margin-top: 4px;
}

.orders-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.orders-filter button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 720;
}

.orders-filter button.active {
  color: #fff;
  border-color: #1d1d1f;
  background: #1d1d1f;
}

.order-card-footer {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
}

.order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.order-detail-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.order-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, .48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.order-detail-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  box-shadow: 0 28px 80px rgba(21, 31, 44, .18);
}

.order-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.order-detail-title-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.order-detail-heading h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.order-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #fff7ed;
}

.order-detail-actions h3 {
  margin: 0;
}

.support-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.support-contact-grid div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
}

.support-contact-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.support-contact-grid strong,
.support-contact-grid a {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.account-platform-links {
  margin-top: 20px;
}

.form-panel,
.track-form {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, .12);
}

.country-select {
  position: relative;
  width: 100%;
}

.country-select input {
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, #6e7784 50%) right 15px center / 6px 6px no-repeat,
    linear-gradient(135deg, #6e7784 50%, transparent 50%) right 9px center / 6px 6px no-repeat,
    #fff;
}

.country-select.open input {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, .12);
}

.country-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(210, 218, 226, .95);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 45px rgba(18, 24, 31, .14);
  backdrop-filter: blur(18px);
}

.country-select.open .country-select-menu {
  display: grid;
  gap: 3px;
}

.country-select-menu button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.country-select-menu button:hover {
  background: #eef6ff;
}

.country-code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.country-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.price-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 8px 0 18px;
}

.price-panel div {
  padding: 18px;
  border-radius: 8px;
  background: #111820;
  color: #fff;
}

.price-panel span {
  display: block;
  margin-bottom: 7px;
  color: #9fb0c2;
  font-size: 13px;
}

.price-panel strong {
  font-size: 30px;
}

.accessories-grid {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.order-option-group {
  display: grid;
  gap: 9px;
}

.option-group-title,
.option-child-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
}

.option-child-title {
  margin: 10px 0 8px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.option-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
}

.option-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #86868b;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
}

.option-chip .color-option-content {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-areas:
    "swatch name"
    "swatch code";
  justify-content: start;
  min-width: 138px;
  min-height: 48px;
  column-gap: 9px;
  row-gap: 2px;
  text-align: left;
  line-height: 1.15;
}

.color-swatch {
  grid-area: swatch;
  width: 22px;
  height: 22px;
  align-self: center;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f5f7, #d2d2d7);
}

.color-option-content b {
  grid-area: name;
  font-size: 14px;
}

.color-option-content em {
  grid-area: code;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.option-chip.selected span,
.option-chip:has(input:checked) span {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, .18);
}

.option-chip.child span {
  min-width: 70px;
  min-height: 34px;
  font-size: 14px;
}

.accessories-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.accessories-heading strong {
  color: var(--ink);
}

.accessory-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.accessory-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 116px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.accessory-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.accessory-card:has(input:checked),
.accessory-card.selected {
  border-color: rgba(0, 113, 227, .72);
  background: linear-gradient(180deg, #edf6ff, #fff);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, .12), 0 10px 24px rgba(0, 113, 227, .1);
}

.accessory-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 6px;
  background: var(--soft);
}

.accessory-card strong {
  color: var(--blue);
  font-size: 13px;
}

.tier-table {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-info-panel,
.product-service-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f5f5f7;
}

.product-service-panel {
  grid-column: 1 / -1;
  width: min(1180px, 100%);
  margin: 26px auto 0;
  padding: 28px;
  background: #fff;
}

.product-info-panel.hidden,
.product-service-panel.hidden {
  display: none;
}

.product-info-panel > strong,
.product-service-panel > strong {
  color: var(--ink);
  font-size: 18px;
}

.product-service-panel > strong {
  font-size: 34px;
  line-height: 1.08;
}

.product-info-panel p,
.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.service-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
}

.service-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 10px 0;
  border-radius: 10px;
  background: #fff;
}

.service-card img,
.service-icon {
  width: 118px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.service-card img {
  object-fit: contain;
  background: #fff;
}

.service-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #eef6ff;
  font-size: 42px;
  font-weight: 760;
}

.service-card h4 {
  margin: 0 0 4px;
  font-size: 20px;
}

.tier-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tier-row:last-child {
  border-bottom: 0;
}

.tier-row.active {
  color: #fff;
  background: var(--green);
}

.result-message {
  min-height: 0;
  margin: 0;
  color: var(--green);
  font-weight: 720;
}

.result-message:empty {
  display: none;
}

.track-section {
  background: #fff;
}

.track-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.tracking-result {
  margin-top: 18px;
}

.tracking-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.status-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 22px 0;
  counter-reset: order-step;
}

.status-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 86px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-align: left;
}

.status-step::before {
  counter-increment: order-step;
  content: counter(order-step);
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #6e7781;
  background: #e4eaf0;
  font-size: 12px;
  font-weight: 820;
}

.status-step strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.status-step small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.status-step.done {
  color: #067647;
  background: #dcfae6;
  border-color: #abefc6;
}

.status-step.done::before {
  content: "✓";
  color: #fff;
  background: #12a150;
}

.status-step:not(.done) .check-mark {
  display: none;
}

.status-step .check-mark {
  display: none;
}

.status-step.status-exception.done {
  color: #b42318;
  background: #fee4e2;
  border-color: #fecdca;
}

.status-step.status-exception.done::before {
  content: "!";
  color: #fff;
  background: #d92d20;
}

.status-step.status-paused.done {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-step.status-paused.done::before {
  clip-path: none;
  border-radius: 50%;
  color: transparent;
  background:
    linear-gradient(#fff, #fff) 9px center / 3px 13px no-repeat,
    linear-gradient(#fff, #fff) 16px center / 3px 13px no-repeat,
    #f59e0b;
}

.single-status {
  grid-template-columns: 1fr;
}

.order-detail-block {
  margin-top: 22px;
}

.sample-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.sample-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}

.sample-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sample-reject-form {
  display: grid;
  gap: 10px;
}

.security-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 5vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.apple-footer {
  padding: 28px 5vw 38px;
  color: #6e6e73;
  background: #f5f5f7;
  font-size: 13px;
}

.footer-note {
  max-width: 980px;
  margin: 0 auto 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d2d2d7;
  line-height: 1.45;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
  max-width: 980px;
  margin: 0 auto;
}

.footer-columns h3 {
  margin-bottom: 10px;
  color: #1d1d1f;
  font-size: 13px;
}

.footer-columns a {
  display: block;
  margin-bottom: 9px;
  color: #55565a;
}

.support-section {
  background: var(--soft);
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.admin-body {
  background: #f5f6f8;
}

.admin-body label {
  margin-bottom: 0;
}

.admin-body input,
.admin-body select,
.admin-body textarea {
  padding: 9px 10px;
}

.admin-body textarea {
  min-height: 78px;
}

.admin-shell {
  min-height: 100vh;
  padding: 0;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  min-height: auto;
  margin: 18px 0 18px 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-brand {
  padding: 8px 9px 7px;
  font-size: 13px;
}

.admin-content {
  min-width: 0;
  padding: 18px 24px 48px;
}

.admin-category-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 0;
  background: transparent;
}

.admin-category-nav a,
.admin-category-nav button {
  position: relative;
  display: grid;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  padding: 8px 10px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.admin-nav-caption {
  margin: 12px 8px 4px;
  color: #8b95a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.admin-nav-caption:first-child {
  margin-top: 2px;
}

.admin-category-nav button b {
  color: inherit;
  font-size: 13px;
  font-weight: 780;
}

.admin-category-nav button small {
  color: #8b95a5;
  font-size: 10px;
  font-weight: 650;
}

.admin-category-nav button.active {
  color: #fff;
  background: #202124;
  box-shadow: 0 6px 14px rgba(22, 26, 33, .14);
}

.admin-category-nav button.active small {
  color: rgba(255, 255, 255, .66);
}

.admin-category-nav button.active::before {
  content: none;
}

.admin-return-link {
  display: block;
  border-top: 1px solid var(--line);
  padding: 12px 8px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.admin-view-panel[hidden] {
  display: none;
}

.settings-card {
  align-self: start;
}

.admin-overview-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-metric-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.admin-metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.admin-metric-card strong {
  font-size: 26px;
  line-height: 1;
}

.admin-metric-card.pending {
  background: #fff8e6;
}

.admin-metric-card.active {
  background: #eef6ff;
}

.admin-metric-card.completed {
  background: #ecfdf3;
}

.admin-metric-card.exception {
  background: #fff1f0;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.admin-quick-grid button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
  cursor: pointer;
  font-weight: 720;
}

.admin-order-tools {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.25fr);
  gap: 12px;
  margin: 18px 0;
  align-items: end;
}

.admin-search-field {
  position: relative;
  display: block;
}

.admin-search-field input {
  padding-right: 38px;
}

.admin-search-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1f4;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.admin-filter-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f5f7;
}

.admin-filter-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.admin-filter-tabs button.active {
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, .85fr);
  gap: 10px;
  margin-top: 12px;
}

.admin-ops-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-ops-card h3 {
  margin: 0;
  font-size: 16px;
}

.ops-list,
.ops-order-list {
  display: grid;
  gap: 8px;
}

.ops-list button,
.ops-order-list button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--soft);
  cursor: pointer;
  text-align: left;
}

.ops-list.compact button {
  justify-content: flex-start;
}

.ops-list strong {
  font-size: 20px;
}

.ops-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-data-grid div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.ops-data-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.ops-data-grid strong {
  font-size: 21px;
}

.ops-order-list span,
.ops-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.ops-order-list button.pending {
  border-color: #f5a524;
  background: #fff8e6;
}

.ops-order-list button.active {
  border-color: #8cc8ff;
  background: #eef6ff;
}

.ops-order-list button.completed {
  border-color: #8bd9a8;
  background: #ecfdf3;
}

.ops-order-list button.exception {
  border-color: #f5a3a0;
  background: #fff1f0;
}

.product-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 220px));
  gap: 8px;
  margin: 10px 0;
}

.product-stats-row div {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-stats-row span,
.product-summary-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.product-stats-row strong {
  font-size: 20px;
  line-height: 1;
}

.login-panel {
  max-width: 460px;
  padding: 26px;
}

.hidden {
  display: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1480px;
}

.admin-grid .panel {
  padding: 16px;
}

.admin-view-panel > .panel-heading h2 {
  font-size: 28px;
  line-height: 1.02;
}

.admin-view-panel > .panel-heading {
  align-items: flex-start;
  margin-bottom: 10px;
}

.admin-grid > .panel {
  scroll-margin-top: 112px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-help {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nav-editor {
  display: grid;
  gap: 8px;
}

.nav-editor-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-hover-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f7fa;
}

.nav-hover-editor .mini-section-title {
  grid-column: 1 / -1;
  margin: 0;
}

.featured-editor {
  display: grid;
  gap: 8px;
}

.featured-editor-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.homepage-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.homepage-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.homepage-group h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.settings-subnav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.settings-subnav button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 760;
}

.settings-subnav button.active {
  color: #fff;
  background: #1d1d1f;
}

.settings-content {
  min-width: 0;
}

.settings-pane {
  display: grid;
  gap: 10px;
}

.settings-pane[hidden] {
  display: none;
}

.settings-pane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-pane-head h3 {
  margin-bottom: 3px;
  font-size: 17px;
}

.compact-homepage-group:nth-child(3),
.compact-homepage-group:nth-child(4),
.compact-homepage-group:nth-child(6) {
  grid-column: 1 / -1;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stats-editor {
  display: grid;
  gap: 8px;
}

.stats-editor-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.featured-span-2 {
  grid-column: span 2;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.check-label input {
  width: auto;
}

.admin-list {
  display: grid;
  gap: 7px;
}

.admin-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-empty {
  padding: 24px;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.admin-order-card {
  display: grid;
  gap: 12px;
  border-left: 5px solid #d2d2d7;
}

.admin-order-card.pending {
  border-left-color: #f5a524;
}

.admin-order-card.active {
  border-left-color: var(--blue);
}

.admin-order-card.completed {
  border-left-color: #12a150;
}

.admin-order-card.exception {
  border-left-color: #d92d20;
}

.admin-order-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1.1fr) minmax(300px, 1fr) max-content auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px 12px;
  border-left: 4px solid #d2d2d7;
}

.admin-order-row.pending { border-left-color: #f5a524; }
.admin-order-row.active { border-left-color: var(--blue); }
.admin-order-row.completed { border-left-color: #12a150; }
.admin-order-row.exception { border-left-color: #d92d20; }

.admin-order-preview {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.admin-order-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-order-identity h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.admin-order-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-order-row-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-order-row-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-order-row-meta b {
  color: #8b95a5;
  font-size: 10px;
  font-weight: 800;
}

.order-detail-modal {
  z-index: 100;
}

.order-detail-panel {
  position: relative;
  z-index: 1;
  width: min(1320px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 16px;
}

.order-detail-card {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.order-detail-head,
.order-detail-product,
.order-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-detail-product {
  justify-content: flex-start;
}

.order-detail-product img {
  width: 68px;
  height: 68px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  object-fit: contain;
}

.order-detail-product h2 {
  margin: 0 0 3px;
  font-size: 24px;
}

.order-detail-product p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-detail-summary {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 1fr;
  gap: 8px;
}

.order-detail-summary div,
.order-read-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}

.order-detail-summary span,
.order-read-grid span,
.order-file-grid > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.order-detail-summary strong,
.order-read-grid strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.order-detail-summary small,
.order-read-grid small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-detail-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.order-detail-section.detail-wide {
  grid-column: 1 / -1;
}

.order-editor.compact-order-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-subtitle {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.order-read-grid,
.order-request-grid,
.order-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-file-grid > div {
  display: grid;
  gap: 5px;
}

.order-detail-footer {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  align-items: start;
}

.order-detail-history {
  display: grid;
  gap: 8px;
}

.order-detail-actions {
  justify-content: flex-end;
  position: sticky;
  bottom: -16px;
  margin: 0 -16px -16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

@media (max-width: 920px) {
  .admin-order-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .admin-order-preview {
    width: 48px;
    height: 48px;
  }

  .admin-order-row-meta {
    grid-column: 2 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-order-row > .button {
    grid-column: 3;
    grid-row: 1;
  }

  .order-detail-grid,
  .order-detail-footer {
    grid-template-columns: 1fr;
  }

  .order-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .admin-order-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .admin-order-row .admin-status-pill {
    grid-column: 2;
  }

  .admin-order-row > .button {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }

  .admin-order-row-meta,
  .order-detail-summary,
  .compact-order-editor,
  .order-read-grid,
  .order-request-grid,
  .order-file-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-head {
    align-items: flex-start;
  }

  .order-detail-product img {
    width: 54px;
    height: 54px;
  }

  .order-detail-product h2 {
    font-size: 18px;
  }
}

.admin-order-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content;
  gap: 14px;
  align-items: start;
}

.admin-order-head h3 {
  font-size: 17px;
}

.admin-order-head p {
  margin-bottom: 3px;
  color: var(--muted);
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 760;
}

.admin-status-pill.pending {
  color: #8a4b00;
  background: #fff3cd;
}

.admin-status-pill.active {
  color: #084c9e;
  background: #e7f1ff;
}

.admin-status-pill.completed {
  color: #067647;
  background: #dcfae6;
}

.admin-status-pill.exception {
  color: #b42318;
  background: #fee4e2;
}

.admin-order-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-order-meta div {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.admin-order-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.admin-order-meta strong {
  overflow-wrap: anywhere;
}

.admin-child-orders {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .82);
  border-radius: 10px;
  background: #fbfbfd;
}

.admin-child-orders div {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(180px, 1fr) minmax(120px, max-content);
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.admin-child-orders span,
.admin-child-orders small {
  color: var(--muted);
  font-weight: 720;
}

.account-child-orders {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.account-child-orders div {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(160px, 1fr) minmax(110px, max-content);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
}

.account-child-orders span,
.account-child-orders small {
  color: var(--muted);
  font-weight: 720;
}

.admin-file-links {
  display: grid;
  gap: 5px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
  font-size: 12px;
}

.admin-file-links a {
  overflow: hidden;
  color: var(--blue);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-file-links em {
  color: var(--muted);
  font-style: normal;
}

.admin-order-history {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.admin-order-history ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.admin-order-history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-order-history span {
  color: var(--ink);
  font-weight: 720;
}

.admin-item h3 {
  margin-bottom: 6px;
}

.login-history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.login-history-list div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}

.login-history-list small {
  color: var(--muted);
}

.tier-editor {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.tier-editor-row {
  display: grid;
  grid-template-columns: .8fr .8fr .8fr .8fr auto;
  gap: 6px;
}

.adjustment-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.adjustment-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.adjustment-group h4 {
  margin: 0;
  text-transform: capitalize;
}

.adjustment-row {
  grid-template-columns: minmax(120px, 1fr) 120px;
  align-items: center;
  margin-bottom: 0;
}

.order-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.product-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  align-items: start;
  gap: 10px;
}

.product-summary-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  min-height: 154px;
  padding: 12px;
}

.product-summary-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--soft);
}

.product-summary-card h3 {
  margin: 1px 0 3px;
  font-size: 15px;
}

.product-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.product-summary-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.product-summary-card > .button {
  grid-column: 1 / -1;
  justify-self: stretch;
  min-height: 34px;
}

.admin-list.compact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
  gap: 10px;
}

.admin-user-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.admin-user-card .admin-order-head h3,
.admin-order-card .admin-order-head h3 {
  font-size: 15px;
}

.admin-user-card .recent-order-list button {
  grid-template-columns: minmax(118px, 1fr) auto;
  gap: 6px 10px;
  width: 100%;
  min-width: 0;
}

.admin-user-card .recent-order-list button small {
  grid-column: 1 / -1;
}

.admin-list:not(.compact-list):not(.product-admin-list) {
  display: grid;
  gap: 10px;
}

.admin-order-card {
  padding: 14px;
}

.admin-order-card .admin-order-head {
  gap: 16px;
}

.admin-order-card .admin-order-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-order-card .admin-order-meta div {
  min-height: 56px;
  padding: 8px 10px;
}

.order-editor {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
  align-items: start;
}

.resource-card {
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 76px;
  padding: 9px;
}

.resource-thumb {
  width: 58px;
  height: 50px;
}

.product-edit-panel {
  width: min(1260px, 100%);
  padding: 16px;
}

.product-editor-layout {
  grid-template-columns: 156px minmax(0, 1fr);
}

.product-editor-subnav {
  padding: 6px;
  border-radius: 10px;
}

.product-editor-subnav button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}

.product-state {
  display: inline-flex;
  width: max-content;
  margin-top: 3px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 760;
}

.product-state.active {
  color: #067647;
  background: #dcfae6;
}

.product-state.draft {
  color: #6b7280;
  background: #eef1f4;
}

.admin-product-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.admin-product-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.product-edit-panel,
.product-create-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.product-admin-card {
  display: grid;
  gap: 10px;
}

.product-admin-head,
.mini-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.product-admin-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.product-admin-layout {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(300px, 1fr);
  gap: 8px;
}

.product-editor-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.product-editor-summary div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .82);
  border-radius: 10px;
  background: #fbfbfd;
}

.product-editor-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.product-editor-summary strong {
  font-size: 16px;
}

.product-editor-layout {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.product-editor-subnav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f5f7;
  position: sticky;
  top: 8px;
}

.product-editor-subnav button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 750;
  cursor: pointer;
}

.product-editor-subnav button.active {
  color: #fff;
  background: #1d1d1f;
}

.product-editor-content {
  min-width: 0;
}

.product-editor-pane[hidden] {
  display: none;
}

.product-admin-block {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(210, 218, 226, .82);
  border-radius: 12px;
  background: var(--soft);
}

.product-admin-block small {
  color: var(--muted);
}

.product-compact-grid,
.product-locale-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.product-compact-grid label,
.product-locale-grid label {
  margin: 0;
}

.product-locale-grid textarea,
.product-compact-grid textarea {
  min-height: 88px;
}

.product-inline-check {
  justify-self: start;
  margin: 0;
}

.product-image-setting {
  grid-column: 1 / -1;
}

.tier-editor-head {
  display: grid;
  grid-template-columns: .8fr .8fr .8fr auto;
  gap: 6px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-badge.status-paused .check-mark,
.status-step.status-paused.done .check-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  font-size: 0;
}

.status-badge.status-paused .check-mark::before,
.status-badge.status-paused .check-mark::after,
.status-step.status-paused.done .check-mark::before,
.status-step.status-paused.done .check-mark::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.status-badge.status-paused .check-mark::before,
.status-step.status-paused.done .check-mark::before {
  left: 5px;
}

.status-badge.status-paused .check-mark::after,
.status-step.status-paused.done .check-mark::after {
  right: 5px;
}

.visual-config-list,
.option-value-list,
.accessory-editor {
  display: grid;
  gap: 6px;
}

.option-value-row-wrap {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .75);
  border-radius: 12px;
  background: #fbfbfd;
}

.config-group-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.config-group-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: start;
}

.config-locale-fields,
.option-locale-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
}

.config-remove-button {
  align-self: end;
}

.option-value-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 320px;
  gap: 12px;
  align-items: start;
}

.option-value-main,
.option-child-main {
  display: grid;
  gap: 8px;
}

.option-value-side,
.option-child-side {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(210, 218, 226, .68);
  border-radius: 10px;
  background: #fff;
}

.option-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.option-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.option-child-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
}

.option-child-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 300px;
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px dashed rgba(134, 143, 155, .35);
  border-radius: 10px;
  background: #fff;
}

.button.ghost.danger-lite {
  border-color: #fca5a5;
  color: #b42318;
  background: #fff;
}

.admin-image-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-image-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  justify-content: start;
}

.admin-image-actions .button,
.admin-image-actions .image-upload-button {
  width: 100%;
  padding-inline: 10px;
}

.image-upload-button {
  min-height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-upload-button input {
  display: none;
}

.admin-image-preview {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}

.admin-image-preview img {
  max-width: 100%;
  max-height: 86px;
  object-fit: contain;
}

.product-gallery-setting {
  grid-column: span 2;
}

.product-gallery-field {
  display: grid;
  gap: 8px;
}

.product-gallery-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.product-gallery-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(210, 218, 226, .82);
  border-radius: 10px;
  background: #fff;
}

.product-gallery-item img {
  width: 100%;
  height: 76px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f7;
}

.product-gallery-empty {
  min-height: 92px;
}

.image-library-modal {
  z-index: 120;
}

.image-library-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 60px);
  overflow: auto;
}

.image-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.image-library-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.image-library-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
}

.image-library-card span {
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
}

.image-library-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-library-card strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.resource-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.resource-thumb {
  width: 64px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
}

.resource-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.resource-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.resource-card small {
  color: var(--muted);
}

.accessory-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 300px;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .75);
  border-radius: 12px;
  background: #fbfbfd;
}

.accessory-main,
.accessory-side {
  display: grid;
  gap: 8px;
}

.accessory-side {
  padding: 8px;
  border: 1px solid rgba(210, 218, 226, .68);
  border-radius: 10px;
  background: #fff;
}

.service-editor {
  display: grid;
  gap: 10px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 300px;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(210, 218, 226, .75);
  border-radius: 12px;
  background: #fbfbfd;
}

.service-main,
.service-side,
.service-field-group {
  display: grid;
  gap: 8px;
}

.service-side {
  padding: 8px;
  border: 1px solid rgba(210, 218, 226, .68);
  border-radius: 10px;
  background: #fff;
}

.service-field-group {
  padding: 8px;
  border: 1px solid rgba(210, 218, 226, .55);
  border-radius: 10px;
  background: #fff;
}

.service-field-group strong {
  font-size: 13px;
  color: var(--ink);
}

.compact-check {
  min-height: auto;
  margin: 0;
}

.user-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.user-stat-strip div {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--soft);
}

.user-stat-strip span,
.recent-order-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.recent-order-list {
  display: grid;
  justify-items: start;
  gap: 5px;
  margin-top: 6px;
}

.recent-order-list button {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(120px, max-content) minmax(180px, max-content);
  justify-content: start;
  gap: 14px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.recent-order-list button small {
  text-align: left;
}

.product-create-panel {
  margin: 12px 0;
  padding: 14px;
  background: #fff;
}

.adjustment-preview {
  display: grid;
  gap: 8px;
}

.adjustment-preview summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.input-error {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
}

.order-field-error {
  margin-top: -2px;
  color: #d92d20;
  font-size: 12px;
  font-weight: 700;
}

.video-embed {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.admin-user-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.admin-user-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-user-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, .5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-user-detail-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
}

.admin-form-grid.dense {
  gap: 10px;
}

.success-page {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
  padding: 86px 20px;
  background: #f5f5f7;
}

.success-card {
  width: min(760px, 100%);
  padding: 42px;
  border: 1px solid rgba(210, 218, 226, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(20, 24, 32, .08);
  text-align: center;
}

.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #16a34a;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px rgba(22, 163, 74, .24);
}

.success-check svg {
  width: 34px;
  height: 34px;
  display: block;
}

.success-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.success-card h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.success-body {
  max-width: 590px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.success-order-box {
  width: min(440px, 100%);
  display: grid;
  gap: 8px;
  margin: 28px auto;
  padding: 18px;
  border-radius: 18px;
  background: #f5f5f7;
  border: 1px solid rgba(210, 218, 226, .9);
}

.success-order-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.success-order-box strong {
  font-size: 24px;
  letter-spacing: 0;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-user-orders {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.admin-user-orders h3 {
  margin-bottom: 2px;
  font-size: 18px;
}

.admin-user-order-row {
  display: grid;
  grid-template-columns: minmax(170px, max-content) minmax(150px, max-content) minmax(190px, max-content) auto;
  justify-content: start;
  gap: 14px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-width: min(640px, 100%);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}

.admin-user-order-row small {
  color: var(--muted);
  text-align: left;
}

@media (max-width: 920px) {
  .floating-contact {
    right: 12px;
    top: auto;
    bottom: 86px;
    width: 168px;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand tools"
      "nav nav";
    gap: 8px 12px;
    min-height: 58px;
    padding: 8px 12px 7px;
    overflow: visible;
  }

  .brand {
    grid-area: brand;
  }

  .main-nav {
    grid-area: nav;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 2px 2px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a,
  .nav-preview-wrap > a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    white-space: nowrap;
  }

  .nav-preview-wrap {
    min-height: 28px;
  }

  .nav-hover-preview {
    top: 82px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    padding: 16px 14px 20px;
  }

  .mega-preview-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mega-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-tools {
    grid-area: tools;
    justify-self: end;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    overflow: visible;
  }

  .nav-icon {
    min-width: 28px;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .currency-unit {
    order: 4;
    padding: 4px 8px;
    font-size: 11px;
  }

  .language-button {
    max-width: 118px;
    padding: 5px 8px;
  }

  .language-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-dashboard,
  .quote-layout,
  .amazon-order-form,
  .product-detail-hero,
  .featured-panel,
  .video-layout,
  .auth-grid,
  .account-layout,
  .admin-grid,
  .support-grid,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-category-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .admin-nav-caption {
    grid-column: 1 / -1;
  }

  .admin-category-nav button {
    min-height: 46px;
  }

  .admin-content {
    padding: 14px;
  }

  .order-buy-box {
    position: static;
  }

  .admin-filter-tabs {
    grid-template-columns: repeat(5, max-content);
    overflow-x: auto;
  }

  .account-sidebar {
    position: static;
  }

  .account-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
  }

  .support-actions {
    justify-content: flex-start;
  }

  .trust-strip,
  .intro-grid,
  .factory-gallery,
  .product-grid,
  .home-product-grid,
  .shop-product-grid,
  .stats-grid,
  .featured-editor-row,
  .track-form,
  .shipping-fields,
  .account-summary,
  .status-summary,
  .profile-overview-grid,
  .order-detail-grid,
  .support-contact-grid,
  .footer-columns,
  .homepage-editor,
  .product-admin-layout,
  .product-editor-layout,
  .product-editor-summary,
  .product-compact-grid,
  .product-locale-grid,
  .accessory-card-grid,
  .user-stat-strip,
  .recent-order-list button,
  .settings-layout,
  .admin-overview-cards,
  .admin-ops-grid,
  .admin-quick-grid,
  .admin-order-meta {
    grid-template-columns: 1fr 1fr;
  }

  .product-editor-layout {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .partition-toolbar,
  .partition-row {
    grid-template-columns: 1fr;
  }

  .partition-row-fields,
  .partition-row-flags,
  .partition-password-field {
    grid-column: 1;
  }

  .partition-row-fields {
    grid-template-columns: 1fr;
  }

  .service-card-grid {
    grid-template-columns: 1fr;
  }

  .config-group-head {
    grid-template-columns: 180px minmax(0, 1fr) max-content;
  }

  .option-value-row,
  .option-child-row,
  .accessory-row,
  .service-row {
    grid-template-columns: 1fr;
  }

  .config-locale-fields,
  .option-locale-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .floating-contact {
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: min(176px, calc(100vw - 20px));
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
  }

  .floating-contact-icon {
    width: 34px;
    height: 34px;
  }

  .floating-contact strong {
    font-size: 13px;
  }

  .floating-contact p {
    font-size: 11px;
  }

  .floating-contact-links {
    gap: 4px;
  }

  .floating-contact-links a {
    gap: 6px;
    min-height: 29px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .floating-contact-links > a > span:first-child {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .floating-contact-links strong {
    font-size: 11px;
  }

  .floating-contact-copy small {
    font-size: 9px;
  }

  .site-header {
    padding-inline: 10px;
  }

  .brand-text {
    display: none;
  }

  .compact-brand {
    min-width: 24px;
  }

  .header-tools {
    gap: 6px;
  }

  .account-menu {
    gap: 5px;
  }

  .nav-icon {
    max-width: 96px;
    font-size: 11px;
  }

  .currency-unit {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .language-button {
    max-width: 86px;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .main-nav a,
  .nav-preview-wrap > a {
    min-height: 26px;
    padding: 6px 9px;
    font-size: 11px;
  }

  h1 {
    font-size: 42px;
  }

  .trust-strip,
  .intro-grid,
  .factory-gallery,
  .product-grid,
  .home-product-grid,
  .shop-product-grid,
  .stats-grid,
  .form-grid,
  .price-panel,
  .track-form,
  .shipping-fields,
  .status-steps,
  .account-summary,
  .status-summary,
  .profile-overview-grid,
  .order-detail-grid,
  .support-contact-grid,
  .footer-columns,
  .homepage-editor,
  .product-admin-layout,
  .product-editor-layout,
  .product-editor-summary,
  .product-compact-grid,
  .product-locale-grid,
  .config-group-head,
  .option-value-row,
  .accessory-card-grid,
  .user-stat-strip,
  .recent-order-list button,
  .settings-layout,
  .admin-form-grid,
  .admin-overview-cards,
  .admin-ops-grid,
  .admin-quick-grid,
  .admin-order-tools,
  .admin-order-meta,
  .stats-editor-row,
  .order-editor,
  .tier-editor-row,
  .adjustment-row,
  .nav-editor-row,
  .admin-user-order-row {
    grid-template-columns: 1fr;
  }

  .product-editor-subnav {
    position: static;
  }

  .option-child-row,
  .service-row {
    grid-template-columns: 1fr;
  }

  .config-locale-fields,
  .option-locale-fields,
  .option-meta-grid {
    grid-template-columns: 1fr;
  }

  .product-gallery-setting {
    grid-column: auto;
  }

  .account-tabs,
  .panel-heading,
  .orders-toolbar,
  .order-card-heading,
  .order-card-footer,
  .order-detail-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .featured-span-2 {
    grid-column: auto;
  }

  .site-footer {
    flex-direction: column;
  }

  .order-card-status-actions,
  .order-inline-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .account-order-card {
    padding-bottom: 12px;
  }

  .order-inline-actions {
    position: static;
  }

  .order-product-preview {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Final mobile header override: collapse navigation into a stable menu. */
@media (max-width: 920px) {
  .site-header {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas: "brand menu tools";
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    overflow: visible;
  }

  .site-header .brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header .header-tools {
    grid-area: tools;
    justify-self: end;
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    overflow: visible;
  }

  .site-header > .language-switch {
    grid-area: tools;
    justify-self: end;
  }

  .mobile-nav-toggle {
    grid-area: menu;
    justify-self: end;
    display: inline-grid;
    place-items: center;
    gap: 3px;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid rgba(29, 29, 31, .28) !important;
    border-radius: 11px !important;
    background: rgba(251, 251, 253, .3) !important;
    box-shadow: none !important;
    cursor: pointer;
    color: #1d1d1f !important;
    position: relative;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus-visible {
    background: rgba(29, 29, 31, .08);
    border-color: rgba(29, 29, 31, .48);
    outline: none;
  }

  .site-header.mobile-nav-open .mobile-nav-toggle {
    background: #1d1d1f !important;
    border-color: #1d1d1f !important;
    color: #fff !important;
  }

  .mobile-nav-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }

  .mobile-nav-close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(.72);
  }

  .mobile-nav-menu-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
  }

  .site-header.mobile-nav-open .mobile-nav-menu-icon {
    opacity: 0;
    transform: rotate(90deg) scale(.72);
  }

  .site-header.mobile-nav-open .mobile-nav-close-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
  }

  .site-header .main-nav {
    position: absolute;
    top: calc(100% + 7px);
    left: 10px;
    right: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: auto;
    min-width: 0;
    max-height: min(72vh, 520px);
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(210, 218, 226, .82);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 60px rgba(18, 24, 31, .16);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease;
  }

  .site-header.mobile-nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .site-header .main-nav a,
  .site-header .nav-preview-wrap > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(245, 245, 247, .82);
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
  }

  .site-header .nav-preview-wrap {
    display: block;
    min-height: 0;
  }

  .site-header .nav-hover-preview {
    display: none;
  }

  .account-menu.logged-in > .nav-icon:not(.account-center-shortcut) {
    display: none;
  }

  .site-header .nav-icon {
    max-width: 88px;
    min-width: 28px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header .cart-nav-link {
    flex: 0 0 30px;
    width: 30px;
    max-width: 30px;
    overflow: visible;
  }

  .site-header .currency-unit {
    max-width: 92px;
    min-height: 26px;
    padding: 4px 8px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
  }

  .site-header .language-button {
    max-width: 96px;
    min-height: 28px;
    padding: 5px 8px;
  }

  .site-header .language-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Keep mobile navigation controls dimensionally stable while tapping. */
@media (max-width: 920px) {
  .site-header .main-nav a,
  .site-header .nav-preview-wrap > a,
  .mobile-nav-toggle,
  .inventory-nav button,
  .inventory-sidebar-bottom button,
  .inventory-sidebar-bottom a {
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header .main-nav a:active,
  .site-header .main-nav a:focus,
  .site-header .nav-preview-wrap > a:active,
  .site-header .nav-preview-wrap > a:focus,
  .mobile-nav-toggle:active,
  .mobile-nav-toggle:focus,
  .inventory-nav button:active,
  .inventory-nav button:focus,
  .inventory-sidebar-bottom button:active,
  .inventory-sidebar-bottom button:focus,
  .inventory-sidebar-bottom a:active,
  .inventory-sidebar-bottom a:focus {
    transform: none;
    scale: 1;
  }

  .site-header .main-nav a,
  .site-header .nav-preview-wrap > a,
  .inventory-nav button {
    line-height: 1.25;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 8px;
  }

  .site-header .brand-text,
  .site-header .currency-unit {
    display: none;
  }

  .site-header .brand-mark {
    width: 17px;
    height: 20px;
  }

  .site-header .header-tools {
    gap: 5px;
  }

  .site-header .language-button {
    width: 52px;
    max-width: 52px;
    justify-content: center;
  }

  .site-header .nav-icon {
    max-width: 70px;
  }

  .site-header .language-button span {
    display: none;
  }
}

/* Final mobile inventory-nav sizing override. */
@media (max-width: 880px) {
  .inventory-nav button,
  .inventory-nav button.active {
    flex: 0 0 108px;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
  }

  .inventory-nav button b {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  .inventory-nav button small { display: none; }
}

/* Keep the inventory mobile navigation row from growing after a tab change. */
@media (max-width: 880px) {
  .inventory-nav {
    box-sizing: border-box;
    align-items: center;
    align-content: center;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    overflow-x: auto;
    overflow-y: hidden;
  }
}

/* Prevent the mobile sidebar grid item from stretching with page content. */
@media (max-width: 880px) {
  .inventory-sidebar {
    align-self: start;
    height: auto;
  }
}

/* Inventory state panels must remain mutually exclusive even when nested form styles set display:grid. */
.inventory-body .hidden { display: none !important; }

/* Initialization and setup pages use a single full-width panel instead of the login grid. */
.inventory-login[data-inventory-access-mode="initialize"],
.inventory-login[data-inventory-access-mode="setup"] {
  display: block;
  width: min(920px, calc(100% - 32px));
  margin: 5vh auto 0;
  padding: 28px;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-login-header,
.inventory-login[data-inventory-access-mode="setup"] .inventory-login-header {
  display: none;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-panel,
.inventory-login[data-inventory-access-mode="setup"] .inventory-bootstrap-panel {
  margin-top: 0;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-login[data-inventory-access-mode="initialize"],
.inventory-login[data-inventory-access-mode="setup"] {
  background: #f8fbfa;
  border-color: #cbded8;
  box-shadow: 0 18px 48px rgba(21, 73, 61, .12);
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-panel,
.inventory-login[data-inventory-access-mode="setup"] .inventory-bootstrap-panel {
  color: #203b34;
  border-color: #c7ddd6;
  background: #ffffff;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-panel h2,
.inventory-login[data-inventory-access-mode="setup"] .inventory-bootstrap-panel h2 {
  color: #173f34;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-panel p,
.inventory-login[data-inventory-access-mode="setup"] .inventory-bootstrap-panel p {
  color: #5f716a;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-badge,
.inventory-login[data-inventory-access-mode="setup"] .inventory-bootstrap-badge {
  color: #17634f;
  background: #e4f3ee;
}
.inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-options label {
  color: #35564c;
  border-color: #d6e6e1;
  background: #f8fbfa;
}
.inventory-login[data-inventory-access-mode="setup"] .setup-guide-steps article {
  border-color: #d5e5e0;
  background: #f7faf9;
}
.inventory-login[data-inventory-access-mode="setup"] .setup-guide-steps article b {
  color: #17634f;
}
.inventory-login[data-inventory-access-mode="setup"] .setup-guide-steps article span {
  color: #5c7068;
}

.setup-admin-form {
  margin: 1.15rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d5e5e0;
  border-radius: 14px;
  background: #f7faf9;
}
.setup-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}
.setup-admin-form label {
  display: grid;
  gap: .35rem;
  color: #29483e;
  font-weight: 700;
}
.setup-admin-form label span { font-size: .88rem; }
.setup-admin-form label small { color: #6b7d76; font-weight: 400; font-size: .75rem; }
.setup-admin-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbded8;
  border-radius: 9px;
  padding: .55rem .7rem;
  color: #1f3931;
  background: #fff;
}
.setup-admin-form input:focus { outline: 3px solid rgba(28, 126, 101, .16); border-color: #1c7e65; }
.setup-admin-form .button { margin-top: .95rem; min-height: 42px; }
.setup-guide-flow { margin-top: 1.1rem; }
.setup-guide-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}
.setup-guide-flow-head div { display: grid; gap: .15rem; }
.setup-guide-flow-head b { color: #173f34; font-size: 1rem; }
.setup-guide-flow-head span { color: #6b7d76; font-size: .78rem; }
.setup-guide-flow-status { white-space: nowrap; padding: .32rem .6rem; border-radius: 999px; color: #17634f; background: #e4f3ee; font-size: .76rem !important; }
@media (max-width: 700px) {
  .setup-admin-form-grid { grid-template-columns: 1fr; }
  .setup-guide-flow-head { display: grid; align-items: start; }
}
@media (max-width: 700px) {
  .inventory-login[data-inventory-access-mode="initialize"],
  .inventory-login[data-inventory-access-mode="setup"] {
    width: calc(100% - 20px);
    margin: 12px auto 0;
    padding: 16px;
  }
  .inventory-login[data-inventory-access-mode="initialize"] .inventory-bootstrap-options,
  .inventory-login[data-inventory-access-mode="setup"] .setup-guide-steps {
    grid-template-columns: 1fr;
  }
}




/* UI/UX Pro Max redesign · flat industrial workspace */
.inventory-body {
  --ui-ink: #0f172a;
  --ui-muted: #64748b;
  --ui-soft: #f1f5f9;
  --ui-border: #e2e8f0;
  --ui-card: #ffffff;
  --ui-primary: #334155;
  --ui-accent: #059669;
  --ui-accent-soft: #ecfdf5;
  --ui-danger: #dc2626;
  background: #f8fafc;
  color: var(--ui-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}
.inventory-body *,
.inventory-body *::before,
.inventory-body *::after { box-sizing: border-box; }
.inventory-body button,
.inventory-body input,
.inventory-body select,
.inventory-body textarea { font-family: inherit; }
.inventory-app { grid-template-columns: 260px minmax(0, 1fr); background: #f8fafc; }
.inventory-sidebar {
  z-index: 30;
  border-right: 1px solid var(--ui-border);
  padding: 22px 14px 16px;
  background: #fff;
}
.inventory-brand { gap: 11px; padding: 2px 10px 22px; border-bottom: 1px solid var(--ui-border); }
.inventory-brand-mark { width: 38px; height: 38px; border-radius: 10px; color: #fff; background: var(--ui-accent); font-size: 18px; }
.inventory-brand b { color: var(--ui-ink); font-size: 18px; letter-spacing: .02em; }
.inventory-user-badge {
  display: grid;
  gap: 3px;
  margin: 16px 4px 12px;
  border: 1px solid #dbe7e3;
  border-radius: 10px;
  padding: 11px 12px;
  background: #f8fffc;
}
.inventory-user-badge span { overflow: hidden; color: #1e3a32; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.inventory-user-badge small { color: #6b7d76; font-size: 11px; }
.inventory-nav { gap: 2px; padding: 4px 2px; }
.inventory-nav > span {
  margin: 17px 8px 6px;
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.inventory-nav button {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 11px 8px 14px;
  color: #475569;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.inventory-nav button:hover { color: #0f766e; background: #f0fdf9; border-color: #d9f0e8; }
.inventory-nav button b { font-size: 13px; font-weight: 700; }
.inventory-nav button small { color: #94a3b8; font-size: 10px; }
.inventory-nav button.active {
  color: #065f46;
  border-color: #a7f3d0;
  background: var(--ui-accent-soft);
  box-shadow: none;
}
.inventory-nav button.active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 99px;
  background: var(--ui-accent);
}
.inventory-nav button.active small { color: #4b7d6d; }
.inventory-sidebar-bottom { gap: 5px; margin-top: 14px; border-top: 1px solid var(--ui-border); padding: 14px 8px 0; }
.inventory-sidebar-bottom button,
.inventory-sidebar-bottom a { border-radius: 8px; padding: 8px 9px; color: #475569; transition: background-color .18s ease, color .18s ease; }
.inventory-sidebar-bottom button:hover,
.inventory-sidebar-bottom a:hover { color: #0f766e; background: #f0fdf9; }
.inventory-version { color: #94a3b8; padding-left: 9px; }
.inventory-content { padding: 34px clamp(20px, 3.6vw, 56px) 64px; }
.inventory-sync-status {
  top: 18px;
  right: clamp(18px, 3vw, 46px);
  border-color: #d9e7e2;
  border-radius: 9px;
  padding: 7px 11px;
  color: #315c4e;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .06);
  backdrop-filter: none;
  font-size: 11px;
}
.inventory-view { width: min(1560px, 100%); }
.inventory-page-head {
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ui-border);
}
.inventory-page-head h1 { color: var(--ui-ink); font-size: clamp(25px, 2.4vw, 32px); letter-spacing: -.02em; }
.inventory-page-head p:not(.inventory-kicker) { color: var(--ui-muted); font-size: 13px; }
.inventory-kicker { color: #0f766e; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.inventory-head-actions { gap: 8px; }
.inventory-body .button {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 13px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.inventory-body .button:hover { transform: translateY(-1px); border-color: #94a3b8; background: #f8fafc; }
.inventory-body .button.primary { border-color: var(--ui-accent); color: #fff; background: var(--ui-accent); }
.inventory-body .button.primary:hover { border-color: #047857; background: #047857; }
.inventory-body .button.danger { border-color: var(--ui-danger); background: var(--ui-danger); }
.inventory-body input,
.inventory-body select,
.inventory-body textarea { border-color: #cbd5e1; border-radius: 8px; background: #fff; }
.inventory-body input:focus,
.inventory-body select:focus,
.inventory-body textarea:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(5, 150, 105, .13); }
.inventory-metrics { gap: 12px; margin-bottom: 22px; }
.inventory-metric,
.inventory-section,
.inventory-reconcile-card {
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: var(--ui-card);
  box-shadow: none;
}
.inventory-metric { min-height: 112px; gap: 10px; padding: 17px; }
.inventory-metric span,
.inventory-reconcile-card span { color: var(--ui-muted); font-size: 12px; }
.inventory-metric strong,
.inventory-reconcile-card strong { color: var(--ui-ink); font-size: 25px; font-weight: 800; }
.inventory-metric.warn { border-left: 4px solid #d97706; background: #fffbeb; }
.inventory-metric.good { border-left: 4px solid #059669; background: #f0fdf4; }
.inventory-metric.blue { border-left: 4px solid #2563eb; background: #eff6ff; }
.inventory-metric.orange { border-left: 4px solid #ea580c; background: #fff7ed; }
.inventory-metric.payable { border-left: 4px solid #0f766e; background: #f0fdfa; }
.inventory-metric.awaiting-finance { border-left: 4px solid #ca8a04; background: #fefce8; }
.inventory-metric.low,
.inventory-metric.overdue { border-left: 4px solid #dc2626; background: #fef2f2; }
.inventory-overview-grid { gap: 18px; }
.inventory-section { padding: 20px; }
.inventory-section-head { align-items: center; margin-bottom: 16px; }
.inventory-section-head h2 { color: var(--ui-ink); font-size: 16px; }
.inventory-section-head p { color: var(--ui-muted); }
.inventory-table-shell { overflow: auto; padding: 0; }
.inventory-table { min-width: 760px; border-collapse: separate; border-spacing: 0; }
.inventory-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--ui-border);
  padding: 12px 14px;
  color: #475569;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.inventory-table td { border-bottom: 1px solid #eef2f1; padding: 13px 14px; color: #334155; font-size: 12px; vertical-align: middle; }
.inventory-table tbody tr:hover td { background: #f8fffc; }
.inventory-table tbody tr:last-child td { border-bottom: 0; }
.inventory-filter-bar,
.inventory-reconcile-controls,
.inventory-record-filters { gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--ui-border); border-radius: 12px; background: #fff; }
.warehouse-launchpad { gap: 12px; }
.warehouse-launchpad-head { border: 1px solid var(--ui-border); border-radius: 12px; padding: 18px; background: #fff; }
.warehouse-action {
  min-height: 112px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.warehouse-action:hover { border-color: #99d8c2; background: #f4fffa; transform: translateY(-2px); }
.warehouse-action-icon { border-radius: 10px; }
.inventory-access-denied-card { border-color: var(--ui-border); border-radius: 14px; background: #fff; box-shadow: none; }
.inventory-body :focus-visible { outline: 3px solid rgba(5, 150, 105, .26); outline-offset: 2px; }
@media (max-width: 900px) {
  .inventory-app { grid-template-columns: 220px minmax(0, 1fr); }
  .inventory-content { padding-inline: 22px; }
}
@media (max-width: 620px) {
  .inventory-app { display: block; }
  .inventory-sidebar { position: sticky; height: auto; border-right: 0; border-bottom: 1px solid var(--ui-border); padding: 12px; }
  .inventory-brand { padding-bottom: 13px; }
  .inventory-user-badge { margin: 10px 2px 8px; }
  .inventory-content { padding: 22px 14px 46px; }
  .inventory-page-head { padding-bottom: 14px; }
  .inventory-metrics { gap: 8px; }
  .inventory-metric { min-height: 96px; padding: 13px; }
  .inventory-metric strong { font-size: 19px; }
  .inventory-section { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .inventory-body *, .inventory-body *::before, .inventory-body *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}



/* UI/UX Pro Max — new operations command center shell.
   This is an independent visual system: deep navy navigation, amber alerts,
   blue-gray workspace, and deliberately centered two-line nav items. */
.inventory-body {
  /* Softer enterprise navy: keeps the command-center hierarchy without the
     harsh pure-black / pure-white contrast of the previous shell. */
  --ux-navy: #172033;
  --ux-navy-2: #1e2a3f;
  --ux-navy-3: #263650;
  --ux-blue: #2563eb;
  --ux-amber: #f59e0b;
  --ux-bg: #f4f7fb;
  --ux-card: #ffffff;
  --ux-line: #dbe3ee;
  --ux-ink: #172033;
  --ux-muted: #64748b;
  background: var(--ux-bg);
  color: var(--ux-ink);
  font-family: var(--inventory-font-family);
  --inventory-font-scale: 1;
  --inventory-font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

/* GoldenLoop administration workspace: dense, full-height B2B operations UI. */
.admin-body {
  --admin-ink: #0f172a;
  --admin-muted: #64748b;
  --admin-line: #dce3ec;
  --admin-surface: #ffffff;
  --admin-canvas: #f4f7fb;
  --admin-accent: #0369a1;
  --admin-sidebar: #101827;
  background: var(--admin-canvas);
  color: var(--admin-ink);
}

.admin-shell {
  min-height: 100vh;
}

.login-panel {
  width: min(100% - 32px, 440px);
  margin: min(18vh, 160px) auto 0;
  padding: 30px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .12);
}

.login-panel h1 {
  margin: 4px 0 8px;
  color: var(--admin-ink);
  font-size: 28px;
  letter-spacing: 0;
}

.login-panel > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--admin-muted);
}

.login-panel form {
  display: grid;
  gap: 14px;
}

.login-panel .button {
  min-height: 44px;
  margin-top: 2px;
}

.admin-login-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 650;
}

.admin-dashboard {
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--admin-canvas);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  margin: 0;
  padding: 18px 12px 16px;
  border: 0;
  border-radius: 0;
  background: var(--admin-sidebar);
  box-shadow: none;
  backdrop-filter: none;
}

.admin-brand {
  align-items: center;
  min-height: 44px;
  padding: 8px 10px 18px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
}

.admin-brand .brand-mark {
  background: #38bdf8;
}

.admin-category-nav {
  gap: 3px;
  padding: 0;
}

.admin-nav-caption {
  margin: 16px 10px 5px;
  color: #71819a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.admin-category-nav a,
.admin-category-nav button {
  min-height: 42px;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #c2cede;
  font-size: 13px;
  transition: background .18s ease, color .18s ease;
}

.admin-category-nav button b {
  color: inherit;
  font-size: 13px;
  font-weight: 720;
}

.admin-category-nav button small {
  color: #8190a5;
  font-size: 10px;
  font-weight: 560;
}

.admin-category-nav button:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, .07);
}

.admin-category-nav button.active {
  color: #ffffff;
  background: var(--admin-accent);
  box-shadow: none;
}

.admin-category-nav button.active small {
  color: rgba(255, 255, 255, .72);
}

.admin-return-link {
  margin-top: auto;
  border-top-color: rgba(255, 255, 255, .12);
  padding: 16px 10px 4px;
  color: #a8b6c9;
}

.admin-return-link:hover {
  color: #ffffff;
}

.admin-content {
  min-width: 0;
  padding: 0 24px 32px;
}

.admin-workspace-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 98px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -24px 18px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(220, 227, 236, .92);
  background: rgba(244, 247, 251, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-workspace-kicker {
  margin: 0 0 4px;
  color: var(--admin-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

.admin-workspace-header h1 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.admin-workspace-header p:not(.admin-workspace-kicker) {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-operator {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-grid {
  gap: 14px;
}

.admin-grid .panel,
.admin-grid > .panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  background: var(--admin-surface);
}

.panel-heading {
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  font-size: 18px;
}

.admin-help {
  max-width: 72ch;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-overview-cards {
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 0;
}

.admin-metric-card {
  min-height: 92px;
  padding: 13px;
  border-color: var(--admin-line);
  border-radius: 8px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-metric-card:hover {
  border-color: #a9c9de;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.admin-metric-card span,
.ops-data-grid span {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-metric-card strong {
  color: var(--admin-ink);
  font-size: 25px;
}

.admin-ops-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 12px;
}

.admin-ops-card {
  padding: 14px;
  border-color: var(--admin-line);
  border-radius: 8px;
}

.admin-order-tools {
  grid-template-columns: minmax(260px, .7fr) minmax(500px, 1.3fr);
  gap: 14px;
  margin: 4px 0 14px;
}

.admin-filter-tabs {
  gap: 3px;
  padding: 3px;
  border-color: var(--admin-line);
  border-radius: 8px;
  background: #eef2f7;
}

.admin-filter-tabs button {
  min-height: 36px;
  border-radius: 6px;
  color: #526276;
}

.admin-filter-tabs button.active {
  background: #fff;
  color: var(--admin-ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
}

.admin-order-row {
  grid-template-columns: 54px minmax(220px, 1.25fr) minmax(150px, .75fr) minmax(130px, .55fr) minmax(150px, .65fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 8px;
  border-color: var(--admin-line);
}

.admin-order-row:hover {
  border-color: #abcce1;
  background: #fbfdff;
}

.admin-user-card,
.product-admin-card,
.resource-card {
  border-color: var(--admin-line);
  border-radius: 8px;
}

.admin-body :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid rgba(3, 105, 161, .35);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .admin-dashboard { grid-template-columns: 196px minmax(0, 1fr); }
  .admin-content { padding: 0 16px 24px; }
  .admin-workspace-header { margin-inline: -16px; padding-inline: 16px; }
  .admin-overview-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-order-tools { grid-template-columns: 1fr; }
  .admin-order-row { grid-template-columns: 50px minmax(200px, 1fr) minmax(140px, .7fr) max-content; }
  .admin-order-row-meta { display: none; }
}

@media (max-width: 720px) {
  .admin-dashboard { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; min-height: auto; padding: 12px; }
  .admin-brand { padding-bottom: 8px; }
  .admin-category-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-category-nav button { min-height: 48px; }
  .admin-return-link { display: none; }
  .admin-workspace-header { position: static; min-height: 0; align-items: flex-start; flex-direction: column; gap: 12px; }
  .admin-workspace-actions { width: 100%; justify-content: space-between; }
  .admin-overview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-ops-grid { grid-template-columns: 1fr; }
  .admin-grid .panel, .admin-grid > .panel { padding: 14px; }
  .admin-order-row { grid-template-columns: 46px minmax(0, 1fr) max-content; align-items: start; }
  .admin-order-row > :not(.admin-order-thumb):not(.button) { grid-column: 2; }
  .admin-order-row > .button { grid-column: 3; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *, .admin-body *::before, .admin-body *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* 2026-09 admin information architecture: compact primary navigation and
   three grouped website-content workspaces. */
.admin-dashboard {
  grid-template-columns: 188px minmax(0, 1fr);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 10px 14px;
}

.admin-brand {
  min-height: 42px;
  padding: 6px 9px 16px;
}

.admin-sidebar .admin-brand {
  grid-area: auto;
}

.admin-category-nav {
  flex: 0 0 auto;
  gap: 5px;
  margin-top: 4px;
}

.admin-category-nav button {
  display: flex;
  min-height: 39px;
  align-items: center;
  padding: 8px 11px 8px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.admin-category-nav button::before {
  content: "";
  width: 3px;
  height: 16px;
  margin-right: 9px;
  border-radius: 99px;
  background: #52627a;
  transition: height .18s ease, background .18s ease;
}

.admin-category-nav button:hover {
  border-color: rgba(148, 163, 184, .18);
}

.admin-category-nav button.active {
  border-color: rgba(56, 189, 248, .24);
  background: rgba(3, 105, 161, .72);
}

.admin-category-nav button.active::before {
  height: 22px;
  background: #7dd3fc;
}

.admin-category-nav button b {
  font-size: 13px;
  font-weight: 700;
}

.admin-content {
  width: 100%;
  padding: 0 22px 30px;
}

.admin-workspace-header {
  min-height: 82px;
  margin: 0 -22px 14px;
  padding: 12px 22px;
}

.admin-workspace-header h1 {
  font-size: 20px;
}

.admin-workspace-header p:not(.admin-workspace-kicker) {
  margin-top: 3px;
}

.admin-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.admin-grid .admin-view-panel,
.admin-grid > .admin-view-panel {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-view-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: #fff;
}

.admin-view-toolbar p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
}

.settings-layout {
  display: block;
  margin-top: 0;
}

.settings-subnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #eaf0f6;
}

.settings-subnav button {
  display: grid;
  min-height: 48px;
  align-content: center;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #526276;
  background: transparent;
  text-align: left;
}

.settings-subnav button b {
  color: inherit;
  font-size: 13px;
  font-weight: 760;
}

.settings-subnav button small {
  overflow: hidden;
  color: #7a889b;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-subnav button:hover {
  color: var(--admin-ink);
  background: rgba(255, 255, 255, .58);
}

.settings-subnav button.active {
  border-color: var(--admin-line);
  color: var(--admin-ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
}

.settings-subnav button.active small {
  color: var(--admin-muted);
}

.settings-content {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.settings-pane {
  grid-column: span 12;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.settings-pane[data-settings-pane="hero"],
.settings-pane[data-settings-pane="video"] {
  grid-column: span 6;
}

.settings-pane[data-settings-pane="featured"],
.settings-pane[data-settings-pane="products"] {
  grid-column: span 6;
}

.settings-pane[data-settings-pane="stats"],
.settings-pane[data-settings-pane="grid"] {
  grid-column: span 12;
}

.settings-pane > .panel-heading,
.settings-pane > .settings-pane-head {
  margin: -2px 0 8px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #e8edf3;
  border-radius: 0;
  background: transparent;
}

.settings-pane h3 {
  font-size: 15px;
}

.settings-pane .admin-form-grid,
.settings-pane .featured-editor-row,
.settings-pane .nav-editor-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.settings-pane label > span,
.settings-pane .admin-help {
  font-size: 11px;
}

.settings-pane input,
.settings-pane select,
.settings-pane textarea {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.settings-pane textarea {
  min-height: 72px;
}

.settings-pane .homepage-group {
  gap: 8px;
  padding: 10px;
}

.settings-pane .featured-editor-row,
.settings-pane .nav-editor-row,
.settings-pane .stats-editor-row {
  padding: 10px;
}

@media (max-width: 1040px) {
  .settings-pane[data-settings-pane="hero"],
  .settings-pane[data-settings-pane="video"],
  .settings-pane[data-settings-pane="stats"],
  .settings-pane[data-settings-pane="featured"],
  .settings-pane[data-settings-pane="products"],
  .settings-pane[data-settings-pane="grid"] {
    grid-column: span 12;
  }
}

@media (max-width: 1100px) {
  .admin-dashboard { grid-template-columns: 176px minmax(0, 1fr); }
  .admin-content { padding: 0 16px 24px; }
  .admin-workspace-header { margin-inline: -16px; padding-inline: 16px; }
  .settings-pane .admin-form-grid,
  .settings-pane .featured-editor-row,
  .settings-pane .nav-editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .admin-dashboard { grid-template-columns: 1fr; }
  .admin-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px;
    padding: 9px 10px 8px;
  }
  .admin-sidebar .admin-brand {
    grid-area: auto;
    grid-row: 1;
    min-height: 34px;
    padding: 3px 6px 5px;
  }
  .admin-category-nav {
    grid-row: 2;
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 2px 0 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-category-nav::-webkit-scrollbar { display: none; }
  .admin-category-nav button {
    flex: 0 0 108px;
    width: 108px;
    min-height: 38px;
    padding: 7px 8px;
    justify-content: center;
    text-align: center;
  }
  .admin-category-nav button::before { display: none; }
  .settings-subnav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-subnav button { min-height: 42px; padding-inline: 8px; text-align: center; }
  .settings-subnav button small { display: none; }
  .settings-pane[data-settings-pane] { grid-column: 1 / -1; }
  .settings-pane .admin-form-grid,
  .settings-pane .featured-editor-row,
  .settings-pane .nav-editor-row { grid-template-columns: 1fr; }
  .admin-view-toolbar { align-items: flex-start; }
}
.inventory-body .inventory-content,
.inventory-body .inventory-sidebar,
.inventory-body .inventory-modal-card,
.inventory-body .inventory-login { font-size: calc(1em * var(--inventory-font-scale)); }
.inventory-body .inventory-content { line-height: 1.55; }
.inventory-body .inventory-section p,
.inventory-body .inventory-page-head p:not(.inventory-kicker),
.inventory-body .inventory-filter-bar label,
.inventory-body .inventory-reconcile-controls label,
.inventory-body .inventory-record-filters label,
.inventory-body .inventory-form-grid label,
.inventory-body .inventory-section-head p { font-size: calc(14px * var(--inventory-font-scale)); }
.inventory-body .inventory-table th { font-size: calc(13px * var(--inventory-font-scale)); }
.inventory-body .inventory-table td { font-size: calc(14px * var(--inventory-font-scale)); }
.inventory-body .inventory-table small,
.inventory-body .inventory-status,
.inventory-body .inventory-form-status { font-size: calc(12px * var(--inventory-font-scale)); }
.inventory-body .inventory-nav button small { font-size: calc(11px * var(--inventory-font-scale)); }
.inventory-body .inventory-sync-status { font-size: calc(12px * var(--inventory-font-scale)); }
.inventory-body .inventory-content input,
.inventory-body .inventory-content select,
.inventory-body .inventory-content textarea { font-size: calc(14px * var(--inventory-font-scale)); }
.inventory-body .inventory-content input::placeholder,
.inventory-body .inventory-content textarea::placeholder { color: #64748b; opacity: 1; }
.inventory-body[data-inventory-font-scale="large"] .inventory-table,
.inventory-body[data-inventory-font-scale="xlarge"] .inventory-table { font-size: calc(13px * var(--inventory-font-scale)); }
.inventory-body[data-inventory-font-scale="large"] .inventory-table th,
.inventory-body[data-inventory-font-scale="large"] .inventory-table td,
.inventory-body[data-inventory-font-scale="xlarge"] .inventory-table th,
.inventory-body[data-inventory-font-scale="xlarge"] .inventory-table td { padding-top: 11px; padding-bottom: 11px; }
.inventory-body[data-inventory-font-scale="large"] .inventory-nav button small,
.inventory-body[data-inventory-font-scale="xlarge"] .inventory-nav button small { font-size: 11px; }
.inventory-app { grid-template-columns: 276px minmax(0, 1fr); background: var(--ux-bg); }
.inventory-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border: 0;
  padding: 22px 14px 16px;
  color: #d8e3f1;
  background: var(--ux-navy);
}
.inventory-brand {
  margin: 0 4px;
  padding: 2px 10px 20px;
  border-bottom: 1px solid rgba(226,232,240,.13);
}
.inventory-brand-mark { width: 40px; height: 40px; border-radius: 10px; color: #fff; background: var(--ux-blue); }
.inventory-brand b { color: #f8fafc; font-size: 18px; letter-spacing: .04em; }
.inventory-brand small { color: #91a5bd; }
.inventory-user-badge {
  margin: 16px 4px 12px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--ux-navy-2);
}
.inventory-user-badge span { color: #f8fafc; }
.inventory-user-badge small { color: #9fb0c5; }
.inventory-nav {
  gap: 3px;
  padding: 3px 2px;
  scrollbar-color: #38506e transparent;
}
.inventory-nav > span {
  margin: 18px 9px 7px;
  color: #7f94ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.inventory-nav button,
.inventory-nav button.active {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px 10px 17px;
  color: #c4d0df;
  background: transparent;
  text-align: left;
  line-height: 1.25;
  box-shadow: none;
  transform: none;
}
.inventory-nav button::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #617995;
  transform: translateY(-50%);
}
.inventory-nav button:hover {
  color: #fff;
  border-color: rgba(96,165,250,.24);
  background: rgba(37,99,235,.16);
}
.inventory-nav button.active {
  color: #fff;
  border-color: rgba(96,165,250,.34);
  background: var(--ux-navy-3);
}
.inventory-nav button.active::before {
  top: 50%;
  bottom: auto;
  left: 7px;
  width: 4px;
  height: 28px;
  border-radius: 3px;
  background: var(--ux-amber);
  transform: translateY(-50%);
}
.inventory-nav button b {
  display: block;
  color: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}
.inventory-nav button small {
  display: block;
  overflow: hidden;
  color: #8397ae;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-nav button.active small { color: #b9c9dc; }
.inventory-sidebar-bottom { margin-top: 14px; border-top-color: rgba(226,232,240,.13); padding: 14px 8px 0; }
.inventory-sidebar-bottom button,
.inventory-sidebar-bottom a { color: #aebdd0; border-radius: 8px; }
.inventory-sidebar-bottom button:hover,
.inventory-sidebar-bottom a:hover { color: #fff; background: rgba(37,99,235,.16); }
.inventory-version { color: #71859e; }
.inventory-content { padding: 34px clamp(22px, 4vw, 60px) 64px; }
.inventory-sync-status { border-color: #d7e0eb; color: #39536f; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.inventory-page-head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--ux-line); }
.inventory-page-head h1 { color: var(--ux-ink); font-weight: 800; letter-spacing: -.025em; }
.inventory-kicker { color: #1d4ed8; letter-spacing: .14em; }
.inventory-body .button { border-color: #cbd5e1; border-radius: 8px; color: #334155; background: #fff; }
.inventory-body .button.primary { border-color: var(--ux-blue); background: var(--ux-blue); }
.inventory-body .button.primary:hover { border-color: #1d4ed8; background: #1d4ed8; }
.inventory-body .button.danger { border-color: #dc2626; background: #dc2626; }
.inventory-metric,
.inventory-section,
.inventory-reconcile-card { border-color: var(--ux-line); border-radius: 12px; box-shadow: 0 3px 10px rgba(15,23,42,.035); }
.inventory-metric { min-height: 112px; padding: 17px; }
.inventory-metric strong,
.inventory-reconcile-card strong { color: var(--ux-ink); font-weight: 800; }
.inventory-section { padding: 20px; }
.inventory-section-head h2 { color: var(--ux-ink); }
.inventory-section-head p { color: var(--ux-muted); }
.inventory-table th { color: #475569; background: #f8fafc; border-bottom-color: var(--ux-line); }
.inventory-table td { color: #334155; border-bottom-color: #edf1f5; }
.inventory-table tbody tr:hover td { background: #f5f9ff; }
.inventory-filter-bar,
.inventory-reconcile-controls,
.inventory-record-filters { border-color: var(--ux-line); border-radius: 12px; background: #fff; }
.inventory-overview-grid { gap: 18px; }
.warehouse-action { border-color: var(--ux-line); border-radius: 12px; background: #fff; }
.warehouse-action:hover { border-color: #93c5fd; background: #f5f9ff; }
.inventory-body :focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }
@media (max-width: 900px) {
  .inventory-app { grid-template-columns: 236px minmax(0, 1fr); }
  .inventory-sidebar { padding-inline: 10px; }
}
@media (max-width: 620px) {
  .inventory-sidebar { padding: 12px 10px; }
  .inventory-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .inventory-nav > span { grid-column: 1 / -1; margin: 13px 6px 3px; }
  .inventory-nav button,
  .inventory-nav button.active { min-height: 54px; padding: 9px 8px 10px 15px; }
  .inventory-nav button small { font-size: 9px; }
}



/* High-contrast destructive-operation notice. Keep text dark on a pale amber
   surface so the warning remains readable in light and low-quality displays. */
.system-initialize-warning {
  margin: 1rem 0;
  border: 1px solid #f1c46a;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 13px 15px;
  color: #713f12 !important;
  background: #fff7d6 !important;
  line-height: 1.7;
  font-size: 13px;
  font-weight: 600;
}
.system-initialize-warning strong,
.system-initialize-warning span {
  display: block;
}
.system-initialize-warning strong {
  margin-bottom: 4px;
  color: #78350f;
}
.system-initialize-warning span + span {
  margin-top: 4px;
}
.system-initialize-countdown {
  min-height: 20px;
  margin: 10px 0 2px;
  color: #b45309;
  font-size: 12px;
  font-weight: 750;
}

.system-font-scale-setting output {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}
.system-font-scale-setting input[type="range"] {
  width: 100%;
  min-height: 30px;
  accent-color: #2563eb;
  cursor: pointer;
}
.system-font-scale-setting small { color: #64748b; line-height: 1.5; }
.system-font-family-setting small { color: #64748b; line-height: 1.5; }
.system-font-family-setting select { min-height: 42px; }

/* The mobile layout has a few intentionally compact labels. Keep them
   readable and let the precise slider override their fixed pixel sizes. */
@media (max-width: 880px) {
  .inventory-body .inventory-content,
  .inventory-body .inventory-sidebar,
  .inventory-body .inventory-login { font-size: 16px; }
  .inventory-body .inventory-page-head p:not(.inventory-kicker),
  .inventory-body .inventory-section-head p,
  .inventory-body .inventory-section p { font-size: 14px; }
  .inventory-body .inventory-nav button b { font-size: 13px; }
  .inventory-body .inventory-nav button small { font-size: 10px; }
  .inventory-body .inventory-table th { font-size: 13px; }
  .inventory-body .inventory-table td { font-size: 14px; }
  .inventory-body input,
  .inventory-body select,
  .inventory-body textarea { font-size: 16px; }
}
.system-initialize-warning::before {
  content: "注意";
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #fff;
  background: #b45309;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}


/* Account form alignment and readable entered values. Each field keeps its
   own content height so helper text in one column cannot push the neighbour
   input downward. */
#accountForm.inventory-form-grid {
  align-items: start;
  grid-auto-rows: max-content;
}
#accountForm.inventory-form-grid > label {
  align-content: start;
  align-items: start;
  min-height: 0;
}
#accountForm.inventory-form-grid > label > input,
#accountForm.inventory-form-grid > label > select {
  align-self: start;
  min-height: 44px;
  color: #172033 !important;
  background: #fff;
  opacity: 1;
}
#accountForm.inventory-form-grid > label > input[name="username"] {
  color: #0f172a !important;
  font-weight: 650;
  letter-spacing: .01em;
}
#accountForm.inventory-form-grid > label > small {
  min-height: 16px;
  color: #64748b;
  line-height: 1.35;
}
#accountForm.inventory-form-grid > label:nth-child(2) { padding-top: 0; }

#accountForm.inventory-form-grid > label > input[name="username"]:disabled {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  opacity: 1;
  background: #f8fafc;
}
#accountForm.inventory-form-grid > label > input::placeholder { color: #94a3b8; opacity: 1; }


/* System management: use the available width deliberately instead of leaving
   a tall empty column beside the compact status card. */
.system-management-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.system-management-layout .system-status-card {
  grid-column: 1 / -1;
  grid-row: 1;
}
.system-management-layout .system-settings-card {
  grid-column: 1;
  grid-row: 2;
}
.system-management-layout .system-initialize-card {
  grid-column: 2;
  grid-row: 2;
}
.system-management-layout .system-backup-card {
  grid-column: 1 / -1;
  grid-row: 3;
}
.system-management-layout .system-status-detail {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.system-management-layout .system-status-detail > div {
  min-height: 64px;
  padding: 11px 12px;
}
.system-management-layout .system-settings-card,
.system-management-layout .system-initialize-card { min-height: 100%; }
@media (max-width: 900px) {
  .system-management-layout { grid-template-columns: 1fr; }
  .system-management-layout .system-status-card,
  .system-management-layout .system-settings-card,
  .system-management-layout .system-initialize-card,
  .system-management-layout .system-backup-card { grid-column: 1; grid-row: auto; }
  .system-management-layout .system-status-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .system-management-layout .system-status-detail { grid-template-columns: 1fr; }
}


/* System branding is text-only; preserve balanced spacing after removing logo marks. */
.inventory-login-header { gap: 0; }
.inventory-brand { gap: 0; }
.warehouse-launchpad-head { display: flex; align-items: center; gap: 14px; }


/* Final mobile pass — one stable horizontal action rail, no stretched grid
   buttons and no layout jumps when a tab is selected. */
@media (max-width: 880px) {
  .inventory-app { display: block; min-width: 0; }
  .inventory-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 12px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid #dbe3ee;
    background: var(--ux-navy);
    overflow: hidden;
  }
  .inventory-brand { grid-column: 1; grid-row: 1; align-self: center; padding: 4px 8px 10px; border-bottom: 0; }
  .inventory-user-badge { grid-column: 1 / -1; grid-row: 2; margin: 0 4px 9px; }
  .inventory-sidebar-bottom {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    border-top: 0;
    padding: 0 2px 8px 8px;
  }
  .inventory-sidebar-bottom button,
  .inventory-sidebar-bottom a { min-height: 40px; padding: 8px 10px; border: 1px solid rgba(148,163,184,.28); color: #d8e3f1; background: rgba(30,42,63,.88); }
  .inventory-version { display: none; }
  .inventory-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex !important;
    align-items: stretch;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 7px;
    width: 100%;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    padding: 3px 2px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #47617f transparent;
    scroll-snap-type: x proximity;
  }
  .inventory-nav > span { display: none !important; }
  .inventory-nav button,
  .inventory-nav button.active {
    position: relative;
    flex: 0 0 122px;
    width: 122px;
    min-width: 122px;
    max-width: 122px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    display: grid;
    align-content: center;
    justify-items: stretch;
    gap: 3px;
    padding: 7px 9px 7px 17px;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 9px;
    color: #c4d0df;
    background: rgba(30,42,63,.9);
    text-align: left;
    line-height: 1.2;
    overflow: hidden;
    scroll-snap-align: start;
  }
  .inventory-nav button:hover { border-color: rgba(96,165,250,.35); background: rgba(37,99,235,.2); }
  .inventory-nav button.active { border-color: rgba(96,165,250,.5); color: #fff; background: var(--ux-navy-3); }
  .inventory-nav button::before,
  .inventory-nav button.active::before { left: 7px; top: 50%; bottom: auto; width: 3px; height: 5px; border-radius: 99px; background: #617995; transform: translateY(-50%); }
  .inventory-nav button.active::before { height: 26px; background: var(--ux-amber); }
  .inventory-nav button b { width: 100%; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-nav button small { display: block; width: 100%; overflow: hidden; color: #8da0b6; font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-nav button.active small { color: #c4d0df; }
  .inventory-content { width: 100%; min-width: 0; padding: 22px 14px 46px; }
}
@media (max-width: 520px) {
  .inventory-sidebar { padding-inline: 9px; }
  .inventory-brand { padding-inline: 5px; }
  .inventory-brand b { font-size: 16px; }
  .inventory-user-badge { margin-inline: 2px; }
  .inventory-sidebar-bottom button,
  .inventory-sidebar-bottom a { min-height: 38px; padding: 7px 8px; font-size: 11px; }
  .inventory-nav { gap: 6px; height: 56px; min-height: 56px; max-height: 56px; }
  .inventory-nav button,
  .inventory-nav button.active { flex-basis: 116px; width: 116px; min-width: 116px; max-width: 116px; height: 48px; min-height: 48px; max-height: 48px; }
  .inventory-nav button b { font-size: 11px; }
  .inventory-nav button small { font-size: 8px; }
  .inventory-content { padding: 18px 11px 40px; }
  .inventory-page-head { gap: 10px; margin-bottom: 18px; }
  .inventory-page-head h1 { font-size: 23px; }
  .inventory-metrics { gap: 7px; }
  .inventory-metric { min-height: 88px; padding: 11px; }
  .inventory-section { padding: 13px; }
}


@media (max-width: 880px) {
  html, body.inventory-body { overflow-x: hidden; }
  .inventory-nav button,
  .inventory-nav button.active { flex-shrink: 0; }
  .inventory-sync-status {
    top: 8px;
    right: 8px;
    max-width: calc(100vw - 16px);
    min-height: 28px;
    padding: 5px 8px;
    font-size: 10px;
  }
  .inventory-page-head > div:first-child { min-width: 0; }
  .inventory-page-head p:not(.inventory-kicker) { max-width: 62ch; }
  .inventory-head-actions { min-width: 0; }
  .inventory-table-shell { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .inventory-modal { padding: 10px; }
  .inventory-modal-card { width: 100%; max-width: 100%; max-height: calc(100dvh - 20px); padding: 16px; border-radius: 12px; }
  .inventory-modal-head { margin-bottom: 14px; }
}
@media (max-width: 520px) {
  .inventory-content { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .inventory-sync-status span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-page-head p:not(.inventory-kicker) { font-size: 12px; }
  .inventory-head-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .inventory-head-actions .button { min-width: 0; }
  .inventory-modal-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .inventory-modal-actions .button { width: 100%; }
}

/* Font scaling must also give the two-line sidebar navigation room to grow.
   Older responsive rules intentionally used fixed heights, which clipped the
   helper line (for example, the text under “订单管理”) at 115%–130%. */
.inventory-body .inventory-nav button,
.inventory-body .inventory-nav button.active {
  height: auto;
  min-height: calc(56px * var(--inventory-font-scale, 1));
  max-height: none;
}
.inventory-body .inventory-nav button b,
.inventory-body .inventory-nav button small {
  line-height: 1.3;
}

@media (max-width: 880px) {
  .inventory-body .inventory-nav {
    height: auto;
    min-height: calc(58px * var(--inventory-font-scale, 1));
    max-height: none;
  }
  .inventory-body .inventory-nav button,
  .inventory-body .inventory-nav button.active {
    height: auto;
    min-height: calc(50px * var(--inventory-font-scale, 1));
    max-height: none;
  }
}


/* Keep the material-gap content centered within the same page gutter on both sides. */
.material-gap-page-content {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}

/* Final mobile readability pass. These values are the 100% baseline; the
   system font slider scales them proportionally from 90% to 130%. */
@media (max-width: 880px) {
  .inventory-body .inventory-page-head h1 { font-size: 25px; }
  .inventory-body .inventory-page-head p:not(.inventory-kicker),
  .inventory-body .inventory-section-head p,
  .inventory-body .inventory-section p,
  .inventory-body .inventory-empty,
  .inventory-body .inventory-form-status { font-size: 14px; line-height: 1.55; }
  .inventory-body .inventory-kicker { font-size: 12px; }
  .inventory-body .inventory-section-head h2 { font-size: 18px; }
  .inventory-body .inventory-table th { font-size: 13px; }
  .inventory-body .inventory-table td { font-size: 14px; line-height: 1.45; }
  .inventory-body .inventory-table td small { font-size: 12px; }
  .inventory-body .inventory-filter-bar label,
  .inventory-body .inventory-reconcile-controls label,
  .inventory-body .inventory-record-filters label,
  .inventory-body .inventory-form-grid label { font-size: 13px; }
  .inventory-body input,
  .inventory-body select,
  .inventory-body textarea { min-height: 42px; font-size: 16px; }
  .inventory-body .inventory-nav button b { font-size: 13px; }
  .inventory-body .inventory-nav button small { font-size: 10px; }
}

/* Product management should use the full workspace width while keeping each
   product card compact enough for quick scanning. */
.product-admin-list {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.product-summary-card {
  min-width: 0;
  min-height: 0;
}

.product-summary-card > .button {
  width: 100%;
}

.product-summary-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
  min-width: 0;
}

.product-summary-head > div {
  min-width: 0;
}

.product-sort-number {
  align-self: start;
  padding: 3px 7px;
  border: 1px solid var(--admin-line, var(--line));
  border-radius: 5px;
  color: var(--admin-muted, var(--muted));
  background: var(--admin-canvas, #f5f7fa);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.product-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line, var(--line));
  border-radius: 9px;
  background: #fff;
}

.product-admin-toolbar > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-admin-toolbar strong {
  color: var(--admin-ink, var(--ink));
  font-size: 13px;
}

.product-admin-toolbar small,
.product-order-status {
  color: var(--admin-muted, var(--muted));
  font-size: 11px;
}

.product-admin-toolbar label {
  min-width: 170px;
  margin: 0;
}

.product-admin-toolbar label span {
  font-size: 11px;
}

.product-admin-toolbar select {
  min-height: 34px;
  padding-block: 6px;
}

.product-order-status {
  min-width: 112px;
  align-self: center;
  text-align: right;
}

@media (max-width: 720px) {
  .product-admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .product-admin-toolbar > div,
  .product-order-status {
    grid-column: 1 / -1;
  }

  .product-admin-toolbar label {
    min-width: 0;
  }

  .product-admin-toolbar .button {
    width: 100%;
  }
}

/* Product page mobile containment: keep every configurator surface inside the
   viewport while preserving the desktop composition at larger widths. */
.product-page,
.product-page main,
.product-page .section,
.product-page .product-config-section,
.product-page .quote-layout,
.product-page .amazon-order-form,
.product-page .order-product-preview,
.product-page .order-config-main,
.product-page .order-buy-box {
  min-width: 0;
}

.product-page {
  overflow-x: hidden;
}

/* Closed dialogs must leave the document's layout entirely. Their hidden
   upload/radio controls are positioned elements and can otherwise create a
   phantom horizontal scroll area on narrow screens. */
.product-page .service-config-modal:not(.open),
.product-page .order-review-modal:not(.open),
.product-page .cart-modal:not(.open) {
  display: none;
}

.product-page .service-config-modal.open,
.product-page .order-review-modal.open,
.product-page .cart-modal.open {
  display: grid;
}

/* Keep the visually-hidden option control anchored to its own chip. Without
   a positioned label, the global input width rule can make the radio input
   span the whole form and create horizontal overflow on mobile. */
.product-page .option-chip {
  position: relative;
  min-width: 0;
}

.product-page .option-chip input {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.product-page img,
.product-page input,
.product-page select,
.product-page textarea,
.product-page button {
  max-width: 100%;
}

@media (max-width: 720px) {
  .product-page .shop-list-section,
  .product-page .product-config-section {
    width: 100%;
    max-width: 100%;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    overflow-x: hidden;
  }

  .product-page .shop-list-heading,
  .product-page .shop-product-grid,
  .product-page .amazon-order-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-page .shop-list-heading h1,
  .product-page .shop-list-heading p,
  .product-page .shop-product-card h3,
  .product-page .shop-product-card p {
    overflow-wrap: anywhere;
  }

  .product-page .amazon-order-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .product-page .order-product-preview {
    position: static;
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .product-page .order-gallery,
  .product-page .order-main-image {
    width: 100%;
    max-width: 100%;
  }

  .product-page .order-main-image {
    aspect-ratio: 4 / 3;
    min-height: 210px;
    max-height: none;
    border-radius: 14px;
  }

  .product-page .order-main-image img {
    padding: 10px;
  }

  .product-page .order-image-thumbs {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .product-page .order-image-thumbs::-webkit-scrollbar {
    display: none;
  }

  .product-page .order-image-thumbs button {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }

  .product-page .order-product-preview h3 {
    max-width: 100%;
    margin: 0;
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .product-page .order-product-preview p {
    max-width: 100%;
    margin: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .product-page .order-config-main {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 9px;
  }

  .product-page .options-grid,
  .product-page .shipping-fields,
  .product-page .order-config-main .form-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .product-page .option-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
  }

  .product-page .option-chip,
  .product-page .option-chip span,
  .product-page .option-chip .color-option-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .product-page .option-chip span {
    min-height: 42px;
    padding: 8px 7px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .product-page .option-chip .color-option-content {
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 6px;
  }

  .product-page .color-option-content b,
  .product-page .color-option-content em {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .product-page .accessory-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-page .accessory-card {
    min-width: 0;
    padding: 9px;
  }

  .product-page .accessory-card strong {
    overflow-wrap: anywhere;
  }

  .product-page .shipping-fields {
    padding: 9px;
    gap: 8px;
  }

  .product-page .shipping-fields .featured-span-2 {
    grid-column: auto;
  }

  .product-page .shipping-fields input,
  .product-page .shipping-fields select,
  .product-page .order-config-main input,
  .product-page .order-config-main select,
  .product-page .order-config-main textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .product-page .order-buy-box,
  .product-page .quantity-panel {
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }

  .product-page .order-buy-box .price-panel {
    width: 100%;
    max-width: 100%;
  }

  .product-page .order-buy-box .price-panel div {
    grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
    gap: 8px;
    padding: 9px 10px;
  }

  .product-page .order-buy-box .price-panel span {
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .product-page .order-buy-box .price-panel strong {
    min-width: 0;
    font-size: 17px;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .product-page .service-config-entry,
  .product-page .service-config-button,
  .product-page .order-submit-actions {
    width: 100%;
    max-width: 100%;
  }

  .product-page .service-config-button {
    min-width: 0;
    padding: 12px;
  }

  .product-page .service-config-button span {
    min-width: 0;
  }

  .product-page .service-config-button strong,
  .product-page .service-config-button small {
    overflow-wrap: anywhere;
  }

  .product-page .service-config-modal,
  .product-page .order-review-modal,
  .product-page .cart-modal {
    padding: 10px;
  }

  .product-page .service-config-dialog,
  .product-page .order-review-dialog,
  .product-page .cart-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px;
    border-radius: 14px;
  }

  .product-page .service-config-head,
  .product-page .order-review-head,
  .product-page .cart-head {
    min-width: 0;
    gap: 10px;
  }

  .product-page .service-config-head > div,
  .product-page .order-review-head > div,
  .product-page .cart-head > div {
    min-width: 0;
  }

  .product-page .service-config-head strong,
  .product-page .order-review-head strong,
  .product-page .cart-head h2 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .product-page .service-config-head p,
  .product-page .order-review-head p,
  .product-page .cart-head p:not(.eyebrow) {
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .product-page .service-config-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .product-page .service-config-tab {
    min-width: 0;
    padding: 0 5px;
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .product-page .mode-switch,
  .product-page .mode-switch.two-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-page .mode-switch:not(.two-mode) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-page .mode-switch:not(.two-mode) label:first-child {
    grid-column: auto;
  }

  .product-page .mode-switch span {
    min-width: 0;
    min-height: 40px;
    padding: 7px 4px;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .product-page .partition-toolbar,
  .product-page .partition-row,
  .product-page .partition-row-fields,
  .product-page .partition-row-flags {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-page .partition-row-fields,
  .product-page .partition-row-flags,
  .product-page .partition-password-field {
    grid-column: 1;
  }

  .product-page .order-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-page .order-review-actions,
  .product-page .cart-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .product-page .order-review-actions .button,
  .product-page .cart-actions .button,
  .product-page .order-submit-actions .button {
    width: 100%;
    min-height: 44px;
  }

  .product-page .cart-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 9px;
  }

  .product-page .cart-item-price {
    grid-column: 2;
    justify-items: start;
  }
}

@media (max-width: 380px) {
  .product-page .option-chip-grid,
  .product-page .accessory-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-page .service-config-tabs,
  .product-page .mode-switch:not(.two-mode) {
    grid-template-columns: minmax(0, 1fr);
  }
}
