:root {
  --ink: #201b18;
  --muted: #776f68;
  --line: #e8ded4;
  --paper: #fffaf5;
  --surface: #ffffff;
  --rose: #b66573;
  --rose-dark: #8d3f52;
  --gold: #c49a5d;
  --green: #2e7d58;
  --blue: #305f8e;
  --danger: #9f3a38;
  --shadow: 0 16px 45px rgba(49, 37, 25, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f6efe8;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shop-header,
.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(116deg, rgba(255, 246, 236, 0.96), rgba(232, 176, 162, 0.9) 48%, rgba(92, 67, 72, 0.92)),
    #f8efe8;
  box-shadow: 0 10px 30px rgba(72, 49, 41, 0.12);
}

.logo-wrap,
.admin-brand img {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(59, 36, 24, 0.16);
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-brand img {
  object-fit: cover;
}

.shop-title,
.admin-brand div {
  flex: 1;
  min-width: 0;
}

.shop-title p,
.admin-brand p,
.eyebrow {
  margin: 0;
  color: #5a403d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shop-title h1,
.admin-brand h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

.cart-pill,
.primary-button,
.ghost-button,
.danger-button,
.product-card .add-button,
.toggle-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.cart-pill,
.primary-button {
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
}

.cart-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 8px;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
}

.customer-account-button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  max-width: 210px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  text-align: left;
}

.customer-account-button span,
.customer-account-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-account-button small {
  color: var(--rose-dark);
  font-size: 11px;
}

.shop-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 18px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 32px) 28px;
}

.storefront-hero {
  position: relative;
  isolation: isolate;
  grid-column: 1 / -1;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(86, 55, 37, 0.2);
  border-radius: 10px;
  background: #160f0d;
  box-shadow: 0 14px 34px rgba(49, 28, 19, 0.18);
  animation: storefrontHeroFade 0.8s ease-out both;
}

.storefront-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(17, 10, 8, 0.04) 35%, rgba(17, 10, 8, 0.64) 58%, rgba(10, 6, 5, 0.9) 100%);
}

.storefront-hero-media,
.storefront-hero-media img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.storefront-hero-media img {
  object-fit: cover;
  object-position: center;
}

.storefront-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 52%;
  min-height: 260px;
  margin-left: auto;
  padding: 24px clamp(24px, 4vw, 54px);
  color: #fff;
}

.storefront-hero-content h2 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(25px, 2.7vw, 40px);
  line-height: 1.08;
  text-wrap: balance;
  text-transform: uppercase;
}

.storefront-hero-content p {
  margin: 12px 0 18px;
  color: #f2d8ad;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 800;
  text-transform: uppercase;
}

.storefront-hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease;
}

.storefront-hero-button:hover,
.storefront-hero-button:focus-visible {
  background: #fff;
  transform: translateY(-1px);
}

.maintenance-notice {
  margin: 14px 0;
  padding: 12px 16px;
  border: 1px solid #e6b765;
  border-radius: 8px;
  color: #6c4614;
  background: #fff3d9;
  font-weight: 800;
  text-align: center;
}

@keyframes storefrontHeroFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-panel,
.cart-panel,
.checkout-card,
.admin-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.94);
  box-shadow: 0 8px 28px rgba(66, 45, 28, 0.08);
}

.brand-panel,
.cart-panel {
  position: sticky;
  top: 108px;
  height: calc(100vh - 126px);
  padding: 16px;
  overflow: auto;
}

.panel-title {
  margin-bottom: 10px;
  font-weight: 900;
}

.brand-list {
  display: grid;
  gap: 7px;
}

.brand-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.brand-list button.active {
  border-color: #d8c3af;
  background: #fff;
}

.collection-chip {
  color: #7a3d50;
  background: #f7e8ed;
}

.catalog-area {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.search-box {
  flex: 1 1 260px;
  min-width: 220px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-box input,
.form-grid input,
textarea,
select,
.admin-filters input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.search-box input,
.form-grid input,
select,
.admin-filters input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

.segment {
  display: inline-flex;
  flex: 1 1 360px;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  scrollbar-width: none;
}

.segment::-webkit-scrollbar {
  display: none;
}

.segment button {
  flex: 0 0 auto;
  min-width: 68px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.segment button.active {
  color: #fff;
  background: var(--rose-dark);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-card.preorder {
  border-color: #d9b66f;
  box-shadow: inset 0 3px 0 #d9b66f;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
}

.product-image-button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f8f4ee;
}

.product-image-button img {
  display: block;
}

.product-image-button:focus-visible {
  outline: 3px solid rgba(141, 63, 82, 0.34);
  outline-offset: -3px;
}

.volume-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  color: #fff;
  background: rgba(32, 27, 24, 0.88);
  box-shadow: 0 3px 10px rgba(31, 22, 18, 0.2);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.product-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f4ece4;
  color: #5f4f44;
  font-size: 12px;
  font-weight: 800;
}

.chip.blue {
  color: #244c78;
  background: #e5eef7;
}

.chip.rose {
  color: #8a3d55;
  background: #f8e5ea;
}

.chip.gold {
  color: #7a4c13;
  background: #fff1cf;
}

.chip.preorder-chip {
  color: #70480d;
  background: #fff0c9;
}

.preorder-note {
  width: fit-content;
  margin: -2px 0 7px;
  padding: 3px 7px;
  border-radius: 5px;
  color: #70480d;
  background: #fff0c9;
  font-size: 11px;
  font-weight: 900;
}

.order-item-preorder {
  width: fit-content;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  color: #70480d;
  background: #fff0c9;
  font-size: 11px;
  font-weight: 900;
}

.chip.sold-out-chip {
  color: #8b2d2b;
  background: #fae2e1;
}

.product-card h3 {
  margin: 0;
  min-height: 42px;
  font-size: 15px;
  line-height: 1.35;
}

.product-sku {
  margin: 0;
  min-height: 18px;
  color: #6d5d53;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.product-sku.compact {
  min-height: 0;
  margin: -3px 0 7px;
  font-size: 11px;
}

.product-sku.detail-sku {
  min-height: 0;
  margin-top: 7px;
  font-size: 14px;
}

.product-card .add-button {
  width: 100%;
  margin-top: auto;
  color: #fff;
  background: var(--rose-dark);
}

.product-package-select,
.detail-package-spec-field {
  display: grid;
  gap: 5px;
  color: #6d5d53;
  font-size: 11px;
  font-weight: 900;
}

.product-package-select select,
.detail-package-spec-field select {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ddcec2;
  border-radius: 8px;
  color: #2c2420;
  background: #fff;
  font: inherit;
}

.product-card.sold-out img {
  opacity: 0.72;
}

.product-card .add-button:disabled,
#detailAddButton:disabled {
  cursor: not-allowed;
  color: #7b6b62;
  background: #e6ddd4;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-row h2 {
  margin: 0;
  font-size: 20px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

.mobile-only {
  display: none;
}

.cart-items,
.checkout-summary {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.order-edit-notice {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #e4cbbf;
  border-radius: 8px;
  background: #fff8f2;
  color: var(--text);
  font-size: 13px;
}

.order-edit-notice button {
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  color: var(--rose-dark);
  background: #f8e5ea;
}

.cart-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cart-item img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.cart-item h4 {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.25;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-row button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.empty-state {
  padding: 28px;
  border: 1px dashed #d3c2b2;
  border-radius: 8px;
  color: var(--muted);
  background: #fffaf5;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 18, 15, 0.48);
}

.checkout-card {
  width: min(680px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  padding: 20px;
}

.customer-auth-card {
  width: min(500px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf5;
  box-shadow: var(--shadow);
}

.customer-auth-card h2,
.customer-profile-head h3 {
  margin: 2px 0 0;
}

.customer-auth-help {
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.customer-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6eee7;
}

.customer-auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-weight: 900;
}

.customer-auth-tabs button.active {
  color: #fff;
  background: var(--rose-dark);
}

.customer-auth-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.customer-auth-form label {
  display: grid;
  gap: 6px;
  color: #4b4039;
  font-weight: 800;
}

.customer-auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
}

.customer-auth-form label small {
  color: var(--muted);
  font-size: 11px;
}

.customer-auth-form .primary-button,
#customerLogoutButton {
  width: 100%;
}

.customer-profile-head {
  margin: 18px 0 14px;
  text-align: center;
}

.customer-profile-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.customer-profile-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 auto 14px;
  max-width: 220px;
}

.customer-profile-stats article {
  display: grid;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.customer-profile-stats strong {
  font-size: 24px;
}

.customer-profile-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-activity-message {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 8px;
  color: #62461e;
  background: #fff0cf;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.checkout-card input[readonly] {
  color: var(--muted);
  background: #f3ede7;
}

.product-detail-card {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.98);
  box-shadow: var(--shadow);
}

.product-detail-card h2 {
  margin: 2px 0 0;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.15;
}

.detail-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: min(62vh, 680px);
  min-height: 300px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-image-open {
  position: absolute;
  inset: 0;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  padding: 12px;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}

.detail-stage img {
  position: absolute;
  inset: 12px;
  display: block;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  background: #fff;
}

.detail-volume-badge {
  right: 18px;
  bottom: 18px;
  z-index: 4;
}

.image-viewer-open {
  overflow: hidden;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  background: rgba(15, 13, 12, 0.94);
}

.image-viewer-toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 102;
  display: flex;
  gap: 8px;
}

.image-viewer-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #fff;
  background: rgba(24, 20, 18, 0.82);
  font-size: 22px;
  font-weight: 800;
}

