:root {
  --green: #16a05d;
  --green-dark: #0c7c45;
  --green-soft: #e9f8ef;
  --text: #17231c;
  --muted: #708075;
  --line: #e5efe8;
  --bg: #f6fbf7;
  --danger: #e54848;
  --orange: #f0c508;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}
button.secondary { color: var(--green); background: var(--green-soft); }
button.warn { background: var(--orange); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}
textarea { min-height: 78px; resize: vertical; }
.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 28px rgba(17, 84, 45, .08);
}
.shop-shell { position: relative; min-height: 100vh; overflow-x: hidden; background: #f5f7f5; }
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 16px 14px;
  color: #fff;
  background: linear-gradient(135deg, #19b86b, #0d8b4d);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}
.top h1 { margin: 0; font-size: 22px; }
.top p { margin: 6px 0 0; opacity: .9; font-size: 13px; }
.tabs, .admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px;
}
.tabs button, .admin-tabs button { flex: 0 0 auto; padding: 8px 12px; color: var(--green); background: var(--green-soft); }
.tabs button.active, .admin-tabs button.active { color: #fff; background: var(--green); }
.section { padding: 14px; }
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 84, 45, .05);
}
.grid { display: grid; gap: 12px; }
.product-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: #fff;
}
.product-card img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--green-soft);
}
.product-card h3 { margin: 0; font-size: 16px; }
.product-card p { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.price { color: #ef3d30; font-weight: 800; font-size: 18px; }
.old-price { color: #9aa89f; text-decoration: line-through; font-size: 12px; margin-left: 6px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; }
.tag.orange { color: #b75c00; background: #fff3df; }
.tag.status-delivered { color: #fff; background: #17b85f; }
.tag.status-warning { color: #4c371a; background: #f2c94c; }
.tag.status-unpaid { color: #9b1b58; background: #ffe3f0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.mini { font-size: 12px; }
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}
.bottom-bar button { padding: 9px 4px; font-size: 12px; color: var(--green); background: var(--green-soft); }
.bottom-bar button.active { color: #fff; background: var(--green); }
.panel { display: none; }
.panel.active { display: block; }
.admin-main > .panel { display: none !important; }
.admin-main > .panel.active { display: grid !important; }
.cart-item, .order-item, .msg {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; padding: 0; }
.timeline { margin: 10px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.timeline li { margin: 4px 0; }
.form-grid { display: grid; gap: 10px; }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; font-size: 13px; vertical-align: top; }
th { color: var(--green-dark); background: var(--green-soft); }
.admin-shell {
  --green: #d97816;
  --green-dark: #111111;
  --green-soft: #fff0d2;
  --text: #111111;
  --muted: #6d5a42;
  --line: #ead8bd;
  --bg: #fff8eb;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  color: var(--text);
  background: #fff8eb;
}
.admin-shell input,
.admin-shell select,
.admin-shell textarea {
  border-radius: 0;
}
.admin-login-body { min-height: 100vh; background: linear-gradient(135deg, #fff8eb, #fff0d2); }
.admin-login-shell { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.admin-login-card { width: min(100%, 420px); padding: 34px 32px; border: 1px solid #ead8bd; border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(88, 55, 14, .14); }
.admin-login-card h1 { margin: 0 0 8px; color: #111; font-size: 26px; text-align: center; }
.admin-login-card p { margin: 0 0 24px; color: #6d5a42; text-align: center; }
.admin-login-form { display: grid; gap: 16px; }
.admin-login-form label { display: grid; gap: 8px; color: #6d5a42; font-size: 14px; }
.admin-login-form input { height: 44px; border-color: #ead8bd; border-radius: 0; background: #fffaf1; }
.admin-login-form button { height: 46px; margin-top: 6px; border-radius: 10px; background: #d97816; font-size: 16px; }
.admin-login-error { display: none; margin-bottom: 16px; padding: 10px 12px; border-radius: 10px; color: #a03232; background: #fff1f1; font-size: 14px; text-align: center; }
.admin-login-error.show { display: block; }
.admin-login-card small { display: block; margin-top: 18px; color: #9b8b77; font-size: 12px; line-height: 1.6; text-align: center; }
.admin-layout { padding: 16px; display: grid; gap: 16px; }
.admin-subtabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.admin-subtabs button { color: #8a4d12; background: #fff3df; border-radius: 10px; }
.admin-subtabs button.active { color: #fff; background: #d97816; }
.product-subpanel { display: none; gap: 16px; }
.product-subpanel.active { display: grid; }
.product-subpanel .table-card input, .product-subpanel .table-card select { min-width: 120px; }
.promo-pick-card { display: grid; gap: 14px; }
.promo-pick-filters { display: grid; grid-template-columns: 118px minmax(120px, 1fr) auto auto; gap: 8px; align-items: center; width: min(50%, 560px); }
.promo-workbench { --promo-editor-height: 360px; display: grid; grid-template-columns: minmax(260px, .85fr) minmax(420px, 1.4fr); gap: 14px; align-items: stretch; }
.promo-side { display: grid; gap: 12px; min-width: 0; }
.promo-product-results { display: grid; align-content: start; gap: 8px; height: var(--promo-editor-height); overflow-y: auto; padding: 10px; border: 1px solid var(--line); background: #fffdf8; }
.promo-editor { height: var(--promo-editor-height); }
.promo-product-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: #fffaf1; cursor: pointer; }
.promo-product-row.active { border-color: #d97816; background: #fff3df; }
.promo-product-row img { width: 46px; height: 46px; object-fit: cover; background: #fff; }
.promo-product-row b, .promo-product-row span { display: block; }
.promo-product-row span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.promo-product-row button { justify-self: end; align-self: center; padding: 7px 12px; white-space: nowrap; }
.promo-config-list { display: grid; gap: 8px; width: 100%; padding: 14px; border: 1px solid var(--line); background: #fff; }
.promo-config-list h3 { margin: 0; color: var(--green-dark); font-size: 15px; }
.promo-config-table-wrap { overflow-x: auto; }
.promo-config-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 12px; }
.promo-config-table th, .promo-config-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.promo-config-table th { color: #7b5b30; background: #fff8ed; font-weight: 700; }
.promo-config-table tr.active td { background: #fffaf1; }
.promo-config-table button { padding: 7px 14px; white-space: nowrap; }
.promo-status { color: #8a6b3d; }
.promo-status.active { color: #129044; font-weight: 700; }
.promo-config-card, .promo-empty-editor { display: grid; gap: 12px; box-sizing: border-box; min-height: 100%; height: 100%; overflow-y: auto; padding: 16px; border: 1px solid var(--line); background: #fff; }
.inline-promo-editor { margin: 0; }
.promo-config-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.promo-config-card h3 { margin: 0; }
.promo-config-card header span { color: var(--muted); font-size: 13px; }
.promo-form-row { display: grid; gap: 10px; }
.promo-form-row.price-row,
.promo-form-row.time-row,
.promo-form-row.status-row,
.promo-form-row.group-rule-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.promo-form-row.other-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promo-form-row label { display: grid; gap: 6px; color: #6d5a42; font-size: 13px; }
.promo-config-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.seckill-manage-panel button,
.group-manage-panel button { border-radius: 0; }
.metric-section { display: grid; gap: 8px; }
.order-metric-section { gap: 10px; }
.metric-section h3 { margin: 0; color: var(--green-dark); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 7px; }
.kpi { display: flex; align-items: center; gap: 7px; min-height: 54px; padding: 8px; font-size: 12px; }
.kpi strong { display: block; margin-top: 3px; font-size: 15px; color: var(--green-dark); line-height: 1.15; }
.kpi span:not(.metric-icon) { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.metric-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 8px;
  background: #ffe0a3;
}
.metric-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  background: #c26a1b;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-order { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12v18H6zM8 7h8v2H8zm0 4h8v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E"); }
.icon-amount { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5h14v14H5zM8 8h8v2H8zm2 3h4a3 3 0 0 1 0 6h-1v2h-2v-2H8v-2h6a1 1 0 0 0 0-2h-4z'/%3E%3C/svg%3E"); }
.icon-user,.icon-user-today { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5zm-8 9a8 8 0 0 1 16 0z'/%3E%3C/svg%3E"); }
.icon-calendar,.icon-week,.icon-month { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v3h6V2h2v3h3v17H4V5h3zM6 10v10h12V10z'/%3E%3C/svg%3E"); }
.icon-topup { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7h18v12H3zm2 3v6h14v-6zm6 1h2v2h2v2h-2v2h-2v-2H9v-2h2z'/%3E%3C/svg%3E"); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.map-admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 12px; }
.admin-map { width: 100%; height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff8eb; }
.admin-map .amap-logo,.admin-map .amap-copyright,.rider-map .amap-logo,.rider-map .amap-copyright,.address-map .amap-logo,.address-map .amap-copyright { display: block !important; }
.admin-map.rider-map { height: 260px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.map-actions button { width: auto; border-radius: 10px; padding: 8px 12px; }
.rider-location-list { display: grid; gap: 8px; }
.rider-location-list div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf1; }
.rider-location-list b { font-size: 14px; }
.rider-location-list span,.rider-location-list em { color: var(--muted); font-size: 12px; font-style: normal; }
.admin-desktop-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: min(100%, 1660px);
  max-width: 1660px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 28px rgba(88, 55, 14, .08);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 18px;
  color: #111;
  background: #fff8eb;
}
.admin-brand {
  display: grid;
  gap: 10px;
  padding: 4px 4px 22px;
  border-bottom: 1px solid rgba(120, 72, 12, .18);
}
.admin-brand-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--green-dark);
  background: #fff8eb;
  font-size: 24px;
  font-weight: 800;
  line-height: 48px;
  text-align: center;
}
.admin-brand h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.admin-brand p { margin: 5px 0 0; color: #4c371a; font-size: 12px; }
.admin-brand-desc { margin: 0; line-height: 1.55; }
.admin-side-nav.admin-tabs {
  display: grid;
  gap: 10px;
  padding: 22px 0 0;
  overflow: visible;
}
.admin-side-nav.admin-tabs button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  color: #1f1b16;
  background: transparent;
  text-align: left;
}
.admin-side-nav.admin-tabs button span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #111;
  background: #ffe2a6;
  font-size: 13px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.admin-side-nav.admin-tabs button.active,
.admin-side-nav.admin-tabs button:hover {
  color: var(--green-dark);
  background: #fff8eb;
  box-shadow: 0 10px 18px rgba(120, 72, 12, .14);
}
.admin-side-nav.admin-tabs button.active span,
.admin-side-nav.admin-tabs button:hover span {
  color: #fff;
  background: var(--green);
}
.admin-side-links {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}
.admin-side-links button {
  width: 100%;
  border: 1px solid rgba(120, 72, 12, .22);
  border-radius: 14px;
  color: #111;
  background: #ffe2a6;
}
.admin-main {
  min-width: 0;
  padding: 16px;
  background: #fff;
}
.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 18px rgba(88, 55, 14, .07);
}
.admin-page-head h2 { margin: 0; font-size: 24px; color: var(--green-dark); }
.admin-page-head p { margin: 8px 0 0; color: var(--muted); }
.admin-live {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 13px;
}
.admin-desktop-shell .admin-layout {
  padding: 0;
  gap: 10px;
}
.admin-desktop-shell .card {
  border-radius: 0;
  box-shadow: 0 6px 14px rgba(88, 55, 14, .06);
}
.admin-desktop-shell .kpis {
  grid-template-columns: repeat(4, minmax(112px, 1fr));
}
.admin-desktop-shell .two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 10px;
}
.admin-desktop-shell .grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
}
.admin-desktop-shell .table-card {
  padding: 0;
  overflow: auto;
}
.dashboard-panels { align-items: stretch; margin-top: 2px; }
.order-dashboard-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.line-chart { height: 260px; min-height: 220px; }
.compact-line-chart { height: 240px; min-height: 220px; }
.line-chart svg { width: 100%; height: 190px; }
.chart-legend { display: flex; gap: 16px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 18px; height: 3px; border-radius: 999px; }
.legend-orders { background: #c26a1b; }
.legend-amount { background: #f2a900; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.status-stat-list { display: grid; gap: 8px; }
.status-stat-list div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.status-stat-list b { color: var(--green-dark); }
.status-stat-list em { color: #ef7d22; font-style: normal; font-weight: 700; }
.admin-create-form h3 { margin: 0; }
.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
}
.inline-form button { width: auto; }
.admin-desktop-shell td input,
.admin-desktop-shell td select { min-width: 108px; padding: 7px 8px; font-size: 12px; }
.admin-edit-row input,
.admin-edit-row select {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-edit-row input::placeholder { font-size: 12px; }
.admin-dblclick-row { cursor: pointer; }
.admin-dblclick-row:hover td { background: #fffaf1; }
.admin-row-active td { background: #fff5df; }
.order-flow-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 6px 14px rgba(88, 55, 14, .06);
}
.order-flow-card div {
  position: relative;
  min-height: 86px;
  padding: 12px;
  border-radius: 14px;
  background: var(--green-soft);
}
.order-flow-card div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: translateY(-50%) rotate(45deg);
}
.order-flow-card b { display: block; color: var(--green-dark); font-size: 15px; }
.order-flow-card span { display: block; margin: 6px 0; color: var(--muted); font-size: 12px; }
.order-flow-card em { color: #17231c; font-size: 13px; font-style: normal; font-weight: 700; }
.order-user-board { display: grid; gap: 10px; }
.user-order-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 6px 14px rgba(88, 55, 14, .06);
}
.user-order-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.user-order-group > header b { display: block; color: var(--green-dark); font-size: 18px; }
.user-order-group > header span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.user-order-group > header strong { color: #ef7d22; font-size: 16px; }
.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #355143;
  background: #f3f7f4;
  font-size: 12px;
}
.status-chips b { color: var(--green-dark); }
.order-admin-card { display: grid; gap: 10px; }
.order-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.order-times span {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #edf3ef;
  background: #fbfdfb;
  color: var(--muted);
  font-size: 12px;
}
.order-times b { color: var(--green-dark); font-size: 13px; }
.switch-line select { margin-top: 6px; }
#orderUserFilter { display: flex; justify-content: flex-end; }
#orderUserFilter button { width: auto; }
.order-table-card { overflow-x: auto; }
.order-overview-table { min-width: 1240px; }
.order-overview-table th,
.order-overview-table td { vertical-align: top; white-space: nowrap; }
.sort-th {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  padding: 0;
  border-radius: 0;
  color: var(--green-dark);
  background: transparent;
  font-weight: 700;
  text-align: left;
}
.sort-th span { color: var(--muted); font-size: 12px; }
.sort-th.active span { color: #d97816; }
.address-cell { max-width: 240px; white-space: normal !important; color: var(--muted); }
.link-btn {
  width: auto;
  padding: 0;
  color: var(--green-dark);
  background: transparent;
  text-align: left;
  box-shadow: none;
}
.link-btn span { color: var(--muted); font-size: 12px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 118px; }
.table-actions button { width: auto; padding: 7px 10px; border-radius: 4px; font-size: 12px; }
.table-actions .action-ok { background: #17b85f; }
.table-actions .action-warn { color: #4c371a; background: #f2c94c; }
.table-actions .danger { background: #e54848; }
.product-compact-row td { padding: 8px 9px; vertical-align: middle; }
.product-compact-row input { min-width: 68px; padding: 7px 8px; border-radius: 0; font-size: 12px; }
.product-compact-row select { width: auto; min-width: 0; padding: 7px 6px; border-radius: 0; font-size: 12px; }
.product-compact-row select.compact-select { min-width: 0 !important; width: auto !important; }
.product-compact-row .unit-select { width: 50px !important; }
.product-compact-row .status-select { width: 62px !important; }
.product-compact-row .promo-select { width: 62px !important; }
.product-compact-row .category-select { max-width: 88px; }
.product-compact-row td:nth-child(1) { width: 58px; }
.product-compact-row td:nth-child(2) { min-width: 120px; max-width: 140px; }
.product-compact-row td:nth-child(4),
.product-compact-row td:nth-child(5) { width: 78px; }
.product-compact-row td:nth-child(6) { width: 54px; }
.product-compact-row td:nth-child(7),
.product-compact-row td:nth-child(8),
.product-compact-row td:nth-child(9),
.product-compact-row td:nth-child(11),
.product-compact-row td:nth-child(12) { width: 82px; }
.product-compact-row td:nth-child(10) { max-width: 100px; }
.product-thumb {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff0d2;
}
.readonly-cell {
  display: inline-block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.product-upload-btn,
.product-desc-btn { width: auto; padding: 7px 10px; border-radius: 4px; font-size: 12px; }
.order-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.order-pager div { display: flex; gap: 8px; }
.order-pager button { width: auto; padding: 7px 12px; border-radius: 4px; font-size: 12px; }
.order-admin-card .timeline { display: none; }
.service-chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  min-height: 660px;
  padding: 0 !important;
  overflow: hidden;
}
.chat-customer-list {
  display: grid;
  align-content: start;
  max-height: 660px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fff8eb;
}
.chat-customer {
  position: relative;
  width: 100%;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #111;
  background: transparent;
  text-align: left;
}
.chat-customer.active,
.chat-customer:hover { background: #fff0d2; }
.chat-customer b { position: relative; display: inline-block; padding-right: 16px; font-size: 15px; }
.chat-customer span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.chat-customer em {
  position: absolute;
  right: -9px;
  top: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #e54848;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}
.chat-window { display: grid; grid-template-rows: auto auto auto 1fr auto; min-width: 0; background: #fbf7ef; }
.chat-window-head { display: flex; gap: 12px; align-items: baseline; padding: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-window-head b { font-size: 18px; }
.chat-window-head span { color: var(--muted); font-size: 13px; }
.chat-order-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 16px; background: #fffaf0; border-bottom: 1px solid var(--line); }
.chat-order-picker button { width: auto; border-radius: 8px; }
.emoji-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.emoji-bar button { width: 34px; height: 34px; padding: 0; border-radius: 8px; color: #111; background: #fff0d2; }
.chat-bubbles { display: grid; align-content: start; gap: 10px; min-height: 360px; max-height: 420px; overflow: auto; padding: 16px; }
.chat-bubble-row { display: flex; }
.chat-bubble-row.user { justify-content: flex-start; }
.chat-bubble-row.admin { justify-content: flex-end; }
.chat-bubble { max-width: min(72%, 620px); padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 5px 12px rgba(88, 55, 14, .06); }
.chat-bubble-row.user .chat-bubble { border-top-left-radius: 4px; }
.chat-bubble-row.admin .chat-bubble { color: #103b24; background: #dff7e8; border-top-right-radius: 4px; }
.chat-bubble b { display: block; margin-bottom: 5px; font-size: 12px; color: var(--muted); }
.chat-bubble p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.chat-bubble span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; text-align: right; }
.chat-send-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.chat-send-row textarea { min-height: 72px; }
.chat-send-row button { border-radius: 8px; }
.message-context-menu {
  position: fixed;
  z-index: 120;
  min-width: 96px;
  padding: 6px;
  border: 1px solid #ead8bd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(88, 55, 14, .18);
}
.message-context-menu button {
  width: 100%;
  border-radius: 7px;
  padding: 8px 12px;
  color: #e54848;
  background: #fff2f2;
}
.topup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  flex-wrap: wrap;
  max-width: none;
  padding: 10px;
}
.topup-card p { margin: 0; white-space: nowrap; }
.topup-card label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.topup-card input,
.topup-card select { padding: 8px 10px; border-radius: 0; }
.topup-card select { width: 260px; }
#topupAmount { width: 110px; }
#topupNote { width: 150px; }
.topup-card button { width: auto; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.admin-desktop-shell table {
  min-width: 980px;
}
.admin-desktop-shell th,
.admin-desktop-shell td {
  padding: 13px 14px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(12, 124, 69, .94);
  display: none;
  z-index: 99;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
}
.toast.show { display: block; }
.admin-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, .36);
  backdrop-filter: blur(4px);
}
.admin-confirm-mask.show { display: flex; }
.admin-confirm-dialog {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  width: min(100%, 430px);
  border: 1px solid #ead8bd;
  border-radius: 18px;
  padding: 20px;
  color: #111;
  background: #fff8eb;
  box-shadow: 0 18px 48px rgba(88, 55, 14, .22);
}
.admin-confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #8a4f12;
  background: #ffe0a3;
  font-size: 24px;
  font-weight: 800;
}
.admin-confirm-body h3 { margin: 0 0 8px; font-size: 18px; }
.admin-confirm-body p { margin: 0; color: #6d5a42; line-height: 1.6; white-space: pre-line; }
.admin-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.admin-confirm-actions button { width: auto; border-radius: 8px; padding: 9px 16px; }
.admin-confirm-ok { background: #d97816; }
.admin-image-mask {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, .38);
  backdrop-filter: blur(4px);
}
.admin-image-mask.show { display: flex; }
.admin-image-dialog {
  display: grid;
  gap: 16px;
  width: min(100%, 760px);
  max-height: min(86vh, 720px);
  overflow: auto;
  border: 1px solid #ead8bd;
  border-radius: 18px;
  padding: 18px;
  background: #fff8eb;
  box-shadow: 0 18px 48px rgba(88, 55, 14, .22);
}
.admin-image-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-image-dialog h3 { margin: 0 0 6px; font-size: 18px; }
.admin-image-dialog header button,
.product-image-dialog-actions button { width: auto; padding: 8px 14px; border-radius: 8px; }
.product-image-dialog-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.product-image-dialog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.product-image-dialog-card { display: grid; gap: 8px; padding: 10px; border: 1px solid #ead8bd; border-radius: 12px; background: #fff; }
.product-image-dialog-grid img { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; object-fit: cover; background: #fff0d2; }
.product-image-dialog-grid b { color: #4c371a; font-size: 12px; }
.product-image-dialog-card div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-image-dialog-grid select { width: fit-content; min-width: 72px; padding: 7px 8px; border-radius: 6px; font-size: 12px; }
.product-image-dialog-card .danger { width: auto; padding: 7px 10px; border-radius: 6px; background: #e54848; font-size: 12px; }
.admin-rich-mask {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 17, 17, .38);
  backdrop-filter: blur(4px);
}
.admin-rich-mask.show { display: flex; }
.admin-rich-dialog {
  display: grid;
  gap: 14px;
  width: min(100%, 860px);
  max-height: min(88vh, 780px);
  overflow: auto;
  border: 1px solid #ead8bd;
  border-radius: 18px;
  padding: 18px;
  background: #fff8eb;
  box-shadow: 0 18px 48px rgba(88, 55, 14, .22);
}
.admin-rich-dialog header,
.admin-rich-dialog footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-rich-dialog h3 { margin: 0 0 6px; font-size: 18px; }
.admin-rich-dialog header button,
.admin-rich-dialog footer button,
.rich-toolbar button { width: auto; padding: 8px 14px; border-radius: 8px; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid #ead8bd; border-radius: 12px; background: #fff; }
.rich-editor { min-height: 360px; max-height: 52vh; overflow: auto; padding: 18px; border: 1px solid #ead8bd; border-radius: 12px; background: #fff; line-height: 1.75; outline: none; }
.rich-editor:focus { border-color: #d97816; box-shadow: 0 0 0 3px rgba(217,120,22,.12); }
.rich-editor img { max-width: 100%; height: auto; border-radius: 12px; }
.rider-body { background: #eef3ff; }
.rider-app { width: min(100%, 430px); min-height: 100vh; margin: 0 auto; background: #f6f6f6; box-shadow: 0 0 28px rgba(28, 79, 179, .12); }
.rider-page { display: none; }
.rider-login-page.active { display: grid; }
.rider-home-page.active,.rider-detail-page.active { display: block; }
.rider-login-page { min-height: 100vh; align-content: start; padding: 72px 28px 0; background: #fff; text-align: center; }
.rider-login-page h1 { margin: 0 0 44px; font-size: 24px; }
.rider-login-logo { justify-self: center; display: grid; place-items: end center; width: 78px; height: 78px; margin-top: 38px; border-radius: 7px 7px 24px 24px; color: #315df4; background: linear-gradient(145deg, #5298ff, #315fe2); box-shadow: 0 6px 18px rgba(49, 93, 244, .24); }
.rider-login-logo span { width: 78px; padding: 4px 0; border-radius: 50% 50% 0 0; background: #fff; font-size: 12px; font-weight: 700; }
.rider-login-page > b { justify-self: center; margin-top: 10px; padding: 6px 11px; border-radius: 3px; color: #fff; background: #3e68df; font-size: 13px; }
.rider-login-form { display: grid; gap: 22px; align-self: start; margin-top: 0; }
.rider-login-form label { display: grid; grid-template-columns: 52px 1fr; align-items: center; border-bottom: 1px solid #edf0f5; padding: 0 12px 14px; text-align: left; }
.rider-login-form label span { color: #4b5563; font-size: 15px; }
.rider-login-form input { border: 0; border-radius: 0; color: #111; background: transparent; font-size: 16px; }
.rider-login-form button { height: 48px; margin-top: 16px; border-radius: 3px; background: linear-gradient(90deg, #4d94f3, #3d61dc); font-size: 16px; }
.rider-home-page,.rider-detail-page { min-height: 100vh; background: #f6f6f6; }
.rider-home-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 64px; padding: 0 14px; color: #fff; background: linear-gradient(145deg, #4c93f2, #365ee3); }
.rider-home-head h1 { margin: 0; font-size: 18px; text-align: center; }
.rider-home-head button { width: auto; padding: 4px 0; color: #fff; background: transparent; font-size: 14px; text-align: left; }
.rider-home-head .switch { justify-self: end; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.18); }
.rider-duty-badge { grid-column: 1 / -1; justify-self: center; margin-top: 26px; padding: 8px 24px; border-radius: 999px; color: #315df4; background: #fff; font-size: 24px; font-weight: 800; }
.rider-store-icon { position: absolute; right: 28px; bottom: 18px; color: rgba(255,255,255,.52); font-size: 58px; }
.rider-location-card { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.rider-home-page > .rider-location-card { margin: 12px 14px; border: 0; border-radius: 12px; box-shadow: none; }
.rider-location-card button { padding: 9px 12px; }
.rider-location-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.rider-map { width: calc(100% - 28px); height: 180px; margin: 0 14px 12px; overflow: hidden; border: 1px solid #dfe6fb; border-radius: 14px; background: #eef3ff; }
.rider-tabs { position: sticky; top: 64px; z-index: 19; display: flex; gap: 20px; overflow-x: auto; padding: 10px 14px 0; border-bottom: 1px solid #edf0f5; background: #fff; }
.rider-tabs button { flex: 0 0 auto; padding: 9px 0 12px; border-radius: 0; color: #555; background: transparent; font-size: 13px; }
.rider-tabs button.active { color: #315df4; border-bottom: 4px solid #315df4; }
.rider-order-list { display: grid; gap: 12px; padding: 12px 0 22px; }
.rider-task-card { display: grid; gap: 0; padding: 16px 16px 18px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.rider-task-card header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #edf0f5; }
.rider-task-card header b { font-size: 19px; }
.rider-task-card header span { color: #111; font-size: 13px; }
.rider-task-row { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f1f4; }
.rider-task-row span { color: #8b94a3; font-size: 14px; }
.rider-task-row strong { justify-self: end; color: #111; font-size: 14px; font-weight: 500; text-align: right; }
.rider-order-card { overflow: hidden; }
.rider-order-map { width: 100%; height: 180px; margin: 10px 0 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--green-soft); }
.rider-task-actions,.rider-route-buttons { display: flex; justify-content: flex-end; gap: 14px; margin-top: 14px; }
.rider-task-actions button,.rider-route-buttons button { width: auto; min-width: 90px; padding: 9px 14px; border-radius: 5px; background: #3d68e8; }
.rider-task-actions .secondary,.rider-route-buttons .secondary { color: #3d68e8; background: #fff; border: 1px solid #3d68e8; }
.rider-route-tip { margin: 4px 0 0; color: #606978; font-size: 13px; text-align: right; }
.rider-nav-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.rider-nav-actions button { padding: 8px 6px; font-size: 12px; }
.rider-empty { padding: 60px 0; color: #9aa1ad; text-align: center; }
.rider-detail-head { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; height: 48px; background: #fff; }
.rider-detail-head button { width: 50px; padding: 0; color: #111; background: transparent; font-size: 30px; }
.rider-detail-head h1 { margin: 0; font-size: 18px; text-align: center; }
.rider-detail-body { display: grid; gap: 10px; padding-bottom: 24px; }
.rider-time-card { display: grid; place-items: center; gap: 8px; padding: 38px 14px; background: #fff; }
.rider-time-card b { color: #315df4; font-size: 20px; }
.rider-time-card span { color: #666; font-size: 14px; }
.rider-detail-block { display: grid; gap: 0; padding: 0 16px 12px; background: #fff; }
.rider-detail-block h3 { margin: 0; padding: 18px 0 12px; border-bottom: 1px solid #edf0f5; font-size: 16px; }
.rider-detail-product,.rider-detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #f0f1f4; }
.rider-detail-product span,.rider-detail-row span { color: #8b94a3; }
.rider-detail-product em { margin-left: 6px; color: #111; font-style: normal; }
.rider-detail-product b,.rider-detail-row b { color: #111; font-weight: 500; text-align: right; }
.rider-detail-map { height: 220px; }
@media (min-width: 800px) {
  .phone-shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .admin-desktop-shell {
    display: block;
    width: 100%;
    max-width: none;
  }
  .admin-sidebar {
    position: static;
    min-height: auto;
    padding: 16px;
  }
  .admin-brand {
    padding-bottom: 14px;
  }
  .admin-side-nav.admin-tabs {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    overflow-x: auto;
  }
  .admin-side-nav.admin-tabs button {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 12px;
  }
  .admin-side-links {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 12px;
    padding-top: 0;
  }
  .admin-main {
    padding: 14px;
  }
  .admin-page-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }
  .admin-desktop-shell .kpis,
  .admin-desktop-shell .two-col,
  .admin-desktop-shell .grid,
  .order-dashboard-panels,
  .order-flow-card,
  .service-chat-layout,
  .promo-workbench {
    grid-template-columns: 1fr;
  }
  .promo-pick-filters { width: 100%; grid-template-columns: 1fr 1fr; }
  .promo-form-row.price-row,
  .promo-form-row.time-row,
  .promo-form-row.status-row,
  .promo-form-row.group-rule-row,
  .promo-form-row.other-row { grid-template-columns: 1fr; }
  .map-admin-grid { grid-template-columns: 1fr; }
  .chat-customer-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .order-flow-card div:not(:last-child)::after { display: none; }
  .topup-card { align-items: center; }
}

/* Mobile client, inspired by the existing frontend project. */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 10px 24px 42px;
  background: linear-gradient(180deg, #5dd00b 0%, #10a760 45%, #f6fbf7 45%);
}
.auth-card {
  width: 100%;
  padding: 24px 22px 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 22px 48px rgba(12,124,69,.22);
  transform: translateY(-18px);
}
.brand-mark {
  width: 64px;
  height: 64px;
  margin: -6px auto 14px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #63d20b, #0fa660);
  font-size: 30px;
  font-weight: 800;
  line-height: 64px;
  text-align: center;
}
.auth-card h1 { margin: 0 0 20px; text-align: center; font-size: 24px; color: var(--green-dark); }
.auth-card p { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; padding: 4px; border-radius: 999px; background: var(--green-soft); }
.auth-tabs button { color: var(--green-dark); background: transparent; }
.auth-tabs button.active { color: #fff; background: var(--green); box-shadow: 0 8px 16px rgba(22,160,93,.2); }
.auth-card .form-grid { gap: 14px; }
.auth-guest-btn { color: var(--green-dark); background: var(--green-soft); }
.auth-name-row { margin-bottom: 14px; }
.auth-form-main { margin-top: 0; }
.app-screen { min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); background: #f5f5f5; }
.app-screen.sub-page .shop-hero,
.app-screen.sub-page .service-bar { display: none; }
.app-screen.address-mode .native-tabbar { display: none; }
.app-screen.category-mode { height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; overflow: hidden; padding-bottom: 0; }
.shop-hero {
  position: relative;
  min-height: 176px;
  padding: calc(14px + env(safe-area-inset-top)) 15px 14px;
  color: #fff;
  background: radial-gradient(circle at 86% 18%, rgba(255,255,255,.22), transparent 27%), linear-gradient(135deg, #68d40d 0%, #17b83d 100%);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.hero-title { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 19px; font-weight: 700; }
.hero-title button { padding: 6px 12px; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.36); }
.location-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.location { display: flex; align-items: center; min-width: 0; max-width: 285px; }
.location img { width: 16px; height: 19px; margin-right: 6px; object-fit: contain; }
.location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.open-pill { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: 12px; }
.open-pill.closed { background: rgba(0,0,0,.22); }
.search-box { display: flex; align-items: center; height: 38px; margin-top: 12px; padding: 0 14px; border-radius: 20px; background: #fff; box-shadow: 0 10px 24px rgba(12,124,69,.16); }
.search-box span { color: #202124; font-size: 19px; transform: rotate(-20deg); }
.search-box input { border: 0; padding: 0 0 0 8px; color: #333; }
.delivery-rule {
  margin: 10px 0 0;
  padding: 6px 0 0;
  border-radius: 0;
  color: rgba(255,255,255,.95);
  background: transparent;
  font-size: 12px;
  line-height: 1.55;
}
.hero-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
  margin: -64px 14px 0;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #17231c, #0d8b4d);
  box-shadow: 0 18px 34px rgba(12,124,69,.18);
}
.hero-card b { font-size: 20px; }
.hero-card p { margin: 7px 0 0; color: rgba(255,255,255,.82); font-size: 13px; }
.hero-card button { color: var(--green-dark); background: #fff; }
.service-bar.upgraded {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 42px;
  margin: 0 0 8px;
  padding: 0 8px;
  overflow: hidden;
  border-bottom: 8px solid #f5f5f5;
  background: #fff;
}
.service-bar.upgraded div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  min-width: 0;
  white-space: nowrap;
}
.service-bar.upgraded img {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 4px;
  object-fit: contain;
}
.service-bar.upgraded span {
  overflow: hidden;
  color: #69766f;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.promo-tabs { display: flex; gap: 18px; overflow-x: auto; padding: 12px 14px 8px; background: #fff; }
.promo-tabs button { flex: 0 0 auto; padding: 4px 0; border: 0; border-radius: 0; color: #49554d; background: transparent; font-weight: 600; }
.promo-tabs button.active { color: #f5222d; background: transparent; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px 9px; }
#panel-home .home-product-title { display: none; }
.section-title b { font-size: 18px; }
.section-title span { color: var(--muted); font-size: 12px; }
.cheap-scroll#hotList {
  display: none;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  padding: 5px 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cheap-scroll#hotList::-webkit-scrollbar { display: none; }
.deal-card { position: relative; flex: 0 0 112px; min-width: 112px; min-height: 178px; padding: 8px; border-radius: 0; background: #fff; box-shadow: 0 8px 18px rgba(17,84,45,.06); scroll-snap-align: start; }
.deal-card > img { display: block; width: 96px; height: 90px; margin: 0 auto 8px; object-fit: contain; }
.deal-card b { display: -webkit-box; height: 35px; overflow: hidden; color: #2d4454; font-size: 13px; line-height: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.deal-card span { display: block; margin-top: 5px; color: #f62929; font-weight: 700; }
.deal-card button { position: absolute; right: 7px; bottom: 7px; width: 28px; height: 28px; padding: 0; background: transparent; }
.deal-card button img, .goods-card button img, .category-product-card button img, .favorite-product-card button img { width: 100%; height: 100%; }
.goods-grid { display: grid; gap: 14px; padding: 10px 10px 18px; }
.goods-section { display: grid; gap: 9px; }
.goods-section-title { display: flex; align-items: center; gap: 9px; min-height: 18px; margin: 0 0 -1px; color: #ff4d4f; }
.goods-section-title::before, .goods-section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #ff4d4f, #ff8a3d); }
.goods-section-title::after { background: linear-gradient(90deg, #ff8a3d, #ff4d4f, transparent); }
.goods-section-title span { flex: 0 0 auto; color: #ff4d4f; background: transparent; font-family: KaiTi, STKaiti, "楷体", serif; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.goods-block { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.goods-card { position: relative; min-width: 0; overflow: hidden; border-radius: 0; background: #fff; box-shadow: 0 8px 18px rgba(17,84,45,.05); }
.goods-card > img { display: block; width: 100%; height: 142px; padding: 8px; object-fit: contain; background: #fff; }
.goods-card > div { padding: 0 10px 10px; }
.goods-card h3 { margin: 8px 0 4px; color: #263f32; font-size: 15px; }
.goods-card p { display: -webkit-box; height: 34px; margin: 0; overflow: hidden; color: #8a968e; font-size: 12px; line-height: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; }
.goods-card footer b { color: #f62929; font-size: 16px; }
.goods-card footer em { color: #a1aaa4; font-size: 12px; font-style: normal; }
.goods-card footer button { width: 28px; height: 28px; padding: 0; background: transparent; }
.goods-card, .deal-card, .category-product-card, .favorite-product-card { cursor: pointer; }
.card-promo-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 22px; }
.card-promo-row .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-countdown { flex: 0 0 auto; color: #f5222d; background: transparent; font-size: 11px; font-weight: 800; white-space: nowrap; animation: seckillPulse .85s infinite alternate; }
@keyframes seckillPulse { from { transform: scale(1); box-shadow: 0 0 0 rgba(245,34,45,.2); } to { transform: scale(1.06); box-shadow: 0 0 14px rgba(245,34,45,.48); } }
.seckill-product-card { border: 1px solid #ffb4b8; background: linear-gradient(180deg, #fff5f5 0%, #fff 58%); }
.group-product-card { position: relative; border: 1px solid #ffd5a3; background: linear-gradient(180deg, #fffaf2 0%, #fff 58%); }
.group-countdown { color: #e54800; animation: none; }
.group-meta { display: grid; gap: 3px; margin-top: 7px; padding: 7px 8px; border-radius: 10px; color: #9a4b00; background: #fff2dc; font-size: 12px; }
.group-meta b { color: #e54800; font-size: 13px; }
.group-join-btn { width: auto !important; min-width: 48px; height: 28px; padding: 0 10px !important; color: #fff; background: linear-gradient(135deg,#ff7a1a,#e54800) !important; font-size: 12px; }
.group-join-btn.joined { color: #e54800; border: 1px solid #ffb070; background: #fff4e8 !important; }
.seckill-cart-btn { background: linear-gradient(135deg,#ff4d4f,#d71920) !important; }
.category-page { flex-direction: column; height: calc(100vh - 62px - env(safe-area-inset-bottom)); height: calc(100dvh - 62px - env(safe-area-inset-bottom)); overflow: hidden; background: #f5f5f5; }
.category-page.active { display: flex; }
.category-head { flex: 0 0 auto; z-index: 5; padding: calc(28px + env(safe-area-inset-top)) 24px 14px; background: radial-gradient(circle at 86% 18%, rgba(255,255,255,.22), transparent 27%), linear-gradient(135deg, #68d40d 0%, #17b83d 100%); }
.category-head h2 { margin: 0 0 16px; color: #fff; font-size: 20px; font-weight: 500; text-align: center; letter-spacing: 1px; }
.category-search { display: flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: 0 8px 18px rgba(13,139,77,.12); }
.category-search span { color: #111; font-size: 18px; transform: rotate(-20deg); }
.category-search input { border: 0; padding: 0 0 0 9px; color: #111; font-size: 16px; }
.category-search input::placeholder { color: #929cab; }
.category-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 92px 1fr; background: #fff; }
.category-tabs { display: grid; align-content: start; min-height: 0; overflow: hidden; background: #f6f6f6; }
.category-tabs button { position: relative; height: 62px; padding: 0 6px 0 12px; border-radius: 0; color: #5f6a78; background: transparent; font-size: 15px; text-align: left; }
.category-tabs button.active { color: #21b33a; background: #fff; font-weight: 500; }
.category-tabs button.active::before { content: ""; position: absolute; left: 0; top: 21px; width: 4px; height: 21px; background: #21b33a; }
.category-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.category-subtabs { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; height: 54px; padding: 0 12px 0 20px; background: #fff; }
.category-subtabs button { position: relative; width: auto; padding: 0 0 11px; border-radius: 0; color: #1fb136; background: transparent; font-size: 16px; }
.category-subtabs button::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: #1fb136; }
.category-subtabs b { color: #111; font-size: 16px; font-weight: 600; }
.category-subtabs span { color: #9aa0a8; font-size: 19px; }
.category-goods { flex: 1 1 auto; min-height: 0; display: grid; align-content: start; gap: 0; padding: 0 0 16px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; background: #fff; -webkit-overflow-scrolling: touch; }
.category-product-card { display: grid; grid-template-columns: 88px 1fr; gap: 10px; min-height: 110px; padding: 10px 10px 14px; border-bottom: 1px solid #eef0ef; background: #fff; }
.category-product-card > img { width: 88px; height: 88px; border-radius: 50%; object-fit: contain; background: #f8faf8; }
.category-product-card > div { align-self: start; transform: translateY(-3px); }
.category-product-card h3 { margin: 1px 0 4px; color: #202428; font-size: 17px; line-height: 1.2; }
.category-product-card p { display: -webkit-box; height: 20px; margin: 0; overflow: hidden; color: #9aa0a8; font-size: 13px; line-height: 20px; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.category-product-card .tag { display: none; }
.category-product-card footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 3px; }
.category-product-card footer b { color: #f00; font-size: 17px; }
.category-product-card footer em { color: #a1a6ad; font-size: 13px; font-style: normal; }
.category-product-card footer button { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: #25b236; }
.product-detail-page { min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); background: #fff; }
.product-detail-body { padding-bottom: 20px; }
.detail-hero-img { position: relative; display: grid; place-items: center; min-height: 292px; padding: 4px 24px 8px; background: #fff; }
.detail-hero-img img { width: min(72%, 255px); height: 270px; object-fit: contain; }
.detail-hero-img i { width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #26b63a; }
.detail-summary { display: grid; gap: 14px; padding: 0 24px 20px; background: #fff; }
.detail-summary h1 { margin: 0; color: #20252c; font-size: 27px; line-height: 1.2; }
.detail-meta-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-summary p { margin: 0; color: #8b929d; font-size: 19px; }
.detail-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.detail-price { display: flex; align-items: center; gap: 8px; }
.detail-price b { color: #28b63f; font-size: 25px; }
.detail-discount { padding: 2px 6px; border-radius: 4px; color: #fff; background: #ff7a3a; font-size: 14px; }
.detail-summary del { display: block; margin-top: 12px; color: #939aa5; font-size: 19px; }
.detail-action-buttons { display: flex; align-items: flex-start; justify-content: flex-end; gap: 16px; }
.detail-action-buttons button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 36px; padding: 0; color: #111; background: transparent; border-radius: 0; font-size: 13px; line-height: 1.2; }
.detail-action-buttons button img { width: 26px; height: 26px; object-fit: contain; }
.detail-action-buttons button.favorited span { color: #25b236; }
.detail-action-buttons span { color: #111; font-size: 13px; }
.detail-price-row em { color: #9098a6; font-size: 18px; font-style: normal; white-space: nowrap; }
.detail-description { padding: 12px 24px 40px; border-top: 12px solid #f5f5f5; }
.detail-description h3 { margin: 0 0 16px; color: #111827; font-size: 24px; }
.detail-description p { color: #44504a; font-size: 15px; line-height: 1.75; }
.detail-description img { max-width: 100%; height: auto; border-radius: 14px; }
.detail-gallery { display: grid; gap: 12px; margin-top: 18px; }
.detail-gallery img { width: 100%; border-radius: 14px; object-fit: contain; background: #f8faf8; }
.detail-bottom-bar { position: fixed; left: 50%; bottom: 0; z-index: 70; display: grid; grid-template-columns: 42% 58%; width: 100%; max-width: 430px; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); transform: translateX(-50%); background: #fff; box-shadow: 0 -8px 22px rgba(17,84,45,.08); }
.detail-cart-link { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 0; color: #8d95a0; background: #fff; font-size: 15px; }
.detail-cart-link img { width: 28px; height: 28px; object-fit: contain; }
.detail-cart-link em { position: absolute; left: calc(50% - 48px); top: 9px; display: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; color: #fff; background: #fa436a; font-size: 11px; font-style: normal; line-height: 18px; }
.detail-add-cart { border-radius: 0; background: #32b949; font-size: 18px; }
.favorites-page { min-height: calc(100vh - 62px); padding-bottom: 88px; background: #f5f5f5; }
.favorites-list { display: grid; gap: 10px; padding: 12px; }
.favorite-product-card { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 12px; background: #fff; box-shadow: 0 8px 20px rgba(17,84,45,.05); }
.favorite-product-card > img { width: 86px; height: 86px; object-fit: contain; background: #f8faf8; }
.favorite-product-card h3 { margin: 4px 0 6px; font-size: 16px; }
.favorite-product-card p { display: -webkit-box; height: 34px; margin: 0; overflow: hidden; color: #8a968e; font-size: 12px; line-height: 17px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.favorite-product-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.favorite-product-card footer b { color: #f62929; font-size: 16px; }
.favorite-product-card footer em { color: #a1aaa4; font-size: 12px; font-style: normal; }
.favorite-product-card footer button { width: 28px; height: 28px; padding: 0; background: transparent; }
.favorite-empty { padding: 40px 12px; text-align: center; }
.cart-address-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  width: 100%;
  margin: 0 0 12px;
  padding: 13px 14px;
  border-radius: 0;
  color: #17231c;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17,84,45,.05);
  text-align: left;
}
.cart-address-card span { color: var(--muted); font-size: 12px; }
.cart-address-card b { grid-column: 1 / 2; font-size: 15px; line-height: 1.45; }
.cart-address-card small { display: flex; align-items: center; gap: 7px; grid-column: 1 / 2; color: #17231c; font-size: 13px; }
.cart-address-card small i { padding: 2px 6px; border-radius: 4px; color: #fff; background: #22b236; font-size: 12px; font-style: normal; }
.cart-address-card em { grid-column: 2; grid-row: 1 / 4; align-self: center; color: var(--green); font-size: 13px; font-style: normal; }
.checkout-card { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border-radius: 0; background: #fff; box-shadow: 0 8px 20px rgba(17,84,45,.05); }
.checkout-card select.has-disabled-coupons { color: #6f7d72; background: #f8faf8; }
.total-row strong { color: #f62929; font-size: 22px; }
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 58px; height: 58px; border-radius: 0; object-fit: cover; }
.cart-line p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.orders-page { flex-direction: column; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; padding-bottom: 0; overflow: hidden; background: #f5f5f5; }
.orders-page.active { display: flex; }
.orders-page #orderList { flex: 1 1 auto; min-height: 0; gap: 10px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.order-head { flex: 0 0 auto; z-index: 8; }
.order-filter-tabs { flex: 0 0 auto; z-index: 7; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0 14px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.order-filter-tabs button { position: relative; height: 56px; padding: 0 2px; border-radius: 0; color: #2b2f36; background: transparent; font-size: 17px; font-weight: 500; }
.order-filter-tabs button.active { color: #22b236; background: transparent; }
.order-filter-tabs button.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 36px; height: 3px; background: #22b236; transform: translateX(-50%); }
.order-card { padding: 14px; border-radius: 0; background: #fff; box-shadow: 0 8px 20px rgba(17,84,45,.05); }
.order-list-card { padding: 16px 24px; box-shadow: none; cursor: pointer; }
.order-list-card header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #edf0ed; }
.order-list-card header b { overflow: hidden; color: #3c4248; font-size: 17px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.order-list-card header span { flex: 0 0 auto; color: #22b236; font-size: 17px; }
.order-preview { display: flex; align-items: center; gap: 18px; min-height: 88px; padding: 16px 0 10px; }
.order-preview img { width: 62px; height: 62px; object-fit: contain; background: #fff; }
.order-preview.single { display: grid; grid-template-columns: 82px 1fr; gap: 20px; }
.order-preview.single img { width: 76px; height: 76px; }
.order-preview.single b { display: block; margin-bottom: 4px; color: #232832; font-size: 18px; font-weight: 500; }
.order-preview.single span, .order-preview.single em { display: block; color: #838b97; font-size: 15px; font-style: normal; line-height: 1.6; }
.order-preview.single em { color: #232832; }
.order-time { margin: 0; color: #9098a6; font-size: 15px; }
.order-list-card footer { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; margin-top: 16px; color: #9098a6; font-size: 15px; }
.order-list-card footer b { color: #2d3138; font-size: 18px; }
.order-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.order-card-actions button, .order-detail-actions button { padding: 7px 14px; border: 1px solid #22b236; border-radius: 999px; color: #22b236; background: #fff; font-size: 14px; }
.order-empty { padding: 38px 14px; text-align: center; }
.order-detail-page { flex-direction: column; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; overflow: hidden; background: #f5f5f5; }
.order-detail-page.active { display: flex; }
.order-detail-head { flex: 0 0 auto; grid-template-columns: 52px 1fr auto; padding-right: 18px; }
.order-detail-state { color: #22b236; font-size: 19px; font-style: normal; font-weight: 600; white-space: nowrap; }
.order-detail-body { flex: 1 1 auto; min-height: 0; padding-bottom: 24px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.order-detail-status, .order-detail-block { margin-bottom: 10px; padding: 18px 24px; background: #fff; }
.order-detail-status { display: grid; gap: 14px; }
.order-status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-detail-status b { color: #22b236; font-size: 20px; }
.order-detail-status span { color: #9098a6; font-size: 14px; text-align: right; }
.order-detail-actions { display: flex; justify-content: flex-end; }
.order-detail-block h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding-bottom: 18px; border-bottom: 1px solid #edf0ed; color: #111827; font-size: 19px; font-weight: 600; }
.order-detail-block h3 em { text-align: right; }
.order-detail-product { display: grid; grid-template-columns: 72px 1fr auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid #edf0ed; }
.order-detail-product img { width: 72px; height: 72px; object-fit: contain; }
.order-detail-product b { display: block; color: #111827; font-size: 18px; font-weight: 500; }
.order-detail-product span { display: block; margin-top: 6px; color: #111827; font-size: 16px; }
.order-detail-product strong { color: #111827; font-size: 17px; }
.order-detail-row { display: grid; grid-template-columns: 94px 1fr auto; gap: 10px; align-items: center; min-height: 54px; border-bottom: 1px solid #edf0ed; }
.order-detail-row span { color: #8a92a0; font-size: 15px; }
.order-detail-row p { margin: 0; color: #111827; font-size: 15px; text-align: right; line-height: 1.45; }
.order-detail-row button { padding: 4px 0 4px 12px; color: #111827; background: transparent; font-size: 14px; }
.order-step.done span { color: #22b236; }
.order-detail-timeline { margin: 0; padding: 14px 0 0; list-style: none; }
.order-detail-timeline li { display: grid; gap: 5px; padding: 0 0 14px; color: #111827; font-size: 14px; }
.order-detail-timeline span { color: #9098a6; font-size: 13px; }
.order-detail-action-block { margin-bottom: 10px; padding: 16px 24px; background: #fff; }
#panel-service { min-height: calc(100vh - 62px - env(safe-area-inset-bottom)); padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
#panel-service h2 { margin: 0 0 12px; }
.service-card { min-height: calc(100vh - 220px); max-height: calc(100vh - 178px); overflow: auto; background: #f6fbf7; }
.msg.left, .msg.right { max-width: 82%; margin: 8px 0; padding: 10px 12px; border: 0; border-radius: 16px; background: #fff; }
.msg.right { margin-left: auto; color: #fff; background: var(--green); }
.msg p { margin: 5px 0; font-size: 14px; }
.msg span { opacity: .75; font-size: 11px; }
.chat-send { position: fixed; left: 50%; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 70; display: grid; grid-template-columns: 1fr auto; gap: 8px; width: min(calc(100% - 28px), 402px); padding: 10px 0; background: #fff; transform: translateX(-50%); }
.wx-service-page { position: relative; min-height: 100vh; background: #f5f5f5; }
.wx-service-body { display: grid; place-items: center; gap: 14px; min-height: calc(100vh - 76px); padding: 24px; }
.wx-service-body img { width: min(100%, 360px); max-height: calc(100vh - 180px); object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(17,84,45,.12); }
.wx-service-body p { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.wx-save-btn { position: fixed; right: max(18px, calc((100vw - 430px) / 2 + 18px)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border-radius: 50%; color: #fff; background: rgba(22,160,93,.72); box-shadow: 0 10px 24px rgba(17,84,45,.22); backdrop-filter: blur(8px); font-size: 26px; }
.user-page-lite { min-height: calc(100vh - 76px); padding-bottom: 22px; background: #f1f1f1; }
.user-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 200px;
  padding: 42px 25px 78px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 10% -10%, rgba(255,255,255,.24), transparent 24%), radial-gradient(circle at 92% 75%, rgba(255,255,255,.16), transparent 28%), linear-gradient(145deg, #73d51e, #15b633);
}
.user-hero p { margin: 0 0 12px; font-size: 26px; letter-spacing: 1px; }
.user-hero em { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 12px; font-style: normal; }
.user-avatar { position: relative; flex: 0 0 auto; }
.user-avatar img { display: block; width: 92px; height: 92px; border: 8px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px rgba(18,122,38,.18); }
.user-avatar button { position: absolute; right: 5px; bottom: -3px; padding: 3px 10px; border-radius: 999px; background: #73c91e; font-size: 12px; }
.asset-card { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); margin: -78px 24px 16px; padding: 16px 0 15px; border-radius: 11px; background: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.asset-card button { border-radius: 0; color: #080d35; background: transparent; }
.asset-card b { display: block; margin-bottom: 12px; font-size: 24px; font-weight: 500; }
.asset-card span { color: #080d35; font-size: 15px; }
.user-range-card { display: grid; gap: 10px; margin: 0 24px 16px; padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.user-range-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-range-card b { color: #111; font-size: 16px; }
.user-range-card button { width: auto; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.user-range-card p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #606978; font-size: 14px; }
.user-range-card span { color: #9aa1ad; font-size: 12px; }
.user-range-map { height: 190px; overflow: hidden; border: 1px solid #edf0f2; border-radius: 12px; background: #eef8f1; }
.user-order-card { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin: 0 24px 16px; padding: 14px 6px 13px; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.user-order-card button { position: relative; display: grid; place-items: center; gap: 8px; padding: 0; border-radius: 0; color: #080d35; background: transparent; }
.user-order-card img { width: 35px; height: 35px; object-fit: contain; }
.user-order-card span { font-size: 14px; }
.user-order-card em { position: absolute; top: -5px; right: 16px; display: none; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; color: #fff; background: #fa436a; font-size: 10px; font-style: normal; line-height: 17px; }
.menu-card { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 6px; margin: 0 26px; padding: 24px 10px 30px; border-radius: 8px; background: #fff; }
.menu-card button { display: grid; place-items: center; gap: 8px; padding: 0; border-radius: 0; color: #080d35; background: transparent; }
.menu-card img { width: 34px; height: 34px; object-fit: contain; }
.menu-card span { font-size: 13px; white-space: nowrap; }
.address-page,
.address-edit-page,
.address-map-page,
.profile-page { min-height: calc(100vh - 62px); padding-bottom: 96px; background: #f3f3f3; }
.address-map-page.active { position: fixed; left: 50%; top: 0; bottom: 0; z-index: 90; display: block; width: min(100%, 430px); min-height: 100vh; padding-bottom: 0; transform: translateX(-50%); overflow: hidden; background: #fff; }
.address-head { position: relative; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; height: 76px; background: #fff; }
.address-head button { width: 52px; height: 52px; padding: 0; color: #111; background: transparent; font-size: 38px; font-weight: 300; line-height: 52px; }
.address-head h2 { margin: 0; color: #111; font-size: 18px; font-weight: 500; text-align: center; }
.address-list { min-height: calc(100vh - 232px); background: #f3f3f3; }
.address-item { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 8px; padding: 22px 24px 20px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.address-main { display: grid; gap: 14px; padding: 0; border-radius: 0; color: #091229; background: transparent; text-align: left; }
.address-main p { margin: 0; font-size: 19px; line-height: 1.35; }
.address-main div { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.address-main b { padding: 2px 6px; border-radius: 5px; color: #fff; background: #22b236; font-size: 14px; }
.address-edit { justify-self: end; align-self: start; width: auto; padding: 5px 0; color: #20b331; background: transparent; font-size: 16px; }
.address-empty { display: grid; place-items: center; height: 260px; color: #9ba0a8; font-size: 15px; }
.address-add-btn { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 65; width: min(74%, 360px); height: 58px; transform: translateX(-50%); border-radius: 999px; background: #25b236; font-size: 20px; }
.address-form { display: grid; margin-top: 10px; background: #fff; }
.address-form label,
.address-radio-row,
.address-tag-row,
.address-default-row { display: grid; grid-template-columns: 102px minmax(0, 1fr); align-items: center; min-height: 64px; padding: 0 24px; border-bottom: 1px solid #edf0f2; color: #101828; font-size: 18px; }
.address-form input { border: 0; border-radius: 0; padding: 0; color: #111; font-size: 18px; }
.address-form input::placeholder { color: #9aa1ad; }
.address-form label { position: relative; }
.address-form label:has(.address-locate-btn) { grid-template-columns: 102px minmax(0, 1fr) 44px; }
.address-form label em { position: absolute; right: 24px; color: #9098a6; font-style: normal; }
.address-locate-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 999px; background: #f2f3f5; }
.address-locate-btn img { width: 18px; height: 18px; object-fit: contain; }
.address-map-head { position: fixed; left: 50%; top: 0; z-index: 80; display: grid; grid-template-columns: 62px 1fr 54px; align-items: center; width: min(100%, 430px); height: 58px; transform: translateX(-50%); background: rgba(255,255,255,.82); backdrop-filter: blur(8px); }
.address-map-head h2 { margin: 0; color: #111; font-size: 17px; font-weight: 500; text-align: center; }
.address-map-head button { width: auto; min-width: 0; padding: 0 10px; color: #111; background: transparent; font-size: 16px; white-space: nowrap; }
.address-map-head button:last-child { justify-self: end; width: 46px; height: 32px; margin-right: 8px; padding: 0; border-radius: 9px; color: #fff; background: #21bd55; font-size: 14px; font-weight: 600; line-height: 32px; text-align: center; }
.address-map-full { position: absolute; inset: 0 0 90px; overflow: hidden; background: #eef8f1; }
.address-map-page.has-candidates .address-map-full { bottom: 310px; }
.address-map-locate { position: absolute; left: 22px; bottom: 110px; z-index: 75; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border-radius: 14px; color: #188bf2; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.12); font-size: 32px; }
.address-map-page.has-candidates .address-map-locate { bottom: 330px; }
.map-error { display: grid; place-items: center; height: 100%; margin: 0; padding: 18px; color: #8a9099; font-size: 14px; text-align: center; }
.address-map-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 74; display: grid; gap: 12px; max-height: 310px; padding: 18px 18px calc(14px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
.address-search-box { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; }
.address-search-box input { height: 44px; border: 0; border-radius: 12px; padding: 0 14px; background: #f2f3f5; font-size: 16px; text-align: center; }
.address-search-box button { padding: 0; border-radius: 12px; font-size: 14px; }
.address-candidates { display: grid; max-height: 260px; overflow-y: auto; border-top: 1px solid #edf0f2; }
.address-candidates:empty { display: none; }
.address-candidates button { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #edf0f2; border-radius: 0; color: #111; background: #fff; text-align: left; }
.address-candidates b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 500; }
.address-candidates span { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a2a8b1; font-size: 14px; }
.address-candidates em { color: #24bd55; font-size: 26px; font-style: normal; text-align: center; }
.address-candidates p { padding: 14px 0; color: #9aa1ad; font-size: 14px; }
.address-radio-row { grid-template-columns: 102px auto auto 1fr; gap: 20px; }
.address-radio-row button { position: relative; width: auto; padding: 0 0 0 34px; color: #111; background: transparent; font-size: 18px; }
.address-radio-row button::before { content: ""; position: absolute; left: 0; top: 50%; width: 25px; height: 25px; border: 1px solid #d4d8dd; border-radius: 50%; transform: translateY(-50%); }
.address-radio-row button.active::before { border-color: #22b236; background: #22b236; }
.address-radio-row button.active::after { content: ""; position: absolute; left: 8px; top: 47%; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-50%); }
.address-tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.address-tag-row span { flex: 0 0 92px; }
.address-tag-row button { flex: 0 0 auto; width: auto; min-width: 58px; padding: 5px 14px; color: #556070; background: #f3f4f6; font-size: 14px; white-space: nowrap; }
.address-tag-row button.active { color: #22b236; background: #eaf8ed; }
.address-default-row { grid-template-columns: 1fr auto; margin-top: 10px; background: #fff; border-bottom: 0; }
.address-switch { position: relative; width: 56px; height: 34px; padding: 0; border: 1px solid #ddd; background: #fff; box-shadow: inset 0 0 4px rgba(0,0,0,.12); }
.address-switch i { position: absolute; left: 2px; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.22); transition: .2s; }
.address-switch.active { background: #22b236; border-color: #22b236; }
.address-switch.active i { left: 24px; }
.address-submit { width: calc(100% - 52px); height: 56px; margin: 50px 26px 0; border-radius: 4px; background: #25b236; font-size: 20px; }
.profile-form { display: grid; margin-top: 10px; background: #fff; }
.profile-form label,
.profile-avatar-row,
.profile-radio-row { display: grid; grid-template-columns: 102px minmax(0, 1fr); align-items: center; min-height: 64px; padding: 0 24px; border-bottom: 1px solid #edf0f2; color: #101828; font-size: 18px; }
.profile-avatar-row { min-height: 92px; }
.profile-avatar-row img { justify-self: end; width: 54px; height: 54px; object-fit: contain; }
.profile-form input { border: 0; border-radius: 0; padding: 0; color: #111; font-size: 18px; text-align: right; }
.profile-form input:disabled { color: #7b8290; background: transparent; }
.profile-form input::placeholder { color: #9aa1ad; }
.profile-radio-row { grid-template-columns: 1fr auto auto; gap: 28px; }
.profile-radio-row button { position: relative; width: auto; padding: 0 0 0 34px; color: #111; background: transparent; font-size: 18px; }
.profile-radio-row button::before { content: ""; position: absolute; left: 0; top: 50%; width: 25px; height: 25px; border: 2px solid #e6e1e1; border-radius: 50%; transform: translateY(-50%); }
.profile-radio-row button.active::before { border-color: #22b236; background: #22b236; }
.profile-radio-row button.active::after { content: ""; position: absolute; left: 8px; top: 47%; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-50%); }
.profile-save { width: calc(100% - 52px); height: 52px; margin: 30px 26px 0; border-radius: 4px; background: #25b236; font-size: 18px; }
.profile-logout { width: 100%; height: 82px; margin-top: 16px; border-radius: 0; color: #ff3b6b; background: #fff; font-size: 20px; }
.native-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 430px;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-top: 1px solid #edf1ee;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -8px 22px rgba(17,84,45,.08);
}
.native-tabbar button { flex: 1 1 25%; min-width: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; padding: 6px 0; border-radius: 0; color: #6d776f; background: transparent; font-size: 11px; }
.native-tabbar button.active { color: #1db342; }
.native-tabbar span { position: relative; min-height: 24px; font-size: 21px; line-height: 24px; }
.native-tabbar img { width: 23px; height: 23px; object-fit: contain; }
.native-tabbar em { position: absolute; right: -13px; top: -7px; display: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; color: #fff; background: #fa436a; font-size: 10px; font-style: normal; line-height: 16px; text-align: center; }
