:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #17332d;
  background: #e9f3ee;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(12, 166, 120, 0.08), transparent 38%),
    #e9f3ee;
}

button { font: inherit; }

.phone-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #f4fbf7;
  box-shadow: 0 0 42px rgba(18, 75, 60, 0.14);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 64px;
  padding: 10px 16px;
  color: #fff;
  background: #087f5b;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  background: #fff;
  color: #087f5b;
  font-size: 19px;
  font-weight: 900;
}

.app-header div { min-width: 0; flex: 1; }
.app-header strong, .app-header span { display: block; }
.app-header strong { font-size: 17px; line-height: 22px; }
.app-header div span { color: rgba(255,255,255,.76); font-size: 11px; line-height: 16px; }

.refresh-button,
.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 25px;
  cursor: pointer;
}

.app-content {
  min-height: calc(100vh - 126px);
  padding: 14px 14px 86px;
}

.login-view {
  padding: 54px 10px 20px;
  text-align: center;
}

.login-emblem {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #0b8f67;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.login-view h1 { margin: 14px 0 3px; font-size: 26px; letter-spacing: 0; }
.login-view > p { margin: 0; color: #71847d; font-size: 12px; }
.login-panel { margin-top: 30px; padding: 17px; border: 1px solid #d8ebe3; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(8,127,91,.1); text-align: left; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 6px; background: #edf5f1; }
.login-tabs label { position: relative; cursor: pointer; }
.login-tabs input { position: absolute; opacity: 0; }
.login-tabs span { display: grid; height: 36px; place-items: center; border-radius: 5px; color: #64756f; font-size: 12px; font-weight: 800; }
.login-tabs input:checked + span { background: #fff; color: #087f5b; box-shadow: 0 2px 7px rgba(8,127,91,.1); }
.customer-login-fields label,
.admin-login-fields label,
.coupon-admin > label,
.coupon-fields label { display: block; margin-top: 14px; color: #40524c; font-size: 11px; font-weight: 800; }
.customer-login-fields input,
.admin-login-fields input,
.coupon-admin input { width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #cfe4dc; border-radius: 6px; color: #17332d; background: #fbfffd; font: inherit; font-weight: 400; }
.customer-login-fields small,
.admin-login-fields small { display: block; margin-top: 8px; color: #71847d; font-size: 10px; }

.hero {
  position: relative;
  height: 194px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 12px 28px rgba(8,127,91,.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  padding: 28px;
  background: linear-gradient(135deg, #0ca678, #74c69d);
}

.hero-slide:nth-child(2) { background: linear-gradient(135deg, #087f5b, #e5b271); }
.hero-slide:nth-child(3) { background: linear-gradient(135deg, #2b8a3e, #7386c9); }
.hero-slide.is-active { display: flex; }

.hero-slide.has-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8,65,47,.32);
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide:nth-child(1) > img { object-position: 60% center; }
.hero-slide:nth-child(2) > img { object-position: center 46%; }

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaf-shape {
  position: absolute;
  right: 30px;
  top: 28px;
  width: 116px;
  height: 56px;
  border-radius: 56px 7px 56px 7px;
  background: rgba(255,255,255,.2);
  transform: rotate(-25deg);
}

.leaf-shape.second { right: 102px; top: 112px; transform: rotate(16deg); }
.hero-copy { position: relative; z-index: 1; max-width: 82%; }
.hero-kicker { display: inline-block; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 700; }
.hero h1 { margin: 11px 0 4px; font-size: 28px; line-height: 36px; letter-spacing: 0; }
.hero p { margin: 0; font-size: 13px; line-height: 20px; opacity: .9; }
.hero-dots { position: absolute; z-index: 2; right: 14px; bottom: 12px; display: flex; gap: 5px; }
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.hero-dot.is-active { width: 17px; border-radius: 3px; background: #fff; }

.activity-banner {
  width: 100%;
  aspect-ratio: 772 / 343;
  overflow: hidden;
  border: 1px solid #d8ebe3;
  border-radius: 8px;
  background: #654a4b;
  box-shadow: 0 9px 24px rgba(8,127,91,.12);
}

.activity-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.notice,
.card,
.summary-row,
.empty-state {
  border: 1px solid #d8ebe3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(8,127,91,.07);
}

.notice { margin-top: 12px; padding: 11px 13px; background: #effdf6; color: #087f5b; font-size: 13px; line-height: 19px; }
.section { margin-top: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-title { margin: 0; font-size: 20px; line-height: 27px; letter-spacing: 0; }
.section-note { display: block; margin-top: 2px; color: #71847d; font-size: 11px; line-height: 16px; }
.text-button { min-width: 52px; height: 30px; padding: 0 10px; border: 1px solid #d8ebe3; border-radius: 6px; background: #fff; color: #0ca678; font-size: 12px; font-weight: 800; cursor: pointer; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-card { overflow: hidden; cursor: pointer; }
.product-cover { display: grid; width: 100%; aspect-ratio: 1.45; place-items: center; overflow: hidden; background: linear-gradient(135deg,#d3f9d8,#fff4e6); color: #087f5b; font-size: 16px; font-weight: 900; }
.product-cover img, .row-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 10px; }
.product-name { min-height: 38px; font-size: 15px; line-height: 19px; font-weight: 900; }
.product-taste { display: -webkit-box; height: 34px; margin-top: 4px; overflow: hidden; color: #71847d; font-size: 11px; line-height: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-foot, .row-top, .row-meta, .info-card, .logistics-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.product-foot { margin-top: 8px; }
.price { color: #0b8f67; font-weight: 900; }
.stock { color: #8a9a94; font-size: 11px; }

.page-title { margin: 4px 2px 3px; font-size: 24px; line-height: 32px; letter-spacing: 0; }
.page-note { margin: 0 2px 15px; color: #71847d; font-size: 13px; line-height: 19px; }
.category-row { display: flex; gap: 7px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; min-width: 58px; height: 32px; padding: 0 12px; border: 1px solid #d8ebe3; border-radius: 6px; background: #fff; color: #087f5b; font-size: 12px; font-weight: 800; cursor: pointer; }
.category-chip.is-active { border-color: #0ca678; background: #0ca678; color: #fff; }
.product-list, .info-list { display: flex; flex-direction: column; gap: 10px; }
.product-row { display: flex; min-height: 116px; overflow: hidden; cursor: pointer; }
.row-cover { display: grid; flex: 0 0 116px; place-items: center; background: linear-gradient(135deg,#d3f9d8,#fff4e6); color: #087f5b; font-size: 16px; font-weight: 900; }
.row-body { min-width: 0; flex: 1; padding: 12px; }
.row-name { min-width: 0; font-size: 15px; line-height: 20px; font-weight: 900; }
.row-desc { display: -webkit-box; height: 34px; margin: 6px 0 8px; overflow: hidden; color: #71847d; font-size: 11px; line-height: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tag { display: inline-flex; min-height: 20px; align-items: center; padding: 0 8px; border-radius: 999px; background: #d3f9d8; color: #087f5b; font-size: 10px; font-weight: 800; }

.empty-state { padding: 48px 20px; text-align: center; color: #71847d; font-size: 13px; line-height: 20px; }
.empty-state strong { display: block; margin-bottom: 7px; color: #17332d; font-size: 18px; }

.member-card { display: flex; min-height: 94px; align-items: center; gap: 12px; padding: 15px; border-radius: 8px; background: #0b8f67; color: #fff; box-shadow: 0 9px 24px rgba(8,127,91,.18); }
.member-info { min-width: 0; flex: 1; }
.member-logout { flex: 0 0 auto; padding: 7px 9px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; cursor: pointer; }
.avatar { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: #e8fff0; color: #0b6b50; font-size: 22px; font-weight: 900; }
.member-name { font-size: 20px; font-weight: 900; }
.member-level { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 12px; }
.balance-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 11px; }
.balance-card { padding: 13px; }
.balance-card.accent { border-color: #ffdfba; background: #fff8ef; }
.balance-label { display: block; color: #71847d; font-size: 12px; }
.balance-value { display: block; margin-top: 5px; font-size: 23px; font-weight: 900; }
.summary-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 10px; padding: 11px 0; }
.summary-item { min-width: 0; padding: 0 5px; border-right: 1px solid #d8ebe3; text-align: center; }
.summary-item:last-child { border-right: 0; }
.summary-num { display: block; overflow: hidden; font-size: 13px; line-height: 20px; font-weight: 900; text-overflow: ellipsis; }
.summary-label { color: #71847d; font-size: 10px; }
.info-card, .logistics-card { padding: 13px; }
.info-title { font-size: 14px; line-height: 19px; font-weight: 900; }
.info-sub { display: block; margin-top: 4px; color: #71847d; font-size: 11px; line-height: 17px; }
.info-side { flex: 0 0 auto; text-align: right; }
.status { display: block; margin-top: 4px; color: #087f5b; font-size: 11px; font-weight: 800; }
.points-wallet { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 13px; background: #edfff4; }
.points-wallet span,
.points-wallet strong { display: block; }
.points-wallet span { color: #71847d; font-size: 10px; }
.points-wallet strong { margin-top: 2px; color: #0b8f67; font-size: 24px; }
.points-wallet p { max-width: 235px; margin: 0; color: #64756f; font-size: 10px; line-height: 16px; }
.coupon-wallet { display: grid; gap: 8px; }
.coupon-ticket { display: flex; align-items: center; gap: 14px; padding: 12px; border-left: 4px solid #12b886; border-radius: 6px; background: #fff8ef; }
.coupon-ticket > strong { flex: 0 0 72px; color: #d9480f; font-size: 22px; }
.coupon-ticket b,
.coupon-ticket span { display: block; }
.coupon-ticket b { font-size: 13px; }
.coupon-ticket span { margin-top: 3px; color: #71847d; font-size: 10px; }

.points-zone { margin-bottom: 20px; }
.points-zone-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.points-zone-head h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.points-zone-head span { display: block; margin-top: 2px; color: #71847d; font-size: 10px; }
.points-zone-head > div:last-child { text-align: right; }
.points-zone-head strong { display: block; color: #0b8f67; font-size: 22px; }
.points-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.points-product { overflow: hidden; }
.points-price { margin-top: 6px; color: #0b8f67; font-size: 14px; font-weight: 900; }
.points-product .full-action { min-height: 34px; margin-top: 10px; font-size: 11px; }

.tab-bar {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%,430px);
  height: 66px;
  grid-template-columns: repeat(4,1fr);
  transform: translateX(-50%);
  border-top: 1px solid #d8ebe3;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
}

.tab-bar[hidden] { display: none; }

.tab { display: grid; place-content: center; gap: 1px; border: 0; background: transparent; color: #71847d; font-size: 11px; cursor: pointer; }
.tab-symbol { display: grid; width: 23px; height: 23px; margin: 0 auto; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 900; }
.tab.is-active { color: #087f5b; font-weight: 800; }
.tab.is-active .tab-symbol { background: #d3f9d8; }

.product-dialog,
.shop-dialog { width: min(88vw,390px); max-height: 88vh; padding: 0; overflow: auto; border: 0; border-radius: 8px; box-shadow: 0 25px 70px rgba(15,48,39,.28); }
.product-dialog::backdrop,
.shop-dialog::backdrop { background: rgba(12,35,29,.42); }
.dialog-close { position: absolute; z-index: 2; top: 7px; right: 7px; border-radius: 50%; background: rgba(255,255,255,.9); color: #17332d; }
.dialog-cover { display: grid; height: 210px; place-items: center; overflow: hidden; background: linear-gradient(135deg,#d3f9d8,#fff4e6); color: #087f5b; font-size: 22px; font-weight: 900; }
.dialog-cover img { width: 100%; height: 100%; object-fit: cover; }
.dialog-body { padding: 20px; }
.dialog-body h2 { margin: 0; font-size: 23px; letter-spacing: 0; }
.dialog-body p { color: #5f716b; font-size: 13px; line-height: 21px; }
.dialog-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }

.page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cart-button { flex: 0 0 auto; height: 34px; margin-top: 5px; padding: 0 11px; border: 1px solid #bfe2d4; border-radius: 6px; background: #fff; color: #087f5b; font-size: 12px; font-weight: 800; cursor: pointer; }
.cart-button span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 3px; border-radius: 50%; background: #0ca678; color: #fff; font-size: 10px; }

.purchase-row,
.purchase-total,
.cart-summary,
.checkout-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.purchase-row { margin-top: 18px; padding-top: 15px; border-top: 1px solid #d8ebe3; font-size: 13px; font-weight: 800; }
.purchase-total { margin-top: 12px; font-size: 13px; }
.purchase-total strong,
.cart-summary strong,
.checkout-total strong { color: #0b8f67; font-size: 19px; }
.stepper { display: grid; width: 100px; height: 34px; grid-template-columns: 32px 1fr 32px; align-items: center; overflow: hidden; border: 1px solid #cfe4dc; border-radius: 6px; background: #fff; text-align: center; }
.stepper button { height: 100%; padding: 0; border: 0; background: #effdf6; color: #087f5b; font-size: 19px; cursor: pointer; }
.stepper strong { font-size: 13px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 17px; }
.primary-action,
.secondary-action { min-height: 42px; padding: 0 13px; border-radius: 6px; font-weight: 900; cursor: pointer; }
.primary-action { border: 1px solid #0ca678; background: #0ca678; color: #fff; }
.secondary-action { border: 1px solid #0ca678; background: #fff; color: #087f5b; }
.primary-action:disabled { cursor: wait; opacity: .6; }
.full-action { width: 100%; margin-top: 15px; }

.shop-dialog { padding: 20px; }
.shop-dialog-head { padding-right: 34px; }
.shop-dialog-head h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.shop-dialog-head span { display: block; margin-top: 3px; color: #71847d; font-size: 11px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cart-row { display: flex; gap: 11px; padding-bottom: 10px; border-bottom: 1px solid #e2efe9; }
.cart-thumb { display: grid; flex: 0 0 76px; height: 76px; place-items: center; overflow: hidden; border-radius: 6px; background: linear-gradient(135deg,#d3f9d8,#fff4e6); color: #087f5b; font-size: 13px; font-weight: 900; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-main { min-width: 0; flex: 1; }
.cart-main > strong { display: block; min-height: 34px; font-size: 14px; line-height: 17px; }
.cart-main > .price { display: block; margin-top: 2px; font-size: 13px; }
.cart-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.cart-controls .stepper { width: 88px; height: 29px; grid-template-columns: 28px 1fr 28px; }
.remove-button { padding: 4px 2px; border: 0; background: transparent; color: #ad5b4e; font-size: 11px; cursor: pointer; }
.cart-summary { margin-top: 16px; padding-top: 13px; border-top: 1px solid #d8ebe3; }

.checkout-products { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; padding: 12px; border-radius: 6px; background: #effdf6; }
.checkout-products div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.checkout-products strong { flex: 0 0 auto; }
#checkoutForm { margin-top: 15px; }
#checkoutForm > label { display: block; margin-top: 10px; color: #40524c; font-size: 12px; font-weight: 800; }
#checkoutForm input[type="text"],
#checkoutForm input:not([type]),
#checkoutForm textarea { width: 100%; margin-top: 5px; padding: 10px 11px; border: 1px solid #cfe4dc; border-radius: 6px; outline: none; background: #fff; color: #17332d; font: inherit; font-weight: 400; }
#checkoutForm input:focus,
#checkoutForm textarea:focus { border-color: #0ca678; box-shadow: 0 0 0 2px rgba(12,166,120,.12); }
#checkoutForm textarea { min-height: 64px; resize: vertical; }
#checkoutForm fieldset { display: grid; gap: 7px; margin: 14px 0 0; padding: 0; border: 0; }
#checkoutForm legend { margin-bottom: 7px; color: #40524c; font-size: 12px; font-weight: 800; }
.payment-option { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #d8ebe3; border-radius: 6px; cursor: pointer; }
.payment-option input { accent-color: #0ca678; }
.payment-option span { font-size: 12px; font-weight: 800; }
.payment-option small { display: block; margin-top: 2px; color: #71847d; font-size: 10px; font-weight: 400; }
.checkout-total { margin-top: 15px; padding-top: 13px; border-top: 1px solid #d8ebe3; }
.form-status { min-height: 18px; margin: 8px 0 0; color: #b14d43; font-size: 11px; line-height: 18px; }
.admin-mobile { padding-bottom: 10px; }
.admin-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.admin-metrics > div { padding: 12px; border: 1px solid #d8ebe3; border-radius: 8px; background: #fff; }
.admin-metrics span,
.admin-metrics strong { display: block; }
.admin-metrics span { color: #71847d; font-size: 10px; }
.admin-metrics strong { margin-top: 4px; color: #0b8f67; font-size: 20px; }
.coupon-admin { margin-top: 14px; padding: 14px; }
.target-control { display: flex; gap: 8px; padding: 8px; border-radius: 6px; background: #effdf6; color: #40524c; font-size: 11px; font-weight: 800; }
.target-control label { flex: 1; }
.target-control input { width: auto; margin: 0 4px 0 0; accent-color: #0ca678; }
.coupon-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.admin-customers { display: grid; gap: 8px; }
.admin-customer { display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.admin-customer > input { flex: 0 0 auto; accent-color: #0ca678; }
.admin-customer > div { min-width: 0; flex: 1; }
.admin-customer strong,
.admin-customer span,
.admin-customer small { display: block; }
.admin-customer > div strong { font-size: 13px; }
.admin-customer > div span { margin-top: 3px; color: #71847d; font-size: 10px; }
.admin-customer aside { flex: 0 0 auto; text-align: right; }
.admin-customer aside strong { color: #0b8f67; font-size: 17px; }
.admin-customer aside span,
.admin-customer aside small { color: #71847d; font-size: 9px; }
.admin-sales { display: grid; gap: 8px; }
.admin-sale { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; }
.admin-sale > div { min-width: 0; flex: 1; }
.admin-sale strong,
.admin-sale span { display: block; }
.admin-sale > div strong { font-size: 12px; line-height: 17px; }
.admin-sale > div span,
.admin-sale aside span { margin-top: 3px; color: #71847d; font-size: 9px; }
.admin-sale aside { flex: 0 0 auto; text-align: right; }
.admin-sale aside strong { color: #0b8f67; font-size: 15px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 92px; max-width: 320px; padding: 10px 16px; border-radius: 6px; background: #17332d; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 22px 0; }
  .phone-shell { min-height: calc(100vh - 44px); border-radius: 18px; }
  .app-content { min-height: calc(100vh - 170px); }
  .tab-bar { bottom: 22px; border-radius: 0 0 18px 18px; }
}