.image-viewer-toolbar button:disabled {
  cursor: default;
  opacity: 0.42;
}

#resetImageZoom {
  min-width: 68px;
  font-size: 14px;
}

.image-viewer-surface {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 76px 20px 20px;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.image-viewer-surface:active {
  cursor: grabbing;
}

.image-viewer-surface img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.08s ease-out;
  will-change: transform;
  pointer-events: none;
}

.viewer-volume-badge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 102;
}

.detail-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(232, 222, 212, 0.82);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(40, 27, 20, 0.12);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

#detailPrev {
  left: 12px;
}

#detailNext {
  right: 12px;
}

.detail-nav:disabled {
  cursor: default;
  opacity: 0.28;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 4px;
}

.detail-thumbs button {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #fff;
}

.detail-thumbs button.active {
  border-color: var(--rose-dark);
}

.detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fragrance-notes-card {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #e2d5c9;
  border-left: 4px solid var(--rose-dark);
  border-radius: 8px;
  background: #fff;
}

.fragrance-notes-card h3 {
  margin: 0 0 6px;
  color: var(--rose-dark);
  font-size: 14px;
}

.fragrance-notes-card p {
  margin: 0;
  color: #4f443d;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.detail-package-spec-field {
  min-width: 190px;
  margin: 0;
}

.detail-actions .primary-button {
  min-width: 142px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-card label,
.delivery-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #4b4039;
  font-weight: 800;
}

.delivery-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.radio-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  font-weight: 700 !important;
}

.radio-row input {
  width: 18px;
  height: 18px;
}

.checkout-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.checkout-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.admin-header {
  justify-content: space-between;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(128deg, rgba(255, 250, 245, 0.92), rgba(231, 196, 209, 0.84), rgba(58, 39, 62, 0.92)),
    #f6efe8;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.96);
  box-shadow: var(--shadow);
}

.login-card img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(59, 36, 24, 0.16);
}

