:root {
  --bg: #f7f4ed;
  --panel: #fffdf8;
  --ink: #1d2522;
  --muted: #68716d;
  --line: #e3ddd1;
  --green: #167a5a;
  --green-dark: #0d513d;
  --gold: #d69b38;
  --coral: #d95b43;
  --blue: #347a98;
  --shadow: 0 18px 45px rgba(41, 35, 25, .11);
}

[hidden] {
  display: none !important;
}

.admin-center-body {
  background: #eef2f5;
  color: #333;
}

.admin-mobile-title {
  height: 86px;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  background: #f7f7f7;
  color: #111;
}

.admin-mobile-title button {
  width: 38px;
  height: 38px;
  background: transparent;
  color: #111;
  font-size: 28px;
  font-weight: 400;
}

.admin-mobile-title div {
  display: grid;
  justify-items: center;
}

.admin-mobile-title strong {
  font-size: 22px;
}

.admin-mobile-title span {
  color: #777;
  font-size: 14px;
}

.admin-console {
  min-height: 100vh;
  background: #fff;
}

.console-topbar {
  height: 48px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  background: #22b4df;
  color: #fff;
}

.console-brand {
  display: flex;
  align-items: center;
  padding-left: 28px;
  background: rgba(0, 0, 0, .07);
  font-weight: 700;
}

.console-icons {
  display: flex;
}

.console-icons span {
  width: 64px;
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(255, 255, 255, .2);
  font-size: 18px;
}

.console-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.console-user button {
  min-height: 30px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.console-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
}

.console-sidebar {
  background: #f2f4f5;
  border-right: 1px solid #dfe5e8;
}

.sidebar-title {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #dde4e7;
  color: #333;
  font-weight: 700;
}

.console-sidebar button,
.console-sidebar a {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #dde4e7;
  border-radius: 0;
  padding: 0 22px;
  background: transparent;
  color: #333;
  font-weight: 500;
  text-align: left;
}

.console-sidebar button.active {
  background: #fff;
  color: #1489aa;
  box-shadow: inset 4px 0 0 #22b4df;
}

.console-workspace {
  min-width: 0;
  padding: 0 22px 36px;
  background: #fff;
}

.console-section {
  display: none;
}

.console-section.active {
  display: block;
}

.breadcrumb {
  height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf1f3;
  color: #555;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.stats-grid article,
.info-card,
.console-form,
.table-panel {
  border: 1px solid #e5ebee;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.stats-grid article {
  padding: 16px;
}

.stats-grid span {
  color: #7b858a;
  font-size: 13px;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  color: #1489aa;
  font-size: 28px;
}

.stats-grid strong.stat-alert {
  color: #e33f36;
}

.info-card {
  margin-bottom: 16px;
  padding: 18px 20px;
}

.info-card h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 80px;
  color: #4f5a60;
  font-size: 14px;
}

.console-form {
  max-width: 760px;
  margin: 18px 0;
  padding: 18px;
}

.console-form.wide-form {
  max-width: 980px;
}

.console-section .table-panel {
  margin-top: 18px;
}

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-body {
  background: #f3f6f4;
}

.mini-app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 86px;
  background: linear-gradient(180deg, #d9ffe4 0, #f7faf8 210px);
}

.mini-top {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, #d9ffe4 0, #eaffef 100%);
}

.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-row {
  gap: 10px;
  margin-bottom: 12px;
}

.store-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 20px;
}

.store-title strong {
  color: #12a35a;
}

.store-title span {
  font-weight: 800;
  white-space: nowrap;
}

.store-title b {
  border-radius: 6px;
  padding: 2px 6px;
  background: #f04d5d;
  color: #fff;
  font-size: 15px;
}

.store-location {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
  white-space: nowrap;
}

.mini-back-link {
  color: #16884f;
  font-weight: 800;
  white-space: nowrap;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: end;
}

.gift-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gift-form .form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-search {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #8ee3b2;
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
}

.market-search input {
  height: 48px;
  border: 0;
  background: transparent;
  font-size: 17px;
}

.market-search span {
  color: #15a761;
  font-size: 18px;
  font-weight: 900;
}

.mini-content {
  display: grid;
  gap: 12px;
  padding: 0 12px 18px;
}

.promo-card {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(110deg, rgba(0, 128, 42, .96), rgba(28, 158, 79, .82)), url("assets/bundle.svg") center right / auto 150% no-repeat;
  overflow: hidden;
}

.promo-card > div {
  flex: 1;
  min-width: 0;
}

