.ref-surface .page.warehouse-reference {
  --storage-red: #ff432c;
  --order-red: #ff454e;
  --storage-bg: #eef1fb;
  --storage-line: #ededed;
  padding: 0;
  display: block;
  color: #222;
  background: #fff;
}
#app.ref-warehouse, #app.ref-commission, #app.ref-commission-payment, #app.ref-shipment { background: #fff; }
#app.ref-warehouse .page.warehouse-reference { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
#app.ref-storage, #app.ref-pickup { background: #eef1fb; }
#app.ref-benefits, #app.ref-pickups { background: #f3f3f3; }
.ref-storage .page.warehouse-reference,
.ref-pickup .page.warehouse-reference {
  background: #eef1fb;
  padding-bottom: 60px;
}
.ref-commission .page.warehouse-reference,
.ref-commission-payment .page.warehouse-reference,
.ref-shipment .page.warehouse-reference {
  padding-bottom: 60px;
}
.warehouse-reference .pagination { padding: 12px; }
.wh-tabs { display: flex; align-items: stretch; background: #fff; }
.wh-tabs a {
  position: relative;
  display: grid;
  place-items: center;
  width: 75px;
  min-height: 44px;
  color: #666;
  font-size: 16px;
}
.wh-tabs a[aria-current] { color: #ff4a26; font-weight: 700; }
.wh-tabs a[aria-current]::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 12px;
  width: 26px;
  border-top: 2px solid currentColor;
  border-radius: 2px;
}
.ref-warehouse .wh-tabs {
  background: #faf9fb url("./assets/reference/tab_page_head_bg.png") center bottom / 100% auto no-repeat;
}
#app.ref-warehouse .topbar { border-bottom: 0; background: #faf9fb; }
.wh-tabs-wide a,
.wh-tabs-ledger a { width: 50%; }
.wh-tabs-wide a[aria-current]::after,
.wh-tabs-ledger a[aria-current]::after { left: 25%; width: 50%; bottom: 0; }
.wh-tabs-ledger a[aria-current] { color: #3b99ff; font-weight: 400; }
.wh-tabs-ledger a { min-height: 40px; font-size: 14px; }
.wh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 10px 10px;
  border-radius: 26px;
  background: linear-gradient(#fff, #eff3fd);
}
.wh-grid .wh-empty { grid-column: 1/-1; }
.wh-empty { margin: 0; padding: 35px 12px; text-align: center; color: #999; font-size: 14px; }
.wh-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 4px #00000006;
}
.wh-card-photo { display: block; width: 100%; aspect-ratio: 1.38; object-fit: cover; }
.wh-card-title { padding: 9px 7px; overflow: hidden; color: #252525; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wh-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px 10px; gap: 4px; }
.wh-card-foot strong { color: #ff4a20; font-size: 13px; }
.wh-chip { color: #fff; background: #ff591e; border-radius: 10px; padding: 0 6px; font-size: 10px; line-height: 14px; white-space: nowrap; }
.wh-large { padding: 5px 4px 8px; background: #fff; }
.wh-large-photo { display: block; width: 100%; aspect-ratio: 1.05; object-fit: cover; border-radius: 4px; }
.wh-detail-text { padding: 6px 9px 18px; }
.wh-detail-text h1 { margin: 0 0 9px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.wh-owner { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.wh-owner span { padding: 1px 7px; color: #172b3c; background: linear-gradient(#98cef8, #c0e8ff); border-radius: 2px; }
.wh-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 9px;
  width: min(100%, 520px);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 -2px 6px #0000000b;
}
.wh-button {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 8px;
  background: #ff432c;
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
}
.wh-button:disabled { opacity: .55; }
.wh-dock-round .wh-button { min-height: 42px; border-radius: 25px; background: #ff454e; }
.wh-address {
  display: grid;
  grid-template-columns: 32px 1fr 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 9px;
  padding: 10px 9px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #141414;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.wh-address > svg { color: #777; height: 17px; width: 17px; }
.wh-address-pin { display: grid; place-items: center; color: #7acbfa; }
.wh-address-pin svg { width: 23px; height: 23px; stroke-width: 3; }
.wh-address-fields { border: 0; margin: 10px 0 0; padding: 12px; background: #fff; border-radius: 4px; }
.wh-address-fields .field { margin: 8px 0; }
.wh-address-fields input, .wh-address-fields textarea { border-radius: 4px; }
.wh-payment { min-height: 100%; background: #fff; }
.wh-product-summary {
  display: grid;
  grid-template-columns: clamp(67px, 21vw, 100px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 112px;
  padding: 15px 10px 10px;
  border-bottom: 4px solid #f4f4f4;
}
.wh-summary-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.wh-product-summary h1 { margin: 0 0 4px; color: #171717; font-size: 16px; line-height: 1.35; font-weight: 400; }
.wh-product-summary strong { color: #ff454e; font-size: 17px; font-weight: 700; }
.wh-line, .wh-payment .value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid #ededed;
  font-size: 14px;
  line-height: 1.3;
}
.wh-line > div { display: flex; align-items: center; gap: 4px; color: #161616; }
.wh-payment .value-row > strong { text-align: right; overflow-wrap: anywhere; }
.wh-subtle { color: #707070; font-size: 12px; }
.wh-coupon-select { display: flex; align-items: center; background: none; border: 0; padding: 0; font-size: 15px; }
.wh-coupon-select svg { width: 12px; height: 12px; color: #888; }
.wh-toggle { position: relative; display: inline-block; width: 42px; height: 22px; cursor: pointer; }
.wh-toggle input { position: absolute; inset: 0; z-index: 1; opacity: 0; margin: 0; }
.wh-toggle span { position: absolute; inset: 0; background: #ddd; border-radius: 14px; }
.wh-toggle input:checked + span { background: #ff454e; }
.wh-toggle span::after { position: absolute; content: ""; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.wh-toggle input:checked + span::after { transform: translateX(20px); }
.wh-toggle input:focus-visible + span { outline: 2px solid #257cc3; outline-offset: 2px; }
.wh-option-title { min-height: 36px; padding: 9px 10px; border-bottom: 1px solid #ededed; }
.wh-option { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 7px 15px; }
.wh-option-check { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #ff454e; color: #fff; }
.wh-option-check svg { width: 16px; height: 16px; stroke-width: 2.5; }
.wh-pay-content { padding: 10px 15px 20px; }
.wh-qr { margin: 14px auto 7px; text-align: center; }
.wh-qr figcaption { margin: 0 0 9px; color: #272727; }
.wh-qr img { display: block; max-width: 100%; width: min(68%, 250px); max-height: 320px; margin: auto; object-fit: contain; border-radius: 4px; }
.wh-qr p, .wh-cost-description { margin: 7px 0 3px; color: #8c8c8c; font-size: 13px; }
.wh-cost-description b, .wh-cost-note, .wh-error { color: #ff454e; }
.wh-cost-note { margin: 4px 0 8px; font-size: 13px; }
.wh-upload { margin: 34px 0 8px; }
.wh-upload h2 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.wh-upload label {
  position: relative;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 5px;
  width: 106px;
  aspect-ratio: 1;
  padding: 4px;
  overflow: hidden;
  border: 1px dashed #d6d6d6;
  border-radius: 4px;
  background: #f4f4f4;
  color: #949494;
  font-size: 12px;
  cursor: pointer;
}
.wh-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.wh-upload label:focus-within { outline: 2px solid #257cc3; outline-offset: 2px; }
.wh-upload [data-proof-placeholder] { display: grid; justify-items: center; gap: 5px; }
.wh-upload [data-proof-preview] { display: block; width: 96px; height: 96px; object-fit: contain; }
.wh-upload [hidden] { display: none; }
.wh-upload [data-proof-status] { margin: 7px 0 0; font-size: 12px; color: #707070; }
.wh-upload [data-proof-status].wh-error { color: #c6232c; }
.wh-existing { color: #666; font-size: 13px; }
.wh-existing img { max-width: min(240px, 100%); }
.wh-close-order, .wh-text-button {
  display: inline-block;
  min-height: 36px;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: #318deb;
  font-size: 13px;
  cursor: pointer;
}

#app.ref-surface:has(.wh-direct-pay) .topbar {
  min-height: calc(38px + env(safe-area-inset-top));
  border-bottom: 0;
  color: #111;
}
#app.ref-surface:has(.wh-direct-pay) .topbar strong { font-size: 14px; }
#app.ref-surface:has(.wh-direct-pay) .topbar .back { min-height: 38px; height: 38px; left: 3px; }
.ref-surface .page.warehouse-reference:has(.wh-direct-pay) {
  padding-bottom: calc(58px + env(safe-area-inset-bottom));
}
.wh-direct-pay .wh-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 43px;
  padding: 7px 14px;
  border: 0;
  background: #fff;
  color: #333;
  text-align: left;
  font-size: 14px;
}
.wh-direct-pay .wh-method:disabled { color: #888; }
.wh-method-indicator {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  height: 19px;
  border: 1px solid #c8c8c8;
  border-radius: 50%;
}
.wh-method-indicator svg { display: none; width: 15px; height: 15px; stroke-width: 2.8; }
.wh-method[aria-pressed='true'] .wh-method-indicator { background: #ff484e; border-color: #ff484e; color: #fff; }
.wh-method[aria-pressed='true'] .wh-method-indicator svg { display: block; }
.wh-method[aria-pressed='true'] .wh-method-indicator:empty::after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.wh-direct-pay .wh-pay-content { padding: 0 14px 6px; }
.wh-direct-pay .wh-qr { margin: 15px auto 0; }
.wh-direct-pay .wh-qr figcaption { margin-bottom: 8px; font-size: 14px; }
.wh-qr-image {
  position: relative;
  width: min(53vw, 274px);
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 4px;
  background: #f4f4f4;
}
.wh-qr .wh-qr-image img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.wh-direct-pay .wh-qr p { margin: 10px 0 1px; }
.wh-direct-pay .wh-qr p,
.wh-direct-pay .wh-cost-description { color: #929292; font-size: 12px; }
.wh-direct-pay .wh-cost-description b { font-weight: 400; }
.wh-direct-pay .wh-cost-note { margin: 2px 0 0; color: #d65357; font-size: 13px; }
.wh-direct-pay .wh-code-preparation { margin: 16px 0; text-align: center; }
.wh-direct-pay .wh-qr-image > .wh-code-preparation {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 8px;
}
.wh-direct-pay .wh-upload { margin: 38px 0 0; }
.wh-direct-pay .wh-upload h2 { font-size: 14px; font-weight: 400; }
.wh-direct-pay .wh-upload label { width: 97px; background: #f3f3f3; }
.wh-direct-pay .wh-upload [data-proof-placeholder] { gap: 8px; }
.wh-direct-pay .wh-upload [data-proof-placeholder] svg { width: 22px; height: 22px; }
.wh-direct-pay .wh-upload [data-proof-preview] { width: 100%; height: 87px; }
.wh-direct-pay .wh-upload [data-proof-status]:empty { display: none; }
.wh-direct-pay .wh-close-order { padding-inline: 0; }
.wh-direct-pay .wh-dock { padding: 8px 9px calc(8px + env(safe-area-inset-bottom)); }
.wh-direct-pay .wh-dock-round .wh-button { min-height: 38px; background: #ff484e; font-size: 14px; }

#app:is(.ref-pickups, .ref-benefits, .ref-coupons, .ref-distribution, .ref-profit) {
  --team-unit: min(.13333333vw, .693333px);
  --team-gutter: 15px;
  --team-space: 10px;
  --mine-panel-bg: #f2f4fd;
  background: var(--mine-panel-bg);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
#app:is(.ref-pickups, .ref-benefits) { --mine-panel-bg: #f5f5f5; }
#app:is(.ref-pickups, .ref-benefits, .ref-coupons, .ref-distribution, .ref-profit) .page.warehouse-reference { background: var(--mine-panel-bg); }
#app.ref-distribution .page.wh-my-referrals { background: #f5f5f5; }
#app:is(.ref-pickups, .ref-benefits, .ref-coupons, .ref-distribution, .ref-profit) .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: calc(44px + env(safe-area-inset-top));
  border: 0;
  color: #000;
}
.wh-my-tabs { display: flex; min-height: 51px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.wh-my-tabs a { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; justify-content: center; gap: 5px; color: #666; font-size: 16px; }
.wh-my-tabs a[aria-current] { color: #f90; font-weight: 500; }
.wh-my-tabs a[aria-current]::after { content: ""; position: absolute; bottom: -1px; left: 50%; width: 20px; height: 2px; background: #f90; transform: translateX(-50%); }
.wh-pickup-tabs { padding-inline: 20px; }
.wh-pickup-tabs small { display: grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 3px; border-radius: 12px; background: #ff4d4f; color: #fff; font-size: 10px; }
.wh-my-pickups, .wh-my-coupons { padding: 10px; }
.wh-my-empty { padding: 100px 0; color: #999; font-size: 16px; text-align: center; }
.wh-my-no-more { padding: 20px 0; color: #999; font-size: 14px; text-align: center; }
.wh-my-pickup { margin-bottom: 10px; padding: 16px; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / 5%); }
.wh-my-pickup > a { display: block; }
.wh-my-pickup header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.wh-my-pickup header strong { color: #666; font-size: 14px; overflow-wrap: anywhere; }
.wh-my-pickup header span { color: #f90; font-size: 14px; white-space: nowrap; }
.wh-my-pickup header .wh-pickup-done { color: #52c41a; }
.wh-my-pickup-product { display: flex; gap: 16px; margin-bottom: 12px; }
.wh-my-pickup-product > :is(img, .image-fallback) { width: calc(var(--team-unit) * 150); aspect-ratio: 1; flex: 0 0 auto; border-radius: 4px; overflow: hidden; background: #f5f5f5; object-fit: cover; }
.wh-my-pickup-product > div:not(.image-fallback) { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow-wrap: anywhere; }
.wh-my-pickup-product strong { color: #333; font-size: 16px; font-weight: 500; }
.wh-my-pickup-product span { margin-top: 8px; color: #ff4d4f; }
.wh-my-pickup-track { padding-top: 15px; border-top: 1px solid #ddd; font-size: 12px; overflow-wrap: anywhere; }
.wh-my-pickup-track button { margin-left: 12px; padding: 1px 5px; border: 1px solid; border-radius: 10px; background: transparent; }
.wh-my-pickup footer { margin-top: 12px; color: #999; font-size: 12px; }

.wh-my-coupon { display: grid; grid-template-columns: minmax(90px, 27%) 1fr; min-height: 91px; margin-bottom: 7px; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / 5%); }
.wh-my-coupon > div:first-child { position: relative; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 15px 10px; background: #fceded; color: #fa3534; font-size: 13px; text-align: center; }
.wh-my-coupon > div:first-child strong { font-size: 20px; }
.wh-my-coupon > div:first-child::after { content: ""; position: absolute; z-index: 1; right: -10px; top: calc(50% - 10px); width: 20px; height: 20px; border-radius: 50%; background: var(--mine-panel-bg); box-shadow: inset 0 0 0 2px #fff; }
.wh-my-coupon > div:last-child { display: flex; flex-direction: column; justify-content: space-between; gap: 7px; padding: 20px 16px; border-left: 1px dashed #f0f0f0; font-size: 12px; }
.wh-my-coupon > div:last-child strong { color: #333; font-weight: 500; }
.wh-my-coupon > div:last-child span { color: #999; font-size: 10px; }
.wh-coupon-archived > div:first-child { background: #f0f0f0; color: #646464; }

.wh-mine-total { display: grid; gap: 7px; padding: 20px 15px; border-radius: 0 0 10px 10px; background: linear-gradient(135deg,#3c9cff,#2989ff); color: #fff; text-align: center; box-shadow: 0 1px 5px rgb(60 156 255 / 20%); }
.wh-mine-total span { font-size: 14px; line-height: 19px; }
.wh-mine-total strong { font-size: 24px; line-height: 31px; }
.ref-profit .wh-mine-total { margin: 10px; border-radius: 10px; text-align: start; }
.ref-profit .wh-mine-total span { font-size: 16px; line-height: 21px; }
.ref-profit .team-order-date { position: sticky; top: calc(44px + env(safe-area-inset-top)); z-index: 12; }
.wh-my-profit { margin: 10px; }
.wh-my-profit [data-team-end] { display: none; }
.wh-mine-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px; }
.wh-mine-shortcuts a { display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 10px; border-radius: 5px; background: #fff; box-shadow: 0 1px 5px rgb(0 0 0 / 5%); }
.wh-mine-shortcuts a > img { width: 31px; height: 31px; flex-shrink: 0; object-fit: contain; }
.wh-mine-shortcuts a > div { display: grid; flex: 1; min-width: 0; gap: 2px; }
.wh-mine-shortcuts strong { color: #333; font-size: 14px; font-weight: 500; }
.wh-mine-shortcuts span, .wh-mine-team header :is(a, button) { color: #999; font-size: 12px; }
.wh-mine-shortcuts svg, .wh-mine-team header svg { width: 11px; height: 11px; flex-shrink: 0; color: #999; vertical-align: middle; }
.wh-mine-team { margin: 0 10px; padding: 10px; }
.wh-mine-team > header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 9px; }
.wh-mine-team > header strong { color: #333; font-size: 14px; font-weight: 500; }
.wh-mine-team > header button { padding: 0; border: 0; background: none; }
.wh-mine-team .team-order-list { margin: 10px 0 0; }
.wh-mine-team .team-order-tools, .wh-mine-team .team-order-tabs { background: transparent; }
.wh-ledger-date { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; min-height: 44px; border: 0; background: #fff; color: #666; font-size: 14px; }
.wh-ledger-date svg { width: 12px; height: 12px; transform: rotate(90deg); }
.wh-ledger { margin-top: 5px; background: #fff; }
.wh-ledger header { min-height: 37px; padding: 9px 15px; border-bottom: 1px solid #ededed; text-align: right; color: #666; font-size: 14px; }
.wh-ledger-row { padding: 12px 15px 9px; border-bottom: 1px solid #ededed; font-size: 14px; }
.wh-ledger-row p { margin: 0; line-height: 1.6; }
.wh-ledger-row > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.wh-ledger-row time { color: #999; }
.wh-ledger-row strong { font-size: 15px; }
.wh-ledger-row .is-positive { color: #63bd39; }
.wh-ledger-row .is-negative { color: #f16673; }
#dialog:has(.warehouse-risk) { width: min(calc(100% - 26px), 447px); max-height: 82dvh; padding: 0; border: 0; border-radius: 8px; }
#dialog:has(.warehouse-risk)::backdrop { background: #0008; }
#dialog:has(.warehouse-risk) .dialog-content { position: relative; padding: 0; }
#dialog:has(.warehouse-risk) h2 { margin: 0; padding: 15px 40px; border-bottom: 1px solid #eee; text-align: center; font-size: 16px; color: #222; }
.warehouse-risk { height: min(46dvh, 390px); overflow: auto; padding: 12px 15px; color: #666; line-height: 1.65; }
.warehouse-risk h3, .warehouse-risk h4 { margin: 0 0 10px; color: #333; line-height: 1.5; }
.warehouse-risk h3 { font-size: 16px; text-align: center; }
.warehouse-risk h4 { font-size: 15px; }
.warehouse-risk p { margin: 0 0 15px; white-space: pre-line; }
.wh-risk-countdown { height: 32px; margin: 0; padding: 7px 0 0; border-top: 1px solid #eee; color: #999; text-align: center; font-size: 12px; }
#dialog:has(.warehouse-risk) .dialog-actions { display: block; margin: 0; padding: 0 15px 14px; }
#dialog:has(.warehouse-risk) [data-cancel] {
  position: absolute; right: 10px; top: 9px; width: 27px; height: 27px; min-height: 0; border: 0;
  border-radius: 50%; background: #f5f5f5; padding: 0; color: #999; font-size: 0;
}
#dialog:has(.warehouse-risk) [data-cancel]::after { content: "×"; font-size: 20px; }
#dialog:has(.warehouse-risk) [data-confirm] { width: 100%; min-height: 32px; border-radius: 4px; background: #ff432c; }
#dialog:has(.warehouse-risk) [data-confirm]:disabled { opacity: 1; background: #c8c8c8; color: #fff; }
