/* ==========================================================================
   乡田直供 · 设计系统 CSS
   主色 #4CAF50 翠绿 | 辅助 #FF9800 橙黄 | 背景 #F5F8F5 浅绿白
   ========================================================================== */

:root {
  --green: #4CAF50;
  --green-dark: #3B8C3F;
  --green-light: #E8F5E9;
  --green-50: #F1F8F1;
  --orange: #FF9800;
  --orange-dark: #F57C00;
  --orange-light: #FFF3E0;
  --red: #E74C3C;
  --red-light: #FDECEA;
  --blue: #3498DB;
  --blue-light: #EBF5FB;
  --bg: #F5F8F5;
  --text: #2C3E2C;
  --text-2: #5A6B5A;
  --text-3: #94A394;
  --line: #EAEFEA;
  --white: #FFFFFF;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;
  --shadow-s: 0 1px 3px rgba(44, 62, 44, .06);
  --shadow: 0 2px 12px rgba(44, 62, 44, .08);
  --safe-b: 0px;
  --tab-h: 56px;
  --nav-h: 44px;
}

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

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

/* ========================= 桌面外壳 ========================= */
.stage { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; gap: 28px; padding: 24px 20px 40px; }
.stage-aside { width: 236px; flex: 0 0 236px; position: sticky; top: 24px; }
.brand-card { background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.brand-title { font-size: 19px; font-weight: 700; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.brand-title .leaf { width: 26px; height: 26px; }
.brand-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.brand-meta { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.9; }
.brand-meta b { color: var(--text-2); font-weight: 600; }

.role-switch { background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.role-switch h4 { font-size: 12px; color: var(--text-3); font-weight: 600; margin-bottom: 10px; letter-spacing: .5px; }
.role-btn {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer;
  margin-bottom: 8px; font-size: 13.5px; color: var(--text-2); transition: all .18s; font-family: inherit; text-align: left;
}
.role-btn:hover { border-color: var(--green); background: var(--green-50); }
.role-btn.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(76,175,80,.28); }
.role-btn .ico { font-size: 17px; width: 22px; text-align: center; }
.role-btn .tip { font-size: 11px; opacity: .72; display: block; margin-top: 1px; font-weight: 400; }

.nav-tree { background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 12px 10px; max-height: 50vh; overflow: auto; }
.nav-tree h4 { font-size: 12px; color: var(--text-3); font-weight: 600; padding: 4px 8px 8px; letter-spacing: .5px; }
.nav-tree a { display: block; padding: 7px 10px; border-radius: var(--radius-s); color: var(--text-2); text-decoration: none; font-size: 13px; transition: all .15s; cursor: pointer; }
.nav-tree a:hover { background: var(--green-50); color: var(--green-dark); }
.nav-tree a.on { background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.nav-tree .grp { font-size: 11px; color: var(--text-3); padding: 10px 10px 4px; font-weight: 600; }

/* ========================= 手机壳 ========================= */
.device {
  width: 390px; height: 844px; flex: 0 0 390px; background: #10130F; border-radius: 46px; padding: 11px;
  box-shadow: 0 24px 60px rgba(0,0,0,.32); position: relative;
}
.screen { width: 100%; height: 100%; background: var(--bg); border-radius: 36px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 118px; height: 26px; background: #10130F; border-radius: 0 0 16px 16px; z-index: 60; }

.statusbar { height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 30px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg); position: relative; z-index: 70; letter-spacing: .3px; }
.statusbar .sb-right { display: flex; align-items: center; gap: 5px; }
.statusbar .bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.statusbar .bars i { width: 3px; background: var(--text); border-radius: 1px; display: block; }
.statusbar .batt { width: 24px; height: 12px; border: 1.4px solid var(--text); border-radius: 3px; position: relative; opacity: .85; }
.statusbar .batt::after { content: ''; position: absolute; right: -3px; top: 3px; width: 2px; height: 6px; background: var(--text); border-radius: 0 1px 1px 0; }
.statusbar .batt i { position: absolute; inset: 1.4px; width: 76%; background: var(--text); border-radius: 1px; display: block; }
.statusbar.dark, .statusbar.dark .batt, .statusbar.dark .batt::after { color: #fff; border-color: #fff; }
.statusbar.dark .bars i, .statusbar.dark .batt i { background: #fff; }
.statusbar.dark { background: linear-gradient(160deg, #4CAF50, #3E9E42); }

.pages { flex: 1; overflow: hidden; position: relative; }
.page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--safe-b) + 12px); animation: pageIn .26s cubic-bezier(.22,.9,.3,1); scrollbar-width: none; }
.page::-webkit-scrollbar { width: 0; }
@keyframes pageIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.pb-tab { height: calc(var(--tab-h) + var(--safe-b) + 10px); }

/* ========================= 导航栏 ========================= */
.navbar { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 8px; position: sticky; top: 0; z-index: 40; background: var(--bg); }
.navbar.plain { background: var(--green); color: #fff; }
.navbar.white { background: var(--white); }
.navbar.transparent { background: transparent; }
.navbar .nb-side { min-width: 62px; display: flex; align-items: center; gap: 2px; }
.navbar .nb-side.right { justify-content: flex-end; }
.navbar .nb-title { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.navbar .nb-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; color: inherit; font-size: 20px; border-radius: 50%; font-family: inherit; }
.navbar .nb-btn:active { background: rgba(0,0,0,.05); }
.navbar .nb-text { border: none; background: transparent; font-size: 14px; color: inherit; cursor: pointer; font-family: inherit; padding: 4px 6px; }

/* 首页渐变头 */
.hero-head { background: linear-gradient(160deg, #4CAF50 0%, #3E9E42 58%, #37A04A 100%); border-radius: 0 0 22px 22px; padding: 0 14px 14px; color: #fff; position: relative; overflow: hidden; }
.hero-head::before { content: ''; position: absolute; right: -46px; top: -56px; width: 190px; height: 190px; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%); }
.hero-head::after { content: ''; position: absolute; left: -30px; bottom: -60px; width: 150px; height: 150px; background: radial-gradient(circle, rgba(255,152,0,.22), transparent 70%); }

.loc-row { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; position: relative; z-index: 2; cursor: pointer; }
.loc-row .arrow { font-size: 9px; opacity: .9; }
.loc-row .sub { font-weight: 400; opacity: .82; font-size: 11.5px; margin-left: 2px; }
.searchbar { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.96); border-radius: 20px; padding: 8px 14px; margin-top: 10px; color: var(--text-3); font-size: 13px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: relative; z-index: 2; }
.searchbar .hot { margin-left: auto; color: var(--orange); font-size: 12px; font-weight: 600; }
.searchbar.solid { background: var(--green-50); border: 1px solid var(--line); box-shadow: none; }

/* ========================= 金刚区 ========================= */
.kingkong { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 16px 6px 6px; }
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.kk-ico { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; box-shadow: var(--shadow-s); }
.kk-label { font-size: 11.5px; color: var(--text-2); font-weight: 500; }

/* ========================= 通用卡片 ========================= */
.card { background: var(--white); border-radius: var(--radius-l); margin: 10px 12px; box-shadow: var(--shadow-s); overflow: hidden; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 4px; }
.card-hd h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-hd .more { font-size: 12px; color: var(--text-3); cursor: pointer; }
.card-bd { padding: 10px 14px 14px; }

.sec-title { display: flex; align-items: center; gap: 7px; padding: 18px 14px 8px; font-size: 17px; font-weight: 700; }
.sec-title .bar { width: 4px; height: 17px; background: var(--green); border-radius: 2px; }
.sec-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: auto; }

/* ========================= Banner ========================= */
.banner { margin: 10px 12px; border-radius: var(--radius-l); overflow: hidden; position: relative; height: 148px; box-shadow: var(--shadow); }
.banner .slides { display: flex; height: 100%; transition: transform .45s cubic-bezier(.3,.9,.3,1); }
.banner .slide { min-width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: center; padding: 0 22px; color: #fff; overflow: hidden; }
.banner .slide h2 { font-size: 21px; font-weight: 800; letter-spacing: .5px; text-shadow: 0 2px 6px rgba(0,0,0,.16); position: relative; z-index: 2; }
.banner .slide p { font-size: 12.5px; opacity: .95; margin-top: 5px; position: relative; z-index: 2; }
.banner .slide .tagline { display: inline-block; margin-top: 12px; background: rgba(255,255,255,.94); color: var(--green-dark); font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 14px; width: fit-content; position: relative; z-index: 2; }
.banner .slide .pear { position: absolute; right: -10px; bottom: -18px; width: 132px; opacity: .95; z-index: 1; }
.banner .dots { position: absolute; bottom: 10px; right: 16px; display: flex; gap: 5px; z-index: 3; }
.banner .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: all .25s; }
.banner .dots i.on { width: 16px; background: #fff; }

/* ========================= 商品卡 ========================= */
.waterfall { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 12px 12px; }
.pcard { background: var(--white); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-s); cursor: pointer; transition: transform .18s; }
.pcard:active { transform: scale(.975); }
.pcard .thumb { width: 100%; aspect-ratio: 1/1; position: relative; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .badge-origin { position: absolute; left: 7px; top: 7px; background: rgba(0,0,0,.42); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 9px; backdrop-filter: blur(3px); font-weight: 500; }
.pcard .badge-trace { position: absolute; right: 7px; top: 7px; background: var(--green); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 9px; font-weight: 600; }
.pcard .info { padding: 9px 10px 11px; }
.pcard .name { font-size: 14px; font-weight: 600; line-height: 1.35; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.pcard .price-row { display: flex; align-items: baseline; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.pcard .price { color: var(--orange-dark); font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.pcard .price .sym { font-size: 12px; font-weight: 700; }
.pcard .price .unit { font-size: 11px; color: var(--text-3); font-weight: 500; }
.pcard .market { font-size: 11px; color: var(--text-3); text-decoration: line-through; }
.pcard .sales { margin-left: auto; font-size: 11px; color: var(--text-3); }
.pcard .farmer-line { font-size: 11px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 4px; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 6px 12px 14px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hcard { flex: 0 0 132px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); cursor: pointer; }
.hcard .thumb { width: 100%; aspect-ratio: 1/1; }
.hcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hcard .info { padding: 8px 9px 10px; }
.hcard .name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .price { color: var(--orange-dark); font-size: 15px; font-weight: 800; margin-top: 4px; }
.hcard .price .sym { font-size: 10px; }

.flash { margin: 10px 12px; background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-radius: var(--radius-l); padding: 12px; border: 1px solid #FFD9A8; }
.flash-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.flash-hd h3 { font-size: 16px; font-weight: 800; color: #D2691E; }
.flash-hd .cd { margin-left: auto; display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: #D2691E; }
.flash-hd .cd b { background: var(--text); color: #fff; border-radius: 4px; padding: 2px 5px; font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; display: inline-block; }

/* ========================= 标签 / 按钮 ========================= */
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; padding: 2px 7px; border-radius: 5px; font-weight: 600; line-height: 1.6; }
.tag.green { background: var(--green-light); color: var(--green-dark); }
.tag.orange { background: var(--orange-light); color: var(--orange-dark); }
.tag.red { background: var(--red-light); color: var(--red); }
.tag.blue { background: var(--blue-light); color: var(--blue); }
.tag.gray { background: #F0F2F0; color: var(--text-3); }
.tag.outline { background: transparent; border: 1px solid var(--green); color: var(--green); }

.btn { display: flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 24px; font-size: 15px; font-weight: 600; cursor: pointer; padding: 12px 20px; font-family: inherit; transition: all .18s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #4CAF50, #43A047); color: #fff; box-shadow: 0 4px 12px rgba(76,175,80,.3); }
.btn.orange { background: linear-gradient(135deg, #FF9800, #F57C00); color: #fff; box-shadow: 0 4px 12px rgba(255,152,0,.3); }
.btn.ghost { background: var(--white); color: var(--text-2); border: 1px solid var(--line); }
.btn.outline-green { background: var(--white); color: var(--green); border: 1.5px solid var(--green); }
.btn.danger { background: var(--red); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 16px; }
.btn.xs { padding: 4px 11px; font-size: 12px; border-radius: 13px; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

.actionbar { position: sticky; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 9px 14px calc(9px + var(--safe-b)); display: flex; align-items: center; gap: 10px; z-index: 45; }
.actionbar .price-info { flex: 1; }
.actionbar .price-info .p { color: var(--orange-dark); font-size: 21px; font-weight: 800; }
.actionbar .price-info .p .sym { font-size: 13px; }
.actionbar .price-info .d { font-size: 11px; color: var(--text-3); }

/* ========================= 列表 / 表单 ========================= */
.list { background: var(--white); border-radius: var(--radius-l); margin: 10px 12px; overflow: hidden; box-shadow: var(--shadow-s); }
.li { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.li:last-child { border-bottom: none; }
.li:active { background: var(--green-50); }
.li.noarrow:active { background: transparent; }
.li .li-ico { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 36px; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-title { font-size: 14.5px; font-weight: 500; }
.li .li-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.li .li-right { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.li .arrow { color: #C7CFC7; font-size: 15px; }

.form { background: var(--white); border-radius: var(--radius-l); margin: 10px 12px; overflow: hidden; box-shadow: var(--shadow-s); }
.fi { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.fi:last-child { border-bottom: none; }
.fi > label { font-size: 14px; color: var(--text-2); flex: 0 0 88px; font-weight: 500; }
.fi .req::before { content: '*'; color: var(--red); margin-right: 3px; }
.fi input, .fi textarea, .fi select { flex: 1; border: none; outline: none; font-size: 14px; font-family: inherit; color: var(--text); background: transparent; min-width: 0; }
.fi input::placeholder, .fi textarea::placeholder { color: #B9C4B9; }
.fi textarea { resize: none; height: 68px; line-height: 1.5; }
.fi.col { flex-direction: column; align-items: stretch; gap: 8px; }
.fi.col > label { flex: none; }
.hint { font-size: 11.5px; color: var(--text-3); padding: 8px 14px 12px; line-height: 1.6; }

.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.up-box { aspect-ratio: 1/1; border: 1.5px dashed var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; cursor: pointer; background: #FAFCFA; overflow: hidden; position: relative; }
.up-box .plus { font-size: 22px; font-weight: 300; line-height: 1; }
.up-box.filled { border: none; }
.up-box img { width: 100%; height: 100%; object-fit: cover; }
.up-box .del { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ========================= 商品详情 ========================= */
.pd-gallery { width: 100%; aspect-ratio: 1/1; position: relative; background: #EFF3EF; overflow: hidden; }
.pd-gallery .slides { display: flex; height: 100%; transition: transform .4s cubic-bezier(.3,.9,.3,1); }
.pd-gallery .slide { min-width: 100%; height: 100%; }
.pd-gallery .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-gallery .idx { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.42); color: #fff; font-size: 11.5px; padding: 3px 10px; border-radius: 11px; }
.pd-price-box { background: linear-gradient(135deg, #4CAF50, #3B8C3F); padding: 14px 16px; color: #fff; display: flex; align-items: flex-end; gap: 10px; }
.pd-price-box .now { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.pd-price-box .now .sym { font-size: 16px; font-weight: 700; }
.pd-price-box .old { font-size: 12.5px; opacity: .72; text-decoration: line-through; padding-bottom: 2px; }
.pd-price-box .save { margin-left: auto; background: rgba(255,255,255,.2); font-size: 11.5px; padding: 4px 10px; border-radius: 11px; font-weight: 600; }

.farmer-row { display: flex; align-items: center; gap: 10px; }
.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--green-light); }
.farmer-row .f-info { flex: 1; min-width: 0; }
.farmer-row .f-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.farmer-row .f-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trace-entry { display: flex; align-items: center; gap: 10px; background: var(--green-50); border: 1px solid #DCEBDC; border-radius: var(--radius); padding: 11px 12px; cursor: pointer; width: 100%; font-family: inherit; text-align: left; }
.trace-entry .te-main { flex: 1; }
.trace-entry .te-t { font-size: 13.5px; font-weight: 600; color: var(--green-dark); }
.trace-entry .te-d { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.sku-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.sku-opt { padding: 8px 15px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--white); font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: all .16s; font-family: inherit; }
.sku-opt.on { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.sku-opt.disabled { opacity: .4; text-decoration: line-through; pointer-events: none; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 32px; height: 30px; border: none; background: var(--green-50); color: var(--text-2); font-size: 17px; cursor: pointer; font-family: inherit; }
.stepper button:disabled { color: #C9D2C9; cursor: not-allowed; }
.stepper .val { width: 42px; text-align: center; font-size: 14.5px; font-weight: 600; }

/* ========================= 时间轴 / 步骤 ========================= */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #D5DED5; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
.tl-item.done::before { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.tl-item.now::before { background: var(--orange); box-shadow: 0 0 0 3px rgba(255,152,0,.18); }
.tl-item .tl-t { font-size: 14px; font-weight: 600; }
.tl-item.now .tl-t { color: var(--orange-dark); }
.tl-item .tl-d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tl-item .tl-imgs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tl-item .tl-imgs img { width: 66px; height: 66px; border-radius: 8px; object-fit: cover; }

.steps { display: flex; align-items: center; padding: 4px 6px; }
.steps .st { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); position: relative; }
.steps .st .dot { width: 9px; height: 9px; border-radius: 50%; background: #D5DED5; margin: 0 auto 5px; position: relative; z-index: 2; }
.steps .st.on .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(76,175,80,.16); }
.steps .st.on { color: var(--green-dark); font-weight: 600; }
.steps .st .line { position: absolute; top: 4px; left: 50%; width: 100%; height: 2px; background: #E4EAE4; z-index: 1; }
.steps .st:last-child .line { display: none; }
.steps .st.done .line { background: var(--green); }

.progress { height: 7px; background: #EDF1ED; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #FF9800, #FF7043); border-radius: 4px; transition: width .5s; }
.progress.green i { background: linear-gradient(90deg, #4CAF50, #66BB6A); }

/* ========================= 统计 / 图表 ========================= */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
.stat-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.c4 { grid-template-columns: repeat(4, 1fr); gap: 7px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 13px 12px; box-shadow: var(--shadow-s); cursor: pointer; }
.stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.stat .v .u { font-size: 11px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
.stat .l { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat .delta { font-size: 10.5px; margin-top: 4px; font-weight: 600; }
.stat .delta.up { color: var(--green); }
.stat .delta.down { color: var(--red); }
.stat.c4 .v { font-size: 17px; }

.chart { display: flex; align-items: flex-end; gap: 7px; height: 108px; padding: 0 2px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #66BB6A, #4CAF50); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .6s; }
.chart .bar.alt { background: linear-gradient(180deg, #FFB74D, #FF9800); }
.chart .lb { font-size: 10px; color: var(--text-3); }
.spark { width: 100%; height: 76px; display: block; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }

/* ========================= Tabs / TabBar ========================= */
.tabs { display: flex; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h); z-index: 35; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab { flex: 1; min-width: 68px; text-align: center; padding: 12px 6px; font-size: 14px; color: var(--text-2); position: relative; cursor: pointer; white-space: nowrap; }
.tabs .tab.on { color: var(--green-dark); font-weight: 700; }
.tabs .tab.on::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 3px; background: var(--green); border-radius: 2px; }
.tabs .tab .cnt { display: inline-block; background: var(--red); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 8px; margin-left: 3px; font-weight: 600; }
.tabs.plain { position: static; background: var(--bg); border: none; }

.tabbar { position: absolute; bottom: 0; left: 0; right: 0; height: calc(var(--tab-h) + var(--safe-b)); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; z-index: 50; padding-bottom: var(--safe-b); }
.tabbar .tb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--text-3); position: relative; }
.tabbar .tb.on { color: var(--green); }
.tabbar .tb .ico { font-size: 21px; line-height: 1; }
.tabbar .tb .lb { font-size: 10.5px; font-weight: 500; }
.tabbar .tb.on .lb { font-weight: 700; }
.tabbar .tb .dot { position: absolute; top: 4px; left: 50%; margin-left: 4px; min-width: 15px; height: 15px; background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.home-indicator { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; background: var(--text); opacity: .28; border-radius: 3px; z-index: 55; pointer-events: none; }

/* ========================= 购物车 / 地址 ========================= */
.cart-item { display: flex; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item .thumb { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; flex: 0 0 74px; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .main { flex: 1; min-width: 0; }
.cart-item .name { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.cart-item .spec { font-size: 11.5px; color: var(--text-3); margin-top: 4px; display: inline-block; background: #F4F7F4; padding: 2px 7px; border-radius: 4px; }
.cart-item .bot { display: flex; align-items: center; margin-top: 7px; }
.cart-item .price { color: var(--orange-dark); font-size: 16px; font-weight: 800; }
.cart-item .price .sym { font-size: 11px; }
.checkbox { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid #CFD8CF; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .16s; }
.checkbox.on { background: var(--green); border-color: var(--green); }
.checkbox.on::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg) translate(-1px,-1px); }

.addr-card { display: flex; align-items: flex-start; gap: 10px; padding: 14px; }
.addr-card .a-main { flex: 1; min-width: 0; }
.addr-card .a-top { font-size: 15px; font-weight: 700; }
.addr-card .a-top .phone { font-weight: 500; color: var(--text-2); margin-left: 8px; font-size: 13.5px; }
.addr-card .a-detail { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }

/* ========================= 团购 ========================= */
.leader-card { display: flex; align-items: center; gap: 11px; padding: 13px; background: var(--white); }
.group-card { background: var(--white); border-radius: var(--radius-l); margin: 10px 12px; overflow: hidden; box-shadow: var(--shadow-s); cursor: pointer; }
.group-card .gc-hd { display: flex; gap: 11px; padding: 12px; }
.group-card .thumb { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; flex: 0 0 92px; }
.group-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.group-card .gc-main { flex: 1; min-width: 0; }
.group-card .gc-name { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.group-card .gc-price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.group-card .gc-price .gp { color: var(--orange-dark); font-size: 20px; font-weight: 800; }
.group-card .gc-price .gp .sym { font-size: 12px; }
.group-card .gc-price .mp { font-size: 11.5px; color: var(--text-3); text-decoration: line-through; }
.group-card .gc-price .save { font-size: 11px; background: var(--red-light); color: var(--red); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.group-card .gc-ft { padding: 10px 12px 12px; border-top: 1px dashed var(--line); }
.group-card .gc-progress { display: flex; align-items: center; gap: 9px; }
.group-card .gc-progress .progress { flex: 1; }
.group-card .gc-progress .txt { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.group-card .gc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.group-card .gc-meta .left { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.pickup-tag { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #FF9800, #F57C00); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 5px; }
.pickup-code { text-align: center; padding: 18px; }
.pickup-code .code { font-size: 30px; font-weight: 800; letter-spacing: 7px; color: var(--green-dark); font-family: "SF Mono", Consolas, monospace; }

/* ========================= 溯源 ========================= */
.trace-hero { background: linear-gradient(160deg, #2E7D32, #4CAF50); color: #fff; padding: 18px 16px; position: relative; overflow: hidden; }
.trace-hero .batch { font-size: 11.5px; opacity: .82; font-family: "SF Mono", Consolas, monospace; letter-spacing: .5px; }
.trace-hero h2 { font-size: 20px; font-weight: 800; margin-top: 6px; }
.trace-hero .sub { font-size: 12.5px; opacity: .9; margin-top: 4px; }
.trace-hero .qr { position: absolute; right: 16px; top: 18px; width: 58px; height: 58px; background: rgba(255,255,255,.92); border-radius: 8px; padding: 4px; }
.verify-badge { display: flex; align-items: center; gap: 8px; background: var(--green-50); border: 1px solid #C8E6C9; border-radius: var(--radius); padding: 11px 12px; margin: 12px; }
.verify-badge .vb-ico { font-size: 20px; }
.verify-badge .vb-t { font-size: 13.5px; font-weight: 700; color: var(--green-dark); }
.verify-badge .vb-d { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }

/* ========================= 弹层 / Toast ========================= */
.mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 80; animation: fadeIn .2s; display: flex; align-items: flex-end; }
.mask.center { align-items: center; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; background: var(--white); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 16px 16px calc(16px + var(--safe-b)); animation: sheetUp .28s cubic-bezier(.22,.9,.3,1); max-height: 76%; overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-hd h3 { font-size: 17px; font-weight: 700; }
.sheet-hd .close { border: none; background: #F2F5F2; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--text-2); font-size: 15px; font-family: inherit; }
.dialog { width: 300px; background: var(--white); border-radius: var(--radius-l); padding: 22px 20px 18px; text-align: center; animation: popIn .24s cubic-bezier(.22,.9,.3,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.dialog .d-ico { font-size: 42px; }
.dialog h3 { font-size: 17px; font-weight: 700; margin-top: 8px; }
.dialog p { font-size: 13px; color: var(--text-2); margin-top: 7px; line-height: 1.6; }
.dialog .d-btns { display: flex; gap: 10px; margin-top: 18px; }
.dialog .d-btns .btn { flex: 1; }

.toast-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 120; }
.toast { background: rgba(28,38,28,.9); color: #fff; font-size: 13.5px; padding: 11px 18px; border-radius: 10px; animation: popIn .2s; max-width: 260px; text-align: center; line-height: 1.5; }

/* ========================= 空状态 / 其它 ========================= */
.empty { text-align: center; padding: 56px 30px; color: var(--text-3); }
.empty .e-ico { font-size: 46px; opacity: .5; }
.empty .e-t { font-size: 14px; margin-top: 10px; color: var(--text-2); }
.empty .e-d { font-size: 12px; margin-top: 4px; }
.empty .btn { margin: 16px auto 0; width: fit-content; padding: 9px 22px; }

.skeleton { background: linear-gradient(90deg, #EEF2EE 25%, #F7F9F7 37%, #EEF2EE 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.notice-bar { display: flex; align-items: center; gap: 7px; background: var(--orange-light); color: #B35C00; font-size: 12px; padding: 8px 14px; margin: 10px 12px; border-radius: var(--radius); }
.divider { height: 8px; background: var(--bg); }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text-3); }
.price-text { color: var(--orange-dark); font-weight: 800; }
.price-text .sym { font-size: .68em; }
.stars { color: #FFB300; letter-spacing: 1px; }
.price-sm { font-size: 12px; }
.flex1 { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.p12 { padding: 12px; } .p14 { padding: 14px; }
.text-c { text-align: center; }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; } .fs15 { font-size: 15px; }
.fw6 { font-weight: 600; } .fw7 { font-weight: 700; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