.promo-card span {
  font-weight: 900;
}

.promo-card h1 {
  margin: 6px 0;
  font-size: 27px;
}

.promo-card p {
  color: rgba(255, 255, 255, .88);
}

.promo-card button {
  min-width: 106px;
  min-height: 38px;
  background: #fff;
  color: #16884f;
}

.service-strip,
.category-card,
.ticker-card,
.mini-panel {
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 26px rgba(26, 85, 53, .08);
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 12px;
  color: #8b9390;
  text-align: center;
}

.category-card {
  padding: 12px;
}

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

.category-grid button {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 98px;
  padding: 4px;
  border: 1px solid #e4f1ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfefd 0%, #f3f9f6 100%);
  color: #232927;
  font-weight: 500;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.category-grid button:nth-child(2) {
  background: linear-gradient(180deg, #fffefd 0%, #fff7ee 100%);
}

.category-grid button:nth-child(3) {
  background: linear-gradient(180deg, #fdfdff 0%, #f4f4fb 100%);
}

.category-grid button:hover {
  border-color: #b8dfca;
  box-shadow: 0 8px 18px rgba(22, 129, 93, .1);
  transform: translateY(-1px);
}

.category-grid button:focus-visible {
  outline: 3px solid rgba(29, 185, 111, .28);
  outline-offset: 2px;
}

.category-grid button.active span {
  background: linear-gradient(135deg, #c9f5dc, #eafbf1);
}

.category-grid button.active {
  border-color: #79d5a5;
  box-shadow: 0 8px 20px rgba(22, 129, 93, .13);
}

.category-grid button.active::after {
  position: absolute;
  right: 22%;
  bottom: 0;
  left: 22%;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #20c868;
  content: "";
}

.category-grid button.active b {
  color: #16815d;
  font-weight: 800;
}

.category-grid button:disabled {
  cursor: default;
  opacity: .52;
}

.category-grid span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, #dff7ff, #ffe7e8);
  font-size: 28px;
  overflow: hidden;
}

.category-grid span img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-grid span.has-thumb {
  position: relative;
  width: min(110px, 92%);
  height: 82px;
  border-radius: 12px;
  background: transparent;
}

.category-grid b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}

@media (max-width: 420px) {
  .store-title {
    font-size: 18px;
  }

  .promo-card {
    padding: 16px;
  }

  .promo-card h1 {
    font-size: 24px;
  }
}

.ticker-card {
  padding: 14px 18px;
  color: #68716d;
}

.mini-panel {
  padding: 16px;
}

.market-section-head {
  margin-top: 8px;
}

.market-products {
  grid-template-columns: 1fr;
}

.market-product-card {
  box-shadow: 0 10px 22px rgba(26, 85, 53, .08);
}

.market-add {
  width: calc(100% - 26px);
  min-height: 42px;
  margin: 0 13px 13px;
  border: 0;
  border-radius: 999px;
  background: #13865c;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.market-add:hover {
  background: #0f704f;
}

.mini-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(520px, 100%);
  height: 74px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  transform: translateX(-50%);
  border-top: 1px solid #e7ece9;
  background: #fff;
}

.mini-tabbar button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  background: transparent;
  color: #1c2521;
  font-weight: 500;
}

.mini-tabbar button.active span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #20c868;
  color: #fff;
}

.mini-tabbar span {
  font-size: 24px;
}

.mini-tabbar b {
  font-size: 13px;
  font-weight: 500;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(22, 122, 90, .11), transparent 260px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin: 0; }

button, a, input, select, textarea {
  -webkit-tap-highlight-color: rgba(22, 122, 90, .16);
}

.shop-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 18px 110px;
}

.shop-hero {
  min-height: 206px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, .28), transparent 120px),
    linear-gradient(135deg, #12684f, #1f8e68 52%, #e1a13a);
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: end;
  max-width: 620px;
}

.hero-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 7vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 440px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.7;
}

.admin-entry,
.admin-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.admin-entry {
  align-self: flex-start;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
}

