/* ============================================================
 * 云栖谷家庭农场订货平台 · 样式
 * ============================================================ */
:root {
  --green: #2f9e44;
  --green-deep: #1b6e34;
  --green-light: #e8f6ec;
  --green-gradient: linear-gradient(135deg, #37b24d 0%, #2f9e44 55%, #237a38 100%);
  --orange: #f76707;
  --red: #ff4d4f;
  --gold: #f59f00;
  --text: #1f2d22;
  --text-2: #5c6b60;
  --text-3: #9aa89e;
  --line: #edf1ed;
  --bg: #f4f7f3;
  --card: #ffffff;
  --radius: 14px;
  --tabbar-h: 58px;
  --shadow: 0 4px 18px rgba(31, 84, 45, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: #dfe9de;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#phone {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, .12);
  overflow: hidden;
}

/* ---------- 视图切换 ---------- */
.view { display: none; padding-bottom: calc(var(--tabbar-h) + 70px); min-height: 100vh; }
.view.active { display: block; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--tabbar-h);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
  transition: color .2s;
}
.tab .tab-ico { font-size: 21px; line-height: 1; filter: grayscale(.4); transition: transform .2s; }
.tab.active { color: var(--green); font-weight: 600; }
.tab.active .tab-ico { filter: none; transform: translateY(-1px) scale(1.08); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 16px 14px 0;
  background: var(--green-gradient);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; color: #fff; position: relative; z-index: 1; }
.hero-name { font-size: 19px; font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero-sub { font-size: 11px; opacity: .9; margin-top: 3px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff5252;
  box-shadow: 0 0 0 rgba(255,82,82,.6); animation: pulse 1.6s infinite; }
.live-dot.off { background: #adb5bd; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,82,82,.55); }
  70% { box-shadow: 0 0 0 8px rgba(255,82,82,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,82,82,0); }
}
.hero-banner {
  margin-top: 14px;
  position: relative; z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  height: 158px;
  box-shadow: 0 10px 24px rgba(27, 78, 40, .3);
}
.hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-banner .banner-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px 14px; color: #fff;
}
.banner-mask b { font-size: 16px; letter-spacing: .5px; }
.banner-mask span { font-size: 11px; opacity: .92; margin-top: 3px; }
.hero-actions {
  position: relative; z-index: 1;
  display: flex; gap: 10px;
  margin: 14px 0 18px;
}
.hero-btn {
  flex: 1; text-align: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 9px 0; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: background .2s;
}
.hero-btn.solid { background: #fff; color: var(--green-deep); border-color: #fff; }
.hero-btn:active { transform: scale(.97); }

/* ---------- 直播监控卡 ---------- */
.monitor-card {
  margin: -14px 14px 0;
  position: relative; z-index: 2;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.monitor-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
}
.monitor-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.monitor-title::before { content: '📹'; font-size: 15px; }
.monitor-viewers { font-size: 11px; color: var(--text-3); }
.monitor-screen {
  position: relative;
  margin: 0 12px 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #232d24;
  aspect-ratio: 4 / 3;
}
.monitor-screen img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .95; }
.monitor-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 30%, transparent 70%, rgba(0,0,0,.4));
  pointer-events: none;
}
.monitor-topline { display: flex; justify-content: space-between; align-items: center; }
.mon-live { display: flex; align-items: center; gap: 4px; background: #ff3b3b; color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 3px; letter-spacing: .5px; }
.mon-time { font-family: Menlo, monospace; font-size: 10px; color: rgba(255,255,255,.92); }
.mon-cam { align-self: flex-start; background: rgba(0,0,0,.45); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 3px; }
.monitor-offline {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: #2b2f2c; color: #8a958c; font-size: 12px;
}
.monitor-screen.off .monitor-overlay, .monitor-screen.off img { display: none; }
.monitor-screen.off .monitor-offline { display: flex; }

/* ---------- 公告条 ---------- */
.notice-bar {
  margin: 12px 14px 0;
  background: #fff8eb;
  border: 1px solid #ffe3ad;
  border-radius: 999px;
  height: 34px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  overflow: hidden;
}
.notice-bar .n-ico { flex: none; font-size: 14px; }
.notice-track { flex: 1; overflow: hidden; position: relative; height: 20px; }
.notice-text {
  position: absolute; white-space: nowrap;
  font-size: 12px; color: #b25f00;
  line-height: 20px;
  animation: marquee 18s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ---------- 通用区块 ---------- */
.section { margin: 18px 14px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }
.section-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.section-title::before {
  content: ''; width: 4px; height: 15px;
  background: var(--green-gradient);
  border-radius: 2px;
}
.section-more { font-size: 12px; color: var(--text-3); cursor: pointer; }

/* 分类九宫格入口 */
.quick-cats { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; padding: 14px 6px; }
.quick-cat {
  flex: 1; text-align: center; cursor: pointer;
  transition: transform .15s;
}
.quick-cat:active { transform: scale(.92); }
.quick-cat .qc-ico {
  width: 46px; height: 46px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
  background: var(--green-light);
  border-radius: 14px;
}
.quick-cat:nth-child(2) .qc-ico { background: #fff3e6; }
.quick-cat:nth-child(3) .qc-ico { background: #eef7e4; }
.quick-cat:nth-child(4) .qc-ico { background: #fdf0e8; }
.quick-cat .qc-txt { font-size: 12px; color: var(--text-2); }

/* 热选横滑商品 */
.hot-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px;
  scrollbar-width: none; }
.hot-scroll::-webkit-scrollbar { display: none; }
.hot-card {
  flex: none; width: 138px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.hot-img { position: relative; width: 100%; aspect-ratio: 1; background: var(--green-light); }
.hot-img img, .p-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-fallback {
  width: 100%; height: 100%;
  display: none;
  align-items: center; justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #e9f6ec, #d7ecdc);
}
.img-fallback.show { display: flex; }
.hot-tag {
  position: absolute; top: 7px; left: 7px;
  background: linear-gradient(135deg, #ff8c3b, #f76707);
  color: #fff; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
}
.hot-body { padding: 8px 9px 10px; }
.hot-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-spec { font-size: 10px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }

/* 价格 */
.price { color: var(--red); font-weight: 700; }
.price .rmb { font-size: 11px; }
.price .num { font-size: 17px; }
.price .unit { font-size: 10px; color: var(--text-3); font-weight: 400; margin-left: 2px; }
.hot-foot .price .num { font-size: 15px; }

/* 数量步进器 */
.stepper { display: flex; align-items: center; gap: 8px; }
.step-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: none; cursor: pointer;
  font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.step-btn:active { transform: scale(.85); }
.step-plus { background: var(--green); color: #fff; }
.step-minus { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.step-num { min-width: 18px; text-align: center; font-size: 14px; font-weight: 600; }

/* 品质承保 */
.promise-grid { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px 8px; }
.promise { text-align: center; }
.promise .pm-ico { font-size: 26px; }
.promise .pm-txt { font-size: 11px; color: var(--text-2); margin-top: 5px; font-weight: 500; }

/* 农场故事 */
.story-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 130px;
  box-shadow: var(--shadow);
}
.story-card img { width: 100%; height: 100%; object-fit: cover; }
.story-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(27,70,40,.85), rgba(27,70,40,.15));
  color: #fff; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.story-mask b { font-size: 14px; }
.story-mask span { font-size: 11px; opacity: .9; margin-top: 3px; line-height: 1.5; }

/* 评价 */
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; }
.review-head { display: flex; align-items: center; gap: 9px; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex: none;
}
.review-who { flex: 1; }
.review-name { font-size: 13px; font-weight: 600; }
.review-stars { font-size: 11px; color: var(--gold); letter-spacing: 1px; }
.review-date { font-size: 11px; color: var(--text-3); }
.review-text { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-top: 8px; }
.review-tag {
  display: inline-block; margin-top: 8px;
  background: var(--green-light); color: var(--green-deep);
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
}

/* ---------- 订购页 ---------- */
.shop-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--green-gradient);
  padding: 14px 14px 12px;
  border-radius: 0 0 18px 18px;
}
.shop-title { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.shop-search {
  margin-top: 10px;
  background: #fff; border-radius: 999px;
  height: 38px; display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
}
.shop-search input {
  flex: 1; border: none; outline: none;
  font-size: 13px; background: transparent; color: var(--text);
}
.shop-search .s-ico { font-size: 15px; }

.shop-body { display: flex; padding-top: 10px; }
.cat-sidebar {
  flex: none; width: 86px;
  min-height: 60vh;
}
.cat-item {
  position: relative;
  padding: 15px 6px;
  text-align: center;
  font-size: 13px; color: var(--text-2);
  cursor: pointer;
  border-left: 3px solid transparent;
  line-height: 1.3;
}
.cat-item .ci-ico { display: block; font-size: 18px; margin-bottom: 3px; }
.cat-item.active {
  background: var(--bg);
  color: var(--green-deep); font-weight: 700;
  border-left-color: var(--green);
}
.cat-item.active::after { content: ''; }
.shop-list { flex: 1; padding: 0 10px; min-width: 0; }
.cat-caption { font-size: 12px; color: var(--text-3); padding: 4px 2px 8px; }

.p-card {
  display: flex; gap: 10px;
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.p-img { flex: none; width: 96px; height: 96px; border-radius: 9px; overflow: hidden;
  background: var(--green-light); position: relative; }
.p-img .img-fallback { font-size: 34px; }
.p-info { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.p-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.p-spec { font-size: 11px; color: var(--text-3); margin-top: 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-sales { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.p-sales b { color: var(--orange); font-weight: 600; }
.p-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.p-foot .price .num { font-size: 18px; }
.p-offmask {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-2); font-weight: 600;
  border-radius: 9px;
}

/* ---------- 购物车悬浮条 ---------- */
.cartbar {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 10px);
  width: calc(100% - 28px); max-width: 452px;
  height: 52px;
  background: #2d3a2f;
  border-radius: 999px;
  display: flex; align-items: center;
  color: #fff;
  z-index: 70;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  transition: transform .25s, opacity .25s;
}
.cartbar.hidden { transform: translateX(-50%) translateY(90px); opacity: 0; pointer-events: none; }
.cart-ico-wrap {
  position: relative;
  width: 52px; height: 52px; margin-top: -14px;
  background: #2d3a2f;
  border: 4px solid #f4f7f3;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex: none;
}
.cart-ico-wrap.full { background: linear-gradient(135deg, #40c057, #2f9e44); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  display: none;
  align-items: center; justify-content: center;
}
.cart-badge.show { display: flex; }
.cart-total { flex: 1; padding-left: 8px; line-height: 1.25; }
.cart-total .ct-label { font-size: 10px; color: #aebcb2; }
.cart-total .ct-price { font-size: 17px; font-weight: 700; }
.cart-total .ct-price .rmb { font-size: 11px; }
.cart-total .ct-tip { font-size: 10px; color: #aebcb2; }
.cart-go {
  height: 100%; padding: 0 24px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #ffd43b, #f59f00);
  color: #5c3a00; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.cart-go:disabled { background: #555f57; color: #93a096; cursor: not-allowed; }

/* ---------- 弹层通用 ---------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(20, 30, 22, .5);
  z-index: 90;
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  z-index: 91;
  max-height: 86vh;
  display: flex; flex-direction: column;
  animation: slideUp .28s cubic-bezier(.22,.8,.36,1);
}
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid var(--line);
}
.sheet-title { font-size: 16px; font-weight: 700; }
.sheet-close { border: none; background: none; font-size: 20px; color: var(--text-3); cursor: pointer; line-height: 1; }
.sheet-body { overflow-y: auto; padding: 12px 14px 20px; }
.sheet-foot { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }

/* 购物车清单 */
.cart-item {
  display: flex; gap: 10px; align-items: center;
  background: #fff; border-radius: 12px;
  padding: 10px; margin-bottom: 9px;
}
.cart-item .p-img { width: 64px; height: 64px; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-spec { font-size: 11px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-price { margin-top: 4px; }
.ci-price .price .num { font-size: 15px; }
.cart-clear { font-size: 12px; color: var(--text-3); cursor: clear; }
.cart-summary {
  background: #fff; border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 7px;
  font-size: 13px; color: var(--text-2);
}
.cart-summary .row { display: flex; justify-content: space-between; }
.cart-summary .row.total { color: var(--text); font-weight: 700; font-size: 15px;
  border-top: 1px dashed var(--line); padding-top: 9px; margin-top: 2px; }
.cart-summary .row.total .price .num { font-size: 20px; }

/* 按钮 */
.btn {
  display: block; width: 100%;
  border: none; border-radius: 999px;
  padding: 13px 0;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform .12s, filter .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green-gradient); color: #fff; box-shadow: 0 6px 16px rgba(47,158,68,.32); }
.btn-orange { background: linear-gradient(135deg, #ff922b, #f76707); color: #fff; }
.btn-ghost { background: #fff; color: var(--green-deep); border: 1.5px solid var(--green); }
.btn-gray { background: #eef1ee; color: var(--text-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: 12px; width: auto; display: inline-block; }

/* 表单 */
.form-group { margin-bottom: 12px; }
.form-label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; display: block; font-weight: 600; }
.form-label .req { color: var(--red); margin-right: 2px; }
.form-input, .form-textarea, .form-select {
  width: 100%; border: 1px solid var(--line);
  background: #fff; border-radius: 10px;
  padding: 11px 12px; font-size: 14px;
  outline: none; color: var(--text);
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--green); }
.form-textarea { resize: none; height: 70px; }
.form-switch { display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 10px; padding: 11px 12px; margin-bottom: 12px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { display: none; }
.switch i {
  position: absolute; inset: 0;
  background: #ced6cf; border-radius: 999px; transition: background .2s;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

.pay-box { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.pay-total { text-align: center; padding: 6px 0 12px; }
.pay-total .label { font-size: 12px; color: var(--text-3); }
.pay-total .amount { font-size: 30px; font-weight: 800; color: var(--text); }
.pay-total .amount .rmb { font-size: 16px; }
.pay-method { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pay-method .pm-ico { font-size: 22px; }
.pay-method .pm-name { flex: 1; font-size: 14px; font-weight: 600; }
.radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center; }
.radio-dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }

/* ---------- 下单成功 ---------- */
.success-box { text-align: center; padding: 30px 20px 10px; }
.success-ico { font-size: 60px; }
.success-box h3 { margin: 12px 0 6px; font-size: 19px; }
.success-box p { font-size: 13px; color: var(--text-3); line-height: 1.7; }
.success-no {
  margin: 14px auto 0; max-width: 300px;
  background: #fff; border-radius: 10px;
  padding: 11px; font-size: 12px; color: var(--text-2);
  border: 1px dashed #cfe3d3;
}

/* ---------- 订单页 ---------- */
.order-query {
  background: var(--green-gradient);
  padding: 14px 14px 18px;
  border-radius: 0 0 18px 18px;
}
.order-query .oq-title { color: #fff; font-size: 17px; font-weight: 700; }
.order-query .oq-sub { color: rgba(255,255,255,.85); font-size: 11px; margin-top: 3px; }
.oq-row { display: flex; gap: 8px; margin-top: 12px; }
.oq-row .form-input { flex: 1; height: 42px; border-radius: 999px; }
.oq-btn {
  flex: none; border: none; border-radius: 999px;
  padding: 0 20px; height: 42px;
  background: #fff; color: var(--green-deep);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.status-tabs {
  display: flex; background: #fff;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.status-tab {
  flex: 1; text-align: center; padding: 12px 0;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  position: relative;
}
.status-tab.active { color: var(--green-deep); font-weight: 700; }
.status-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px; background: var(--green);
}
.order-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.order-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.order-head { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.order-no { font-family: Menlo, monospace; }
.order-status { font-weight: 700; font-size: 12px; }
.st-wait { color: var(--orange); }
.st-transit { color: #1c7ed6; }
.st-done { color: var(--green); }
.st-cancel { color: var(--text-3); }
.order-goods { padding: 10px 13px; }
.og-row { display: flex; gap: 10px; padding: 5px 0; align-items: center; }
.og-img { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: var(--green-light); }
.og-img img { width: 100%; height: 100%; object-fit: cover; }
.og-info { flex: 1; min-width: 0; }
.og-name { font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-spec { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.og-price { font-size: 12px; color: var(--text-2); text-align: right; }
.og-price b { display: block; color: var(--text); font-weight: 600; }
.order-total-line { text-align: right; padding: 8px 13px; font-size: 12px; color: var(--text-2);
  border-top: 1px dashed var(--line); }
.order-total-line b { color: var(--red); font-size: 16px; }
.order-addr { padding: 9px 13px; background: #fafdfa; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.order-addr b { color: var(--text); }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 13px; border-top: 1px solid var(--line); }

/* 物流弹窗 */
.tracking-box { background: #fff; border-radius: 12px; padding: 15px; }
.tracking-company { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.tracking-no { font-size: 12px; color: var(--text-3); margin-top: 4px; font-family: Menlo, monospace; }
.track-steps { margin-top: 16px; padding-left: 4px; }
.track-step { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.track-step:last-child { padding-bottom: 0; }
.track-step::before {
  content: ''; position: absolute; left: 6px; top: 16px; bottom: -2px;
  width: 2px; background: var(--line);
}
.track-step:last-child::before { display: none; }
.ts-dot { width: 14px; height: 14px; border-radius: 50%; background: #cfd8d0; flex: none; margin-top: 2px;
  border: 3px solid #f4f7f3; z-index: 1; }
.track-step.done .ts-dot { background: var(--green); }
.ts-content .t-txt { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.track-step.done:last-child .t-txt { color: var(--green-deep); font-weight: 700; }
.ts-content .t-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 30px; color: var(--text-3); }
.empty .e-ico { font-size: 56px; opacity: .8; }
.empty .e-txt { font-size: 13px; margin-top: 12px; line-height: 1.7; }
.empty .btn { margin-top: 18px; max-width: 180px; margin-left: auto; margin-right: auto; }

/* ---------- 管理后台 ---------- */
.admin-header {
  background: linear-gradient(135deg, #343a40, #212529);
  padding: 18px 16px 20px;
  border-radius: 0 0 18px 18px;
  color: #fff;
}
.admin-header .ah-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.admin-header .ah-sub { font-size: 11px; color: #adb5bd; margin-top: 4px; }
.admin-stats { display: flex; gap: 9px; margin-top: 14px; }
.stat-card {
  flex: 1; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px; padding: 10px 8px; text-align: center;
}
.stat-card .s-num { font-size: 19px; font-weight: 800; color: #ffd43b; }
.stat-card .s-lbl { font-size: 10px; color: #ced4da; margin-top: 2px; }
.admin-tabs { display: flex; background: #fff; position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line); }
.admin-tab { flex: 1; text-align: center; padding: 12px 2px; font-size: 12.5px; color: var(--text-2); cursor: pointer; position: relative; }
.admin-tab.active { color: var(--green-deep); font-weight: 700; }
.admin-tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px; background: var(--green); }
.admin-tab .at-badge {
  display: inline-block; min-width: 16px; padding: 0 4px; height: 16px; line-height: 16px;
  background: var(--red); color: #fff; border-radius: 999px; font-size: 10px; margin-left: 2px;
}
.admin-body { padding: 12px; }

.admin-item { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px;
  margin-bottom: 10px; box-shadow: var(--shadow); }
.admin-item .p-img { width: 66px; height: 66px; }
.ai-info { flex: 1; min-width: 0; }
.ai-name { font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.ai-actions { display: flex; gap: 6px; margin-top: 7px; align-items: center; }
.mini-btn {
  border: 1px solid var(--line); background: #f6f8f6;
  border-radius: 6px; padding: 4px 10px;
  font-size: 11px; color: var(--text-2); cursor: pointer;
}
.mini-btn.danger { color: var(--red); border-color: #ffd6d6; background: #fff5f5; }
.mini-btn.primary { color: var(--green-deep); border-color: #b8e0c0; background: var(--green-light); }
.ai-switch { margin-left: auto; }

.fab {
  position: fixed;
  right: calc(50% - 240px + 16px);
  bottom: calc(var(--tabbar-h) + 76px);
  z-index: 60;
  background: var(--green-gradient);
  color: #fff; border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(47,158,68,.4);
  cursor: pointer;
}
@media (max-width: 480px) { .fab { right: 16px; } }

/* 客户档案 */
.customer-card { display: flex; align-items: center; gap: 11px; background: #fff; border-radius: 12px;
  padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.cu-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.cu-info { flex: 1; min-width: 0; }
.cu-name { font-size: 14px; font-weight: 600; }
.cu-phone { font-size: 12px; color: var(--text-3); margin-top: 2px; font-family: Menlo, monospace; }
.cu-stat { text-align: right; flex: none; }
.cu-stat b { font-size: 17px; color: var(--red); }
.cu-stat span { display: block; font-size: 10px; color: var(--text-3); }
.cu-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* 直播/农场设置 */
.settings-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow); }
.settings-card h4 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

/* 弹窗 */
.modal {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 56px); max-width: 380px;
  background: #fff; border-radius: 16px;
  z-index: 91;
  animation: popIn .22s cubic-bezier(.22,.8,.36,1);
  overflow: hidden;
}
@keyframes popIn { from { transform: translate(-50%,-46%); opacity: 0; } to { transform: translate(-50%,-50%); opacity: 1; } }
.modal-head { padding: 16px 18px 0; font-size: 16px; font-weight: 700; }
.modal-body { padding: 12px 18px 16px; font-size: 13px; color: var(--text-2); line-height: 1.7;
  max-height: 60vh; overflow-y: auto; }
.modal-foot { display: flex; border-top: 1px solid var(--line); }
.modal-foot button {
  flex: 1; border: none; background: none; padding: 13px 0;
  font-size: 15px; cursor: pointer; color: var(--text-2);
}
.modal-foot button + button { border-left: 1px solid var(--line); color: var(--green-deep); font-weight: 700; }
.modal-foot button.danger { color: var(--red); font-weight: 700; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 42%;
  transform: translate(-50%, -50%) scale(.9);
  background: rgba(30, 40, 32, .9);
  color: #fff; font-size: 13px;
  padding: 11px 20px; border-radius: 10px;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 78%; text-align: center;
  line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.section-gap { height: 4px; }

/* ---------- 加载动画 ---------- */
.spin { display: inline-block; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 首页农场切换 ---------- */
.hero-name-wrap { cursor: pointer; }
.hero-name-wrap:active .hero-name { opacity: .8; }
.farm-switch-arrow {
  font-size: 11px; font-weight: 500;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.4);
  padding: 2px 8px; border-radius: 999px;
  margin-left: 6px; vertical-align: 2px; letter-spacing: 0;
}
.hero-banner--ph {
  display: flex; align-items: flex-end;
  background: linear-gradient(135deg, #51b366, #2f8f46);
}
.hero-banner--ph .banner-mask { background: linear-gradient(to top, rgba(0,0,0,.45), transparent); }

/* 农场选择弹层 */
.farm-pick {
  display: flex; gap: 11px; align-items: center;
  background: #fff; border-radius: 12px;
  padding: 10px; margin-bottom: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.farm-pick.active { border-color: var(--green); }
.farm-pick:active { transform: scale(.98); }
.farm-pick img, .fp-ph {
  width: 74px; height: 58px; flex: none;
  object-fit: cover; border-radius: 9px;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.fp-info { flex: 1; min-width: 0; }
.fp-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.fp-now {
  font-size: 10px; font-weight: 600; color: #fff;
  background: var(--green); border-radius: 4px; padding: 1px 6px;
}
.fp-sub { font-size: 11px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-meta { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* 订单上的农场标识 */
.order-farm {
  padding: 7px 13px 0;
  font-size: 12px; font-weight: 600; color: var(--green-deep);
}

/* ---------- 农场主登录/注册 ---------- */
.admin-auth {
  max-width: 400px;
  margin: 26px auto 0;
  padding: 0 22px;
}
.auth-logo {
  width: 72px; height: 72px; margin: 8px auto 0;
  border-radius: 22px;
  background: var(--green-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  box-shadow: 0 10px 24px rgba(47,158,68,.3);
}
.admin-auth h3 { text-align: center; font-size: 20px; margin-top: 14px; }
.auth-sub { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.auth-tabs {
  display: flex; background: #fff;
  border-radius: 999px; padding: 4px;
  margin: 20px 0 16px;
  box-shadow: var(--shadow);
}
.auth-tabs .at {
  flex: 1; text-align: center;
  padding: 9px 0; font-size: 14px;
  color: var(--text-2); border-radius: 999px;
  cursor: pointer; transition: all .2s;
}
.auth-tabs .at.active { background: var(--green-gradient); color: #fff; font-weight: 700; }
.auth-tip {
  text-align: center; font-size: 11px; color: var(--text-3);
  margin-top: 14px; line-height: 1.6;
}
.ah-logout {
  float: right;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1);
  color: #fff; font-size: 12px;
  padding: 5px 13px; border-radius: 999px;
  cursor: pointer;
}
.ah-logout:active { opacity: .75; }
