﻿/* ============================================================
   发卡网系统 - 基础样式（用户端 + 管理端共用）
   设计基调：活力橙主色 + 深海军蓝文字 + 中性灰底
   ============================================================ */
:root {
  --primary: #8B5CF6;
  --primary-2: #EC4899;
  --primary-weak: #F4EFFD;
  --gradient: linear-gradient(135deg, #8B5CF6, #EC4899);
  --brand: #1F2430;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --text: #1F2430;
  --text-2: #6B7280;
  --text-3: #9AA3AF;
  --line: #ECEEF2;
  --danger: #E5484D;
  --success: #12A150;
  --warning: #F59E0B;
  --info: #0F6DFF;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 2px 10px rgba(31, 36, 48, 0.06);
  --shadow-lg: 0 8px 30px rgba(31, 36, 48, 0.12);
  --tabbar-h: 56px;
  --nav-h: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); outline: none; }
ul, ol { list-style: none; }

/* ---------- 通用容器 ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.page { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + 20px); }
.page.no-tabbar { padding-bottom: 24px; }
.page.has-navbar { padding-top: var(--nav-h); }

/* ---------- 顶部导航栏 ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; margin: 0 auto;
  width: 100%; max-width: 480px; height: var(--nav-h); z-index: 100;
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; padding: 0 12px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.navbar .nav-title { position: absolute; left: 50%; transform: translateX(-50%); max-width: 65%; text-align: center; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar .nav-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: 50%; }
.navbar .nav-btn:active { background: var(--bg); }
.navbar .nav-right { display: flex; align-items: center; gap: 4px; }

/* ---------- 底部导航栏 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--tabbar-h); z-index: 100;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); font-size: 10px; position: relative;
}
.tabbar .tab.active { color: var(--primary); }
.tabbar .tab .tab-icon { position: relative; }
.tabbar .tab .badge-dot {
  position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 10px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-s);
  font-size: 15px; font-weight: 500; transition: opacity .15s;
  border: 1px solid transparent; user-select: none; white-space: nowrap;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-weak); }
.btn-plain { background: var(--bg); color: var(--text-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-round { border-radius: 22px; }

/* ---------- 标签 / 徽标 ---------- */
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; line-height: 1.6;
}
.tag-primary { background: var(--primary-weak); color: var(--primary); }
.tag-success { background: #E7F7EF; color: var(--success); }
.tag-danger { background: #FDECEC; color: var(--danger); }
.tag-warning { background: #FEF3E2; color: #B45309; }
.tag-info { background: #EAF2FF; color: var(--info); }
.tag-gray { background: #F0F2F5; color: var(--text-2); }
.tag-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; font-size: 16px; font-weight: 600; }
.section-title .more { font-size: 13px; color: var(--text-3); font-weight: 400; }

/* ---------- 单元格列表 ---------- */
.cell {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); cursor: pointer;
}
.cell:last-child { border-bottom: none; }
.cell .cell-icon { color: var(--primary); display: flex; }
.cell .cell-body { flex: 1; min-width: 0; }
.cell .cell-title { font-size: 14px; }
.cell .cell-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cell .cell-value { color: var(--text-2); font-size: 13px; }
.cell .cell-arrow { color: var(--text-3); display: flex; }
.cell-group { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.cell-group .group-head { padding: 8px 16px 0; font-size: 12px; color: var(--text-3); }
.cell-group .group-head .dot { display: inline-block; width: 3px; height: 12px; background: var(--primary); border-radius: 2px; margin-right: 6px; vertical-align: -2px; }

/* ---------- 表单 ---------- */
.form { padding: 12px; }
.form-card { background: var(--card); border-radius: var(--radius); padding: 4px 16px; box-shadow: var(--shadow); }
.form-item { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.form-item:last-child { border-bottom: none; }
.form-item .form-label { width: 78px; color: var(--text); font-size: 14px; flex-shrink: 0; }
.form-item .input { flex: 1; border: none; font-size: 14px; background: transparent; }
.form-item .input::placeholder { color: var(--text-3); }
.form-item .code-btn { flex-shrink: 0; height: 34px; padding: 0 12px; font-size: 12px; border-radius: 17px; }
.form-item select { flex: 1; border: none; background: transparent; }
.form-item .gender-options { flex: 1; display: flex; gap: 20px; }
.form-item .gender-options label { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.form-tip { padding: 10px 4px; font-size: 12px; color: var(--text-3); }
.form-actions { padding: 16px 4px; }

/* ---------- 搜索框 ---------- */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #F0F2F5; border-radius: 20px; padding: 9px 14px;
  color: var(--text-3); cursor: pointer;
}
.search-bar .search-input { flex: 1; border: none; background: transparent; font-size: 14px; color: var(--text); }
.search-bar .search-input::placeholder { color: var(--text-3); }
.search-page-top { position: sticky; top: 0; z-index: 10; background: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.search-page-top .search-bar { flex: 1; }

/* ---------- 轮播 ---------- */
.swiper { position: relative; border-radius: var(--radius); overflow: hidden; }
.swiper-track { display: flex; transition: transform 0.4s ease; }
.swiper-slide { flex-shrink: 0; width: 100%; }
.swiper-slide img { width: 100%; aspect-ratio: 750/320; object-fit: cover; }
.swiper-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.swiper-dots .dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.5); transition: all .3s; }
.swiper-dots .dot.active { width: 16px; background: #fff; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 4px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 8px; cursor: pointer; }
.quick-item .quick-icon {
  width: 46px; height: 46px; border-radius: 16px;
.quick-item .quick-img { width: 46px; height: 46px; border-radius: 16px; object-fit: cover; display: block; margin: 0 auto; background: #f3f5f9; }
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.quick-item .quick-icon.c2 { background: linear-gradient(135deg, #0F6DFF, #5FB2FF); }
.quick-item .quick-icon.c3 { background: linear-gradient(135deg, #00A86B, #5ED9A5); }
.quick-item .quick-icon.c4 { background: linear-gradient(135deg, #7C3AED, #B9A5FF); }
.quick-item .quick-icon.c5 { background: linear-gradient(135deg, #F0416C, #FF8FA8); }
.quick-item .quick-icon.c6 { background: linear-gradient(135deg, #D97706, #FBBF5E); }
.quick-item .quick-icon.c7 { background: linear-gradient(135deg, #0369A1, #5FC3E8); }
.quick-item .quick-icon.c8 { background: linear-gradient(135deg, #64748B, #94A3B8); }
.quick-item .quick-text { font-size: 12px; color: var(--text-2); }

/* ---------- 商品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.product-card .p-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #F0F2F5; }
.product-card .p-body { padding: 8px 10px 10px; }
.product-card .p-name { font-size: 13px; line-height: 1.4; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .p-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card .p-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.product-card .p-price { color: var(--primary); font-size: 16px; font-weight: 700; }
.product-card .p-price small { font-size: 11px; font-weight: 500; }
.product-card .p-sales { font-size: 11px; color: var(--text-3); }
.product-card .p-hot { position: absolute; }

.product-list-card { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); cursor: pointer; }
.product-list-card .p-img { width: 84px; height: 84px; border-radius: var(--radius-s); object-fit: cover; flex-shrink: 0; background: #F0F2F5; }
.product-list-card .p-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product-list-card .p-name { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-list-card .p-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.product-list-card .p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product-list-card .p-price { color: var(--primary); font-size: 17px; font-weight: 700; }
.product-list-card .p-price small { font-size: 11px; }
.product-list-card .p-sales { font-size: 11px; color: var(--text-3); }
.product-list-card .p-cart-btn { color: var(--primary); }

/* ---------- 分类页 ---------- */
.cate-wrap { display: flex; min-height: 100vh; }
.cate-left { width: 92px; background: #F0F2F5; flex-shrink: 0; }
.cate-left .cate-item { padding: 14px 8px; text-align: center; font-size: 13px; color: var(--text-2); position: relative; cursor: pointer; }
.cate-left .cate-item.active { background: var(--bg); color: var(--text); font-weight: 600; }
.cate-left .cate-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 2px; background: var(--primary); }
.cate-right { flex: 1; padding: 12px; }
.cate-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cate-chip { padding: 6px 14px; border-radius: 16px; background: #fff; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow); cursor: pointer; }
.cate-chip.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; align-items: center; background: #fff; padding: 0 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 9; }
.filter-bar .filter-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 12px 0; font-size: 13px; color: var(--text-2); }
.filter-bar .filter-item.active { color: var(--primary); font-weight: 600; }
.filter-bar .view-toggle { padding: 0 10px; color: var(--text-3); display: flex; }

/* ---------- 商品详情 ---------- */
.pd-gallery { position: relative; background: #fff; }
.pd-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pd-info { background: #fff; padding: 14px; border-radius: var(--radius) var(--radius) 0 0; margin-top: -14px; position: relative; }
.pd-price-row { display: flex; align-items: baseline; gap: 10px; }
.pd-price { color: var(--primary); font-size: 26px; font-weight: 800; }
.pd-price small { font-size: 14px; }
.pd-orig { color: var(--text-3); font-size: 13px; text-decoration: line-through; }
.pd-name { font-size: 17px; font-weight: 600; margin-top: 8px; line-height: 1.5; }
.pd-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.pd-meta { display: flex; gap: 20px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.pd-spec { margin-top: 12px; background: var(--bg); border-radius: var(--radius-s); padding: 12px; }
.pd-spec-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.pd-spec-row .k { color: var(--text-3); }
.pd-detail { margin-top: 12px; background: #fff; border-radius: var(--radius); padding: 14px; }
.pd-detail .pd-detail-title { font-weight: 600; margin-bottom: 10px; }
.pd-detail-body { font-size: 13px; color: var(--text-2); white-space: pre-wrap; line-height: 1.8; }
.pd-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 90; background: #fff;
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.pd-bar .pd-act { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--text-2); width: 52px; cursor: pointer; }
.pd-bar .pd-act.active { color: var(--primary); }
.pd-bar .btn { flex: 1; height: 40px; padding: 0; font-size: 14px; }
.pd-bar .btn-buy { background: linear-gradient(135deg, #FF8A2B, var(--primary)); }
.pd-bar .btn-cart { background: linear-gradient(135deg, var(--primary), #FF4D00); margin-left: 6px; }

/* ---------- 购物车 ---------- */
.cart-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.cart-item .cart-img { width: 72px; height: 72px; border-radius: var(--radius-s); object-fit: cover; flex-shrink: 0; background: #F0F2F5; }
.cart-item .cart-body { flex: 1; min-width: 0; }
.cart-item .cart-name { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .cart-spec { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.cart-item .cart-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cart-item .cart-price { color: var(--primary); font-weight: 700; font-size: 15px; }
.cart-settle {
  position: fixed; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; padding: 10px 12px; z-index: 90;
  gap: 10px;
}
.cart-settle .settle-btn { margin-left: auto; }
.cart-settle .settle-total { font-size: 13px; color: var(--text-2); }
.cart-settle .settle-total b { color: var(--primary); font-size: 18px; margin: 0 2px; }

/* ---------- 复选框 ---------- */
.checkbox { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #D0D5DD; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s; }
.checkbox.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.checkbox.round-s { border-radius: 5px; }

/* ---------- 数量步进器 ---------- */
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stepper button { width: 28px; height: 26px; display: flex; align-items: center; justify-content: center; color: var(--text-2); background: #F7F8FA; }
.stepper button:active { background: #ECEEF2; }
.stepper input { width: 40px; height: 26px; border: none; text-align: center; font-size: 13px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* ---------- 空状态 ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-3); }
.empty img { width: 120px; height: 120px; margin-bottom: 14px; opacity: 0.9; }
.empty .empty-text { font-size: 13px; }
.empty .btn { margin-top: 16px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1000; }
.toast { background: rgba(31, 36, 48, 0.92); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; max-width: 70%; text-align: center; animation: toastIn .2s ease; }
.toast.toast-success { background: rgba(18, 161, 80, 0.95); }
.toast.toast-error { background: rgba(229, 72, 77, 0.95); }
@keyframes toastIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 对话框（粉紫主题） ---------- */
.mask { position: fixed; inset: 0; background: rgba(76, 29, 149, 0.35); z-index: 200; animation: fadeIn .12s; backdrop-filter: blur(2px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 310px; z-index: 201;
  padding: 24px 22px 18px; text-align: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FDF5FF 100%);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(124, 58, 237, 0.22);
  animation: popIn .12s ease;
}
@keyframes popIn { from { transform: translate(-50%, -48%) scale(0.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.dialog .dialog-title {
  font-size: 17px; font-weight: 700;
  background: linear-gradient(90deg, #8B5CF6, #EC4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dialog .dialog-text { font-size: 14px; color: var(--text-2); margin-top: 10px; line-height: 1.6; }
.dialog .dialog-actions { display: flex; gap: 10px; margin-top: 20px; }
.dialog .dialog-actions .btn { flex: 1; height: 42px; font-size: 14px; border-radius: 10px; }

/* ---------- 底部弹层 ---------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(76,29,149,0.35); z-index: 300; animation: fadeIn .12s; backdrop-filter: blur(2px); }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: linear-gradient(180deg,#fff,#FDF5FF); z-index: 301;
  border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(168,85,247,0.2);
  animation: sheetUp .15s ease;
}
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet .sheet-title { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 14px; }
.sheet .sheet-close { position: absolute; right: 14px; top: 12px; color: var(--text-3); }

/* ---------- 省市区选择器 ---------- */
.region-picker { max-height: 60vh; display: flex; flex-direction: column; }
.region-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-shrink: 0; }
.region-tabs .rtab { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; font-size: 13px; background: var(--bg); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-tabs .rtab.on { background: linear-gradient(135deg, #a78bfa, #f472b6); color: #fff; font-weight: 600; }
.region-tabs .rtab.done { background: rgba(167, 139, 250, 0.15); color: var(--primary); }
.region-tabs .rtab.disabled { opacity: 0.4; }
.region-list { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 180px; max-height: 46vh; }
.region-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 10px; font-size: 14px; }
.region-item:active { background: var(--bg); }
.region-item.on { color: var(--primary); font-weight: 600; background: rgba(167, 139, 250, 0.1); }

/* ---------- 订单卡片 ---------- */
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.order-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.order-status { color: var(--primary); font-weight: 600; }
.order-status.cancelled { color: var(--text-3); }
.order-status.refunded { color: var(--danger); }
.order-goods { padding: 10px 12px; display: flex; gap: 10px; }
.order-goods img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; background: #F0F2F5; }
.order-goods .og-body { flex: 1; min-width: 0; }
.order-goods .og-name { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-goods .og-spec { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.order-goods .og-price { font-size: 13px; color: var(--text-2); }
.order-goods .og-price b { color: var(--text); }
.order-amount { text-align: right; padding: 4px 12px 10px; font-size: 12px; color: var(--text-2); }
.order-amount b { color: var(--primary); font-size: 15px; margin-left: 4px; }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; border-top: 1px solid var(--line); padding-top: 10px; }

/* ---------- 订单状态进度 ---------- */
.steps { display: flex; padding: 18px 8px; background: var(--card); }
.steps .step { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--text-3); }
.steps .step::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: #E5E7EB; }
.steps .step:first-child::before { display: none; }
.steps .step .step-dot { width: 18px; height: 18px; border-radius: 50%; background: #E5E7EB; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; position: relative; z-index: 1; }
.steps .step.done .step-dot { background: var(--primary); }
.steps .step.done::before { background: var(--primary); }
.steps .step.active .step-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-weak); }
.steps .step.active { color: var(--primary); font-weight: 600; }

/* ---------- 优惠券 ---------- */
.coupon-card { display: flex; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 10px; }
.coupon-left { width: 96px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; position: relative; }
.coupon-left::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; background: var(--bg); border-radius: 50%; }
.coupon-left .c-amount { font-size: 22px; font-weight: 800; }
.coupon-left .c-amount small { font-size: 12px; }
.coupon-left .c-type { font-size: 10px; opacity: 0.9; }
.coupon-body { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.coupon-name { font-size: 14px; font-weight: 600; }
.coupon-threshold { font-size: 12px; color: var(--text-3); }
.coupon-time { font-size: 11px; color: var(--text-3); }
.coupon-right { display: flex; align-items: center; padding: 0 14px; }
.coupon-card.gray .coupon-left { background: #B8C0CC; }
.coupon-card.gray .coupon-name { color: var(--text-3); }

/* ---------- 客服对话 ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h)); padding-bottom: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 12px; }
.chat-bubble { display: flex; gap: 8px; margin-bottom: 14px; }
.chat-bubble .chat-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #F0F2F5; }
.chat-bubble .chat-content {
  max-width: 72%; background: #fff; border-radius: 12px; padding: 10px 12px;
  font-size: 14px; line-height: 1.6; box-shadow: var(--shadow); word-break: break-word; white-space: pre-wrap;
}
.chat-bubble.me { flex-direction: row-reverse; }
.chat-bubble.me .chat-content { background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; }
.chat-bubble.bot .chat-content { border-radius: 12px 12px 12px 2px; }
.chat-bubble .chat-time { font-size: 10px; color: var(--text-3); align-self: flex-end; }
.chat-input-bar {
  border-top: 1px solid var(--line); background: #fff; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
}
.chat-input-bar input { flex: 1; height: 40px; border-radius: 20px; border: 1px solid var(--line); padding: 0 14px; background: #F7F8FA; }
.chat-quick { display: flex; gap: 8px; padding: 8px 12px 2px; overflow-x: auto; background: var(--bg); }
.chat-quick span { flex-shrink: 0; padding: 5px 12px; background: #fff; border-radius: 14px; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow); cursor: pointer; }

/* ---------- FAQ 折叠 ---------- */
.faq-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.faq-q .faq-arrow { color: var(--text-3); transition: transform .2s; display: flex; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 14px 14px; font-size: 13px; color: var(--text-2); line-height: 1.8; }
.faq-item.open .faq-a { display: block; }

/* ---------- 工单 ---------- */
.ticket-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ticket-type { font-weight: 600; font-size: 14px; }
.ticket-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-reply { margin-top: 10px; background: var(--primary-weak); border-radius: 8px; padding: 10px; font-size: 13px; color: #7A4A00; }
.ticket-meta { margin-top: 8px; font-size: 11px; color: var(--text-3); }

/* ---------- 消息 ---------- */
.msg-item { display: flex; gap: 12px; padding: 14px; background: var(--card); border-bottom: 1px solid var(--line); cursor: pointer; }
.msg-item .msg-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.msg-item .msg-body { flex: 1; min-width: 0; }
.msg-item .msg-title { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.msg-item .msg-title b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item .msg-title .msg-time { font-size: 11px; color: var(--text-3); font-weight: 400; flex-shrink: 0; }
.msg-item .msg-summary { font-size: 12px; color: var(--text-3); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-item .msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-top: 5px; flex-shrink: 0; }
.msg-detail { padding: 16px; }
.msg-detail .md-title { font-size: 17px; font-weight: 600; text-align: center; }
.msg-detail .md-time { text-align: center; font-size: 12px; color: var(--text-3); margin: 8px 0 16px; }
.msg-detail .md-content { background: var(--card); border-radius: var(--radius); padding: 16px; font-size: 14px; line-height: 1.9; box-shadow: var(--shadow); white-space: pre-wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 9; }
.tabs .tab-item { flex: 1; text-align: center; padding: 12px 0; font-size: 14px; color: var(--text-2); position: relative; }
.tabs .tab-item.active { color: var(--text); font-weight: 600; }
.tabs .tab-item.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; border-radius: 2px; background: var(--primary); }
.tabs.scrollable { overflow-x: auto; }
.tabs.scrollable .tab-item { flex: none; padding: 12px 16px; }

/* ---------- 用户中心 ---------- */
.user-hero {
  background: linear-gradient(135deg, #1F2430 0%, #2A3245 60%, #3A2A1E 100%);
  color: #fff; padding: 24px 16px 20px; border-radius: 0 0 20px 20px;
}
.user-hero .u-top { display: flex; align-items: center; gap: 12px; }
.user-hero .u-avatar { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.6); background: #fff; }
.user-hero .u-name { font-size: 17px; font-weight: 600; }
.user-hero .u-phone { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.user-hero .u-level { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.user-hero .u-level-tag { background: linear-gradient(135deg, #FFB25E, var(--primary)); color: #fff; font-size: 11px; padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.user-hero .u-level-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.2); overflow: hidden; }
.user-hero .u-level-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFB25E, #FF8A2B); border-radius: 3px; transition: width .4s; }
.user-hero .u-points { font-size: 11px; opacity: 0.85; }
.user-order-short { display: flex; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 0; }
.user-order-short .uos-item { flex: 1; text-align: center; cursor: pointer; position: relative; }
.user-order-short .uos-item .uos-icon { color: var(--text); margin: 0 auto 4px; position: relative; }
.user-order-short .uos-item .uos-num { position: absolute; top: -6px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.user-order-short .uos-item .uos-text { font-size: 12px; color: var(--text-2); }

/* ---------- 地址 ---------- */
.address-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; display: flex; gap: 10px; }
.address-card .addr-main { flex: 1; min-width: 0; }
.address-card .addr-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.address-card .addr-phone { color: var(--text-2); font-weight: 400; font-size: 13px; }
.address-card .addr-detail { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.address-card .addr-ops { display: flex; align-items: center; gap: 16px; color: var(--text-3); font-size: 12px; }
.address-card .addr-ops span { cursor: pointer; display: flex; align-items: center; gap: 4px; }

/* ---------- 支付 ---------- */
.pay-amount-box { background: linear-gradient(135deg, #1F2430, #2A3245); color: #fff; text-align: center; padding: 30px 16px; border-radius: 0 0 20px 20px; }
.pay-amount-box .pa-label { font-size: 13px; opacity: 0.8; }
.pay-amount-box .pa-num { font-size: 40px; font-weight: 800; margin-top: 6px; }
.pay-amount-box .pa-num small { font-size: 20px; }
.pay-methods { margin: 14px 12px; }
.pay-method { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer; border: 2px solid transparent; }
.pay-method.active { border-color: var(--primary); }
.pay-method .pm-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; }
.pay-method .pm-body { flex: 1; }
.pay-method .pm-name { font-size: 14px; font-weight: 500; }
.pay-method .pm-desc { font-size: 11px; color: var(--text-3); }
.pay-fixed-btn { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); z-index: 90; }
.pay-result-icon { width: 76px; height: 76px; border-radius: 50%; background: #E7F7EF; color: var(--success); display: flex; align-items: center; justify-content: center; margin: 40px auto 16px; }
.pay-result-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 14px 12px; }
.pay-result-card .pr-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--text-2); }
.pay-result-card .pr-row b { color: var(--text); }

/* ---------- 卡密卡片 ---------- */
.card-secret { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; }
.card-secret .cs-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.card-secret .cs-row:last-child { border-bottom: none; }
.card-secret .cs-code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 14px; letter-spacing: 0.5px; word-break: break-all; }
.card-secret .cs-ops { display: flex; gap: 8px; flex-shrink: 0; }
.card-secret .cs-secret { font-size: 12px; color: var(--text-2); margin-top: 2px; word-break: break-all; font-family: monospace; }

/* ---------- 购物车项（含左滑删除） ---------- */
.cart-item { position: relative; overflow: hidden; }
.cart-main {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  transition: transform .2s ease; background: var(--card);
}
.cart-item.swiped .cart-main { transform: translateX(-76px); }
.swipe-del {
  position: absolute; right: 0; top: 0; bottom: 0; width: 76px;
  background: var(--danger); color: #fff; display: flex; align-items: center; justify-content: center;
  gap: 4px; font-size: 13px; flex-direction: column;
}

/* ---------- 开关控件 ---------- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 13px; background: #D0D5DD; transition: background .2s; cursor: pointer;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform .2s;
}
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- 深色模式 ---------- */
body.dark {
  --bg: #12151C;
  --card: #1C212B;
  --text: #E8EAEF;
  --text-2: #9AA3AF;
  --text-3: #6B7280;
  --line: #2A303C;
  --brand: #0D1017;
}
body.dark .navbar { background: rgba(28, 33, 43, 0.96); }
body.dark .tabbar { background: rgba(28, 33, 43, 0.97); border-top-color: var(--line); }
body.dark .search-bar { background: #232936; }
body.dark .search-page-top { background: var(--card); }
body.dark .filter-bar { background: var(--card); }
body.dark .tabs { background: var(--card); }
body.dark .cate-left { background: #171B24; }
body.dark .cate-left .cate-item.active { background: var(--bg); }
body.dark .cart-settle, body.dark .pay-fixed-btn, body.dark .pd-bar, body.dark .chat-input-bar, body.dark .pd-info, body.dark .pd-detail { background: var(--card); }
body.dark .stepper button { background: #232936; color: var(--text-2); }
body.dark .stepper input { background: var(--card); color: var(--text); }
body.dark .chat-bubble .chat-content { background: var(--card); }
body.dark .faq-q, body.dark .msg-detail .md-content, body.dark .pd-gallery { background: var(--card); }
body.dark .cart-item .cart-main, body.dark .cart-item, body.dark .order-card .order-goods { background: var(--card); }
body.dark .msg-item { background: var(--card); }

/* ---------- 启动页 / 引导页 ---------- */
.splash { position: fixed; inset: 0; z-index: 999; background: linear-gradient(160deg, #1F2430 0%, #2A2F3D 55%, #3D2A1B 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.splash .splash-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 12px 40px rgba(255, 106, 0, 0.35); animation: splashIn .6s ease; }
.splash .splash-name { font-size: 26px; font-weight: 800; margin-top: 20px; letter-spacing: 2px; }
.splash .splash-slogan { font-size: 13px; opacity: 0.75; margin-top: 8px; letter-spacing: 4px; }
@keyframes splashIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.guide-page { position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.guide-page .gp-icon { width: 140px; height: 140px; margin-bottom: 30px; }
.guide-page .gp-title { font-size: 24px; font-weight: 700; }
.guide-page .gp-desc { font-size: 14px; opacity: 0.8; margin-top: 12px; text-align: center; line-height: 1.7; padding: 0 40px; }
.guide-page .gp-dots { display: flex; gap: 8px; margin-top: 40px; }
.guide-page .gp-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.3); transition: all .3s; }
.guide-page .gp-dots i.active { width: 22px; background: #fff; }
.guide-page .gp-btn { margin-top: 40px; }

/* ---------- 登录页 ---------- */
.auth-hero { background: linear-gradient(135deg, #1F2430, #2A3245); color: #fff; padding: 48px 24px 60px; border-radius: 0 0 28px 28px; }
.auth-hero .ah-logo { width: 60px; height: 60px; border-radius: 16px; }
.auth-hero .ah-title { font-size: 24px; font-weight: 800; margin-top: 16px; }
.auth-hero .ah-sub { font-size: 13px; opacity: 0.7; margin-top: 6px; }
.auth-form { padding: 20px 20px 10px; margin-top: -24px; background: var(--bg); }
.third-login { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.third-login .tl-btn { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); background: #fff; }
.auth-links { display: flex; justify-content: space-between; padding: 14px 4px; font-size: 13px; color: var(--text-2); }


/* ---------- 第三方登录弹层（扫码 / 快捷授权）与绑定弹层 ---------- */
.qr-mask { position: fixed; inset: 0; background: rgba(20, 12, 40, 0.55); backdrop-filter: blur(3px); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.qr-box { width: 100%; max-width: 320px; background: linear-gradient(160deg, #FDF7FF 0%, #F5F0FF 100%); border-radius: 18px; box-shadow: 0 18px 48px rgba(109, 40, 217, 0.25); border: 1px solid rgba(139, 92, 246, 0.18); overflow: hidden; animation: qrIn .22s ease; }
@keyframes qrIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qr-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px 10px; font-size: 16px; font-weight: 800; color: #5B21B6; }
.qr-close { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(139, 92, 246, 0.12); color: #7C3AED; font-size: 16px; cursor: pointer; }
.qr-close:hover { background: rgba(139, 92, 246, 0.22); }
.qr-tabs { display: flex; margin: 0 18px; background: rgba(139, 92, 246, 0.1); border-radius: 10px; padding: 3px; }
.qr-tab { flex: 1; text-align: center; padding: 7px 0; font-size: 13px; color: var(--text-2); border-radius: 8px; cursor: pointer; transition: all .2s; }
.qr-tab.active { background: linear-gradient(135deg, #8B5CF6, #D946EF); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35); }
.qr-pane { padding: 14px 18px 18px; }
.qr-img-wrap { position: relative; display: flex; justify-content: center; padding: 6px 0 2px; }
.qr-img { width: 200px; height: 200px; border-radius: 12px; border: 1px solid rgba(139, 92, 246, 0.2); background: #fff; padding: 8px; box-shadow: 0 6px 18px rgba(109, 40, 217, 0.12); }
.qr-tip { font-size: 12px; color: var(--text-2); text-align: center; margin: 10px 0 12px; line-height: 1.7; }
.qr-tip .qr-refresh { color: var(--primary); cursor: pointer; font-weight: 700; }
.qr-status { font-size: 13px; }

/* ---------- 通用工具类 ---------- */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-10 { margin-bottom: 10px; } .mb-12 { margin-bottom: 12px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.py-10 { padding-top: 10px; padding-bottom: 10px; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { color: var(--primary); font-weight: 700; }
.price small { font-size: 11px; font-weight: 500; }
.load-more { text-align: center; padding: 16px; color: var(--text-3); font-size: 13px; }
.status-pending { color: var(--warning); }
.status-paid { color: var(--info); }
.status-shipped { color: var(--primary); }
.status-completed { color: var(--success); }
.status-cancelled { color: var(--text-3); }
.status-refunded { color: var(--danger); }

/* ============ 开通分站 ============ */
.branch-hero { text-align:center; padding:22px 16px 16px; }
.branch-hero-icon { width:56px; height:56px; margin:0 auto 10px; border-radius:16px; background:linear-gradient(135deg,#7C3AED,#5B21B6); display:flex; align-items:center; justify-content:center; color:#fff; }
.branch-hero-title { font-size:18px; font-weight:700; color:var(--text-1); }
.branch-hero-desc { font-size:12px; color:var(--text-3); margin-top:6px; line-height:1.6; }
.form-static { flex:1; text-align:right; color:var(--text-2); font-size:14px; word-break:break-all; }
.badge-ok { display:inline-block; padding:2px 10px; border-radius:99px; font-size:12px; background:rgba(16,185,129,.12); color:#10B981; }
.badge-off { display:inline-block; padding:2px 10px; border-radius:99px; font-size:12px; background:rgba(239,68,68,.12); color:#EF4444; }
.branch-done .form-card { margin-top:6px; }

/* ============ 分站类型选择 / 余额条 ============ */
.branch-type-picker { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:4px 4px 8px; }
.btp-item { border:1.5px solid var(--line); border-radius:14px; padding:14px 12px; cursor:pointer; transition:all .2s; position:relative; background:#fff; }
.btp-item.active { border-color:#7C3AED; background:rgba(124,58,237,.05); box-shadow:0 2px 12px rgba(124,58,237,.14); }
.btp-item.active::after { content:'✓'; position:absolute; top:8px; right:10px; color:#7C3AED; font-weight:700; }
.btp-ico { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; color:#7C3AED; background:rgba(124,58,237,.1); }
.btp-name { font-size:14px; font-weight:600; color:var(--text); margin-top:8px; }
.btp-price { font-size:17px; font-weight:700; color:#FF6A00; margin-top:2px; }
.btp-desc { font-size:11px; color:var(--text-3); margin-top:2px; }
.balance-bar { display:flex; align-items:center; justify-content:space-between; background:linear-gradient(135deg,#FFF7ED,#FFF1F2); border:1px solid #FFE0C0; border-radius:12px; padding:10px 14px; font-size:13px; color:var(--text-2); margin-bottom:12px; }
.balance-bar b { color:#FF6A00; font-size:15px; }
.badge-warn { display:inline-block; padding:2px 10px; border-radius:99px; font-size:12px; background:rgba(245,158,11,.14); color:#D97706; }
.branch-invite { background:linear-gradient(135deg,#F5F3FF,#EEF2FF); border:1px solid #DDD6FE; border-radius:12px; padding:12px 14px; font-size:12.5px; color:#5B21B6; line-height:1.8; margin-bottom:12px; }
.branch-invite .bi-link { font-family:Consolas,monospace; background:#fff; border:1px solid #DDD6FE; border-radius:8px; padding:6px 10px; margin-top:6px; word-break:break-all; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.branch-invite .bi-link button { flex-shrink:0; }

/* ===== 粉紫主题进入动画（已提速去延时） ===== */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
#view > * { animation: viewIn 0.22s ease both; }
body { animation: fadeIn 0.18s ease both; }
.admin-sidebar nav { animation: slideInL 0.28s ease both; }
.admin-sidebar nav .nav-item { animation: fadeIn 0.22s ease both; }
.admin-main > .panel, .admin-main > .card { animation: viewIn 0.24s ease both; }
.admin-modal-mask { animation: fadeIn 0.12s ease both; }
.admin-modal { animation: popIn 0.15s ease both; }

/* 通用弹窗（.modal-mask/.modal）：分站管理编辑/余额/重置密码等自建弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(76,29,149,0.35); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; animation: fadeIn 0.12s ease both; backdrop-filter: blur(2px); }
.modal {
  background: linear-gradient(180deg, #fff 0%, #FDF5FF 100%); border-radius: 18px; width: 620px; max-width: 100%;
  border: 1px solid rgba(168,85,247,0.18);
  box-shadow: 0 18px 50px rgba(124,58,237,0.2); animation: popIn .12s ease; margin-bottom: 40px;
}
.modal .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(168,85,247,0.14); font-size: 16px; font-weight: 700; background: linear-gradient(90deg, #8B5CF6, #EC4899); color: #fff; border-radius: 18px 18px 0 0; }
.modal .modal-body { padding: 18px 20px; max-height: 65vh; overflow-y: auto; }
.modal .modal-body .form-item { margin-bottom: 14px; }
.modal .modal-body .form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.modal .modal-body .form-item .input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px; background: #fff; }
.modal .modal-body .form-item .input:focus { border-color: var(--primary); }