.shop-main {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.search-panel,
.panel,
.empty-state,
.product-card,
.detail-info,
.login-card,
.drawer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.search-box,
label {
  display: grid;
  gap: 7px;
  color: #38433f;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 122, 90, .13);
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tabs button {
  height: 40px;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffaf0;
  color: var(--ink);
  cursor: pointer;
}

.category-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.category-tabs b {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 12px;
}

.section-head,
.product-title,
.product-meta,
.drawer-head,
.checkout-total,
.admin-header,
.panel-head,
.admin-item,
.actions,
.cart-item,
.cart-qty,
.header-actions {
  display: flex;
  align-items: center;
}

.section-head,
.drawer-head,
.checkout-total,
.admin-header,
.panel-head,
.admin-item {
  justify-content: space-between;
  gap: 14px;
}

.panel-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.panel-actions .ghost {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.eyebrow {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shop-hero .eyebrow { color: #fff4d7; }

.section-head h2,
.admin-header h1 {
  margin-top: 4px;
  font-size: 30px;
}

.count-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  background: #e9f3ee;
  color: var(--green-dark);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.product-card {
  overflow: hidden;
}

.product-link {
  display: block;
  min-height: 100%;
}

.product-media,
.detail-media,
.cart-thumb {
  background: #edf2ea;
  overflow: hidden;
}

.product-media {
  aspect-ratio: 1 / .78;
}

.product-media img,
.detail-media img,
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #174c3b;
  font-size: 56px;
  font-weight: 900;
}

.product-body {
  padding: 13px;
}

.product-title {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.product-title h3 {
  font-size: 17px;
  line-height: 1.35;
}

.price-stack strong,
.detail-price strong {
  color: var(--coral);
  white-space: nowrap;
}

.price-stack {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}

.price-stack del,
.detail-price del {
  color: #8c948f;
  font-size: 12px;
}

.product-body p {
  min-height: 42px;
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-meta {
  justify-content: space-between;
  gap: 8px;
  color: #47534e;
  font-size: 13px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3ef;
  color: #285f50;
  font-size: 12px;
}

.card-actions {
  display: grid;
  grid-template-columns: 42px 1fr 76px;
  gap: 8px;
  align-items: center;
  padding: 0 13px 13px;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.primary,
.add-button {
  min-height: 42px;
  padding: 0 14px;
  background: var(--green);
  color: #fff;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.detail-actions .add-button,
.detail-actions .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  text-decoration: none;
}

.qty-button,
.cart-qty button,
.icon-button,
.ghost,
.danger {
  min-height: 36px;
  padding: 0 11px;
}

.qty-button,
.cart-qty button,
.icon-button,
.ghost {
  background: #edf2ee;
  color: var(--ink);
}

.danger {
  background: #fff0eb;
  color: #be3f2d;
}

.inline-action {
  width: fit-content;
  margin-top: 6px;
}

.card-actions span {
  text-align: center;
  font-weight: 900;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  padding: 18px;
  box-shadow: none;
}

.cart-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.market-body .cart-fab {
  right: max(18px, calc((100vw - 520px) / 2 + 18px));
  bottom: calc(92px + env(safe-area-inset-bottom));
}

.cart-fab strong {
  min-width: 25px;
  min-height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.cart-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  width: min(430px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border-radius: 8px 0 0 8px;
  transform: translateX(100%);
  transition: transform .18s ease;
}

.cart-drawer.open .drawer-panel {
  transform: translateX(0);
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}

.cart-item {
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.cart-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.cart-item div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.cart-item strong,
.cart-item span,
.admin-item strong,
.admin-item span {
  display: block;
}

.cart-item span,
.meta,
.admin-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.cart-qty {
  gap: 6px;
}

.checkout-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.checkout-total strong {
  color: var(--coral);
  font-size: 22px;
}

.form-message {
  color: var(--green-dark);
  line-height: 1.5;
}

.customer-login-panel,
.gift-panel {
  display: grid;
  gap: 14px;
}

.customer-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.customer-summary strong,
.gift-info h3 {
  font-size: 18px;
}

.customer-summary span,
.gift-info span {
  color: var(--muted);
  font-size: 13px;
}

.customer-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.customer-profile-form label {
  min-width: 0;
}

.customer-profile-form .primary {
  min-height: 44px;
  padding: 0 18px;
}

.customer-profile-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.mine-cart-list {
  display: grid;
  gap: 10px;
}

.mine-cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.mine-cart-thumb {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2ea;
}

.mine-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mine-cart-item > div:nth-child(2) {
  min-width: 0;
}

.mine-cart-item strong,
.mine-cart-item span {
  display: block;
}

.mine-cart-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mine-cart-item b {
  color: var(--coral);
  font-size: 15px;
  white-space: nowrap;
}

.mine-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 0;
  color: var(--muted);
}

.mine-cart-total strong {
  color: var(--coral);
  font-size: 20px;
}

.gift-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.gift-media {
  aspect-ratio: 1 / .78;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2ea;
}

.gift-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gift-info {
  display: grid;
  gap: 8px;
}

.gift-info p {
  color: var(--muted);
  line-height: 1.6;
}

.gift-form {
  padding-top: 4px;
}

.detail-shell,
.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.back-link,
.admin-link {
  background: var(--ink);
  color: #fff;
}

.back-link {
  margin-bottom: 16px;
}

.detail-view {
  display: grid;
  grid-template-columns: minmax(300px, 45%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.detail-gallery {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 18px;
}

.detail-media {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.thumb-row,
.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-preview.compact {
  margin-top: 8px;
}

.thumb-row img {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.detail-info {
  padding: 22px;
}

.detail-info h1 {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.2;
}

.detail-price {
  display: grid;
  justify-items: start;
  gap: 3px;
  margin: 14px 0;
}

.detail-price strong {
  font-size: 30px;
}

.detail-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.detail-builder-head {
  margin-bottom: 0;
}

.detail-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 11px;
  background: #edf2ee;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.upload-button input {
  display: none;
}

.detail-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.detail-summary {
  margin: 18px 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.detail-content {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  line-height: 1.85;
}

.detail-content p,
.detail-content ul,
.detail-content div {
  margin: 0 0 12px;
}

.detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

.detail-content figure,
.rich-editor figure {
  margin: 12px 0;
}

.detail-content figcaption,
.rich-editor figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.admin-header {
  margin-bottom: 18px;
}

.header-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 14px;
  align-items: start;
}

.panel {
  padding: 16px;
  margin-bottom: 14px;
}

.panel h2 {
  font-size: 18px;
}

form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.permission-box .check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.permission-box input {
  width: 16px;
  height: 16px;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.store-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.customer-service-trigger {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #8bd7ad;
  border-radius: 999px;
  background: #fff;
  color: #087d56;
}

.customer-service-trigger span {
  font-size: 17px;
  line-height: 1;
}

.customer-service-trigger b {
  font-size: 12px;
}

.customer-service-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 34, 29, .42);
}

.customer-service-dialog {
  position: relative;
  width: min(340px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 24px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.customer-service-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: transparent;
  color: #718078;
  font-size: 24px;
}

.customer-service-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: #087d56;
  font-size: 25px;
}

.customer-service-dialog > strong {
  font-size: 19px;
}

.customer-service-dialog p {
  color: #087d56;
  font-size: 20px;
  font-weight: 900;
}

.customer-service-dial {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #13865c;
  color: #fff;
  font-weight: 900;
}

.admin-center-body .admin-item.order-item {
  display: grid;
  grid-template-columns: auto minmax(220px, 300px) minmax(360px, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.admin-center-body .admin-item.order-item .order-item-main {
  min-width: 0;
}

.admin-center-body .admin-item.order-item .order-products-panel {
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.admin-center-body .admin-item.order-item .order-products-title {
  margin-bottom: 9px;
  color: #607069;
  font-size: 12px;
  font-weight: 700;
}

.admin-center-body .admin-item.order-item .order-product-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-center-body .admin-item.order-item .order-product-row + .order-product-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-center-body .admin-item.order-item .order-product-media {
  display: grid;
  width: 68px;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f8f5;
  color: var(--muted);
  font-size: 11px;
}

.admin-center-body .admin-item.order-item .order-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-center-body .admin-item.order-item .order-product-copy {
  min-width: 0;
}

.admin-center-body .admin-item.order-item .order-product-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-center-body .admin-item.order-item .order-product-copy a {
  display: inline-block;
  margin-top: 7px;
  color: #087d56;
  font-size: 13px;
  font-weight: 700;
}

.logistics-grid {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(150px, 1fr) minmax(190px, 1fr) minmax(190px, 1.1fr);
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.order-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.bulk-tools,
.list-filters,
.pagination-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-tools {
  margin-right: auto;
}

.bulk-tools .check,
.list-toolbar .bulk-tools label,
.order-toolbar .bulk-tools label {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.bulk-tools input[type="checkbox"],
.row-selector input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: #16815d;
}

.list-filters {
  justify-content: flex-end;
}

.row-selector-spacer {
  width: 17px;
  min-width: 17px;
}

.customer-toolbar {
  justify-content: flex-start;
  align-items: flex-end;
  padding: 12px;
  border: 1px solid #e5ebee;
  background: #f7faf8;
}

.customer-toolbar .bulk-tools {
  margin-right: 0;
}

.customer-toolbar .list-filters {
  flex: 1 1 620px;
  justify-content: flex-start;
  align-items: flex-end;
}

.customer-toolbar .list-filters label {
  margin: 0;
}

.customer-toolbar .list-filters label:has(input[type="search"]) {
  flex: 1 1 280px;
  max-width: 420px;
}

.customer-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

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

.customer-table th,
.customer-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e8edeb;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.customer-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef5f1;
  color: #47534d;
  font-weight: 700;
  white-space: nowrap;
}

.customer-table tbody tr:nth-child(even) {
  background: #fbfdfc;
}

.customer-table tbody tr:hover {
  background: #f1f8f4;
}

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

.customer-table .select-column {
  width: 42px;
  text-align: center;
}

.customer-table .action-column {
  width: 128px;
}

.customer-table .address-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.table-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.customer-type-badge,
.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.customer-type-badge.group,
.account-status.active {
  background: #e5f5ed;
  color: #147454;
}

.customer-type-badge.normal {
  background: #eef2f4;
  color: #59666d;
}

.account-status.disabled {
  background: #fff0ed;
  color: #c84e3c;
}

.list-filters label,
.order-toolbar > label {
  width: auto;
  min-width: 118px;
}

.list-filters label:has(input[type="search"]),
.order-toolbar > label:has(input[type="search"]) {
  width: min(100%, 300px);
}

#customerPageSize,
#orderPageSize {
  width: 78px;
}

.pagination-bar {
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-bar button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
}

.row-selector {
  flex: 0 0 auto;
  align-self: flex-start;
  display: flex;
  padding-top: 2px;
}

.order-toolbar label {
  max-width: 260px;
}

.list-toolbar label {
  width: min(100%, 340px);
}

.order-toolbar input,
.order-toolbar select,
.list-toolbar input {
  height: 38px;
  background: #fffdf8;
}

.logistics-grid input,
.logistics-grid select {
  height: 38px;
  background: #fffdf8;
}

.logistics-note {
  color: var(--muted);
  font-size: 13px;
}

.order-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  background: #f7fbf9;
}

.order-edit-form label {
  margin: 0;
}

.order-edit-form .wide {
  grid-column: 1 / -1;
}

.order-edit-actions {
  display: flex;
  gap: 8px;
}

.order-edit-actions button {
  width: auto;
  min-width: 108px;
}

.customer-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.customer-order-actions button {
  width: auto;
}

.order-lock-note {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-radius: 6px;
  background: #f2f5f3;
}

.admin-item > div:first-child {
  min-width: 0;
}

.actions {
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.actions .ghost.active {
  border-color: #16815d;
  background: #16815d;
  color: #fff;
}

.actions .primary-action:not(:disabled) {
  border-color: #16815d;
  background: #16815d;
  color: #fff;
}

.actions button:disabled,
.logistics-grid input:disabled,
.logistics-grid select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 10px 0 12px;
  overflow: hidden;
  border: 1px solid #d9e7dd;
  border-radius: 8px;
  background: #f6f8f6;
}

.order-progress span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 6px;
  color: #748079;
  font-size: 12px;
  font-weight: 800;
}

.order-progress span + span {
  border-left: 1px solid #d9e7dd;
}

.order-progress b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dfe6e1;
  color: #6b756f;
  font-size: 11px;
  line-height: 1;
}

.order-progress span.done {
  background: #edf9f1;
  color: #16815d;
}

.order-progress span.done b {
  background: #16815d;
  color: #fff;
}

.order-progress span.current {
  background: #16815d;
  color: #fff;
}

.order-progress span.current b {
  background: #fff;
  color: #16815d;
}

.tracking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e4ece7;
}

.tracking-head strong {
  color: #1f2d28;
  font-size: 13px;
}

.tracking-head span {
  color: #7b8781;
  font-size: 12px;
}

.tracking-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.tracking-event,
.tracking-message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6faf7;
}

.tracking-event {
  display: grid;
  gap: 3px;
}

.tracking-event span {
  color: #7b8781;
  font-size: 12px;
}

.tracking-event b {
  color: #2b3b35;
  font-size: 13px;
}

.tracking-message {
  margin-top: 8px;
  color: #6c7771;
  font-size: 13px;
}

.admin-tracking {
  margin: 10px 0;
  max-width: 680px;
}

.admin-tracking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #1f2d28;
  font-size: 13px;
}

.admin-tracking-head span {
  color: #7b8781;
  font-size: 12px;
}

.tracking-event.latest {
  border: 1px solid #bfe8d5;
  background: #eefbf4;
}

.tracking-number {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0f6f2;
  color: #63716a;
  font-size: 12px;
}

.tracking-number strong {
  color: #16815d;
  font-size: 13px;
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rich-editor {
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  line-height: 1.7;
  outline: none;
}

.rich-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
}

.image-chip {
  width: 150px;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.image-chip img {
  width: 100%;
  height: 86px;
  border-radius: 6px;
  object-fit: cover;
}

.image-chip span {
  color: var(--muted);
  font-size: 12px;
}

.category-thumb-mini {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  object-fit: cover;
  border-radius: 8px;
  vertical-align: middle;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-layout {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
}

.login-card {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  padding: 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.login-brand-copy {
  min-width: 0;
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.brand-mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.login-brand p {
  margin-top: 5px;
  color: #d7dfda;
  font-size: 13px;
}

.login-icp-footer,
.site-icp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 7px;
  color: #7a827e;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

.login-icp-footer i,
.site-icp-footer i {
  font-style: normal;
}

.login-icp-footer a,
.site-icp-footer a {
  color: inherit;
  text-decoration: none;
}

.login-icp-footer a:hover,
.site-icp-footer a:hover {
  color: var(--green);
  text-decoration: underline;
}

.site-icp-footer {
  padding: 10px 0 76px;
}

@media (max-width: 480px) {
  .login-shell {
    padding: 14px;
  }

  .login-card {
    padding: 16px;
  }

  .login-brand {
    padding: 14px;
  }

  .login-brand h1 {
    font-size: 21px;
  }
}

.form-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff0eb;
  color: #be3f2d;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 820px) {
  .admin-mobile-title {
    display: flex;
  }

  .console-topbar {
    height: 44px;
    grid-template-columns: 150px 1fr;
  }

  .console-brand {
    padding-left: 14px;
    font-size: 13px;
  }

  .console-icons span {
    width: 44px;
    font-size: 14px;
  }

  .console-user {
    display: none;
  }

  .console-layout {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: calc(100vh - 130px);
  }

  .console-sidebar button,
  .console-sidebar a {
    height: 46px;
    padding: 0 10px;
    font-size: 12px;
  }

  .sidebar-title {
    height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .console-workspace {
    padding: 0 10px 24px;
  }

  .stats-grid,
  .info-grid,
  .form-row.three {
    grid-template-columns: 1fr;
  }

  .console-form {
    margin-top: 12px;
    padding: 12px;
  }

  .shop-shell,
  .detail-shell,
  .admin-shell {
    padding: 12px 12px 96px;
  }

  .shop-hero {
    min-height: 184px;
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .product-grid,
  .admin-grid,
  .detail-view {
    grid-template-columns: 1fr;
  }

  .section-head h2,
  .admin-header h1 {
    font-size: 24px;
  }

  .product-media {
    aspect-ratio: 1 / .72;
  }

  .detail-gallery {
    position: static;
  }

  .admin-header,
  .admin-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-center-body .admin-item.order-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-center-body .admin-item.order-item .order-products-panel,
  .admin-center-body .admin-item.order-item .order-item-main,
  .admin-center-body .admin-item.order-item > .actions {
    grid-column: 2;
    width: 100%;
  }

  .admin-center-body .admin-item.order-item .order-products-panel {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .header-actions,
  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .gift-card {
    grid-template-columns: 1fr;
  }

  .logistics-grid {
    grid-template-columns: 1fr;
  }

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

  .order-edit-form .wide {
    grid-column: 1;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .drawer-panel {
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 520px) {
  .shop-hero {
    min-height: 170px;
  }

  .admin-entry {
    min-height: 36px;
    padding: 0 10px;
  }

  .count-pill {
    display: none;
  }

  .product-grid {
    gap: 10px;
  }

  .product-body {
    padding: 11px;
  }

  .card-actions {
    grid-template-columns: 42px 1fr 72px;
    padding: 0 11px 11px;
  }

  .cart-fab {
    left: 12px;
    right: 12px;
    justify-content: center;
  }

  .cart-drawer {
    align-items: flex-end;
  }

  .drawer-panel {
    width: 100%;
    height: min(86vh, 760px);
  }

  .detail-info h1 {
    font-size: 26px;
  }

  .detail-price {
    font-size: 24px;
  }

  .actions button {
    flex: 1 1 44%;
    min-height: 42px;
  }

  .image-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-chip {
    width: auto;
  }
}
