/* Yunxi Commerce UI
   A single storefront and back-office visual system layered over the existing app. */

:root {
  --green: #ff5a1f;
  --green-dark: #d93b12;
  --green-deep: #a92b0b;
  --green-soft: #fff1eb;
  --mint: #ffe1d5;
  --cream: #fff8f3;
  --orange: #ff6a00;
  --red: #e1251b;
  --ink: #1f2329;
  --muted: #7a8089;
  --line: #e7e9ec;
  --surface: #fff;
  --bg: #f5f5f5;
  --shadow: 0 8px 28px rgba(22,28,36,.07);
  --commerce-brand: #ff5a1f;
  --commerce-brand-dark: #d93b12;
  --commerce-gold: #ff9f1a;
  --commerce-navy: #20252b;
}

html { background: #f5f5f5; }
body {
  background: #f5f5f5;
  color: var(--ink);
  font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button,input,select,textarea { font: inherit; }
button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg,#ff6a00,#ff3d1f);
  font-weight: 700;
  box-shadow: none;
}
button:hover { filter: brightness(.98); transform: translateY(-1px); }
button.secondary {
  color: #3f454d;
  background: #fff;
  border-color: #d9dde2;
}
button.secondary:hover { color: var(--commerce-brand); border-color: #ffb497; background: #fffaf8; }
button.danger { color: #fff; background: #e5483f; border-color: #e5483f; }
button:disabled { color: #a7abb1; background: #eceef0; border-color: #eceef0; }
a { color: var(--commerce-brand-dark); }
h1,h2,h3 { color: #20242a; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 14px; }
.card {
  background: #fff;
  border: 1px solid #eceef0;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(24,31,40,.045);
}
.shell { width: 100%; max-width: none; background: #f5f5f5; }

/* Shared brand and status language */
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg,#ff7a18,#ff3d1f);
  box-shadow: 0 6px 16px rgba(255,80,28,.22);
}
.brand-lockup { gap: 10px; }
.brand-lockup strong { color: #e94317; font-size: 22px; letter-spacing: -.02em; }
.brand-lockup small { color: #999da4; letter-spacing: .12em; }

.status { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; color: #a2420e; background: #fff0e7; font-size: 12px; }
.status.good { color: #26734b; background: #eaf7ef; }
.error { color: #c7352d; background: #fff0ef; border: 1px solid #ffd3d0; }
.success { color: #247149; background: #eaf7ef; }
.toast { top: 78px; color: #fff; background: linear-gradient(135deg,#ff6a2a,#ee421f); border-radius: 8px; box-shadow: 0 12px 34px rgba(216,70,24,.22); }

/* Login and registration */
.auth-page {
  min-height: 100vh;
  grid-template-columns: minmax(420px,1fr) minmax(430px,560px);
  background: linear-gradient(118deg,#ff6a00 0%,#ff3d1f 49.8%,#f6f7f9 50%);
}
.auth-intro { padding: 60px clamp(40px,7vw,105px); color: #fff; }
.auth-intro .brand-lockup strong,.auth-intro .brand-lockup small { color: #fff; }
.auth-intro .brand-mark { color: #ff5420; background: #fff; box-shadow: 0 10px 26px rgba(105,24,0,.2); }
.auth-intro h2 { color: #fff; font-size: clamp(34px,4vw,52px); }
.auth-intro:before,.auth-intro:after { background: rgba(255,255,255,.12); }
.auth-life-art { padding: 12px 18px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.24); box-shadow: none; }
.auth-life-art:after { display: none; }
.auth-generated-home { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(100,30,0,.18)); }
.auth-card {
  margin: 38px 48px;
  padding: 38px 42px;
  border: 1px solid #eceef1;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(31,35,41,.12);
}
.auth-card h1 { margin-bottom: 20px; font-size: 28px; }
.primary-wide { background: linear-gradient(90deg,#ff6a00,#ff3d1f); box-shadow: 0 8px 20px rgba(255,80,28,.2); }
.text-button { color: var(--commerce-brand); background: transparent; }
.text-button:hover { color: var(--commerce-brand-dark); background: #fff3ee; }
.register-type-tabs { background: #f2f3f5; border-radius: 10px; }
.register-type-tabs button { color: #646a73; border-radius: 7px; }
.register-type-tabs button.active { color: #fff; background: linear-gradient(90deg,#ff6a00,#ff3d1f); }
.merchant-license-upload {
  position: relative;
  display: grid !important;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  margin: 0 !important;
  padding: 9px 10px;
  color: #303438;
  background: #fff8f5;
  border: 1px dashed #ffad8e;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.merchant-license-upload:hover {
  background: #fff3ed;
  border-color: #ff6a32;
  box-shadow: 0 0 0 3px rgba(255,90,31,.08);
}
.merchant-license-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.merchant-license-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #fff;
  border: 1px solid #ffd4c4;
  border-radius: 10px;
  font-size: 20px;
}
.merchant-license-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.35; }
.merchant-license-copy strong { overflow: hidden; color: #34383c; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.merchant-license-copy small { overflow: hidden; color: #8a7470; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.merchant-license-action {
  padding: 7px 11px;
  color: #fff;
  background: linear-gradient(90deg,#ff6a00,#ff3d1f);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.merchant-document-links { display: flex; flex-wrap: wrap; gap: 5px 9px; }
.merchant-document-links a { color: var(--commerce-brand-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.merchant-document-links a:hover { color: var(--commerce-brand); }

/* Checkout payment methods and WeChat Pay settings */
.checkout-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: start; gap: 18px; }
.checkout-products,.checkout-summary,.active-payment-intent,.wechat-pay-settings { background: #fff; border: 1px solid #e6e8eb; border-radius: 13px; box-shadow: 0 8px 24px rgba(33,38,45,.06); }
.checkout-products { padding: 20px; }
.checkout-products > header { display: flex; margin-bottom: 13px; align-items: center; justify-content: space-between; }
.checkout-products > header h2,.checkout-summary h2 { margin: 0; }
.checkout-item { display: grid; grid-template-columns: 66px minmax(0,1fr) auto; min-height: 82px; padding: 9px 0; align-items: center; gap: 12px; border-top: 1px solid #eef0f2; }
.checkout-item .product-image { width: 66px; height: 66px; border-radius: 9px; }
.checkout-item > div { display: flex; min-width: 0; flex-direction: column; }
.checkout-item > div span { color: #858a91; font-size: 13px; }
.checkout-item > b { color: var(--commerce-brand-dark); white-space: nowrap; }
.checkout-summary { position: sticky; top: 86px; padding: 19px; }
.checkout-summary > h2 { margin-bottom: 16px; color: #24272b; font-size: 30px; }
.checkout-summary > h2 small { color: #777d84; font-size: 13px; }
.checkout-summary > button { width: 100%; margin-top: 9px; }
.payment-method-list { display: grid; margin-bottom: 13px; gap: 9px; }
.payment-method-option { display: grid; width: 100%; min-height: 72px; padding: 10px 12px; grid-template-columns: 42px minmax(0,1fr) 22px; align-items: center; gap: 10px; color: #34383d; background: #fff; border: 1px solid #dfe2e6; border-radius: 10px; text-align: left; box-shadow: none; }
.payment-method-option:hover { color: #34383d; background: #fffaf7; border-color: #ffb392; }
.payment-method-option.active { color: #34383d; background: #fff7f2; border-color: var(--commerce-brand); box-shadow: 0 0 0 2px rgba(255,90,31,.08); }
.payment-method-option.disabled { color: #9a9fa5; background: #f5f6f7; border-color: #e8eaec; opacity: .8; }
.payment-method-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: #f39b36; border-radius: 10px; font-size: 18px; font-weight: 900; }
.payment-method-option:nth-child(2) .payment-method-mark { background: #16a05d; }
.payment-method-copy { display: flex; min-width: 0; flex-direction: column; }
.payment-method-copy strong { font-size: 15px; }
.payment-method-copy small { overflow: hidden; color: #858a91; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-check { color: var(--commerce-brand); font-size: 20px; font-weight: 900; }
.payment-hint,.payment-reserved-note { color: #93611e; font-size: 13px; }
.active-payment-intent { display: flex; margin-bottom: 14px; padding: 14px 16px; align-items: center; justify-content: space-between; gap: 14px; border-color: #f0cf96; background: #fffaf0; }
.active-payment-intent > div { display: flex; align-items: center; gap: 9px; }
.active-payment-intent > div:first-child { flex-direction: column; align-items: flex-start; gap: 2px; }
.active-payment-intent button { min-height: 36px; padding: 6px 11px; }
.checkout-return { display: block; margin: 16px auto; }

.wechat-pay-settings { padding: 22px; }
.wechat-settings-head { display: flex; margin-bottom: 18px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wechat-settings-head h2 { margin: 0 0 4px; }
.wechat-settings-head p { max-width: 720px; margin: 0; color: #747a81; font-size: 13px; }
.wechat-config-status { flex: 0 0 auto; padding: 5px 10px; color: #956526; background: #fff4d8; border-radius: 999px; font-size: 12px; font-weight: 800; }
.wechat-config-status.ready { color: #197447; background: #e6f8ee; }
.wechat-enable-switch { display: flex; margin-bottom: 20px; align-items: center; gap: 9px; font-weight: 800; }
.wechat-enable-switch input { width: 19px; height: 19px; accent-color: #16a05d; }
.wechat-channel-switches { display: flex; margin: -8px 0 14px; padding: 12px 14px; gap: 22px; flex-wrap: wrap; background: #f7faf8; border: 1px solid #e0e8e3; border-radius: 10px; }
.wechat-channel-switches .wechat-enable-switch { margin: 0; font-size: 13px; }
.wechat-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 16px; }
.wechat-setting-full { grid-column: 1/-1; }
.wechat-setting-full textarea { min-height: 126px; font-family: Consolas,monospace; font-size: 12px; }
.wechat-platform-guide { margin-top: 16px; padding: 15px; background: #f6f8f7; border: 1px solid #e1e7e3; border-radius: 10px; }
.wechat-platform-guide h3 { margin: 0 0 10px; font-size: 15px; }
.wechat-platform-guide > p { margin: -4px 0 12px; color: #6e7671; font-size: 12px; }
.wechat-platform-guide dl { display: grid; margin: 0; gap: 7px; }
.wechat-platform-guide dl div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 10px; }
.wechat-platform-guide dt { color: #727980; }
.wechat-platform-guide dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: Consolas,monospace; font-size: 12px; }
.wechat-intent-maintenance { display: flex; margin-top: 14px; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 12px; color: #805822; background: #fff8e9; border: 1px solid #f0d9ac; border-radius: 10px; font-size: 13px; }
.wechat-intent-maintenance button { flex: 0 0 auto; }
.wechat-settings-actions { display: flex; margin-top: 18px; justify-content: flex-end; }
.wechat-settings-actions button { min-width: 180px; }
.captcha-row { display: grid; grid-template-columns: minmax(0,1fr) 132px; align-items: stretch; gap: 9px; }
.captcha-row > input { min-width: 0; }
.captcha-image-button { width: 132px; height: 46px; min-height: 46px; padding: 0; overflow: hidden; background: #f7f9f6; border: 1px solid #d7dcd5; border-radius: 9px; }
.captcha-image-button:hover { border-color: #ffb497; transform: none; }
.captcha-image-button img { display: block; width: 132px; height: 46px; object-fit: cover; }

/* Store header */
.life-header {
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid #e8eaed;
  backdrop-filter: blur(14px);
}
.header-inner { height: 68px; max-width: 1240px; padding: 0 20px; gap: 16px; }
.storefront-brand-button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  align-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.storefront-brand-button:hover { color: inherit; background: transparent; box-shadow: none; filter: none; transform: none; }
.location-pill {
  min-height: 38px;
  padding: 6px 10px;
  color: #51565e;
  background: #f7f7f8;
  border-color: #ebecef;
  border-radius: 8px;
}
.location-pill .ui-icon { color: var(--commerce-brand); }
.desktop-life-nav { gap: 0; }
.desktop-life-nav :is(button, a) {
  min-height: 38px;
  padding: 7px 10px;
  color: #555b63;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
}
.desktop-life-nav :is(button, a):hover { color: var(--commerce-brand); background: #fff2ed; transform: none; }
.desktop-life-nav :is(button, a).active {
  color: #fff;
  background: linear-gradient(90deg,#ff651f,#f34825);
  font-weight: 800;
}
.desktop-life-nav .ui-icon { width: 18px; }

/* Storefront catalog */
.catalog-page {
  width: min(1240px,100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 18px 20px 90px;
  background: #f5f5f5;
}
.catalog-sticky-head {
  position: sticky;
  top: 68px;
  z-index: 18;
  display: block;
  margin: 0 0 20px;
  padding: 10px 0 12px;
  background: rgba(245,245,245,.96);
  backdrop-filter: blur(12px);
}
.catalog-toolbar {
  position: static;
  justify-content: center;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}
.catalog-search { width: min(760px,100%); height: 48px; }
.catalog-search > .ui-icon { left: 17px; top: 14px; color: #8c929a; }
.catalog-search input {
  height: 48px;
  padding: 0 104px 0 48px;
  border: 2px solid var(--commerce-brand);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(255,80,28,.08);
}
.catalog-search input:focus { border-color: #ff3d1f; box-shadow: 0 0 0 3px rgba(255,80,28,.11); }
.catalog-search button {
  right: 4px;
  top: 4px;
  min-width: 88px;
  min-height: 40px;
  padding: 7px 18px;
  border-radius: 9px;
  background: linear-gradient(90deg,#ff6a00,#ff3d1f);
}
.catalog-categories,.catalog-sticky-head .catalog-categories {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  gap: 4px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #eceef0;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(23,29,36,.035);
}
.catalog-sticky-head .catalog-category,.catalog-category {
  flex: 1 0 92px;
  min-width: 92px;
  min-height: 58px;
  padding: 7px 8px;
  gap: 7px;
  color: #4f555d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: none;
}
.catalog-categories .catalog-category:not(.active),.catalog-sticky-head .catalog-category:not(.active) {
  color: #4f555d;
  background: #fff;
  border-color: transparent;
}
.catalog-categories .catalog-category:not(.active):hover,.catalog-sticky-head .catalog-category:not(.active):hover {
  color: var(--commerce-brand-dark);
  background: #fff6f2;
  border-color: #ffd8c9;
  transform: none;
}
.catalog-categories .catalog-category.active,.catalog-sticky-head .catalog-category.active {
  color: #fff;
  background: linear-gradient(135deg,#ff6a00,#ff3d1f);
  border-color: #ee451e;
  box-shadow: 0 6px 14px rgba(255,75,29,.2);
}
.catalog-categories .catalog-category::after { display: none; }
.catalog-categories .catalog-category.active .category-copy small { color: rgba(255,255,255,.8); }
.catalog-sticky-head .category-visual,.category-visual { width: 34px; height: 34px; flex-basis: 34px; background: #fff7ed; border-radius: 50%; }
.catalog-categories .catalog-category.active .category-visual { background: #fff; border-color: rgba(255,255,255,.9); }
.catalog-sticky-head .category-emoji,.catalog-sticky-head .category-home .doodle-logo { width: 25px; height: 25px; }
.catalog-sticky-head .catalog-category strong { font-size: 13px; }
.catalog-products { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.catalog-products > .catalog-section-title h2 { margin: 0 0 14px; font-size: 21px; }
.catalog-products > .catalog-section-title .catalog-title-actions { top: 258px; z-index: 16; margin-bottom: 14px; }
.catalog-sort { padding: 3px; gap: 1px; background: #fff; border: 1px solid #e4e6e9; border-radius: 8px; }
.catalog-sort button { min-height: 30px; padding: 4px 12px; color: #666c74; border-radius: 6px; font-size: 12px; }
.catalog-sort button.active { color: #fff; background: var(--commerce-brand); box-shadow: none; }
.product-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.product-card {
  border: 1px solid #eceef0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20,26,34,.04);
  transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.product-card:hover { border-color: #ffc8b2; box-shadow: 0 10px 26px rgba(31,37,45,.09); transform: translateY(-2px); }
.product-image {
  aspect-ratio: 1/1;
  object-fit: contain;
  object-position: center;
  background: #f6f6f6;
}
.product-body { padding: 11px 12px 12px; }
.product-name {
  min-height: 42px;
  margin: 0 0 8px;
  color: #252a31;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-meta { align-items: flex-end; }
.product-sales-stock { display: flex; min-height: 24px; margin-top: 6px; align-items: center; justify-content: space-between; gap: 8px; }
.product-sales-stock .stock { margin-left: auto; }
.price { color: #e64317; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.price small { font-size: 11px; font-weight: 700; }
.stock { color: #8a9097; background: #f3f4f5; border-radius: 5px; }
.stock.sold { color: #b54a44; background: #fff0ef; }
.product-body > button.add-cart-button {
  min-height: 31px;
  margin-top: 9px;
  padding: 5px 10px;
  color: #fff;
  background: linear-gradient(90deg,#ff6a00,#ff3d1f);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
}
.product-body > button.add-cart-button .ui-icon { width: 15px; height: 15px; }
.catalog-load-sentinel { color: #969ba2; }
.empty-state { background: #fff; border-color: #dfe2e5; border-radius: 12px; }

/* Store inner pages */
.inner-mall-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  width: 100%;
  min-height: 68px;
  padding: 8px max(20px,calc((100vw - 1200px)/2));
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid #e7e9ec;
  box-shadow: 0 2px 10px rgba(24,30,38,.035);
  backdrop-filter: blur(14px);
}
.inner-brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  align-items: center;
  gap: 9px;
  color: #252a31;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.inner-brand:hover { color: var(--commerce-brand); background: transparent; transform: none; }
.inner-brand .generated-brand-logo { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; }
.inner-brand > span { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.inner-brand strong { font-size: 17px; }
.inner-brand small { margin-top: 4px; color: #999da4; font-size: 9px; letter-spacing: .1em; }
.inner-mall-nav { display: flex; margin-left: auto; align-items: center; gap: 2px; }
.inner-mall-nav :is(button, a) {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 10px;
  align-items: center;
  gap: 6px;
  color: #555b63;
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 13px;
}
.inner-mall-nav :is(button, a):hover { color: var(--commerce-brand); background: #fff2ed; transform: none; }
.inner-mall-nav :is(button, a).active { color: #fff; background: linear-gradient(90deg,#ff651f,#f34825); }
.inner-mall-nav .ui-icon { width: 18px; height: 18px; }

.topbar {
  min-height: 64px;
  padding: 10px max(20px,calc((100vw - 1200px)/2));
  gap: 12px;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid #e7e9ec;
  box-shadow: 0 2px 10px rgba(24,30,38,.035);
}
.topbar .brand { color: var(--commerce-brand); font-size: 21px; }
.topbar-brand .doodle-logo { width: 31px; height: 31px; padding: 5px; color: #fff; background: linear-gradient(145deg,#ff7a18,#ff3d1f); border-radius: 9px; }
.topbar > button.secondary { min-height: 36px; padding: 6px 12px; }
.content {
  width: min(1200px,100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 24px 20px 96px;
  background: #f5f5f5;
}
.content > h1,.toolbar h1 { margin: 0 0 18px; font-size: 25px; }
.content .card { margin-bottom: 12px; padding: 18px; }
.content > button:not(.detail-back) { min-width: 132px; margin-left: auto; }
.cart-page,main.content:has(> .toolbar:first-child .grow:first-child) { max-width: 1050px; }
.cart-page,.orders-page { min-height: calc(100vh - 68px); padding-top: 18px; }
.cart-page .cart-row,main.content:has(.cart-row) > .cart-row { min-height: 108px; padding: 18px 20px; }
.cart-page .product-name,main.content:has(.cart-row) .product-name { min-height: 0; margin-bottom: 4px; font-size: 16px; }
.qty { gap: 7px; }
.qty button { min-width: 36px; min-height: 34px; padding: 4px 10px; border-radius: 7px; }
.cart-page .total,main.content:has(.cart-row) > .total { margin: 16px 0; padding: 18px; background: #fff; border: 1px solid #eceef0; border-radius: 10px; color: #333840; font-size: 18px; }
.cart-page .total::first-letter,main.content:has(.cart-row) > .total::first-letter { color: var(--commerce-brand); }
.orders-page { max-width: 1000px; }
.order-filter-bar { background: #fff; border-color: #e5e7ea; border-radius: 10px; box-shadow: 0 3px 12px rgba(23,29,36,.035); }
.order-search input,.order-filter-select { border-color: #dfe2e5; border-radius: 8px; }
.order-search input:focus,.order-filter-select:focus { border-color: #ff9c76; box-shadow: 0 0 0 3px rgba(255,80,28,.09); }
.user-order-card { min-height: 108px; border-radius: 10px; }
.user-order-card:hover { border-color: #ffc8b2; box-shadow: 0 8px 22px rgba(31,37,45,.07); }
.total { color: #2d3239; font-size: 20px; }
.product-detail-page { max-width: 1080px; }
.detail-back { margin-bottom: 14px; }
.product-detail-card { border-color: #e6e8eb; border-radius: 12px; box-shadow: 0 8px 28px rgba(25,31,39,.06); }
.product-detail-gallery { background: #f7f7f7; }
.product-detail-info { padding: clamp(24px,4vw,48px); }
.detail-category { color: var(--commerce-brand-dark); background: #fff0e9; }
.detail-merchant { color: #747a82; }
.product-detail-info > button.detail-add-cart { min-height: 42px; padding: 8px 22px; background: linear-gradient(90deg,#ff6a00,#ff3d1f); }
.content:has(> h1:first-child:nth-last-child(n+2)) > .card { border-radius: 10px; }
.my-page { max-width: 880px; }

.my-section-heading > .ui-icon { color: var(--commerce-brand); }
.my-profile-section { border-radius: 12px; }
.my-admin-entry.admin-entry-wrap { margin: 0 0 4px; }
.my-admin-entry .admin-entry {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 82px;
  padding: 15px 18px;
  gap: 15px;
  overflow: hidden;
  color: #292d32;
  background: linear-gradient(135deg,#fff 0%,#fffaf7 58%,#fff0e8 100%);
  border: 1px solid #ffd0bc;
  border-radius: 14px;
  box-shadow: 0 9px 26px rgba(211,73,25,.09);
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.my-admin-entry .admin-entry::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 120px;
  height: 120px;
  right: -50px;
  bottom: -72px;
  background: rgba(255,90,31,.08);
  border-radius: 50%;
}
.my-admin-entry .admin-entry:hover {
  transform: translateY(-2px);
  border-color: #ff9d77;
  box-shadow: 0 14px 32px rgba(211,73,25,.15);
}
.my-admin-entry .admin-entry:active { transform: translateY(0); }
.my-admin-entry .admin-entry:focus-visible { outline: 3px solid rgba(255,90,31,.28); outline-offset: 3px; }
.my-admin-entry .admin-entry-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg,#ff6a00,#ff3d1f);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(255,75,28,.22);
}
.my-admin-entry .admin-entry-icon .ui-icon { width: 24px; height: 24px; }
.my-admin-entry .admin-entry-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; }
.my-admin-entry .admin-entry-copy strong { color: #292d32; font-size: 18px; line-height: 1.2; }
.my-admin-entry .admin-entry-copy small { color: #777d84; font-size: 13px; font-weight: 500; }
.my-admin-entry .admin-entry-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #e94d1b;
  background: #fff;
  border: 1px solid #ffd0bc;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  transition: transform .18s ease;
}
.my-admin-entry .admin-entry:hover .admin-entry-arrow { transform: translateX(3px); }
.field input,.field select,.field textarea,.search input,.toolbar input {
  border-color: #dfe2e5;
  border-radius: 8px;
  background: #fff;
}
.field input:focus,.field select:focus,.field textarea:focus,.search input:focus,.toolbar input:focus {
  border-color: #ff9c76;
  box-shadow: 0 0 0 3px rgba(255,80,28,.09);
}

/* Back office */
.life-header.editorial-header .header-inner { height: 68px; }
.admin-layout {
  grid-template-columns: 224px minmax(0,1fr);
  min-height: 100vh;
  background: #f4f5f7;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  color: #fff;
  background: #20252b;
  border-right: 1px solid #171b20;
  box-shadow: none;
}
.admin-brand { padding: 4px 10px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
.admin-brand .doodle-logo { width: 38px; height: 38px; padding: 7px; color: #fff; background: linear-gradient(145deg,#ff7a18,#ff3d1f); border-radius: 10px; }
.admin-brand strong { color: #fff; font-size: 18px; }
.admin-brand small { color: #9ea5ae; font-size: 11px; }
.sidebar-nav { padding-top: 16px; }
.sidebar-nav button,.sidebar button {
  min-height: 42px;
  margin: 3px 0;
  padding: 9px 12px;
  gap: 10px;
  color: #c9ced5;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
}
.sidebar-nav button:hover,.sidebar button:hover { color: #fff; background: rgba(255,255,255,.07); transform: none; }
.sidebar-nav button.active,.sidebar button.active { color: #fff; background: linear-gradient(90deg,#ff651f,#f34825); box-shadow: 0 6px 16px rgba(203,56,22,.18); }
.sidebar-nav button.has-order-notice { color: #fff; background: rgba(255,92,34,.18); }
.workspace {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px 28px 44px;
  overflow: visible;
}
.workspace > .toolbar,.workspace > .workspace-head {
  min-height: 58px;
  margin: 0 0 16px;
  padding: 0;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.workspace > .toolbar h1,.workspace > .workspace-head h1 { margin: 0; color: #22272e; font-size: 24px; }
.workspace > .toolbar > button,.workspace > .workspace-head > button { min-height: 38px; }
.console-topbar { display: flex; min-height: 54px; margin: 0 0 14px; align-items: center; justify-content: space-between; gap: 12px; }
.console-topbar > strong { color: #22272e; font-size: 20px; }
.console-top-actions { display: flex; margin-left: auto; align-items: center; justify-content: flex-end; gap: 8px; }
.console-top-actions button { min-height: 38px; }
.stats,.overview-stats { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.stat,.overview-stat {
  min-height: 112px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e7ea;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(23,29,36,.035);
}
.stat strong,.overview-stat strong { color: #242a31; font-size: 29px; }
.stat-mark,.overview-stat > .ui-icon { color: var(--commerce-brand); background: #fff0e9; }
.overview-filters {
  padding: 14px;
  gap: 10px;
  background: #fff;
  border: 1px solid #e4e7ea;
  border-radius: 10px;
  box-shadow: none;
}
.overview-filter span { color: #70767f; font-size: 12px; }
.overview-filter input,.overview-filter select { min-height: 38px; border-color: #dfe2e5; border-radius: 7px; }
.analysis-card {
  background: #fff;
  border: 1px solid #e5e7ea;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(23,29,36,.035);
}
.analysis-title h2 { color: #262b31; }
.analysis-title p,.chart-legend,.trend-labels span,.trend-max,.ranking-label small { color: #737982; }
.chart-legend .sales-key::before { background: #ffc09f; }
.chart-legend .orders-key::before { background: var(--commerce-brand); }
.grid-line { stroke: #eceef0; }
.orders-line { stroke: var(--commerce-brand); }
.orders-dot { fill: #fff; stroke: var(--commerce-brand); }
.sales-bar { fill: #ffc09f; }
.ranking-track { background: #f0f1f2; }
.table-wrap {
  width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e5e8;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(23,29,36,.035);
}
table { min-width: 760px; }
th,td { padding: 13px 14px; border-color: #eceef0; font-size: 14px; }
th { color: #686e76; background: #f7f8f9; font-size: 13px; font-weight: 700; }
tbody tr:hover { background: #fff8f5; }
tbody tr.clickable-row:hover { box-shadow: inset 3px 0 var(--commerce-brand); }
.data-filter-bar {
  display: flex;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: 1px solid #e2e5e8;
  border-radius: 10px;
  scrollbar-width: none;
}
.data-filter-bar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.data-filter-search { position: relative; flex: 1 0 260px; min-width: 220px; }
.data-filter-search .ui-icon { position: absolute; left: 12px; top: 50%; width: 17px; color: #7a8088; transform: translateY(-50%); pointer-events: none; }
.data-filter-search input,.data-filter-bar select,.data-filter-date {
  width: 100%;
  min-height: 38px;
  color: #3f454d;
  background: #fff;
  border: 1px solid #d9dde1;
  border-radius: 7px;
  outline: none;
}
.data-filter-search input { padding: 7px 12px 7px 38px; }
.data-filter-bar select { flex: 0 0 148px; width: 148px; padding: 7px 10px; }
.data-filter-search input:focus,.data-filter-bar select:focus,.data-filter-date:focus-within { border-color: var(--commerce-brand); box-shadow: 0 0 0 3px rgba(255,90,31,.1); }
.data-filter-date { display: flex; flex: 0 0 188px; width: 188px; padding: 5px 8px; align-items: center; gap: 7px; }
.data-filter-date > span { flex: 0 0 auto; color: #777e86; font-size: 11px; font-weight: 700; white-space: nowrap; }
.data-filter-date > input { min-width: 0; width: 100%; padding: 0; color: #30363d; background: transparent; border: 0; outline: 0; font-size: 12px; }
.batch-toolbar { min-height: 48px; }
.batch-toolbar button { min-height: 34px; border-radius: 7px; }
.pagination { color: #737982; }
.pagination button { min-height: 34px; }
.modal-bg,.drawer-bg { background: rgba(20,24,30,.55); backdrop-filter: blur(3px); }
.modal,.drawer {
  border: 1px solid #e4e6e9;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(9,13,18,.25);
}
.modal-head,.drawer-head { background: #fff; border-bottom-color: #eceef0; }
.modal-actions,.drawer-actions { background: #f7f8f9; border-top-color: #e5e7ea; }
.icon-accordion-toggle { color: #444a52; background: #f7f8f9; border-color: #dfe2e5; }
.category-icon-choice.active { color: var(--commerce-brand-dark); background: #fff0e9; border-color: #ffc5ae; }
.product-image-manager { background: #f7f8f9; border-color: #dfe2e5; }
.merchant-registration-toggle.enabled { color: #c94717; background: #fff0e9; border-color: #ffc5ae; }
.merchant-registration-toggle.paused { color: #fff; background: #515861; border-color: #515861; }
.nav-order-badge { background: #ff3d1f; }

/* Tablet */
@media (max-width: 1080px) {
  .header-inner { padding: 0 16px; }
  .desktop-life-nav :is(button, a) { padding-inline: 8px; }
  .product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .admin-layout { grid-template-columns: 200px minmax(0,1fr); }
  .workspace { padding: 22px 18px 36px; }
}

/* Mobile storefront and usable compact back office */
@media (max-width: 760px) {
  body { background: #f5f5f5; font-size: 15px; }
  button { min-height: 38px; }
  .auth-page { display: block; padding: 18px 12px; background: linear-gradient(155deg,#ff6a00 0,#ff3d1f 210px,#f5f5f5 211px); }
  .auth-card { margin: 58px auto 20px; padding: 25px 19px; border-radius: 14px; }
  .auth-mobile-brand { display: block; margin-bottom: 26px; }
  .auth-mobile-brand .brand-lockup strong,.auth-mobile-brand .brand-lockup small { color: #e94317; }
  .address-fields { grid-template-columns: 1fr; }

  .life-header.editorial-header { position: sticky; top: 0; padding: 0; background: #fff; border-bottom: 1px solid #e7e9ec; box-shadow: 0 2px 9px rgba(26,31,38,.05); }
  .editorial-header .mobile-home-row { height: 58px; padding: 8px 12px; background: #fff; }
  .editorial-header .brand-mark { width: 38px; height: 38px; }
  .editorial-header .brand-lockup strong { color: #e94317; font-size: 18px; }
  .storefront-brand-button { min-height: 42px; flex: 0 1 auto; }

  .catalog-page { min-height: calc(100vh - 58px); padding: 0 10px 82px; }
  .catalog-sticky-head { top: 58px; margin-bottom: 12px; padding: 8px 0 9px; }
  .catalog-toolbar { margin-bottom: 8px; padding: 0; }
  .catalog-search { height: 44px; }
  .catalog-search input { height: 44px; padding-left: 42px; padding-right: 82px; border-radius: 10px; font-size: 14px; }
  .catalog-search > .ui-icon { left: 14px; top: 12px; }
  .catalog-search button { top: 4px; right: 4px; min-width: 68px; min-height: 36px; padding: 6px 13px; border-radius: 7px; }
  .catalog-categories,.catalog-sticky-head .catalog-categories { width: calc(100% + 20px); margin: 0 -10px; padding: 7px 10px; gap: 2px; border-width: 1px 0; border-radius: 0; }
  .catalog-sticky-head .catalog-category,.catalog-category { flex: 0 0 116px; min-width: 116px; min-height: 50px; padding: 5px 7px; }
  .catalog-category .category-copy { flex: 1 1 auto; }
  .catalog-sticky-head .category-visual,.category-visual { width: 30px; height: 30px; flex-basis: 30px; }
  .catalog-products > .catalog-section-title h2 { margin-bottom: 10px; font-size: 19px; }
  .catalog-products > .catalog-section-title .catalog-title-actions { top: 203px; z-index: 16; margin-bottom: 10px; }
  .catalog-sort button { min-height: 28px; padding: 3px 9px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-card { border-radius: 8px; }
  .product-body { padding: 9px; }
  .product-name { min-height: 39px; margin-bottom: 6px; font-size: 14px; }
  .price { font-size: 19px; }
  .stock { padding: 2px 5px; font-size: 9px; }
  .product-body > button.add-cart-button { min-height: 29px; padding: 4px 8px; font-size: 11px; }

  .inner-mall-header { min-height: 58px; padding: 7px 10px; gap: 8px; }
  .inner-brand { min-height: 42px; }
  .inner-brand .generated-brand-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .inner-brand strong { font-size: 15px; }
  .inner-brand small { display: none; }
  .inner-mall-nav { display: none; }
  
  .topbar { min-height: 56px; padding: 8px 10px; gap: 7px; }
  .topbar .brand { font-size: 18px; }
  .topbar-brand .doodle-logo { width: 28px; height: 28px; }
  .topbar > button.secondary { min-height: 34px; padding: 5px 9px; font-size: 13px; }
  .content { min-height: calc(100vh - 56px); padding: 16px 10px 82px; }
  .cart-page,.orders-page { min-height: calc(100vh - 58px); padding-top: 12px; }
  .content > h1,.toolbar h1 { margin-bottom: 14px; font-size: 22px; }
  .content .card { padding: 14px; }
  .bottom-nav { grid-template-columns: repeat(5,1fr); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-top-color: #e1e3e6; box-shadow: 0 -5px 18px rgba(20,25,32,.07); }
  .bottom-nav :is(button, a) { min-height: 55px; color: #767c84; background: transparent; border: 0; border-radius: 6px; font-size: 11px; }
  .bottom-nav :is(button, a).active { color: var(--commerce-brand); background: transparent; }
  .bottom-nav :is(button, a).active .ui-icon { stroke-width: 2.3; }
  .cart-row { grid-template-columns: 1fr; }
  .cart-page .cart-row,main.content:has(.cart-row) > .cart-row { min-height: 0; padding: 14px; }
  .qty { width: 100%; margin-top: 8px; }
  .qty button.danger { margin-left: auto; }
  .order-filter-bar { grid-template-columns: minmax(0,1fr) 108px; padding: 9px; }
  .user-order-card { min-height: 96px; }
  .product-detail-card { display: block; }
  .product-detail-gallery { grid-template-columns: 1fr; }
  .product-detail-info { padding: 20px 16px; }
  
  .my-profile-section { padding: 16px; }
  .my-admin-entry .admin-entry { min-height: 74px; padding: 12px 13px; gap: 12px; }
  .my-admin-entry .admin-entry-icon { width: 44px; height: 44px; flex-basis: 44px; }
  .my-admin-entry .admin-entry-copy strong { font-size: 17px; }
  .my-admin-entry .admin-entry-arrow { width: 32px; height: 32px; flex-basis: 32px; }

  .admin-layout { display: block; min-height: 100vh; }
  .sidebar { position: sticky; top: 0; z-index: 30; width: 100%; height: auto; padding: 0; background: #20252b; border: 0; }
  .admin-brand { display: flex; height: 54px; padding: 8px 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
  .admin-brand .doodle-logo { width: 32px; height: 32px; }
  .admin-brand strong { font-size: 16px; }
  .admin-brand small { font-size: 10px; }
  .sidebar-nav { display: flex; padding: 5px 7px 7px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav button,.sidebar button { flex: 0 0 auto; width: auto; min-height: 36px; margin: 0; padding: 6px 10px; gap: 6px; white-space: nowrap; font-size: 12px; }
  .sidebar-nav button .ui-icon { width: 17px; height: 17px; }
  .workspace { padding: 16px 10px 28px; }
  .workspace > .toolbar,.workspace > .workspace-head { min-height: 48px; margin-bottom: 10px; }
  .workspace > .toolbar h1,.workspace > .workspace-head h1 { font-size: 21px; }
  .console-topbar { min-height: 44px; margin-bottom: 10px; }
  .console-topbar > strong { font-size: 17px; }
  .console-top-actions { gap: 6px; }
  .console-top-actions button { min-height: 34px; padding: 5px 8px; font-size: 12px; }
  .stats,.overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stat,.overview-stat { min-height: 94px; padding: 13px; }
  .stat strong,.overview-stat strong { font-size: 23px; }
  .overview-filters { gap: 8px; padding: 10px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-card { padding: 14px; }
  .table-wrap { border-radius: 8px; }
  .table-wrap tbody tr { border-color: #e4e6e9; border-radius: 8px; box-shadow: none; }
  .data-filter-bar {
    width: calc(100% + 20px);
    margin: 0 -10px 9px;
    padding: 8px 10px;
    gap: 7px;
    border-width: 1px 0;
    border-radius: 0;
    scroll-snap-type: x proximity;
  }
  .data-filter-search { flex: 0 0 230px; min-width: 230px; scroll-snap-align: start; }
  .data-filter-bar select { flex-basis: 138px; width: 138px; scroll-snap-align: start; }
  .data-filter-date { flex-basis: 176px; width: 176px; scroll-snap-align: start; }
  .batch-toolbar { align-items: stretch; flex-direction: column; }
  .batch-toolbar .batch-actions { justify-content: flex-start; }
  .modal,.drawer { border-radius: 12px; }
}

@media (max-width: 380px) {
  .topbar .brand span { display: none; }
  .catalog-sort button { padding-inline: 7px; }
  .stats,.overview-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* GPT-generated brand assets; preserve the restored commerce layout. */
.generated-brand-logo {
  display: block;
  object-fit: contain;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.category-generated-logo {
  display: block;
  object-fit: contain;
  font-size: 0;
}
.category-icon-choice .category-generated-logo { width: 38px; height: 38px; }
.selected-category-icon .category-generated-logo { width: 32px; height: 32px; }
.product-visual .category-generated-logo { width: 72px; height: 72px; }

/* Product batch actions stay on one line at every viewport width. */
.product-data-module .batch-toolbar {
  align-items: center !important;
  flex-flow: row nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.product-data-module .batch-toolbar::-webkit-scrollbar { display: none; }
.product-data-module .batch-actions {
  width: auto !important;
  margin-left: auto;
  flex-flow: row nowrap !important;
  white-space: nowrap;
}

/* User orders: horizontal table on desktop, compact cards on phones. */
.orders-page { max-width: 1180px; }
.user-orders-table-wrap {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e6e8;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(28,34,40,.045);
}
.user-orders-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  border-collapse: collapse;
}
.user-orders-table th,
.user-orders-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #eceef0;
  text-align: left;
  vertical-align: middle;
}
.user-orders-table th {
  color: #626971;
  background: #f7f8f8;
  font-size: 13px;
  font-weight: 700;
}
.user-orders-table th:nth-child(1) { width: 24%; }
.user-orders-table th:nth-child(2) { width: 27%; }
.user-orders-table th:nth-child(3) { width: 18%; }
.user-orders-table th:nth-child(4) { width: 11%; }
.user-orders-table th:nth-child(5) { width: 10%; }
.user-orders-table th:nth-child(6) { width: 10%; text-align: right; }
.user-orders-table td:last-child { text-align: right; }
.user-orders-table tbody tr:last-child td { border-bottom: 0; }
.user-order-table-row { cursor: pointer; outline: none; transition: background-color .16s ease; }
.user-order-table-row:hover,
.user-order-table-row:focus-visible { background: #fff8f4; }
.user-order-table-row:focus-visible { box-shadow: inset 0 0 0 2px #ff9c76; }
.order-number-cell,
.order-time-cell { color: #555d65; font-size: 13px; font-variant-numeric: tabular-nums; }
.order-product-cell { overflow: hidden; color: #252b31; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.order-amount-cell strong { color: #e94a18; font-size: 16px; }
.order-amount-cell span { color: #747b82; font-size: 12px; }
.order-table-link { color: #df481b; font-size: 13px; font-weight: 700; white-space: nowrap; }
.order-feed-mobile { display: none; }
.orders-page > .pagination {
  min-height: 44px;
  margin-top: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

@media (max-width: 760px) {
  .orders-page { padding-inline: 12px; }
  .orders-page .mall-page-head { margin-bottom: 12px; }
  .orders-page .mall-page-head h1 { font-size: 24px; }
  .order-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .order-filter-bar::-webkit-scrollbar { display: none; }
  .order-search { min-width: 215px; flex: 1 0 215px; }
  .order-filter-select { width: 108px; min-width: 108px; flex: 0 0 108px; }
  .order-result-count { min-width: 58px; flex: 0 0 58px; text-align: right; align-self: center; }
  .order-search input,
  .order-filter-select { min-height: 42px; font-size: 14px; }
  .user-orders-table-wrap { display: none; }
  .order-feed-mobile { display: grid; gap: 10px; }
  .user-order-card {
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e5e7;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(28,34,40,.04);
    outline: none;
  }
  .user-order-card:focus-visible { border-color: #ff9c76; box-shadow: 0 0 0 3px rgba(255,80,28,.1); }
  .order-card-head {
    display: flex;
    min-height: 42px;
    padding: 9px 12px;
    align-items: center;
    gap: 8px;
    background: #fafafa;
    border-bottom: 1px solid #eceef0;
  }
  .order-card-head > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #747b82;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .order-card-body { display: flex; min-height: 72px; padding: 13px 12px; align-items: center; gap: 11px; }
  .order-card-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    color: #e84b1a;
    background: #fff1ea;
    border-radius: 10px;
  }
  .order-card-icon .ui-icon { width: 20px; height: 20px; }
  .order-card-copy { min-width: 0; }
  .order-card-body h2 {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: #252b31;
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .order-card-body p { margin: 0; color: #7a8188; font-size: 11px; }
  .order-card-foot {
    display: flex;
    min-height: 42px;
    padding: 8px 12px;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    background: #fff;
    border-top: 1px solid #f0f1f2;
  }
  .order-card-foot span { color: #777e85; font-size: 11px; }
  .order-card-foot strong { color: #e94a18; font-size: 15px; }
  .order-card-foot b { margin-left: 6px; color: #434a51; font-size: 11px; }
  .orders-page > .pagination { margin-top: 10px; }
}

/* Keep every catalog view clean: no stacked horizontal rules above products. */
.catalog-sticky-head {
  border-bottom: 0 !important;
}
.catalog-categories,
.catalog-sticky-head .catalog-categories {
  border-top: 0 !important;
  border-bottom: 0 !important;
}
.catalog-products {
  border-top: 0 !important;
}

/* Front-office pages rely on navigation and content, without repeated page titles. */
.catalog-heading-copy,
.mall-page > .mall-page-head h1,
.my-page-title {
  display: none !important;
}

/* One brand lockup for storefront, inner pages, authentication and back office. */
.brand-lockup,
.inner-brand,
.admin-brand {
  align-items: center;
  gap: 10px;
  text-align: left;
}
.brand-mark {
  display: grid;
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  padding: 0 !important;
  place-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.brand-lockup .generated-brand-logo,
.inner-brand .generated-brand-logo,
.admin-brand .generated-brand-logo {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  padding: 0 !important;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.brand-lockup > span:last-child,
.inner-brand > span,
.admin-brand > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.05;
  white-space: nowrap;
}
.brand-lockup strong,
.inner-brand strong,
.admin-brand strong {
  color: #20242a !important;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -.035em !important;
}
.brand-lockup small,
.inner-brand small,
.admin-brand small {
  display: block !important;
  margin-top: 4px;
  color: #8d949c !important;
  font-family: Inter, Arial, sans-serif;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: .13em !important;
  line-height: 1;
}
.auth-intro .brand-lockup {
  width: max-content;
  padding: 9px 12px;
  background: #fff;
  border-radius: 10px;
}
.admin-brand {
  min-height: 68px;
  margin: -20px -14px 14px;
  padding: 13px 18px;
  background: #fff;
  border: 0;
}

@media (max-width: 760px) {
  .editorial-header .brand-mark,
  .inner-brand .generated-brand-logo,
  .admin-brand .generated-brand-logo {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
  }
  .editorial-header .brand-lockup strong,
  .inner-brand strong,
  .admin-brand strong { font-size: 20px !important; }
  .admin-brand {
    height: 58px;
    min-height: 58px;
    margin: 0;
    padding: 8px 12px;
  }
}

/* Back-office search, filters and batch actions remain available while scrolling. */
.catalog-sticky-head {
  padding: 14px;
  background: #fff;
  border: 1px solid #e7e9ec;
  border-bottom: 1px solid #e7e9ec !important;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(27,34,42,.08);
  backdrop-filter: none;
}
.catalog-sticky-head .catalog-toolbar { margin-bottom: 10px; }
.catalog-sticky-head .catalog-categories {
  padding: 9px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #eef0f2;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 760px) {
  .catalog-sticky-head {
    margin-inline: 0;
    padding: 10px;
    border-radius: 15px;
  }
  .catalog-sticky-head .catalog-categories {
    width: 100%;
    margin-inline: 0;
    padding: 8px 0 0;
  }
}
.console-topbar { justify-content: flex-end; }
.overview-portals { min-height: 0; margin: -4px 0 14px; justify-content: flex-start; }
.overview-portals .console-top-actions { margin-left: 0; }
.console-portal-actions {
  padding: 4px;
  gap: 5px;
  background: #e8ece7;
  border: 1px solid #d7ddd6;
  border-radius: 14px;
}
.console-portal-actions .console-portal-button {
  display: inline-flex;
  min-width: 124px;
  min-height: 42px;
  padding: 6px 14px 6px 8px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #39433c;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.console-portal-actions .console-portal-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  color: #4d7058;
  background: #f7faf6;
  border-radius: 9px;
}
.console-portal-actions .console-portal-icon .ui-icon { width: 18px; height: 18px; }
.console-portal-actions .console-portal-button:hover {
  color: #25342a;
  background: rgba(255,255,255,.72);
  transform: translateY(-1px);
}
.console-portal-actions .store-entry {
  color: #fff;
  background: #ef5b2a;
  box-shadow: 0 5px 12px rgba(214,72,30,.2);
}
.console-portal-actions .store-entry .console-portal-icon { color: #ef5b2a; background: #fff; }
.console-portal-actions .store-entry:hover { color: #fff; background: #dc4b1e; }
@media (max-width: 520px) {
  .console-portal-actions { width: 100%; }
  .console-portal-actions .console-portal-button { min-width: 0; flex: 1; padding-inline: 7px 10px; }
}
.data-controls-sticky,
.overview-filters {
  position: sticky;
  top: 0;
  z-index: 24;
}
.data-controls-sticky {
  margin: 0 0 10px;
  padding: 8px 0;
  background: #f4f5f7;
}
.data-controls-sticky .data-filter-bar { margin-bottom: 0; }
.data-controls-sticky .batch-toolbar { margin: 8px 0 0; }
.overview-filters {
  box-shadow: 0 8px 20px rgba(28,34,40,.08);
}

@media (max-width: 760px) {
  .data-controls-sticky,
  .overview-filters { top: 106px; }
  .data-controls-sticky {
    margin: 0 0 8px;
    padding: 7px 0;
  }
  .data-controls-sticky .batch-toolbar {
    margin-top: 7px;
    padding-right: 0;
  }
}

/* Focused product detail: balanced desktop split and swipeable mobile gallery. */
.product-detail-page {
  width: min(1120px,100%);
  max-width: 1120px;
  padding-top: 20px;
}
.detail-back {
  min-height: 38px;
  margin: 0 0 14px;
  padding: 7px 13px;
  color: #535a62;
  background: #fff;
  border-color: #dfe3e5;
  border-radius: 8px;
  font-size: 13px;
}
.product-detail-card {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(330px,.75fr);
  gap: clamp(24px,3vw,38px);
  padding: 22px;
  align-items: start;
  background: #fff;
  border: 1px solid #e2e5e7;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(28,34,40,.07);
}
.product-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  align-self: start;
  background: transparent;
}
.product-detail-gallery .product-image {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f5f5f3;
  border: 0;
  border-radius: 11px;
}
.product-detail-gallery .product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info {
  min-width: 0;
  padding: 26px 4px 12px;
  justify-content: flex-start;
}
.product-detail-info h1 {
  margin: 13px 0 12px;
  color: #20252b;
  font-size: clamp(28px,2.5vw,36px);
  line-height: 1.25;
}
.product-detail-info p { margin: 0 0 16px; color: #626971; font-size: 15px; line-height: 1.7; }
.detail-category { padding: 5px 10px; color: #c94116; background: #fff0e8; border-radius: 999px; font-size: 12px; }
.detail-merchant {
  display: inline-flex;
  padding-top: 14px;
  color: #777e85;
  border-top: 1px solid #eceeef;
  font-size: 13px;
}
.detail-purchase {
  margin: 24px 0 16px;
  padding: 14px 0;
  border-top: 1px solid #eceeef;
  border-bottom: 1px solid #eceeef;
}
.detail-purchase .price { color: #e84917; font-size: 29px; }
.product-detail-info > .detail-add-cart {
  min-width: 142px;
  min-height: 38px;
  margin-left: auto;
  align-self: flex-end;
  border-radius: 999px;
}

/* Order detail: structured product list with a readable summary card. */
.order-detail-page { width: min(1080px,100%); max-width: 1080px; padding-top: 20px; }
.order-detail-reference { min-height: 38px; margin: 0 0 14px; align-items: center; }
.order-detail-reference > div { width: 100%; }
.order-detail-reference p {
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px;
  color: #5e656d;
  background: #fff;
  border: 1px solid #e1e4e6;
  border-radius: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 16px;
  align-items: start;
}
.order-detail-products {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e5e7;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(28,34,40,.045);
}
.order-detail-products > header {
  display: flex;
  min-height: 58px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafafa;
  border-bottom: 1px solid #eceeef;
}
.order-detail-products > header h2 { margin: 0; color: #272c32; font-size: 18px; }
.order-detail-item {
  display: grid;
  min-height: 100px;
  padding: 14px 18px;
  grid-template-columns: 72px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #eceeef;
}
.order-detail-item:last-child { border-bottom: 0; }
.order-detail-item > .product-image {
  width: 72px;
  height: 72px;
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
}
.order-detail-item > .product-image img { width: 100%; height: 100%; object-fit: cover; }
.order-detail-item-copy { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.order-detail-item-copy strong { overflow: hidden; color: #292f35; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.order-detail-item-copy span { color: #777e85; font-size: 12px; }
.order-detail-item > b { color: #e84917; font-size: 15px; white-space: nowrap; }
.order-detail-summary {
  position: sticky;
  top: 82px;
  padding: 18px;
  color: #31373d;
  background: #fff;
  border: 1px solid #e2e5e7;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(28,34,40,.045);
}
.order-detail-summary dl { margin: 0; }
.order-detail-summary dl > div { display: flex; padding: 12px 0; justify-content: space-between; gap: 14px; border-bottom: 1px solid #eceeef; }
.order-detail-summary dl > div:first-child { padding-top: 0; }
.order-detail-summary dt { color: #777e85; font-size: 12px; }
.order-detail-summary dd { margin: 0; text-align: right; font-size: 13px; }
.order-detail-summary .cancelled-text { color: #a34d2d; }
.order-detail-summary .placed-text { color: #25724a; }
.order-detail-summary .summary-total { margin-top: 5px; padding-bottom: 0; border-bottom: 0; align-items: end; }
.order-detail-summary .summary-total dd { color: #e84917; font-size: 21px; font-weight: 800; }

@media (max-width: 760px) {
  .product-detail-page { padding: 10px 10px 84px; }
  .detail-back { margin-bottom: 10px; }
  .product-detail-card { display: block; padding: 10px; border-radius: 12px; }
  .product-detail-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .product-detail-gallery::-webkit-scrollbar { display: none; }
  .product-detail-gallery .product-image {
    min-width: 0;
    flex: 0 0 92%;
    aspect-ratio: 1/1;
    scroll-snap-align: start;
    border-radius: 10px;
  }
  .product-detail-info { padding: 18px 4px 5px; }
  .product-detail-info h1 { margin: 10px 0 8px; font-size: 25px; }
  .product-detail-info p { margin-bottom: 12px; font-size: 14px; }
  .detail-merchant { width: 100%; padding-top: 11px; }
  .detail-purchase { margin: 16px 0 12px; padding: 11px 0; }
  .detail-purchase .price { font-size: 25px; }
  .product-detail-info > .detail-add-cart { min-width: 132px; margin-top: 0; }

  .order-detail-page { padding: 10px 10px 84px; }
  .order-detail-reference { margin-bottom: 10px; }
  .order-detail-reference p { width: 100%; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-detail-layout { display: block; }
  .order-detail-products { border-radius: 10px; }
  .order-detail-products > header { min-height: 50px; padding: 0 12px; }
  .order-detail-products > header h2 { font-size: 16px; }
  .order-detail-item { min-height: 86px; padding: 11px 12px; grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; }
  .order-detail-item > .product-image { width: 58px; height: 58px; border-radius: 8px; }
  .order-detail-item-copy strong { font-size: 14px; }
  .order-detail-item > b { font-size: 13px; }
  .order-detail-summary { position: static; margin-top: 10px; padding: 15px; border-radius: 10px; }
  .order-detail-summary dl > div { padding: 10px 0; }
}

/* Storefront categories are fully visible in a compact tiled grid. */
.catalog-products > .catalog-section-title .catalog-title-actions {
  position: sticky;
  top: 301px;
  z-index: 17;
  width: max-content;
  margin-left: auto;
  padding: 4px;
  background: rgba(255,255,255,.96);
  border: 1px solid #e3e6e9;
  border-radius: 11px;
  box-shadow: 0 9px 24px rgba(24,31,38,.14);
  backdrop-filter: blur(10px);
}
.catalog-products > .catalog-section-title .catalog-sort {
  border: 0;
  box-shadow: none;
}

.data-controls-sticky,
.overview-filters { z-index: 8; }
.modal-bg,
.drawer-bg { z-index: 300; }
.modal,
.drawer { position: relative; z-index: 1; }

.empty-emoji {
  display: inline-grid;
  place-items: center;
  font-family: "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 7px 9px rgba(52,89,60,.1));
}
.table-empty .empty-emoji { display: block; margin: 0 auto 9px; font-size: 52px; }
.chart-empty .empty-emoji { font-size: 50px; opacity: .72; }

.catalog-sticky-head .catalog-categories {
  display: grid;
  grid-template-columns: repeat(10,minmax(0,1fr));
  width: 100%;
  margin: 0;
  padding: 10px 0 0;
  gap: 7px;
  overflow: visible;
  scroll-snap-type: none;
}
.catalog-sticky-head .catalog-category {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 6px 5px;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.catalog-sticky-head .category-visual {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
}
.catalog-sticky-head .category-emoji,
.catalog-sticky-head .category-home .doodle-logo {
  width: 23px;
  height: 23px;
}
.catalog-sticky-head .category-emoji { font-size: 21px; }
.catalog-sticky-head .category-copy { width: 100%; align-items: center; }
.catalog-sticky-head .catalog-category strong { width: 100%; font-size: 12px; text-align: center; }

@media (max-width: 760px) {
  .catalog-products > .catalog-section-title .catalog-title-actions {
    top: 379px;
    padding: 3px;
    border-radius: 10px;
  }
  .catalog-sticky-head .catalog-categories {
    grid-template-columns: repeat(5,minmax(0,1fr));
    width: 100%;
    margin: 0;
    padding: 8px 0 0;
    gap: 5px;
  }
  .catalog-sticky-head .catalog-category {
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    border-radius: 9px;
  }
  .catalog-sticky-head .category-visual {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }
  .catalog-sticky-head .category-emoji,
  .catalog-sticky-head .category-home .doodle-logo {
    width: 21px;
    height: 21px;
  }
  .catalog-sticky-head .category-emoji { font-size: 19px; }
  .catalog-sticky-head .catalog-category strong { font-size: 11px; }
}

/* Category drawer: compact icon-only selection with names kept in tooltips. */
.drawer { width: min(600px,100%); }
.drawer-body {
  padding: 20px 22px;
  background: #f7f8f6;
}
.drawer-body > .field {
  margin: 0 0 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e1e5df;
  border-radius: 14px;
}
.drawer-body > .field > label {
  display: block;
  margin-bottom: 7px;
}
.icon-picker-field { padding: 10px !important; }
.category-icon-search {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #59635b;
  font-size: 13px;
  font-weight: 700;
}
.category-icon-search input { min-height: 40px; background: #fff; }
.category-icon-empty { grid-column: 1 / -1; padding: 18px; color: #7b837d; text-align: center; }
.icon-accordion-toggle {
  min-height: 50px;
  padding: 7px 10px 7px 14px;
  border-radius: 12px;
  background: #fff;
}
.selected-category-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: #f7f8f6;
  border: 1px solid #d9ddd7;
  border-radius: 10px;
}
.selected-category-icon .category-emoji {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  font-size: 26px;
}
.category-icon-picker {
  display: grid;
  grid-template-columns: repeat(8,minmax(0,1fr));
  gap: 7px;
  max-height: calc(100vh - 300px);
  margin-top: 10px;
  padding: 10px;
  overflow-y: auto;
  background: #f5f6f4;
  border: 1px solid #e1e4df;
  border-radius: 13px;
}
.category-icon-choice.icon-only {
  position: relative;
  display: grid;
  min-height: 0;
  aspect-ratio: 1;
  padding: 4px;
  place-items: center;
  color: #313a34;
  background: #fff;
  border: 1px solid #dde1dc;
  border-radius: 11px;
}
.category-icon-choice.icon-only:hover {
  background: #f0f6ef;
  border-color: #8ba58f;
  transform: translateY(-1px);
}
.category-icon-choice.icon-only.active {
  color: #313a34;
  background: #fff2eb;
  border-color: var(--commerce-brand);
  box-shadow: 0 0 0 2px rgba(255,90,31,.14);
}
.category-icon-choice.icon-only.active::after {
  content: "✓";
  position: absolute;
  right: 3px;
  bottom: 2px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  color: #fff;
  background: var(--commerce-brand);
  border-radius: 50%;
  font: 800 10px/1 system-ui,sans-serif;
}
.category-icon-choice.icon-only > .category-emoji {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  font-size: 29px;
  line-height: 1;
}

@media (max-width: 600px) {
  .drawer-body { padding: 14px; }
  .drawer-body > .field { padding: 12px; }
  .category-icon-picker {
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 5px;
    max-height: calc(100vh - 285px);
    padding: 7px;
  }
  .category-icon-choice.icon-only { border-radius: 9px; }
  .category-icon-choice.icon-only > .category-emoji {
    width: 30px;
    height: 30px;
    font-size: 26px;
  }
}

/* Cart: clear product cards and a thumb-friendly checkout bar. */
.cart-page { max-width: 1120px; }
.cart-page-head {
  min-height: 0;
  margin: 0 0 13px;
  align-items: center;
}
.cart-page-head h1 { display: none; }
.cart-page-head p {
  display: inline-flex;
  min-height: 32px;
  margin: 0;
  padding: 5px 11px;
  align-items: center;
  color: #5f6761;
  background: #fff;
  border: 1px solid #e1e5df;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 306px;
  align-items: start;
  gap: 16px;
}
.cart-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.cart-item {
  display: grid;
  min-height: 124px;
  padding: 14px;
  grid-template-columns: 94px minmax(0,1fr) minmax(172px,auto);
  grid-template-areas:
    "media copy price"
    "media copy actions";
  align-items: center;
  column-gap: 15px;
  row-gap: 7px;
  background: #fff;
  border: 1px solid #e4e7e2;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(31,43,34,.055);
}
.cart-item:last-child { border-bottom: 1px solid #e4e7e2; }
.cart-item-media {
  grid-area: media;
  width: 94px;
  height: 94px;
  border-radius: 11px;
}
.cart-item-copy { grid-area: copy; min-width: 0; align-self: center; }
.cart-item-copy h2 {
  margin: 0 0 7px;
  overflow: hidden;
  color: #252b27;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-copy p { color: #858b86; font-size: 12px; }
.cart-item-price {
  grid-area: price;
  justify-self: end;
  color: var(--commerce-brand-dark);
}
.cart-item-price strong { font-size: 22px; }
.cart-item-price small { color: #777e78; font-weight: 700; }
.cart-item-actions {
  display: flex;
  grid-area: actions;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.cart-item-actions .qty {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 2px;
  gap: 2px;
  background: #f2f4f1;
  border: 1px solid #e3e6e1;
  border-radius: 9px;
}
.cart-item-actions .qty button {
  min-width: 32px;
  min-height: 32px;
  padding: 2px;
  color: #343b36;
  background: #fff;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 18px;
}
.cart-item-actions .qty button:disabled { color: #bdc1bd; background: transparent; }
.cart-item-actions .qty strong { min-width: 30px; text-align: center; font-size: 14px; line-height: 1; }
.cart-item-actions .cart-remove {
  min-height: 34px;
  padding: 5px 11px;
  color: #b44332;
  background: #fff1ed !important;
  border: 1px solid #f2c9c0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}
.cart-item-actions .cart-remove:hover { color: #9f2f20; background: #ffe4dd !important; border-color: #e9a99b; transform: none; }
.cart-summary {
  position: sticky;
  top: 82px;
  padding: 20px;
  color: #2c322e;
  background: #fff;
  border: 1px solid #e1e5df;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31,43,34,.075);
}
.cart-summary-head {
  display: flex;
  margin-bottom: 10px;
  padding-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eceeeb;
}
.cart-summary-head > span { color: #272d29; font-size: 19px; font-weight: 800; }
.cart-summary-head > strong { color: #858b86; font-size: 12px; }
.cart-summary dl { margin: 0; }
.cart-summary dl > div {
  display: flex;
  padding: 9px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: #eceeeb;
}
.cart-summary dt { color: #7b827c; font-size: 13px; }
.cart-summary dd { margin: 0; color: #343a35; font-weight: 700; }
.cart-summary .summary-total { margin-top: 3px; padding-top: 15px; }
.cart-summary .summary-total dt { color: #303631; font-size: 15px; font-weight: 800; }
.cart-summary .summary-total dd {
  color: var(--commerce-brand-dark);
  font-size: 30px;
  line-height: 1;
}
.cart-summary .summary-total dd small { margin-left: 3px; font-size: 11px; }
.cart-summary > button {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: linear-gradient(90deg,#ff681e,#f24722) !important;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(239,73,31,.2);
}
.cart-summary > button:disabled { color: #9ba09b !important; background: #e8ebe7 !important; box-shadow: none; }

@media (max-width: 980px) and (min-width: 761px) {
  .cart-layout { grid-template-columns: minmax(0,1fr); }
  .cart-summary { position: static; }
}

@media (max-width: 760px) {
  .cart-page {
    padding: 14px 10px calc(178px + env(safe-area-inset-bottom)) !important;
  }
  .cart-layout { display: block; }
  .cart-page-head { margin-bottom: 9px; }
  .cart-page-head p { min-height: 29px; padding: 4px 9px; font-size: 12px; }
  .cart-page-head > button { min-height: 31px; padding: 4px 9px; font-size: 12px; }
  .cart-list { gap: 8px; }
  .cart-item {
    min-height: 144px;
    padding: 11px;
    grid-template-columns: 74px minmax(0,1fr);
    grid-template-areas:
      "media copy"
      "media price"
      "actions actions";
    column-gap: 11px;
    row-gap: 6px;
    border-radius: 12px;
  }
  .cart-item-media { width: 74px; height: 74px; border-radius: 9px; }
  .cart-item-copy { align-self: end; }
  .cart-item-copy h2 { margin-bottom: 4px; font-size: 15px; }
  .cart-item-copy p { font-size: 11px; }
  .cart-item-price { align-self: start; justify-self: start; }
  .cart-item-price strong { font-size: 19px; }
  .cart-item-actions { justify-content: space-between; }
  .cart-item-actions .qty { width: auto; margin-left: 0; }
  .cart-item-actions .qty button { min-width: 34px; min-height: 34px; }
  .cart-item-actions .cart-remove { min-width: 48px; min-height: 36px; }
  .cart-summary {
    position: fixed;
    right: 8px;
    bottom: calc(63px + env(safe-area-inset-bottom));
    left: 8px;
    top: auto;
    z-index: 49;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(148px,44%);
    padding: 9px 9px 9px 13px;
    align-items: center;
    gap: 9px;
    border-radius: 13px;
    box-shadow: 0 8px 28px rgba(24,32,26,.2);
  }
  .cart-summary-head { display: none; }
  .cart-summary dl { margin: 0; }
  .cart-summary dl > div { display: none; }
  .cart-summary dl > .summary-total {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: baseline;
    justify-content: flex-start;
    gap: 7px;
    border: 0;
  }
  .cart-summary .summary-total dt { font-size: 12px; }
  .cart-summary .summary-total dd { margin: 0; font-size: 25px; }
  .cart-summary > button { min-height: 46px; margin: 0; }
  .cart-summary > .error { grid-column: 1/-1; margin: 0; }
}

/* Two-image picker used while creating a product. */
.new-product-images {
  margin-top: 4px;
  padding: 13px;
  background: #f6f8f5;
  border: 1px solid #dfe5dd;
  border-radius: 13px;
}
.new-product-images-head {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.new-product-images-head > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.new-product-images-head strong { color: #303832; font-size: 14px; }
.new-product-images-head span { color: #7b847d; font-size: 11px; }
.new-product-image-upload {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  padding: 6px 11px;
  align-items: center;
  color: #fff;
  background: var(--commerce-brand);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.new-product-image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.new-product-image-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.new-product-image-slot {
  position: relative;
  display: grid;
  min-height: 126px;
  overflow: hidden;
  place-items: center;
  color: #8a938c;
  background: #fff;
  border: 1px solid #dce2da;
  border-radius: 10px;
}
.new-product-image-slot > span { display: flex; align-items: center; flex-direction: column; gap: 4px; }
.new-product-image-slot b { font-family: "Segoe UI Emoji",sans-serif; font-size: 30px; }
.new-product-image-slot small { font-size: 11px; }
.new-product-image-slot img {
  width: 100%;
  height: 126px;
  object-fit: contain;
  object-position: center;
  background: #f6f6f6;
}
.new-product-image-slot > button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(32,37,34,.78);
  border: 0;
  border-radius: 50%;
  font: 700 18px/1 system-ui,sans-serif;
}

@media (max-width: 500px) {
  .new-product-images { padding: 10px; }
  .new-product-image-slot,.new-product-image-slot img { min-height: 104px; height: 104px; }
}

/* Storefront category panel: keep the complete first row visible when collapsed. */
.catalog-category-panel {
  position: relative;
  min-width: 0;
  padding-bottom: 0;
}
.catalog-category-panel .catalog-categories {
  max-height: 600px;
  overflow: hidden !important;
  transition: max-height .28s ease;
}
.catalog-category-panel.collapsed .catalog-categories { max-height: 72px; }
.category-collapse-toggle {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 29px;
  min-height: 29px;
  padding: 0;
  place-items: center;
  color: #505a52;
  background: #fff;
  border: 1px solid #dce2dc;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(32,43,35,.08);
  transform: none;
}
.category-collapse-toggle:hover {
  color: var(--commerce-brand-dark);
  background: #fff4ee;
  border-color: #ffc6af;
  transform: none;
}
.category-toggle-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.catalog-floating-sort.expanded .category-toggle-chevron { transform: translateY(2px) rotate(225deg); }

@media (max-width: 760px) {
  .catalog-category-panel { padding-bottom: 0; }
  .catalog-category-panel.collapsed .catalog-categories { max-height: 64px; }
  .catalog-category-panel .catalog-categories { max-height: 900px; }
  .category-collapse-toggle {
    right: auto;
    left: auto;
    width: 31px;
    min-width: 31px;
    height: 28px;
    min-height: 28px;
  }
}

.catalog-floating-sort {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 38px;
  margin-top: 7px;
  align-items: center;
  gap: 8px;
}
.catalog-floating-sort > .category-collapse-toggle { grid-column: 2; justify-self: center; }
.catalog-floating-sort .catalog-sort {
  grid-column: 3;
  justify-self: end;
  box-shadow: 0 7px 15px rgba(48,75,54,.12);
  backdrop-filter: blur(10px);
}

@media (max-width: 760px) {
  .catalog-floating-sort { min-height: 34px; margin-top: 6px; }
}

/* Overview filter actions stay in the same grid row as filter fields. */
.overview-filters {
  grid-template-columns: repeat(6,minmax(105px,1fr)) auto;
  align-items: end;
}
.overview-filter-actions {
  display: flex;
  grid-column: auto;
  min-width: 142px;
  padding-top: 0;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
}
.overview-filter-actions button {
  min-width: 66px;
  min-height: 38px;
  padding: 6px 10px;
}

@media (max-width: 1180px) and (min-width: 761px) {
  .overview-filters { grid-template-columns: repeat(3,minmax(120px,1fr)) auto; }
}

@media (max-width: 760px) {
  .overview-filters { align-items: stretch; }
  .overview-filter-actions {
    flex: 0 0 176px;
    min-width: 176px;
    padding-top: 19px;
    align-items: flex-end;
  }
}

/* Category editor uses an icon-only disclosure and larger emoji choices. */
.icon-accordion-toggle {
  grid-template-columns: minmax(0,1fr) auto 30px;
}
.icon-picker-chevron {
  display: block;
  width: 9px;
  height: 9px;
  justify-self: center;
  color: #59635b;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.icon-accordion-toggle[aria-expanded="true"] .icon-picker-chevron {
  transform: translateY(2px) rotate(225deg);
}
.category-icon-choice.icon-only > .category-emoji {
  width: 44px;
  height: 44px;
  font-size: 39px;
}

@media (max-width: 600px) {
  .category-icon-choice.icon-only > .category-emoji {
    width: 38px;
    height: 38px;
    font-size: 34px;
  }
}

/* "All" uses the same emoji language as every other category. */
.catalog-category .category-home { display: grid; place-items: center; }
.catalog-category .category-home .doodle-logo { display: none; }
.catalog-category .category-home::before {
  content: "🛍️";
  display: inline-grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-family: "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;
  font-size: 27px;
  line-height: 1;
}

@media (max-width: 760px) {
  .catalog-category .category-home::before { font-size: 25px; }
}

/* Unified admin and merchant order management. */
.order-management-head { align-items: center; flex-wrap: wrap; }
.order-overview-pills { display: flex; margin-left: auto; align-items: center; justify-content: flex-end; gap: 7px; }
.order-overview-pills > span {
  display: inline-flex;
  min-height: 36px;
  padding: 6px 11px;
  align-items: center;
  gap: 6px;
  color: #626971;
  background: #f4f5f6;
  border: 1px solid #e1e4e7;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.order-overview-pills strong { color: #242a30; font-size: 15px; }
.order-overview-pills .pending { color: #b84920; background: #fff3ed; border-color: #ffd4c3; }
.order-overview-pills .pending strong { color: #df4b18; }
.order-overview-pills .delivered { color: #34734b; background: #edf7f0; border-color: #cde6d4; }
.order-overview-pills .delivered strong { color: #2d7145; }
.order-data-module .table-wrap { overflow: hidden; }
.order-data-module table { min-width: 0; table-layout: fixed; }
.order-data-module th,.order-data-module td { padding-inline: 10px; }
.order-data-module .management-order-number { width: 20%; color: #303740; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-data-module .management-order-products { overflow: hidden; color: #2c3238; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.order-data-module .management-order-amount { color: #e54b19; font-size: 15px; font-weight: 850; }
.order-data-module .management-order-time { color: #727980; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-data-module tbody tr { cursor: pointer; }
.order-data-module .status {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  align-items: center;
  color: #c54b22;
  background: #fff1ea;
  border: 1px solid #ffd0bd;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.order-data-module .status.good { color: #2d7145; background: #edf7f0; border-color: #cbe5d2; }
.modal:has(.order-management-detail) { width: min(760px,100%); }
.order-management-detail { min-width: 0; color: #293038; }
.order-detail-hero { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; padding: 16px; align-items: center; gap: 13px; background: linear-gradient(135deg,#f7faf7,#fff7f2); border: 1px solid #e1e7e1; border-radius: 14px; }
.order-detail-icon { display: grid; width: 48px; height: 48px; place-items: center; color: #e84b19; background: #fff; border: 1px solid #f0d7cd; border-radius: 13px; box-shadow: 0 6px 16px rgba(47,57,50,.08); }
.order-detail-icon .ui-icon { width: 24px; height: 24px; }
.order-detail-title { display: flex; min-width: 0; flex-direction: column; }
.order-detail-title small { color: #858b91; font-size: 11px; font-weight: 700; }
.order-detail-title strong { margin: 2px 0 4px; overflow-wrap: anywhere; font-size: 16px; line-height: 1.25; }
.order-detail-title time { color: #757c83; font-size: 12px; }
.order-delivery-state { padding: 6px 10px; color: #c74b22; background: #fff0e9; border: 1px solid #ffcdb9; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.order-delivery-state.delivered { color: #2e7046; background: #ebf7ef; border-color: #c8e4d0; }
.order-detail-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 12px 0; gap: 8px; }
.order-detail-facts > div { min-width: 0; padding: 12px 13px; background: #f7f8f8; border: 1px solid #e5e7e9; border-radius: 11px; }
.order-detail-facts small { display: block; margin-bottom: 5px; color: #7d848b; font-size: 11px; font-weight: 700; }
.order-detail-facts strong { display: block; overflow: hidden; color: #30363d; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.order-detail-products { overflow: hidden; border: 1px solid #e1e5e8; border-radius: 13px; }
.order-detail-products > header { display: flex; min-height: 45px; padding: 10px 14px; align-items: center; justify-content: space-between; gap: 12px; background: #f6f7f8; border-bottom: 1px solid #e4e7e9; }
.order-detail-products h3 { margin: 0; font-size: 15px; }
.order-detail-products > header span { color: #777e85; font-size: 12px; }
.order-detail-product-list article { display: flex; min-height: 66px; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #eceef0; }
.order-detail-product-list article:last-child { border-bottom: 0; }
.order-detail-product-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.order-detail-product-copy strong { font-size: 14px; }
.order-detail-product-copy small { color: #d24c1f; font-size: 11px; font-weight: 700; }
.order-detail-product-copy span { color: #727980; font-size: 12px; }
.order-detail-product-list article > b { flex: 0 0 auto; color: #e84b19; font-size: 14px; white-space: nowrap; }
.order-detail-total { display: flex; margin-top: 12px; padding: 15px 16px; align-items: center; justify-content: space-between; background: #27342c; border-radius: 13px; color: #fff; }
.order-detail-total > span { color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700; }
.order-detail-total > strong { color: #ffd1bd; font-size: 25px; }
.order-detail-total small { margin-left: 4px; color: rgba(255,255,255,.72); font-size: 12px; }

@media (max-width: 980px) and (min-width: 761px) {
  .admin-order-data th,.admin-order-data td { padding-inline: 7px; font-size: 12px; }
  .admin-order-data .management-order-number { font-size: 11px; }
  .admin-order-data .management-order-time { white-space: normal; }
}

@media (max-width: 760px) {
  .order-management-head { align-items: flex-start !important; }
  .order-management-head h1 { width: 100%; flex: 1 0 100%; }
  .order-overview-pills { width: 100%; margin-left: 0; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .order-overview-pills::-webkit-scrollbar { display: none; }
  .order-overview-pills > span { flex: 1; justify-content: center; }
  .order-data-module .table-wrap tbody tr { padding-top: 13px; background: #fff; border-color: #dfe4e0; box-shadow: 0 5px 16px rgba(38,49,42,.06); }
  .order-data-module .table-wrap tbody td { grid-template-columns: 78px minmax(0,1fr); text-align: right; }
  .order-data-module .management-order-number { width: auto; padding-right: 34px; font-size: 12px; }
  .order-data-module .management-order-products { white-space: normal; }
  .order-data-module .management-order-time { white-space: normal; }
  .order-data-module .status { margin-left: auto; }
  .modal:has(.order-management-detail) { width: 100%; }
  .order-detail-hero { grid-template-columns: 42px minmax(0,1fr); padding: 13px; }
  .order-detail-icon { width: 42px; height: 42px; }
  .order-delivery-state { grid-column: 2; justify-self: start; }
  .order-detail-facts { grid-template-columns: 1fr 1fr; }
  .order-detail-facts > div { padding: 10px; }
  .order-detail-product-list article { padding: 11px 12px; gap: 10px; }
  .order-detail-product-list article > b { font-size: 13px; }
  .order-detail-total { padding: 13px 14px; }
  .order-detail-total > strong { font-size: 22px; }
}

/* Unified back-office visual system */
.admin-layout {
  --admin-bg: #f4f6f8;
  --admin-surface: #fff;
  --admin-surface-soft: #f8f9fb;
  --admin-line: #e3e6ea;
  --admin-line-strong: #d7dbe0;
  --admin-text: #24282e;
  --admin-muted: #737a83;
  --admin-primary: #ff5a1f;
  --admin-primary-dark: #e64516;
  --admin-primary-soft: #fff2ec;
  --admin-danger: #dc4545;
  --admin-danger-dark: #c43838;
  --admin-radius: 14px;
  --admin-button-radius: 10px;
  --admin-card-shadow: 0 8px 24px rgba(25,31,39,.055);
  grid-template-columns: 232px minmax(0,1fr);
  color: var(--admin-text);
  background: var(--admin-bg);
}
.admin-layout .sidebar {
  padding: 0 13px 22px;
  color: var(--admin-text);
  background: #fff;
  border-right: 1px solid var(--admin-line);
  box-shadow: 8px 0 28px rgba(38,45,54,.06);
}
.admin-layout .admin-brand {
  min-height: 72px;
  margin: 0 -13px 14px;
  padding: 13px 18px;
  background: #fff;
  border-bottom: 3px solid var(--admin-primary);
  box-shadow: 0 5px 18px rgba(38,45,54,.08);
}
.admin-layout .sidebar-nav { padding-top: 2px; gap: 5px; }
.admin-layout .sidebar-nav button,
.admin-layout .sidebar > button {
  min-height: 44px;
  margin: 0;
  padding: 9px 12px;
  gap: 11px;
  color: #555d67;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  transition: color .18s ease,background .18s ease,border-color .18s ease;
}
.admin-layout .sidebar-nav button:hover,
.admin-layout .sidebar > button:hover {
  color: var(--admin-primary-dark);
  background: var(--admin-primary-soft);
  border-color: #ffd0bd;
  filter: none;
  transform: none;
}
.admin-layout .sidebar-nav button:not(.active).has-order-notice {
  color: #bd4118;
  background: #fff0e9;
  border-color: #ffc7af;
}
.admin-layout .sidebar-nav button.active,
.admin-layout .sidebar > button.active {
  color: #fff;
  background: linear-gradient(135deg,var(--admin-primary),#ff3d1f);
  border-color: #ff7848;
  box-shadow: 0 8px 20px rgba(224,65,20,.24);
}
.admin-layout .sidebar-nav button:focus-visible { outline: 3px solid rgba(255,122,72,.35); outline-offset: 2px; }
.admin-layout .workspace {
  max-width: 1640px;
  padding: 26px 30px 48px;
  background: var(--admin-bg);
}
.admin-layout .workspace > .toolbar,
.admin-layout .workspace > .workspace-head {
  min-height: 68px;
  margin-bottom: 14px;
  padding: 13px 17px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-card-shadow);
}
.admin-layout .workspace > .toolbar h1,
.admin-layout .workspace > .workspace-head h1 {
  margin: 0;
  color: var(--admin-text);
  font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.025em;
}

/* One interaction language for toolbar, filter, batch, paging and dialog actions. */
.admin-layout .workspace > .toolbar > button,
.admin-layout .overview-filter-actions > button,
.admin-layout .batch-actions > button,
.admin-layout .pagination button,
.admin-layout .modal-actions button,
.admin-layout .drawer-actions button,
.admin-layout .product-image-actions button{
  min-height: 40px;
  padding: 8px 16px;
  color: #fff;
  background: linear-gradient(135deg,var(--admin-primary),#ff3d1f);
  border: 1px solid var(--admin-primary);
  border-radius: var(--admin-button-radius);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: 0 5px 14px rgba(225,68,22,.16);
  transition: transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease;
}
.admin-layout .workspace > .toolbar > button:hover,
.admin-layout .overview-filter-actions > button:hover,
.admin-layout .batch-actions > button:hover,
.admin-layout .pagination button:hover,
.admin-layout .modal-actions button:hover,
.admin-layout .drawer-actions button:hover,
.admin-layout .product-image-actions button:hover{
  background: linear-gradient(135deg,#ff682d,var(--admin-primary-dark));
  border-color: var(--admin-primary-dark);
  box-shadow: 0 8px 18px rgba(225,68,22,.22);
  filter: none;
  transform: translateY(-1px);
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button).secondary {
  color: #4c535c;
  background: #fff;
  border-color: var(--admin-line-strong);
  box-shadow: 0 3px 10px rgba(27,33,41,.05);
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button).secondary:hover {
  color: var(--admin-primary-dark);
  background: var(--admin-primary-soft);
  border-color: #ffb698;
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button).danger {
  color: #fff;
  background: linear-gradient(135deg,#e65454,var(--admin-danger));
  border-color: var(--admin-danger);
  box-shadow: 0 5px 14px rgba(190,49,49,.14);
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button).danger:hover {
  background: linear-gradient(135deg,#e85d5d,var(--admin-danger-dark));
  border-color: var(--admin-danger-dark);
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button):focus-visible {
  outline: 3px solid rgba(255,90,31,.22);
  outline-offset: 2px;
}
.admin-layout :is(.workspace > .toolbar > button,.overview-filter-actions > button,.batch-actions > button,.pagination button,.modal-actions button,.drawer-actions button,.product-image-actions button):disabled {
  color: #a2a8b0;
  background: #eef0f2;
  border-color: #e2e5e8;
  box-shadow: none;
  filter: none;
  transform: none;
}

/* Dashboard portals follow the same primary/secondary hierarchy. */
.admin-layout .overview-portals { margin: 0 0 14px; }
.admin-layout .console-portal-actions {
  padding: 0;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.admin-layout .console-portal-actions .console-portal-button {
  min-width: 130px;
  min-height: 42px;
  padding: 7px 14px 7px 9px;
  color: #4c535c;
  background: #fff;
  border: 1px solid var(--admin-line-strong);
  border-radius: var(--admin-button-radius);
  box-shadow: 0 4px 12px rgba(28,34,42,.06);
  font-size: 14px;
  font-weight: 750;
}
.admin-layout .console-portal-actions .console-portal-icon {
  color: var(--admin-primary-dark);
  background: var(--admin-primary-soft);
  border: 1px solid #ffd4c2;
  border-radius: 8px;
}
.admin-layout .console-portal-actions .console-portal-button:hover {
  color: var(--admin-primary-dark);
  background: var(--admin-primary-soft);
  border-color: #ffb698;
  box-shadow: 0 7px 16px rgba(225,68,22,.11);
}
.admin-layout .console-portal-actions .store-entry,
.admin-layout .console-portal-actions .store-entry:hover {
  color: #fff;
  background: linear-gradient(135deg,var(--admin-primary),#ff3d1f);
  border-color: var(--admin-primary);
}
.admin-layout .console-portal-actions .store-entry .console-portal-icon {
  color: var(--admin-primary-dark);
  background: #fff;
  border-color: #fff;
}

/* Filters, batch controls and tables share one surface treatment. */
.admin-layout .data-controls-sticky {
  margin-bottom: 10px;
  padding: 0;
  background: var(--admin-bg);
}
.admin-layout .data-filter-bar,
.admin-layout .overview-filters {
  padding: 13px;
  gap: 9px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-card-shadow);
}
.admin-layout .data-filter-search input,
.admin-layout .data-filter-bar select,
.admin-layout .data-filter-date,
.admin-layout .overview-filter input,
.admin-layout .overview-filter select {
  min-height: 42px;
  color: #3f464e;
  background: #fff;
  border: 1px solid var(--admin-line-strong);
  border-radius: 10px;
}
.admin-layout .data-filter-search input:focus,
.admin-layout .data-filter-bar select:focus,
.admin-layout .data-filter-date:focus-within,
.admin-layout .overview-filter input:focus,
.admin-layout .overview-filter select:focus {
  border-color: #ff9d77;
  box-shadow: 0 0 0 3px rgba(255,90,31,.1);
  outline: 0;
}
.admin-layout .data-filter-search .ui-icon { color: #8a9098; }
.admin-layout .overview-filter > span,
.admin-layout .data-filter-date > span { color: #666d76; font-weight: 750; }
.admin-layout .batch-toolbar {
  min-height: 54px;
  margin-top: 9px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(25,31,39,.04);
}
.admin-layout .batch-actions { gap: 8px; }
.admin-layout .batch-actions > button { min-height: 38px; }
.admin-layout .table-wrap {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-card-shadow);
}
.admin-layout .table-wrap th {
  color: #59616b;
  background: var(--admin-surface-soft);
  border-bottom-color: var(--admin-line-strong);
  font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.admin-layout .table-wrap td { color: #3a4149; border-color: #eceef1; }
.admin-layout .table-wrap tbody tr:hover { background: #fff7f3; }
.admin-layout .table-wrap tbody tr.clickable-row:hover { box-shadow: inset 3px 0 var(--admin-primary); }
.admin-layout .pagination {
  min-height: 52px;
  margin-top: 10px;
  padding: 7px 10px;
  color: #69717a;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(25,31,39,.04);
}
.admin-layout .pagination strong { color: #333940; }
.admin-layout .pagination button { min-height: 36px; }

/* Dashboard cards use one neutral surface and one orange accent. */
.admin-layout .stats,
.admin-layout .overview-stats { gap: 12px; margin-bottom: 14px; }
.admin-layout .stat,
.admin-layout .overview-stat,
.admin-layout .overview-stat:nth-child(n) {
  position: relative;
  min-height: 116px;
  padding: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-card-shadow);
}
.admin-layout .stat::before,
.admin-layout .overview-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg,var(--admin-primary),#ff9b58);
}
.admin-layout .stat-label,
.admin-layout .overview-stat > span { color: var(--admin-muted); font-size: 13px; font-weight: 700; }
.admin-layout .stat strong,
.admin-layout .overview-stat strong { margin-top: 13px; color: var(--admin-text); font-size: 30px; }
.admin-layout .stat-mark,
.admin-layout .overview-stat > .ui-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: auto;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 9px;
  place-items: center;
  color: var(--admin-primary);
  background: var(--admin-primary-soft);
  border: 1px solid #ffd7c5;
  border-radius: 10px;
  opacity: 1;
  transform: none;
}
.admin-layout .stat-mark .ui-icon { width: 20px; height: 20px; }
.admin-layout .analysis-card {
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-card-shadow);
}
.admin-layout .analysis-title h2 { font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif; font-weight: 800; }

/* Dialogs and registration controls use the same surfaces and intent colors. */
.admin-layout .modal,
.admin-layout .drawer { border-color: var(--admin-line); border-radius: 16px; box-shadow: 0 26px 80px rgba(12,17,23,.28); }
.admin-layout .modal-head,
.admin-layout .drawer-head { background: #fff; border-bottom-color: var(--admin-line); }
.admin-layout .modal-head h2,
.admin-layout .drawer-head h2 { font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif; font-weight: 850; }
.admin-layout .modal-actions,
.admin-layout .drawer-actions { gap: 9px; background: var(--admin-surface-soft); border-top-color: var(--admin-line); }
.admin-layout .toolbar .merchant-registration-toggle { min-height: 40px; border-radius: var(--admin-button-radius); box-shadow: none; }
.admin-layout .toolbar .merchant-registration-toggle.enabled { color: var(--admin-primary-dark); background: var(--admin-primary-soft); border-color: #ffb698; }
.admin-layout .toolbar .merchant-registration-toggle.paused { color: #c33f3f; background: #fff2f2; border-color: #efb5b5; }
.admin-layout .icon-accordion-toggle {
  color: #4c535c;
  background: #fff;
  border: 1px solid var(--admin-line-strong);
  border-radius: var(--admin-button-radius);
  box-shadow: 0 3px 10px rgba(27,33,41,.05);
}
.admin-layout .icon-accordion-toggle:hover {
  color: var(--admin-primary-dark);
  background: var(--admin-primary-soft);
  border-color: #ffb698;
  box-shadow: 0 5px 14px rgba(225,68,22,.10);
  filter: none;
  transform: none;
}
.admin-layout .icon-accordion-toggle .icon-picker-chevron { color: currentColor; }
.admin-layout .order-detail-total {
  color: var(--admin-text);
  background: var(--admin-primary-soft);
  border: 1px solid #ffd0bd;
}
.admin-layout .order-detail-total > span { color: #676e77; }
.admin-layout .order-detail-total > strong,
.admin-layout .order-detail-total small { color: var(--admin-primary-dark); }

@media (max-width: 1080px) and (min-width: 761px) {
  .admin-layout { grid-template-columns: 204px minmax(0,1fr); }
  .admin-layout .workspace { padding: 22px 18px 40px; }
}

@media (max-width: 760px) {
  .admin-layout { display: block; min-height: 100vh; }
  .admin-layout .sidebar { padding: 0; border-right: 0; box-shadow: 0 5px 18px rgba(18,22,28,.14); }
  .admin-layout .admin-brand { min-height: 56px; margin: 0; padding: 8px 12px; border-bottom-width: 2px; box-shadow: none; }
  .admin-layout .sidebar-nav { padding: 6px 7px 8px; gap: 5px; }
  .admin-layout .sidebar-nav button,
  .admin-layout .sidebar > button { min-height: 38px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }
  .admin-layout .workspace { padding: 14px 10px 30px; }
  .admin-layout .workspace > .toolbar,
  .admin-layout .workspace > .workspace-head { min-height: 54px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; }
  .admin-layout .workspace > .toolbar h1,
  .admin-layout .workspace > .workspace-head h1 { font-size: 21px; }
  .admin-layout .workspace > .toolbar > button { min-height: 38px; padding: 7px 12px; }
  .admin-layout .console-portal-actions { width: 100%; gap: 6px; }
  .admin-layout .console-portal-actions .console-portal-button { min-width: 0; min-height: 40px; flex: 1; padding-inline: 7px 9px; font-size: 12px; }
  .admin-layout .data-controls-sticky { padding: 0; }
  .admin-layout .data-filter-bar { width: calc(100% + 20px); margin: 0 -10px; padding: 10px; border-inline: 0; border-radius: 0; }
  .admin-layout .batch-toolbar { margin: 8px 0 0; padding: 7px; overflow-x: auto; }
  .admin-layout .batch-actions { width: max-content; min-width: 100%; flex-wrap: nowrap; justify-content: flex-start; }
  .admin-layout .batch-actions > button { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; font-size: 12px; }
  .admin-layout .table-wrap { border-radius: 12px; }
  .admin-layout .table-wrap tbody tr { background: #fff; border-color: var(--admin-line); box-shadow: 0 5px 16px rgba(27,34,42,.05); }
  .admin-layout .pagination { min-height: 48px; margin-top: 8px; border-radius: 11px; }
  .admin-layout .pagination button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
  .admin-layout .stats,
  .admin-layout .overview-stats { gap: 8px; }
  .admin-layout .stat,
  .admin-layout .overview-stat,
  .admin-layout .overview-stat:nth-child(n) { min-height: 100px; padding: 14px; border-radius: 12px; }
  .admin-layout .stat strong,
  .admin-layout .overview-stat strong { font-size: 24px; }
  .admin-layout .stat-mark,
  .admin-layout .overview-stat > .ui-icon { top: 12px; right: 12px; width: 34px; height: 34px; padding: 8px; }
  .admin-layout .analysis-card { border-radius: 12px; }
}

/* Unified empty-data states: keep color emoji ink clear of the message line. */
.chart-empty {
  box-sizing: border-box;
  min-height: 220px;
  padding: 28px 20px;
  gap: 14px;
  text-align: center;
}
.chart-empty .empty-emoji {
  display: grid;
  width: 76px;
  height: 68px;
  margin: 0;
  flex: 0 0 68px;
  place-items: center;
  font-size: 48px;
  line-height: 1;
}
.chart-empty > span:last-child {
  display: block;
  margin: 0;
  color: #737a83;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}
.table-empty td {
  height: 220px;
  vertical-align: middle;
  text-align: center;
}
.table-empty td > .empty-emoji {
  display: grid;
  width: 76px;
  height: 68px;
  margin: 0 auto 14px;
  place-items: center;
  font-size: 48px;
  line-height: 1;
}
.table-empty td > span:last-child {
  display: block;
  margin: 0;
  color: #737a83;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}
.empty-state {
  padding: 30px 20px;
  gap: 12px;
  text-align: center;
}
.empty-state .empty-visual {
  display: grid;
  min-height: 68px;
  margin: 0;
  place-items: center;
  line-height: 1;
}
.empty-state .empty-visual .empty-emoji { font-size: 48px; }
.empty-state > strong { margin: 0; line-height: 1.5; }

@media (max-width: 760px) {
  .chart-empty { min-height: 180px; padding: 22px 14px; gap: 12px; }
  .chart-empty .empty-emoji,
  .table-empty td > .empty-emoji { width: 66px; height: 58px; flex-basis: 58px; font-size: 42px; }
  .admin-layout .table-wrap tbody .table-empty td {
    min-height: 170px;
    height: auto;
    padding: 20px 12px;
    align-items: center;
    justify-content: center;
  }
}

/* Home parcel pickup and station detail. */
.home-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.pickup-point-button {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 11px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #d94a1a;
  background: #fff6f1;
  border: 1px solid #ffcbb7;
  border-radius: 999px;
  box-shadow: none;
  font-size: 14px;
  white-space: nowrap;
}
.parcel-pickup-button { text-decoration: none; font-weight: 700; }
.parcel-pickup-button .ui-icon { flex: 0 0 auto; }
.pickup-point-button .ui-icon { width: 18px; height: 18px; }
.pickup-point-button:hover {
  color: #bc3810;
  background: #ffede5;
  border-color: #ffaf90;
  box-shadow: none;
  filter: none;
  transform: none;
}
.pickup-point-card {
  padding: 4px 2px 2px;
  color: #29251f;
}
.pickup-point-photo {
  display: block;
  width: 100%;
  height: clamp(170px,28vw,220px);
  margin-bottom: 15px;
  object-fit: cover;
  object-position: center 50%;
  background: #f1efed;
  border: 1px solid #ece8e5;
  border-radius: 12px;
}
.pickup-point-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 12px;
}
.pickup-point-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #e8531f;
  background: #fff4ef;
  border: 1px solid #ffd3c2;
  border-radius: 12px;
}
.pickup-point-card-icon .ui-icon { width: 22px; height: 22px; }
.pickup-point-card-title { min-width: 0; }
.pickup-point-card-title > span {
  display: block;
  margin-top: 3px;
  color: #7d746f;
  font-size: 12px;
  font-weight: 500;
}
.pickup-point-card-title strong {
  display: block;
  color: #24211f;
  font-size: 18px;
  line-height: 1.35;
}
.pickup-point-address-block {
  margin-top: 16px;
  padding: 14px 15px;
  background: #f8f8f8;
  border: 1px solid #ece9e7;
  border-radius: 12px;
}
.pickup-point-address-label {
  display: block;
  margin-bottom: 6px;
  color: #8b817c;
  font-size: 12px;
  font-weight: 600;
}
.pickup-point-address {
  margin: 0;
  color: #302d2b;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .editorial-header .mobile-home-row { justify-content: space-between; gap: 7px; }
  .mobile-home-row .brand-lockup { flex: 0 1 auto; min-width: 0; gap: 6px; }
  .mobile-home-actions { flex: 0 0 auto; gap: 7px; }
  .mobile-home-row .pickup-point-button {
    min-height: 34px;
    padding: 5px 7px;
    gap: 4px;
    font-size: 12px;
  }
  .mobile-home-row .pickup-point-button .ui-icon { width: 16px; height: 16px; }
  
  .pickup-point-card { padding: 1px 0; }
  .pickup-point-photo { height: 170px; margin-bottom: 13px; border-radius: 11px; }
  .pickup-point-card-head { grid-template-columns: 40px minmax(0,1fr); gap: 10px; }
  .pickup-point-card-icon { width: 40px; height: 40px; border-radius: 11px; }
  .pickup-point-card-icon .ui-icon { width: 20px; height: 20px; }
  .pickup-point-card-title strong { font-size: 17px; }
  .pickup-point-address-block { margin-top: 13px; padding: 12px 13px; }
  .pickup-point-address { font-size: 14px; line-height: 1.65; }
}

@media (max-width: 980px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 760px) {
  .checkout-page { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .checkout-products,.checkout-summary,.wechat-pay-settings { padding: 15px; }
  .checkout-item { grid-template-columns: 54px minmax(0,1fr) auto; }
  .checkout-item .product-image { width: 54px; height: 54px; }
  .active-payment-intent { align-items: stretch; flex-direction: column; }
  .active-payment-intent > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .wechat-settings-head { flex-direction: column; }
  .wechat-settings-grid { grid-template-columns: 1fr; }
  .wechat-setting-full { grid-column: auto; }
  .wechat-platform-guide dl div { grid-template-columns: 1fr; gap: 2px; }
  .wechat-intent-maintenance { align-items: stretch; flex-direction: column; }
  .wechat-settings-actions button { width: 100%; }
}

/* Loading recovery and the merchant's read-only storefront. */
.load-error { margin: 16px 0; padding: 20px; }
.load-error > strong { display: block; color: var(--red); font-size: 18px; }
.load-error > p { margin: 8px 0 14px; overflow-wrap: anywhere; }
.merchant-store-return { margin-left: auto; flex: 0 0 auto; }
@media (max-width: 760px) {
  .merchant-store .catalog-sticky-head { top: 58px; }
  .merchant-store-return { padding: 8px 10px; font-size: 13px; }
}

/* Yuan amounts and administrator delivery controls. */
.wechat-payment-method { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding: 14px; color: #267543; background: #eef8f0; border: 1px solid #d4e9d8; border-radius: 10px; }
.checkout-summary .payment-hint { line-height: 1.7; }
.merchant-order-deliveries { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.merchant-order-deliveries h3 { margin: 0 0 10px; }
.merchant-order-delivery { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.merchant-order-delivery > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.merchant-order-delivery > div > span { font-variant-numeric: tabular-nums; color: var(--muted); }
.merchant-order-delivery > button { white-space: nowrap; }
.order-amount-cell,.management-order-amount,.price { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
 .merchant-order-delivery { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
 .merchant-order-delivery > button { grid-column: 1 / -1; justify-self: end; }
 .overview-stat > strong { font-size: clamp(17px,5vw,26px); overflow-wrap: anywhere; }
}

/* Filing stays in document flow, clear of the mobile navigation and checkout bar. */
#root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#root > .mall-shell { flex: 1 0 auto; }
#root > .auth-page { flex: 1 0 auto; min-height: 0; }
.site-filing {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 14px 16px;
  color: #777f87;
  background: #f5f5f5;
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 20px;
}
.site-filing a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; max-width: 100%; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.site-filing img { display: block; flex: 0 0 auto; object-fit: contain; }
.site-filing a:hover { color: #515963; text-decoration: underline; }
.site-filing a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
@media (max-width: 760px) {
  .site-filing { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .site-filing.has-bottom-nav { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .site-filing.has-cart-summary { padding-bottom: calc(152px + env(safe-area-inset-bottom)); }
}

/* Product submission: measured upload, indeterminate server processing. */
.product-save-fields{border:0;padding:0;margin:0;min-width:0;width:100%}
.product-save-fields:disabled{opacity:.7}
.product-save-progress{padding:14px 16px;margin:0 0 16px;background:#f0f8f4;border:1px solid #d3e9dc;border-radius:12px;color:#246747;font-size:14px}
.product-save-progress small{display:block;margin-top:8px;line-height:1.6;color:#587363}
.product-save-track{height:8px;margin-top:10px;background:#dcebe2;border-radius:8px;overflow:hidden}
.product-save-track span{display:block;height:100%;background:#279264;border-radius:8px;transition:width .2s ease}
.product-save-track .indeterminate{width:35%;animation:product-save-slide 1.4s ease-in-out infinite}
@keyframes product-save-slide{from{transform:translateX(-110%)}to{transform:translateX(390%)}}
@media(prefers-reduced-motion:reduce){.product-save-track .indeterminate{animation:none;width:100%;opacity:.6}}

.auth-card .remember-login{display:flex;align-items:center;gap:9px;margin:4px 0 18px;min-height:32px;cursor:pointer;font-size:14px;color:#496254}
.auth-card .remember-login input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;accent-color:#279264;flex-shrink:0}

.product-import-help p,.import-default-images p{line-height:1.6;font-size:14px}
.import-template-link{display:inline-block;padding:10px 14px;border-radius:8px;color:#216446;background:#e8f3ec;text-decoration:none;font-weight:600}
.import-default-images{display:flex;flex-wrap:wrap;gap:10px;padding:12px 0}.import-default-images img{width:82px;height:82px;object-fit:cover;border-radius:9px}.import-default-images p{flex:1;min-width:180px;margin:0}
.import-file-field{display:flex;flex-direction:column;gap:10px;margin:16px 0}.import-file-title{font-size:14px;font-weight:600;color:#344054}
.import-file-picker{position:relative;display:flex;align-items:center;gap:12px;padding:18px 16px;min-height:88px;border:1px dashed #d4dbe3;border-radius:12px;background:#f8fafc;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.import-file-picker:hover,.import-file-picker.has-file{border-color:#f3946d;background:#fff8f3}.import-file-picker:focus-within{outline:3px solid #ffcbb6;outline-offset:3px}
.import-file-picker .import-file-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;z-index:1}
.import-file-icon{display:flex;align-items:center;justify-content:center;width:42px;height:46px;border:1px solid #dbe9df;border-radius:10px;background:#edf6ef;color:#32794e;flex-shrink:0}.import-file-icon .ui-icon{width:25px;height:25px}
.import-file-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}.import-file-copy strong{font-size:14px;font-weight:600;color:#263443;overflow-wrap:anywhere;line-height:1.45}.import-file-copy small{font-size:12px;line-height:1.5;color:#7a8696}
.import-file-action{padding:9px 13px;border:1px solid #f26331;border-radius:8px;background:#fff;color:#e35321;font-size:13px;font-weight:600;white-space:nowrap;flex-shrink:0}
.import-file-picker.is-busy{opacity:.6;cursor:wait}.import-file-picker.is-busy .import-file-input{cursor:wait}
@media(max-width:480px){.import-file-picker{padding:14px 12px;gap:10px;flex-wrap:wrap}.import-file-copy{min-width:calc(100% - 54px)}.import-file-action{margin-left:52px;padding:7px 13px}}

.import-preview h3{font-size:15px}.import-errors{max-height:180px;overflow:auto;color:#a83c34;padding-left:24px}.import-errors li{margin:6px 0}
.import-preview-rows{max-height:220px;overflow:auto;font-size:13px}.import-preview-rows>div{display:flex;flex-direction:column;gap:4px;padding:8px;border-bottom:1px solid #e7eae8}
.live-order-panel{background:#fff;border:1px solid #dce9df;border-radius:14px;padding:16px;margin-bottom:18px}.live-order-head,.live-order-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.live-order-head strong{display:block;font-size:16px}.live-state{font-size:12px;color:#548567}.live-state.offline{color:#a45b30}.live-order-alert{padding:10px 12px;background:#fff3d9;color:#7d520b;border-radius:8px;margin:12px 0}.live-order-stats{display:flex;gap:12px 24px;flex-wrap:wrap;margin:12px 0;font-size:14px;color:#516156}.live-order-stats b{color:#226344}.live-order-list{display:grid;gap:8px;margin-top:8px;max-height:370px;overflow:auto}.live-order-item{display:block;width:100%;text-align:left;background:#f7faf8!important;color:#36483d!important;padding:12px!important;border:1px solid #e2ebe5!important;border-radius:8px}.live-order-item>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.live-order-item b{margin-left:auto;color:#257246}.live-order-item p{font-size:13px;margin:6px 0;overflow-wrap:anywhere}.live-order-item small{font-size:12px;color:#748075}.live-order-item strong{font-size:13px;overflow-wrap:anywhere}.live-new-tag{color:#a56412;background:#ffedc5;padding:2px 5px;border-radius:4px;font-size:11px}.live-order-toggle{padding:0!important;font-size:13px}
@media(max-width:600px){.live-order-panel{padding:12px}.live-order-actions button{padding:7px 10px}.live-order-stats{gap:8px 16px}.import-default-images img{width:68px;height:68px}}

/* Compact Excel import instructions and layout. */
.product-import-help{margin:0 0 20px}.import-template-row{display:flex;align-items:center;justify-content:space-between;gap:14px}.product-import-help h3,.import-upload-heading h3{margin:0;font-size:14px;font-weight:600;color:#283747}.product-import-help p{font-size:12px;color:#778392;margin:5px 0 0;line-height:1.5}.import-template-row .import-template-link{padding:8px 14px;font-size:13px;white-space:nowrap;flex-shrink:0}
.import-category-details{margin-top:10px;font-size:12px;color:#697787}.import-category-details summary{display:list-item;cursor:pointer;width:fit-content;padding:3px 0}.import-category-details summary:focus-visible{outline:2px solid #ffcbb6;outline-offset:3px}.import-category-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;max-height:130px;overflow:auto}.import-category-list>span{padding:4px 8px;border-radius:5px;background:#f2f5f7;color:#536274}
.import-file-field{margin:0 0 16px;gap:10px}.import-upload-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.import-upload-heading>span{font-size:11px;color:#8792a0}.import-file-picker{padding:14px;min-height:78px}.import-file-icon{width:36px;height:40px}.import-file-copy strong{font-size:13px}.import-file-copy small{font-size:11px}
.import-default-images{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;margin:0;padding:12px;background:#f8fafb;border-radius:9px}.import-image-pair{display:flex;gap:5px;flex-shrink:0}.import-default-images .import-image-pair img{width:42px;height:42px;border-radius:6px}.import-default-images strong{display:block;font-size:12px;color:#566475;font-weight:500}.import-default-images p{min-width:0;margin:4px 0 0;font-size:11px;line-height:1.5;color:#8792a0}.import-duplicate-note{margin:10px 0 0;font-size:11px;color:#8792a0}
@media(max-width:480px){.import-template-row{gap:10px}.import-template-row .import-template-link{padding:8px 11px}.import-file-picker{gap:10px;padding:12px;flex-wrap:nowrap}.import-file-copy{min-width:0}.import-file-action{margin-left:0;padding:7px 9px;font-size:12px}.import-upload-heading>span{font-size:10px}.import-default-images{gap:10px;padding:10px}}

/* Order activity: compact summary with an optional recent list. */
.live-order-panel{padding:14px 18px;margin-bottom:16px;border-color:#e3e8ed;border-radius:12px}
.live-order-bar{display:flex;align-items:center;gap:22px;flex-wrap:wrap}.live-order-title{display:flex;align-items:center;gap:8px;flex-shrink:0}.live-order-title>strong{font-size:14px;color:#293b49;white-space:nowrap}.live-order-title>small{font-size:11px;color:#a66c35}
.live-connection-dot{width:7px;height:7px;background:#38a06b;border-radius:50%;flex-shrink:0}.live-connection-dot.offline{background:#d99942}.live-unread-count{padding:3px 7px;border-radius:5px;font-size:11px;font-weight:600;color:#ce592c;background:#fff0e7;white-space:nowrap}
.live-order-panel .live-order-stats{display:flex;align-items:center;flex-wrap:wrap;gap:10px 24px;margin:0;padding-left:22px;border-left:1px solid #e8edf0;flex:1;font-size:12px;color:#82909b}.live-order-stats>span{white-space:nowrap}.live-order-stats b{color:#314b3d;font-size:14px;margin-left:4px}
.live-order-panel .live-order-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.live-order-panel .live-order-actions:empty{display:none}.live-order-panel .live-order-actions button{padding:7px 11px!important;min-height:32px;font-size:12px;margin:0!important;line-height:1.4;width:auto}.live-order-panel .live-order-toggle{color:#526477}
.live-order-panel .live-order-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #eef1f3;max-height:320px}.live-order-panel .live-order-item{padding:10px 12px!important;background:#fafbfc!important;border-color:#eef1f3!important}.live-order-item p{margin:5px 0;font-size:12px}.live-order-item .live-order-summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.live-order-item small{font-size:11px}
@media(max-width:900px){.live-order-bar{gap:12px}.live-order-panel .live-order-stats{gap:8px 16px;padding-left:12px}}
@media(max-width:600px){.live-order-panel{padding:12px}.live-order-bar{display:grid;grid-template-columns:1fr auto;gap:10px}.live-order-title{gap:6px;flex-wrap:wrap}.live-order-title>strong{font-size:13px}.live-order-panel .live-order-stats{grid-column:1/-1;grid-row:2;border-left:0;border-top:1px solid #eef1f3;padding:10px 0 0;display:flex;justify-content:space-between;gap:8px;font-size:11px}.live-order-stats b{font-size:13px;margin-left:2px}.live-order-panel .live-order-actions{gap:6px}.live-order-panel .live-order-actions button{padding:5px 8px!important;min-height:28px;font-size:11px}.live-order-panel .live-order-list{grid-template-columns:1fr;margin-top:10px;padding-top:10px}.live-unread-count{font-size:10px}}

.admin-layout .workspace > .toolbar > button.product-batch-import{background:#25834f;border-color:#25834f;color:#fff;box-shadow:none}
.admin-layout .workspace > .toolbar > button.product-batch-import:hover{background:#1d6d40;border-color:#1d6d40;color:#fff}
.admin-layout .workspace > .toolbar > button.product-batch-import:focus-visible{outline-color:#85c9a1}

.order-data-module th[data-column="手机号"]{width:120px}.order-data-module .management-order-phone{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;color:#344054}
@media(max-width:700px){.order-data-module .management-order-phone{width:auto}}

.finance-page{min-width:0}.finance-page h2{font-size:18px;margin:24px 0 14px}.finance-page .toolbar{gap:10px;flex-wrap:wrap}.finance-page .toolbar h1{margin:0}
.finance-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.finance-stat{padding:22px;display:flex;flex-direction:column;gap:14px}.finance-stat>span{color:#667085;font-size:13px}.finance-stat>strong{color:#237448;font-size:25px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.finance-help{color:#697586;font-size:13px;line-height:1.8;margin:14px 0}.finance-balance-strip{display:flex;flex-wrap:wrap;gap:14px 28px;background:#f5f8f6;border:1px solid #e2e9e4;border-radius:10px;padding:16px;font-size:13px}.finance-balance-strip strong{color:#344b3d;white-space:nowrap}
.finance-tabs{display:flex;gap:10px;margin:20px 0}.finance-filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid #e6ebef;border-radius:12px;padding:18px}.finance-filters label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#667085}.finance-filters input,.finance-filters select{height:40px;max-width:100%;min-width:140px;border:1px solid #dce3e7;border-radius:7px;padding:8px 10px;background:#fff;color:#344054}.finance-filters button{min-height:40px}
.finance-table .table-wrap{overflow-x:auto;max-width:100%}.finance-table table{width:100%;min-width:1150px;table-layout:auto}.finance-table button{white-space:nowrap}.finance-table th{overflow:visible;text-overflow:clip}.finance-table th{white-space:nowrap;font-size:12px}.finance-table td{font-size:13px;white-space:nowrap}.finance-table .status{white-space:nowrap}.finance-table td strong{color:#237448}.finance-table tbody tr:last-child td{border-bottom:0}
.finance-fee-editor{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin:0}.finance-fee-editor input{width:78px;min-width:0;height:34px;padding:5px 7px;border:1px solid #dce3e7;border-radius:6px;background:#fff;color:#344054;font-size:13px;font-variant-numeric:tabular-nums}.finance-fee-editor input:focus{outline:2px solid #ffd9c9;outline-offset:1px;border-color:#ff824d}.finance-fee-editor>span{color:#667085}.finance-fee-editor button{min-height:34px;padding:5px 9px!important;font-size:12px!important;margin:0!important}.finance-fee-editor input:disabled{background:#f3f5f7}
.withdrawal-upload-row{display:flex;align-items:center;gap:10px;min-width:0}.withdrawal-upload-row .new-product-image-upload{display:inline-flex;margin:0;color:#fff;font-size:12px;font-weight:800;flex-shrink:0}.withdrawal-upload-row .new-product-image-upload:focus-within{outline:2px solid #ffad8e;outline-offset:3px}.withdrawal-upload-row .new-product-image-upload[aria-disabled="true"]{opacity:.55;cursor:default}.withdrawal-upload-filename{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667085;font-size:12px}
.finance-facts{display:grid;gap:0;margin:0 0 16px}.finance-facts>div{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid #edf0ed}.finance-facts dt{color:#768178;font-size:13px;flex-shrink:0}.finance-facts dd{margin:0;text-align:right;color:#2f4438;font-weight:600;overflow-wrap:anywhere}.withdrawal-qrcode{display:block;max-width:100%;width:300px;height:auto;max-height:480px;object-fit:contain;margin:12px auto;border:1px solid #e2e7e3;border-radius:10px;background:#fff;padding:8px}.withdrawal-detail h3{font-size:15px}.finance-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#fff6e5;border:1px solid #f0d9aa;border-radius:12px;margin-bottom:16px;padding:12px 16px;font-size:14px;color:#80521e}
@media(max-width:900px){.finance-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.finance-stat{padding:16px}.finance-stat>strong{font-size:22px}}
@media(max-width:760px){.finance-filters{padding:12px;gap:10px}.finance-filters label:first-child{width:100%}.finance-filters label{min-width:0;flex:1 1 130px}.finance-filters input,.finance-filters select{min-width:0;width:100%}.finance-table .table-wrap table{min-width:0;display:block}.finance-table .table-wrap tbody td{height:auto;white-space:normal;overflow-wrap:anywhere}.finance-table .table-wrap tbody td::before{white-space:normal}.finance-balance-strip{gap:12px;flex-direction:column}.finance-facts>div{gap:12px}}

.order-sound-toolbar{display:flex;justify-content:flex-end;margin:0 0 14px}.admin-layout .workspace .order-sound-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;width:auto;margin:0;padding:7px 12px;font-size:12px;font-weight:600;line-height:1.5;border:1px solid #e2e7ec;border-radius:8px;background:#fff;color:#667085;box-shadow:none}.admin-layout .workspace .order-sound-button.is-on{color:#25834f;background:#f3faf5;border-color:#cde5d5}.order-sound-button svg{flex-shrink:0}.order-sound-button:focus-visible{outline:2px solid #ffad8e;outline-offset:3px}

.product-detail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.product-detail-toolbar .detail-back{margin:0}.product-detail-toolbar .product-share-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;color:#e75d22;background:#fff6ef;border:1px solid #ffd8c4}.product-share-button>span{font-size:19px;line-height:1}.product-share-content{display:flex;flex-direction:column;gap:18px}.product-share-preview{display:flex;align-items:center;gap:16px;padding:14px;background:#f8fafb;border-radius:12px}.product-share-preview>.product-image{width:88px;height:88px;min-height:88px;max-height:88px;padding:6px;aspect-ratio:auto;object-fit:contain;flex-shrink:0;border-radius:8px;background:#fff}.product-share-preview>div:last-child{min-width:0;display:flex;flex-direction:column;gap:10px}.product-share-preview strong{font-size:16px;overflow-wrap:anywhere}.product-share-actions{display:flex;gap:12px}.product-share-actions>button{flex:1;min-height:42px}.product-share-content>input{width:100%;min-width:0;font-size:13px;color:#667085;border:1px solid #dce3e7;border-radius:8px;padding:12px}.product-share-hint{margin:0;color:#526477;font-size:13px;line-height:1.8}.product-share-open{text-align:center;color:#e75d22;font-size:14px}.merchant-share-button{white-space:nowrap}.guest-product .inner-mall-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.guest-product .product-detail-page{padding-bottom:30px}
@media(max-width:600px){.product-share-preview{padding:12px;gap:12px}.product-share-preview>.product-image{width:70px;height:70px;min-height:70px;max-height:70px}.product-share-actions{gap:10px}.product-detail-toolbar{gap:8px}.product-detail-toolbar button{padding:9px 11px;font-size:13px}}

.product-share-preview .product-visual .category-emoji{font-size:30px;line-height:1}.product-share-preview .product-visual>span:last-child{font-size:10px}

/* WeChat delivery notification opt-in. */
.delivery-subscription{padding:16px 0;margin-bottom:12px;border-bottom:1px solid #e8e8e8}
.delivery-subscription p{font-size:14px;line-height:1.6;color:#65717d;margin:8px 0 12px}
.delivery-subscription small{display:block;color:#78828d;font-size:12px;margin-top:8px}
.delivery-subscribe-tag wx-open-subscribe{display:block;min-height:44px}

/* External storefront navigation links share the existing navigation styling. */
.desktop-life-nav a, .inner-mall-nav a, .bottom-nav a { text-decoration: none; font-family: inherit; font-weight: 700; }