.login-card p {
  margin: 0;
  color: #5a403d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card h1 {
  margin: -8px 0 4px;
  font-size: 28px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.language-select {
  min-width: 132px;
  height: 44px;
  padding: 0 34px 0 14px;
  border: 1px solid rgba(217, 205, 193, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 800;
}

.login-card .language-select {
  width: 100%;
}

.login-error {
  padding: 10px 12px;
  border-radius: 6px;
  color: #8b2d2b;
  background: #fae2e1;
  font-weight: 800;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-badge {
  margin-top: 6px;
  color: rgba(38, 27, 24, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.admin-tools,
.admin-filters,
.admin-product-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-product-tools {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-ranking-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.inventory-ranking-head,
.inventory-ranking-tools,
.inventory-ranking-export-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inventory-ranking-head {
  justify-content: space-between;
}

.inventory-ranking-head h3 {
  margin: 3px 0 5px;
  font-size: clamp(20px, 2vw, 28px);
}

.inventory-ranking-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.inventory-ranking-tools {
  align-items: flex-end;
  flex-direction: column;
}

.inventory-ranking-export-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-ranking-export-actions button {
  min-height: 40px;
}

.inventory-ranking-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.inventory-ranking-toggle-chevron {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.inventory-ranking-toggle[aria-expanded="true"] .inventory-ranking-toggle-chevron {
  transform: rotate(180deg);
}

.inventory-ranking-table-wrap {
  max-height: 520px;
}

.inventory-ranking-table-wrap[hidden] {
  display: none;
}

.inventory-ranking-table th {
  position: sticky;
  z-index: 2;
  top: 0;
}

.inventory-ranking-table .inventory-ranking-zero td {
  background: rgba(197, 65, 65, 0.06);
}

.inventory-ranking-table .inventory-ranking-unset td {
  color: var(--muted);
  background: rgba(110, 101, 97, 0.045);
}

.inventory-low-stock-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid rgba(196, 131, 28, 0.3);
  border-radius: 14px;
  color: #70460b;
  background: #fff7e7;
}

.inventory-low-stock-notice[hidden] {
  display: none;
}

.inventory-low-stock-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: #c4831c;
}

.inventory-low-stock-notice strong,
.inventory-low-stock-notice p,
.inventory-low-stock-notice small {
  display: block;
}

.inventory-low-stock-notice p {
  margin: 4px 0;
  font-weight: 700;
  line-height: 1.45;
}

.inventory-low-stock-notice small {
  opacity: 0.8;
  line-height: 1.4;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.danger-button {
  padding: 0 14px;
  color: #fff;
  background: var(--danger);
}

.admin-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 20px clamp(14px, 3vw, 32px) 32px;
}

.admin-page.members-tab-active .admin-shell {
  width: min(1840px, 100%);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 900;
}

.admin-tabs button.active {
  color: #fff;
  background: var(--ink);
}

.admin-section {
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.section-head > div:first-child {
  flex: 1;
  min-width: 180px;
}

.section-head > select {
  width: min(260px, 100%);
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.order-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.order-search-form input {
  width: min(320px, 38vw);
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.order-search-form button {
  min-height: 42px;
}

.section-actions select,
.section-actions .order-date-filter {
  width: min(260px, 100%);
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.stats-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stats-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.stats-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.stats-card:hover,
.stats-card.active {
  border-color: #9c3f59;
  background: #fff3f7;
}

.stats-card:active {
  transform: translateY(1px);
}

.stats-card.clear-filter {
  background: #f8f2eb;
}

.stats-card.stats-total-card {
  border-color: #b98a52;
  background: #fff3e4;
}

.stats-card.stats-total-card b {
  color: #8a4b16;
}

.completed-orders-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-receipts-panel {
  margin-bottom: 16px;
}

.inventory-receipt-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  align-items: end;
  gap: 12px;
}

.inventory-receipt-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.inventory-receipt-form input,
.inventory-receipt-form select {
  width: 100%;
  min-height: 42px;
}

.inventory-receipt-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.receipt-query-controls { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.ranking-region-control, .receipt-query-controls label { display: grid; gap: 4px; font-weight: 700; }

.inventory-receipts-panel + .stats-panel .completed-orders-summary {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.completed-orders-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.completed-summary-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.completed-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.completed-summary-card strong {
  font-size: 24px;
}

.completed-orders-table-wrap {
  max-height: min(56vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-gutter: stable;
}

.completed-orders-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.completed-orders-table th,
.completed-orders-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.completed-orders-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f2eb;
  color: var(--muted);
  font-size: 13px;
}

.completed-orders-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-amount-value {
  color: #1e6a47;
}

@media (max-width: 720px) {
  .completed-orders-actions {
    width: 100%;
    justify-content: stretch;
  }

  .completed-orders-actions button {
    flex: 1 1 145px;
  }

  .completed-orders-table-wrap {
    max-height: 50vh;
  }

  .completed-orders-summary {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .order-payment-fields {
    grid-template-columns: 1fr;
  }

  .order-footer-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-note-field {
    grid-column: 1 / -1;
  }

  .order-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-action-buttons button,
  .order-action-buttons .order-save-button {
    min-width: 0;
    width: 100%;
  }

  .order-action-buttons .order-delete-button {
    grid-column: 1 / -1;
  }

  .package-price-grid {
    grid-template-columns: 1fr;
  }

  .combined-payment-rows {
    grid-template-columns: 1fr;
  }

  .payment-option-row {
    grid-template-columns: 22px minmax(54px, auto) minmax(100px, 1fr);
  }
}

.product-insights {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.product-insights > * {
  min-width: 0;
  width: 100%;
}

.inventory-total,
.brand-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inventory-total {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  padding: 14px;
}

.inventory-total span,
.inventory-total em,
.brand-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.inventory-total strong {
  font-size: 38px;
  line-height: 1;
}

.brand-summary-grid {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px 0 2px;
}

.brand-summary-card {
  flex: 0 0 170px;
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 10px 12px;
  text-align: left;
}

.brand-summary-card.active {
  border-color: #b98a52;
  background: #fff7ed;
}

.brand-summary-card strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-card strong {
  font-size: 15px;
}

.stats-card span,
.stats-card em,
.stats-card .stats-card-amount {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.stats-card .stats-card-amount {
  color: #176b4a;
  font-variant-numeric: tabular-nums;
}

.stats-card b {
  font-size: 30px;
  line-height: 1;
}

.ranking-head {
  align-items: center;
}

.ranking-week-label,
.ranking-timezone {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ranking-timezone {
  margin: -4px 0 14px;
}

.ranking-toolbar {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.ranking-view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f1eb;
}

.ranking-view-switch button {
  min-height: 38px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.ranking-view-switch button.active {
  color: #fff;
  background: var(--ink);
}

.ranking-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ranking-controls input,
.ranking-controls button {
  min-height: 42px;
}

.ranking-controls input {
  padding: 0 10px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.ranking-controls .ghost-button {
  border-color: var(--line);
}

.ranking-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ranking-export-panel {
  display: grid;
  gap: 6px;
  justify-items: end;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.ranking-export-panel > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ranking-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ranking-export-actions button {
  min-height: 38px;
}

.ranking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ranking-summary-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ranking-summary article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.ranking-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ranking-summary strong {
  font-size: 30px;
  line-height: 1;
}

.ranking-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ranking-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.ranking-table th {
  color: var(--muted);
  background: #faf6f1;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ranking-table tbody tr:last-child td {
  border-bottom: 0;
}

.ranking-table tbody tr:hover {
  background: #fffaf5;
}

.ranking-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee7e0;
  font-weight: 900;
}

.ranking-position.rank-1 {
  color: #6c4a00;
  background: #f7db83;
}

.ranking-position.rank-2 {
  color: #4c535a;
  background: #dfe4e8;
}

.ranking-position.rank-3 {
  color: #6b3f20;
  background: #e9b88f;
}

.ranking-sku {
  white-space: nowrap;
}

.ranking-units {
  color: #9c3f59;
  font-size: 20px;
}

.ranking-empty {
  padding: 34px 16px !important;
  color: var(--muted);
  text-align: center !important;
}

.inventory-risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-risk-badge.risk-out,
.inventory-risk-badge.risk-insufficient {
  color: #8c2626;
  background: #f8d9d5;
}

.inventory-risk-badge.risk-unset {
  color: #654f3d;
  background: #eee6de;
}

.inventory-risk-badge.risk-exact {
  color: #865100;
  background: #ffe9bd;
}

.inventory-risk-badge.risk-ok {
  color: #17613f;
  background: #dff2e7;
}

.inventory-risk-row.risk-out,
.inventory-risk-row.risk-insufficient {
  background: #fff7f6;
}

.member-rules-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.member-filters {
  display: grid;
  grid-template-columns: minmax(145px, 170px) minmax(220px, 1fr) minmax(160px, 210px);
  gap: 10px;
  width: min(780px, 100%);
}

.member-filters input,
.member-filters select {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
}

.member-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.member-section-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.member-section-panel > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 16px;
  background: #fffaf5;
  cursor: pointer;
  list-style: none;
}

.member-section-panel > summary::-webkit-details-marker {
  display: none;
}

.member-section-panel > summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  color: #8e4559;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.member-section-panel[open] > summary::before {
  content: "−";
}

.member-section-panel > summary > span:first-of-type {
  display: grid;
  flex: 1;
  gap: 3px;
}

.member-section-panel > summary strong {
  font-size: 17px;
}

.member-section-panel > summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.member-section-panel-body {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.member-export-panel {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.member-export-panel h3,
.member-export-note {
  margin: 0;
}

.member-month-tools {
  display: grid;
  gap: 8px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
}

.member-month-tools label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-month-tools input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.member-month-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.member-month-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.member-month-summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.member-month-summary em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.member-month-summary strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.member-monthly-rules {
  margin: 2px 0;
  color: #6d4d3f;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
}

.member-month-tier-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.member-month-tier-summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: #f2eae3;
  font-size: 10px;
  font-weight: 900;
}

.member-month-tier-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.member-export-panel h3 {
  font-size: 18px;
}

.member-export-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.member-selected-count {
  display: flex;
  gap: 7px;
  align-items: baseline;
  padding: 12px;
  border-radius: 7px;
  background: #fff;
}

.member-selected-count strong {
  color: #9c3f59;
  font-size: 26px;
  line-height: 1;
}

.member-selected-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-export-button,
.member-clear-selection {
  width: 100%;
  min-height: 42px;
}

.member-export-all {
  border: 1px solid #d9cdc1;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.member-clear-selection {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.member-export-panel button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.member-data-area {
  min-width: 0;
}

.customer-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf5;
}

.customer-overview-head,
.member-ranking-heading,
.customer-detail-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-overview-head h3,
.member-ranking-heading h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.customer-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customer-overview-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #eadfd5;
  border-radius: 8px;
  background: #fff;
}

.customer-overview-grid span,
.customer-overview-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-overview-grid strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.member-inline-export {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cbbbae;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.member-inline-export:hover {
  border-color: var(--ink);
  background: #f7efe8;
}

.member-inline-export:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.member-ranking-heading {
  margin-bottom: 10px;
}

.member-ranking-count {
  padding: 6px 10px;
  border-radius: 999px;
  color: #7b3f4d;
  background: #f8e4e6;
  font-size: 12px;
  font-weight: 900;
}

.member-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.member-summary article,
.member-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
}

.member-summary-card {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.member-review-card {
  border-color: #d98b48;
  background: #fff4e8;
}

.member-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-summary strong {
  font-size: 30px;
  line-height: 1;
}

.member-table-wrap {
  max-height: min(62vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.member-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #faf6f1;
}

.member-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
  border-collapse: collapse;
}

.member-table th,
.member-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.member-col-select {
  width: 44px;
}

.member-col-tier {
  width: 86px;
}

.member-col-rank,
.member-col-month-tier {
  width: 82px;
}

.member-col-customer {
  width: 120px;
}

.member-col-phone {
  width: 125px;
}

.member-col-orders {
  width: 190px;
}

.member-col-repeat-units,
.member-col-order-count,
.member-col-completed,
.member-col-total-repeat {
  width: 90px;
}

.member-col-sales {
  width: 170px;
}

.member-col-last-order {
  width: 145px;
}

.customer-detail-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.customer-detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.customer-detail-panel > summary {
  min-height: 58px;
  padding: 12px 16px;
  background: #fffaf5;
  cursor: pointer;
  list-style: none;
}

.customer-detail-panel > summary::-webkit-details-marker {
  display: none;
}

.customer-detail-panel > summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  color: #8e4559;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.customer-detail-panel[open] > summary::before {
  content: "−";
}

.customer-detail-panel > summary > span {
  display: grid;
  flex: 1;
  gap: 2px;
}

.customer-detail-panel > summary strong {
  font-size: 16px;
}

.customer-detail-panel > summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-table-wrap {
  max-height: min(58vh, 540px);
  overflow: auto;
}

.customer-analytics-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.customer-analytics-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.customer-analytics-table th,
.customer-analytics-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.customer-analytics-table th {
  color: var(--muted);
  background: #faf6f1;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-analytics-table td {
  font-size: 12px;
}

.receipt-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 132px;
}

.receipt-row-actions button {
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.receipt-row-actions .secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffaf5;
}

.customer-analytics-table [data-receipt-field] {
  min-width: 110px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.customer-analytics-table td[colspan="2"] [data-receipt-field] {
  width: 100%;
}

.customer-rank {
  color: #9c3f59;
  font-weight: 900;
}

.customer-type-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-type-badge.new {
  color: #8a4a00;
  background: #ffedc7;
}

.customer-type-badge.existing {
  color: #275c4c;
  background: #e3f3eb;
}

.member-table th {
  color: var(--muted);
  background: #faf6f1;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.member-table tbody tr:last-child td {
  border-bottom: 0;
}

.member-table tbody tr:hover {
  background: #fffaf5;
}

.member-table tbody tr.member-row-selected,
.member-table tbody tr.member-row-selected:hover {
  background: #fff1e5;
}

.member-order-numbers {
  color: #315f8e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.member-table .member-select-cell {
  width: 44px;
  padding-right: 6px;
  padding-left: 12px;
  text-align: center;
}

.member-select-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #9c3f59;
  cursor: pointer;
}

.member-tier-badge,
.activity-candidate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.member-tier-badge.l0 {
  color: #4f555b;
  background: #e8ecef;
}

.member-tier-badge.unranked {
  color: var(--muted);
  background: #f2eee9;
}

.member-tier-badge.l1 {
  color: #3f4b55;
  background: #d8e0e6;
}

.member-tier-badge.l2 {
  color: #6d4d0e;
  background: #f4dc9b;
}

.member-tier-badge.l3 {
  color: #7b3d13;
  background: #ffd2a1;
}

.member-tier-badge.l4 {
  color: #fff;
  background: linear-gradient(135deg, #6c304b, #241b31);
}

.member-tier-badge.l5 {
  color: #fff;
  background: linear-gradient(135deg, #a77814, #4a2a08);
}

.member-tier-badge.l6,
.member-tier-badge.l7 {
  color: #fff;
  background: linear-gradient(135deg, #8d5c0f, #281b08);
}

.member-tier-badge.l8,
.member-tier-badge.l9,
.member-tier-badge.l10 {
  color: #fff;
  background: linear-gradient(135deg, #982f56, #201329);
  box-shadow: 0 4px 12px rgba(108, 48, 75, 0.2);
}

.member-monthly-rank {
  color: #9c3f59;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.activity-candidate-badge {
  margin-top: 4px;
  color: #7b3d13;
  background: #ffe1bd;
}

.member-phone-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.order-card,
.manage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card {
  padding: 10px 12px;
}

.order-compact-header {
  display: grid;
  grid-template-columns: minmax(250px, 1.05fr) minmax(430px, 1.6fr) auto;
  gap: 14px;
  align-items: center;
}

.order-compact-header .order-number-heading {
  margin-bottom: 0;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 7px;
  min-width: 0;
}

.order-summary-grid > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: #faf6f1;
}

.order-summary-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.order-summary-grid strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-compact-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.order-compact-actions > strong {
  font-size: 15px;
}

.order-edit-panel {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed #dccfc3;
}

.order-edit-panel[hidden] {
  display: none;
}

.order-edit-meta {
  display: grid;
  grid-template-columns: minmax(260px, 520px);
  margin-bottom: 10px;
}

.order-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.order-top h3 {
  margin: 0 0 5px;
}

.order-number-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 7px;
}

.order-number-pair {
  display: inline-grid;
  gap: 1px;
}

.order-number-pair small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.order-number-pair strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.order-number-pair.completed strong {
  color: #1e6a47;
}

.order-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.order-items {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.order-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 7px;
  background: #faf6f1;
}

.order-item img {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  object-fit: cover;
}

.order-item-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.order-item-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-item-controls input {
  width: 74px;
  min-height: 36px;
  padding: 0 8px;
}

.order-item-controls button {
  min-height: 36px;
  padding: 0 10px;
}

.order-item-inventory {
  margin-top: 4px;
  color: #2f6d45;
  font-size: 12px;
  font-weight: 800;
}

.order-item-add {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  margin: 0 0 12px;
}

.order-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.order-footer-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(190px, 1.35fr);
  gap: 10px;
  align-items: end;
}

.order-control-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-control-field > span {
  min-height: 16px;
}

.order-control-field select,
.order-control-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #dfd0c3;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.order-control-field select:focus,
.order-control-field input:focus {
  border-color: #aa6b43;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(170, 107, 67, 0.13);
}

.order-control-field :disabled {
  color: #817970;
  background: #f4f0eb;
  cursor: not-allowed;
}

.order-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #eee4db;
}

.order-action-buttons button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-action-buttons button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(66, 45, 28, 0.1);
}

.order-action-buttons .order-save-button {
  min-width: 148px;
  box-shadow: 0 2px 5px rgba(36, 30, 27, 0.12);
}

.order-action-buttons .order-utility-button {
  border: 1px solid #e1d5ca;
  color: #4e423a;
  background: #fff;
}

.order-action-buttons .order-utility-button:hover:not(:disabled) {
  border-color: #c7a88f;
  background: #fffaf5;
}

.order-action-buttons .order-delete-button {
  border: 1px solid #e5b9b3;
  color: #9d3f39;
  background: #fff7f6;
}

.order-action-buttons .order-delete-button:hover:not(:disabled) {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.order-payment-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(200px, 280px);
  gap: 10px;
  padding: 12px;
  border: 1px solid #ead8c8;
  border-radius: 8px;
  background: #fffaf5;
}

.order-payment-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.automatic-order-total {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid #d8e7dc;
  border-radius: 7px;
  background: #f1f8f3;
}

.automatic-order-total > div {
  display: grid;
  gap: 3px;
}

.automatic-order-total span,
.automatic-order-total small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.automatic-order-total strong {
  color: #1e6a47;
  font-size: 24px;
}

.automatic-order-total .automatic-price-missing {
  color: #a23b38;
}

.automatic-order-total button {
  flex: 0 0 auto;
}

.order-payment-fields input,
.order-payment-fields select {
  width: 100%;
  min-height: 42px;
}

.order-money-input {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
}

.order-percent-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-percent-input b {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.order-percent-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.order-money-input b {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid #e8ddd3;
  color: #1e6a47;
  font-size: 18px;
}

.order-money-input input {
  border: 0;
  border-radius: 0;
}

.combined-payment-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d9c2ad;
}

.combined-payment-details[hidden] {
  display: none;
}

.combined-payment-head {
  display: grid;
  gap: 3px;
}

.combined-payment-head strong {
  color: var(--ink);
  font-size: 14px;
}

.combined-payment-head small {
  color: var(--muted);
  font-size: 12px;
}

.combined-payment-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 8px;
}

.payment-option-row {
  display: grid;
  grid-template-columns: 22px minmax(54px, auto) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px solid #e1d6cb;
  border-radius: 7px;
  background: #fff;
}

.payment-option-row.selected {
  border-color: #b7758b;
  background: #fff4f7;
}

.payment-option-row > input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: #9c3f59;
}

.payment-option-row > strong {
  color: var(--ink);
  font-size: 14px;
}

.payment-reference-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 6px;
  background: #fffaf5;
}

.payment-reference-panel > strong {
  color: var(--ink);
  font-size: 12px;
}

.payment-reference-panel > small {
  color: var(--muted);
  line-height: 1.4;
}

.payment-reference-inputs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.payment-reference-inputs input {
  min-width: 0;
  padding: 7px 6px;
  text-align: center;
  text-transform: uppercase;
  font-family: ui-monospace, monospace;
  letter-spacing: .04em;
}

.payment-proof-upload {
  display: grid;
  gap: 5px;
  padding-top: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.payment-proof-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px dashed #c9b8a8;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.payment-proof-actions {
  display: flex;
  justify-content: flex-end;
}

.payment-proof-actions button {
  padding: 5px 9px;
  font-size: 11px;
}

.combined-payment-amount {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
}

.combined-payment-amount span {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid #e8ddd3;
  color: #1e6a47;
  font-weight: 900;
}

.combined-payment-amount input {
  border: 0;
  border-radius: 0;
}

.order-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.order-name-edit {
  display: grid;
  gap: 5px;
  max-width: 360px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-name-edit input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.status-badge.new {
  color: #79420c;
  background: #fff0d6;
}

.status-badge.confirmed,
.status-badge.picking {
  color: #244c78;
  background: #e5eef7;
}

.status-badge.shipped,
.status-badge.done,
.status-badge.active {
  color: #1f6141;
  background: #e2f1e7;
}

.status-badge.cancelled,
.status-badge.deleted,
.status-badge.inactive {
  color: #8b2d2b;
  background: #fae2e1;
}

.account-management-note {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.account-create-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #d9c5b8;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf6 0%, #f8eee7 100%);
}

.account-create-head h3,
.account-create-head p {
  margin: 0;
}

.account-create-head h3 {
  margin-top: 4px;
  font-size: 20px;
}

.account-create-head p:last-child {
  margin-top: 6px;
  color: var(--muted);
}

.account-create-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(280px, 1.5fr);
  gap: 12px;
  align-items: end;
}

.account-create-grid label {
  display: grid;
  gap: 6px;
}

.account-create-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-create-grid input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.account-link-field input,
.account-link-row input {
  color: #245b87;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.account-create-actions {
  display: flex;
  justify-content: flex-end;
}

.created-sales-credentials {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(320px, 1.8fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #b9d7c4;
  border-radius: 10px;
  background: #edf8f1;
}

.created-sales-credentials[hidden] {
  display: none;
}

.created-sales-credentials p {
  margin: 4px 0 0;
  color: #42644e;
  font-size: 12px;
}

.created-sales-credentials pre {
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.5 Consolas, "Courier New", monospace;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.account-card.inactive {
  background: #f5f1ee;
  opacity: 0.78;
}

.account-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-card-head img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #f3ece5;
  box-shadow: 0 4px 14px rgba(59, 36, 24, 0.16);
}

.account-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-card-head strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
}

.account-card-head span,
.account-card label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-card label {
  display: grid;
  gap: 6px;
}

.account-card input,
.account-card select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.account-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.account-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.account-link-row .ghost-button {
  min-height: 42px;
  padding-inline: 12px;
  white-space: nowrap;
}

.account-avatar-actions {
  display: flex;
  justify-content: flex-end;
}

.account-self-note {
  margin: -4px 0 0;
  color: #8a4b16;
  font-size: 12px;
  font-weight: 700;
}

.manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.manage-card {
  overflow: hidden;
}

.manage-image-wrap {
  position: relative;
}

.inventory-rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(47, 30, 24, 0.18);
  color: #fff;
  background: rgba(38, 27, 24, 0.88);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 8px;
  object-fit: contain;
  background: #f8f4ef;
}

.manage-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.manage-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.product-sku {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toggle-button {
  width: 100%;
  color: #fff;
  background: var(--blue);
}

.toggle-button.off {
  background: var(--green);
}

.manage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.manage-actions .ghost-button,
.manage-actions .toggle-button,
.manage-actions .danger-button {
  width: 100%;
  min-width: 0;
}

.manage-actions .ghost-button {
  border-color: var(--line);
  background: #fffaf5;
}

.manage-actions .danger-button {
  grid-column: 1 / -1;
}

.product-stock-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.order-line-price {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 6px;
  color: #825218;
  font-size: 13px;
}

.product-stock-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 7px;
  text-align: center;
  background: #f7f2ec;
}

.source-low-stock-note {
  display: block;
  margin-top: 4px;
  color: #9a5b00;
  font-size: 11px;
  line-height: 1.3;
}

.product-stock-summary.sales-price-readonly {
  grid-template-columns: minmax(0, 1fr);
}

.sales-price-readonly > div {
  padding: 14px;
  text-align: left;
}

.sales-price-readonly span {
  font-size: 13px;
  white-space: normal;
}

.sales-price-readonly strong {
  font-size: 24px;
}

.product-stock-summary > div:first-child {
  color: #825218;
  background: #fff1cf;
}

.product-stock-summary > div:nth-child(2) {
  color: #245f3b;
  background: #edf7f0;
}

.product-stock-summary > div:nth-child(3) {
  color: #315d8b;
  background: #eef3fb;
}

.product-stock-summary span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-stock-summary strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-stock-summary .price-summary-lines {
  display: grid;
  gap: 1px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}

.product-control-toggle {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8c8b8;
  border-radius: 7px;
  color: #60432d;
  background: #fffaf5;
  font-weight: 850;
}

.product-control-panel {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.product-control-panel[hidden] {
  display: none;
}

.product-delete-button {
  width: 100%;
}

.inventory-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #edf7f0;
  color: #245f3b;
}

.inventory-readout span {
  font-size: 12px;
  font-weight: 800;
}

.inventory-readout strong {
  font-size: 22px;
}

.inventory-location-grid {
  display: grid;
  gap: 9px;
}

.inventory-location-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e6ddd4;
  border-radius: 8px;
  background: #fffaf6;
}

.inventory-location-card:nth-child(2) .inventory-readout {
  background: #eef3fb;
  color: #315d8b;
}

.product-price-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e4d7bd;
  border-radius: 8px;
  background: #fffaf0;
}

.package-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.package-price-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border-radius: 7px;
  color: #825218;
  background: #fff1cf;
}

.package-price-grid span {
  font-size: 11px;
  font-weight: 850;
}

.package-price-grid input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid #dfc998;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.package-price-save {
  width: 100%;
  min-height: 42px;
}

.price-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff1cf;
  color: #825218;
}

.price-readout span {
  font-size: 12px;
  font-weight: 800;
}

.price-readout strong {
  font-size: 22px;
}

.inventory-editor {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px;
}

.inventory-editor input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.inventory-editor button {
  min-width: 104px;
}

.product-form-card {
  width: min(760px, 100%);
}

.fragrance-notes-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.switch-row {
  align-content: center;
  grid-template-columns: 20px 1fr;
  gap: 10px !important;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.switch-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.disabled-field {
  opacity: 0.55;
}

.image-preview-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #d3c2b2;
  border-radius: 8px;
  background: #fffaf5;
}

.image-preview-row img {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8f4ee;
}

.image-preview-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.detail-preview-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #d3c2b2;
  border-radius: 8px;
  background: #fffaf5;
}

.detail-preview-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.detail-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.detail-preview-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.detail-preview-item span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #fff;
  background: rgba(32, 27, 24, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.remove-image-button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(159, 58, 56, 0.9);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 1080px) {
  .shop-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .cart-panel {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: none;
    height: min(78vh, 620px);
    border-radius: 12px 12px 0 0;
  }

  .cart-panel.open {
    display: block;
  }

  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .member-workspace {
    grid-template-columns: 1fr;
  }

  .member-export-panel {
    position: static;
  }

  .customer-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-compact-header {
    grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr);
  }

  .order-compact-actions {
    grid-column: 1 / -1;
  }

  .account-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shop-header,
  .admin-header {
    min-height: 76px;
    padding: 10px 12px;
  }

  .logo-wrap,
  .admin-brand img {
    width: 48px;
    height: 48px;
  }

  .shop-shell {
    display: block;
    padding: 12px;
  }

  .member-filters,
  .customer-overview-grid {
    grid-template-columns: 1fr;
  }

  .customer-overview-head,
  .member-ranking-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-detail-panel > summary {
    flex-wrap: wrap;
  }

  .customer-detail-panel > summary .member-inline-export {
    width: 100%;
    margin-left: 38px;
  }

  .section-actions,
  .order-search-form {
    width: 100%;
  }

  .order-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .order-search-form input {
    width: 100%;
    min-width: 0;
  }

  .storefront-hero {
    min-height: 150px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .storefront-hero::after {
    background: linear-gradient(90deg, rgba(17, 10, 8, 0.12) 28%, rgba(17, 10, 8, 0.72) 55%, rgba(10, 6, 5, 0.94) 100%);
  }

  .storefront-hero-content {
    width: 60%;
    min-height: 150px;
    padding: 10px 12px;
  }

  .storefront-hero-content h2 {
    font-size: clamp(14px, 4.1vw, 18px);
    line-height: 1.08;
  }

  .storefront-hero-content p {
    margin: 7px 0 9px;
    font-size: clamp(11px, 3.1vw, 13px);
    line-height: 1.15;
  }

  .storefront-hero-button {
    min-height: 30px;
    padding: 0 14px;
    font-size: 11px;
  }

  .brand-panel {
    position: static;
    height: auto;
    padding: 10px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .brand-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .brand-list button {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .catalog-toolbar,
  .section-head,
  .stats-head,
  .checkout-actions,
  .admin-header,
  .order-top,
  .order-item-add,
  .order-actions,
  .product-insights,
  .ranking-summary,
  .member-summary,
  .member-filters {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .order-payment-fields {
    grid-template-columns: 1fr;
  }

  .automatic-order-total {
    align-items: stretch;
    flex-direction: column;
  }

  .combined-payment-rows {
    grid-template-columns: 1fr;
  }

  .payment-option-row {
    grid-template-columns: 22px minmax(54px, auto) minmax(100px, 1fr);
  }

  .catalog-toolbar {
    display: grid;
    gap: 8px;
    position: sticky;
    top: 76px;
    z-index: 12;
    padding: 8px 0;
    margin: 0 -2px 10px;
    background: #f6efe8;
  }

  .search-box {
    min-width: 0;
  }

  .search-box input {
    min-height: 44px;
  }

  .member-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-compact-header {
    grid-template-columns: 1fr;
  }

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

  .order-compact-actions {
    grid-column: auto;
    justify-content: space-between;
  }

  .order-edit-meta {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .customer-account-button {
    max-width: 132px;
    min-height: 44px;
    padding: 6px 10px;
  }

  .section-actions {
    width: 100%;
    justify-content: stretch;
  }

  .ranking-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ranking-toolbar,
  .ranking-view-switch {
    width: 100%;
  }

  .ranking-export-panel {
    width: 100%;
    justify-items: stretch;
  }

  .ranking-export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ranking-export-actions button {
    width: 100%;
  }

  .ranking-view-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-view-switch button {
    min-width: 0;
    padding-inline: 6px;
  }

  .ranking-controls input,
  .ranking-controls button {
    width: 100%;
  }

  .section-actions .ghost-button,
  .section-actions select,
  .section-actions .order-date-filter {
    flex: 1;
  }

  .segment {
    display: flex;
    flex: none;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .segment::-webkit-scrollbar {
    display: none;
  }

  .segment button {
    min-width: 88px;
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 12px;
    scroll-snap-align: start;
  }

  .order-item {
    grid-template-columns: 44px 1fr;
    align-items: start;
  }

  .order-item-controls {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .product-body {
    gap: 7px;
    padding: 10px;
  }

  .product-body .chip {
    min-height: 22px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .product-card h3 {
    min-height: 3.9em;
    font-size: 13px;
  }

  .product-card .add-button {
    min-height: 44px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-tools,
  .admin-filters,
  .admin-product-tools {
    width: 100%;
  }

  .inventory-receipt-form {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-receipt-form label:first-child,
  .inventory-receipt-form button {
    grid-column: 1 / -1;
  }

  .admin-tools select,
  .admin-tools button,
  .admin-filters input,
  .admin-filters select,
  .admin-product-tools > button {
    flex: 1;
  }

  .inventory-ranking-head,
  .inventory-ranking-tools,
  .inventory-ranking-export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-ranking-tools,
  .inventory-ranking-export-actions,
  .inventory-ranking-export-actions button,
  .inventory-ranking-toggle {
    width: 100%;
  }

  .inventory-ranking-panel {
    padding: 14px;
  }

  .inventory-ranking-table-wrap {
    max-height: 430px;
  }

  .admin-product-tools {
    align-items: stretch;
  }

  .manage-grid {
    grid-template-columns: 1fr;
  }

  .account-create-grid,
  .created-sales-credentials {
    grid-template-columns: 1fr;
  }

  .account-create-actions,
  .account-create-actions .primary-button,
  .created-sales-credentials .ghost-button {
    width: 100%;
  }

  .account-link-row {
    grid-template-columns: 1fr;
  }

  .detail-stage {
    height: min(54vh, 520px);
    min-height: 250px;
  }

  .image-viewer-toolbar {
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: flex-end;
  }

  .image-viewer-toolbar button {
    min-width: 44px;
    height: 44px;
  }

  .image-preview-row {
    grid-template-columns: 72px 1fr;
  }

  .image-preview-row img {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .storefront-hero {
    animation: none;
  }

  .storefront-hero-button {
    transition: none;
  }
}
.order-inventory-shortage-notice {
  padding: 12px 16px;
  margin: 8px 0;
  border: 1px solid #c95a51;
  border-radius: 10px;
  color: #8b2520;
  background: #fff1ed;
  font-weight: 700;
  overflow-wrap: anywhere;
  grid-column: 1 / -1;
}
.storefront-stock-warning {
  color: #8c4b12;
  background: #fff4db;
  border-left: 3px solid #d59b32;
  border-radius: 6px;
  padding: 9px 11px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.storefront-display-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.4;
}

.storefront-display-price strong {
  color: #81374f;
  font-size: 16px;
}
.region-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.region-picker label { font-weight: 750; color: var(--ink); }
.region-picker p { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.region-picker select { width: auto; min-width: 200px; min-height: 44px; }
.region-picker select:focus-visible { outline: 2px solid var(--rose-dark); outline-offset: 2px; }
.region-order-label { padding: 8px 14px 0; color: var(--rose-dark); font-size: .85rem; font-weight: 750; }
@media (max-width: 600px) {
  .region-picker select { width: 100%; min-width: 0; }
}

/* Storefront catalog. Keep the backoffice layout and palette independent. */
.shop-page {
  --ink: #2d2328;
  --muted: #6a5b64;
  --line: #e2d8dd;
  --surface: #fdfbfc;
  --catalog-bg: #f7f2f5;
  --catalog-tint: #f1e6ec;
  --catalog-button: #813750;
  --catalog-button-ink: #fdfbfc;
  --catalog-soft-ink: #773249;
  background: var(--catalog-bg);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.shop-page .shop-header {
  min-height: 64px;
  gap: 10px;
  padding: 8px max(14px, calc((100% - 1350px) / 2));
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}
.shop-page .logo-wrap { width: 42px; height: 42px; flex: 0 0 42px; box-shadow: none; }
.shop-page .shop-title p { color: var(--muted); text-transform: none; }
.shop-page .shop-title h1 { font-size: clamp(18px, 3vw, 24px); overflow-wrap: anywhere; }
.shop-page .cart-pill { min-height: 44px; padding: 0 10px; white-space: nowrap; background: var(--catalog-button); color: var(--catalog-button-ink); }
.shop-page .cart-pill span { margin-left: 2px; color: var(--catalog-soft-ink); background: var(--surface); }
.shop-page .shop-shell {
  grid-template-columns: minmax(0, 1fr) 278px;
  width: min(1380px, 100%);
  gap: 16px;
  padding: 16px clamp(12px, 3vw, 26px) 32px;
}
.shop-page .region-picker { grid-column: 1 / -1; margin: 0; }
.shop-page .storefront-intro { margin: 0; min-height: 180px; animation: none; box-shadow: none; }
.shop-page .storefront-intro .storefront-hero-content { min-height: inherit; }
.shop-page .catalog-area { scroll-margin-top: 72px; }
.shop-page .region-picker { padding: 10px 14px; gap: 8px 16px; }
.region-picker h2 { margin: 0; font-size: 1rem; }
#shopRegion { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#shopRegion a {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 82px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
#shopRegion a[aria-current="true"] { background: var(--catalog-button); border-color: var(--catalog-button); color: var(--catalog-button-ink); }
.shop-page .cart-panel { align-self: start; top: 80px; height: auto; max-height: calc(100dvh - 96px); background: var(--surface); box-shadow: none; }
.catalog-heading { margin: 0 0 12px; }
.catalog-heading h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.025em; line-height: 1.15; }
.catalog-heading p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.shop-page .catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
  gap: 6px 10px;
  position: sticky;
  top: 64px;
  z-index: 12;
  margin: 0;
  padding: 6px 0;
  background: var(--catalog-bg);
}
.catalog-toolbar .search-box, .catalog-brand { min-width: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.catalog-toolbar .search-box input, .catalog-brand select {
  min-height: 44px;
  min-width: 0;
  margin-top: 4px;
  padding-inline: 9px;
  border-color: var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  font-weight: 500;
}
.catalog-toolbar input::placeholder { color: var(--muted); }
.catalog-filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.catalog-filters .brand-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; overflow: visible; }
.catalog-filters .segment { display: inline-flex; flex: 0 0 auto; width: auto; padding: 0; border: 0; background: transparent; }
.catalog-filters .brand-list button,
.catalog-filters .segment button {
  min-height: 44px; min-width: 0; width: auto; height: auto; padding: 0 8px; font-size: .8rem;
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface);
}
.catalog-filters button[aria-pressed="true"] { border-color: var(--catalog-soft-ink); color: var(--catalog-soft-ink); background: var(--catalog-tint); }
.catalog-filters button:disabled { opacity: .55; cursor: not-allowed; }
.shop-page :is(button, select, input, a):focus-visible { outline: 2px solid var(--catalog-soft-ink); outline-offset: 2px; }
.catalog-count { color: var(--muted); font-size: .82rem; margin: 5px 0 9px; }
.shop-page .product-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 174px), 1fr)); gap: 10px; }
.shop-page .product-card { border-radius: 12px; min-width: 0; }
.shop-page .product-image-button { background: #fff; }
.shop-page .product-image-button:focus-visible { outline-offset: -3px; }
.shop-page .product-image-button img { width: 100%; aspect-ratio: 1.2; padding: 5px; }
.shop-page .product-body { display: flex; flex-direction: column; flex: 1; gap: 5px; padding: 9px; }
.shop-page .product-card h3 { min-height: 0; font-size: clamp(13px, 2vw, 16px); overflow-wrap: anywhere; }
.shop-page .product-body .meta-row { gap: 3px; }
.shop-page .product-body .chip { padding: 2px 4px; min-height: 0; font-size: 10px; overflow-wrap: anywhere; }
.shop-page .product-body .chip:not(.sold-out-chip):not(.preorder-chip) { background: var(--catalog-tint); color: var(--catalog-soft-ink); }
.shop-page .product-body .product-sku { min-height: 0; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.shop-page .product-body .storefront-display-price { display: grid; gap: 0; margin: 2px 0; font-size: 11px; color: var(--muted); }
.shop-page .product-body .storefront-display-price strong { color: var(--ink); font-size: 16px; }
.shop-page .product-body .storefront-stock-warning { padding: 4px 5px; margin: 0; font-size: 11px; }
.shop-page .product-card .add-button { min-height: 44px; border-radius: 8px; }
.shop-page .product-card .add-button:not(:disabled) { color: var(--catalog-button-ink); background: var(--catalog-button); }
.shop-page .empty-state { border-color: var(--line); background: var(--surface); color: var(--muted); }
.shop-page .empty-state p { margin: 0 0 10px; }
.catalog-loading > div { min-height: 205px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(var(--catalog-tint) 62%, var(--surface) 62%); }

@media (max-width: 1080px) {
  .shop-page .shop-shell { grid-template-columns: minmax(0, 1fr); }
  .shop-page .cart-panel { top: auto; height: min(78dvh, 620px); }
}
@media (max-width: 760px) {
  .shop-page .shop-shell { display: grid; gap: 10px; }
  .shop-page .storefront-intro { min-height: 0; }
  .shop-page .storefront-intro .storefront-hero-content { min-height: 0; padding-block: 11px; }
  .shop-page .storefront-intro .storefront-hero-button { min-height: 38px; }
  .shop-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shop-page .customer-account-button { padding-inline: 7px; min-width: 0; }
  .shop-page .customer-account-button small { display: none; }
  .shop-page .catalog-toolbar { position: static; }
}
@media (max-width: 355px) {
  .shop-page .region-picker nav { width: 100%; }
  .catalog-filters .brand-list button, .catalog-filters .segment button { padding-inline: 6px; }
}
@media (prefers-color-scheme: dark) {
  .shop-page {
    --ink: #f6ebf0;
    --muted: #d2c2cb;
    --line: #51434d;
    --surface: #282029;
    --catalog-bg: #1d171e;
    --catalog-tint: #392833;
    --catalog-button: #f2b7cf;
    --catalog-button-ink: #321924;
    --catalog-soft-ink: #f7c4d8;
    color-scheme: dark;
  }
  .shop-page .product-package-select, .shop-page .detail-package-spec-field { color: var(--muted); }
  .shop-page :is(.checkout-card, .product-detail-card, .customer-auth-card, .customer-account-button, .cart-item, .checkout-summary, .fragrance-notes-card) { background: var(--surface); color: var(--ink); }
  .shop-page :is(.checkout-card, .product-detail-card, .customer-auth-card) :is(label, legend, small, .eyebrow, .product-sku, .checkout-actions p) { color: var(--muted); }
  .shop-page :is(input, select, textarea) { border-color: var(--line); background: var(--surface); color: var(--ink); }
  .shop-page :is(.primary-button, .detail-nav) { background: var(--catalog-button); color: var(--catalog-button-ink); }
  .shop-page .empty-state .ghost-button { background: var(--catalog-tint); color: var(--ink); }
  .shop-page .storefront-display-price strong { color: var(--catalog-soft-ink); }
}

.quick-relist-dialog {
  width: min(440px, calc(100% - 24px));
  max-height: min(90vh, 650px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.quick-relist-dialog::backdrop { background: rgba(32, 27, 24, .44); }
.quick-relist-dialog form { display: grid; gap: 10px; }
.quick-relist-dialog h2, .quick-relist-dialog p { margin: 0; }
#quickRelistProduct { font-weight: 750; }
#quickRelistHelp { color: var(--muted); font-size: .9rem; }
.quick-relist-dialog label { display: grid; gap: 4px; }
.quick-relist-dialog input, .quick-relist-dialog select {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #d9cdc1;
  border-radius: 6px;
  background: #fff;
}
.quick-relist-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.inventory-audit-dialog { width: min(940px, calc(100% - 24px)); }
.inventory-audit-dialog td { white-space: normal; overflow-wrap: anywhere; }
.pto-copy-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
#ptoCopyCount { font-size: .88rem; font-weight: 700; }
#ptoCopyResult { flex-basis: 100%; margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.pto-copy-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}
.pto-copy-card label { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; font-size: .8rem; }
.pto-copy-card button { min-height: 38px; padding: 0 8px; font-size: .8rem; }
