:root {
  --bg: #f4f6f9; --card: #fff; --line: #e5e7eb; --text: #1f2329; --muted: #8a919f;
  --primary: #2563eb; --primary-dark: #1d4ed8; --sidebar: #1e293b; --sidebar-text: #cbd5e1;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
.layout { display: flex; min-height: 100vh; }

.sidebar { width: 200px; background: var(--sidebar); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh; flex-shrink: 0; display: flex; flex-direction: column; }
/* 侧栏顶部品牌 LOGO（对齐原站 base.html 的 navbar-brand） */
.side-logo { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-decoration: none; flex: 0 0 auto; }
.side-logo-mark { width: 72px; height: auto; display: block; }
.side-logo-text { width: 76px; height: auto; display: block; }
.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 4px 0 14px; }
.menu-group { padding: 10px 16px 4px; font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
.menu-item { display: block; padding: 8px 16px; color: var(--sidebar-text); cursor: pointer; font-size: 13px; border-left: 3px solid transparent; }
.menu-item:hover { background: #334155; }
.menu-item.active { background: #334155; border-left-color: var(--primary); color: #fff; }

.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.spacer { flex: 1; }
.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 14px; }
.tab:hover { background: var(--bg); color: var(--text); }
.tab.active { background: var(--primary); color: #fff; }
/* 无平台权限的页签：灰掉 + 锁图标，点击给升级引导 */
.tab.locked { color: #b9c0cc; cursor: not-allowed; }
.tab.locked::after { content: '🔒'; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
.tab.locked:hover { background: transparent; color: #b9c0cc; }
.tab.locked.active { background: #c7cdd8; color: #fff; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fef3c7; color: #b45309; }

.content { padding: 16px 24px 48px; }
.crumb { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.crumb small { font-weight: 400; color: var(--muted); margin-left: 10px; }

.filter-bar { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; margin-bottom: 12px; }
.f-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-input { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; color: var(--text); }
.f-input:focus { outline: none; border-color: var(--primary); }
.f-input.grow { flex: 1; min-width: 180px; }
.f-input.num { width: 92px; }
.btn { height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; color: var(--text); }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger:hover { border-color: #dc2626; color: #dc2626; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }

.table-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
thead th { background: #fafbfc; font-weight: 600; cursor: pointer; user-select: none; position: sticky; top: 0; }
thead th.no-sort { cursor: default; }
thead th .arr { color: var(--muted); font-size: 11px; margin-left: 4px; }
thead th.sorted { color: var(--primary); }
tbody tr:hover { background: #f8faff; }
td.img img, td.img .ph { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; display: block; }
td.img .ph { background: linear-gradient(135deg, #e8ecf3, #d8dee9); }
td.img img { cursor: zoom-in; transition: transform .12s ease; }
td.img img:hover { transform: scale(1.08); }

/* 列表图片悬停放大预览：跟随鼠标的浮层，不拦截鼠标事件 */
.img-zoom { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none;
  width: 300px; height: 300px; border-radius: 10px; overflow: hidden; background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb); box-shadow: 0 12px 32px rgba(15,23,42,.22); }
.img-zoom img { width: 100%; height: 100%; object-fit: cover; display: block; }
td.title { min-width: 260px; max-width: 320px; white-space: normal; line-height: 1.5; }
td.title a { color: var(--text); text-decoration: none; cursor: pointer; }
td.title a:hover { color: var(--primary); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.up { color: #dc2626; } .down { color: #16a34a; }
.rank { color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; background: #eef2ff; color: var(--primary); border-radius: 10px; font-size: 12px; margin-right: 4px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.pager button { min-width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.pager button.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.panel h3 { font-size: 14px; margin-bottom: 12px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.bar-label { width: 60px; color: var(--muted); }
.bar-track { flex: 1; height: 10px; background: #eef1f5; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 5px; }
.bar-value { width: 80px; text-align: right; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 17px; font-weight: 600; margin-top: 2px; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal.hide { display: none; }
.modal-box { background: #fff; border-radius: 12px; padding: 20px; min-width: 360px; max-width: 520px; max-height: 80vh; overflow: auto; }
.modal-box h3 { margin-bottom: 12px; font-size: 15px; }
.modal-box .f-row { margin-bottom: 10px; }

.groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.groups .chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; cursor: pointer; background: #fff; }
.groups .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.quota { font-size: 12px; color: var(--muted); }

/* ===== 速卖通富筛选 ===== */
.stab-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }.stab { border: 0; background: transparent; padding: 6px 16px; border-radius: 6px 6px 0 0; cursor: pointer; color: var(--muted); font-size: 13px; text-decoration: none; }
.stab:hover { color: var(--text); background: var(--bg); }
.stab.active { color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--primary); border-radius: 0; }
.kw-mode { display: inline-flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); }
.kw-mode.hide { display: none; }
.kw-mode .radio { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.more-filters { border-top: 1px dashed var(--line); padding-top: 12px; }
.more-filters.hide { display: none; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px 20px; }
.fgroup { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.fg-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.fpresets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.preset { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--muted); }
.preset:hover { border-color: var(--primary); color: var(--primary); }
.preset.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.finputs { display: flex; align-items: center; gap: 6px; }
.finputs .f-input { width: 90px; height: 28px; }
.f-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ===== 速卖通产品详情 ===== */
.detail-head { display: flex; gap: 20px; }
.dh-img { width: 180px; height: 180px; flex-shrink: 0; }
.dh-img img, .dh-img .ph { width: 180px; height: 180px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.dh-img .ph { background: linear-gradient(135deg, #e8ecf3, #d8dee9); }
.dh-main { flex: 1; min-width: 0; }
.dh-title { font-size: 16px; margin-bottom: 8px; line-height: 1.4; }
.dh-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.dh-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; margin-bottom: 14px; }
.dh-meta .m { font-size: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.dh-meta .k { color: var(--muted); margin-right: 6px; }
.dh-meta .v { font-weight: 600; }
.dh-actions { display: flex; gap: 8px; }
.dh-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* 轻量提示 */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(10px);
  background: #1f2937; color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 9999; }
.toast.show { opacity: .95; transform: translateX(-50%) translateY(0); }
.dh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dh-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn.mini { padding: 2px 8px; font-size: 12px; text-decoration: none; }

/* ==== Temu 产品详情页 ==== */
.pd-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.pd-table th, .pd-table td { border: 1px solid var(--line, #e5e7eb); padding: 7px 10px; text-align: left; font-weight: normal; }
.pd-table th { background: rgba(127,127,127,.06); }
.pd-table td span.up, .pd-table td span.down { font-weight: 600; }
.qmark { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center;
  border-radius: 50%; background: #3b82f6; color: #fff; font-size: 11px; cursor: help; text-decoration: none; }
.badge-half { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  background: #9ca3af; color: #fff; font-size: 11px; vertical-align: middle; }
.video-link { margin-left: 8px; color: #38bdf8; font-size: 15px; text-decoration: none; }
.pd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #e5e7eb); margin: 18px 0 0; }
.pd-tab { padding: 8px 16px; font-size: 13px; color: var(--muted, #6b7280); text-decoration: none;
  border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; cursor: pointer; position: relative; }
.pd-tab.active { color: var(--primary, #2563eb); background: rgba(127,127,127,.07);
  border-color: var(--line, #e5e7eb); font-weight: 600; }
/* 外链 Tab（智能找货等）：与普通 Tab 区分开，避免被误认为已禁用 */
.pd-tab-ext { color: var(--primary, #2563eb); }
.pd-tab-ext:hover { background: rgba(37,99,235,.07); }
/* 右上角「付费」角标（对齐原站 icon-new1 橙色角标） */
.pd-tab .pay-badge { position: absolute; top: -3px; right: -2px; background: #f0ad4e; color: #fff;
  font-size: 9px; line-height: 1; padding: 2px 3px; border-radius: 3px; font-style: normal; font-weight: 600;
  transform: scale(.92); transform-origin: right top; pointer-events: none; }
.pd-pane { padding: 16px 2px; }
.pd-block { margin-bottom: 18px; }
.pd-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.pd-b { font-size: 13px; line-height: 1.7; }
.pd-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #e5e7eb); }
.pd-range { display: inline-flex; gap: 4px; margin-left: auto; }
.pd-range .btn.mini.active { background: var(--primary, #2563eb); color: #fff; }

/* ============ 速卖通 经营数据（对齐原站版式） ============ */
/* 原站 .details-header：浅灰底 + 边框，与下方内容合成一张卡片 */
.biz-card { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; overflow: hidden; background: var(--card, #fff); }
.biz-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-size: 13px; font-weight: 600;
  background: var(--bg, #fafafa); border-bottom: 1px solid var(--line, #e5e7eb); }
.biz-body { padding: 16px; }
.pd-why { color: #e5342a; font-weight: 400; font-size: 12px; text-decoration: none; }
.pd-why:hover { text-decoration: underline; }
.biz-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 14px; background: var(--bg, #f7f8fa); border: 1px solid var(--line, #e5e7eb); border-radius: 8px; }
.biz-bar .pd-range { margin-left: 0; }
.biz-sep { width: 1px; height: 20px; background: var(--line, #e5e7eb); }
.biz-daterange { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #8a93a5); font-size: 12px; }
.biz-daterange svg { flex: none; opacity: .65; }
.biz-date { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line, #e5e7eb);
  border-radius: 5px; background: var(--card, #fff); color: inherit; }
.biz-date:focus { outline: none; border-color: var(--primary, #2563eb); }
.biz-dash { color: var(--muted, #8a93a5); }
.biz-ok { padding: 4px 16px; }
.biz-chart { min-height: 240px; }
.biz-chart .legend { justify-content: center; }   /* 原站 Highcharts 图例居中 */
.biz-table-wrap { background: var(--card); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; overflow: auto; }
.biz-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.biz-table th, .biz-table td { padding: 7px 10px; border-bottom: 1px solid var(--line, #e5e7eb); text-align: right; }
.biz-table thead th { background: var(--bg, #f7f8fa); font-weight: 600; color: var(--muted, #8a93a5);
  position: sticky; top: 0; z-index: 2; }
.biz-table th:first-child, .biz-table td:first-child { text-align: left; position: sticky; left: 0; z-index: 1;
  background: var(--card, #fff); }
.biz-table thead th:first-child { z-index: 3; background: var(--bg, #f7f8fa); }
.biz-table tbody tr:hover td { background: rgba(127,127,127,.05); }
.biz-table tbody tr:hover td:first-child { background: rgba(127,127,127,.08); }
.biz-table .row-name { font-weight: 600; }
.biz-q { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  margin-left: 2px; border-radius: 50%; background: #38bdf8; color: #fff; font-size: 10px; line-height: 1;
  cursor: help; position: relative; vertical-align: 1px; }
.biz-q b { display: none; position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 240px; padding: 8px 10px; border-radius: 6px; background: #1f2937; color: #fff; font-size: 12px;
  font-weight: 400; line-height: 1.55; text-align: left; white-space: normal; z-index: 9; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.biz-q:hover b { display: block; }

/* 全局工具类 */
.hide { display: none !important; }

/* 我的关注：分组计数徽标 & 已下架提示 */
.groups .chip b { margin-left: 4px; font-weight: 500; opacity: .75; }
.groups .chip.active b { opacity: .9; }
.muted { color: var(--muted, #8a93a5); font-size: 12px; }

/* ==================== 会员模块 ==================== */
/* 顶栏用户区 */
.user-box { display: flex; align-items: center; }
.ubox { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 20px; cursor: pointer; }
.ubox:hover { background: var(--bg); }
.ubox .avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.ubox .umeta { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ubox .umeta b { font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubox .udue { color: var(--muted); }
.ubox .udue.warn { color: #dc2626; }
.ubox .ucaret { color: var(--muted); font-size: 10px; }
.umenu { position: absolute; right: 0; top: 40px; min-width: 148px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); padding: 5px; z-index: 40; }
.umenu a { display: block; padding: 7px 12px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: pointer; text-decoration: none; }
.umenu a:hover { background: var(--bg); }
.umenu a.danger { color: #dc2626; }
.umenu .usep { height: 1px; background: var(--line); margin: 4px 6px; }

/* 等级徽章 */
.gr-badge { display: inline-block; padding: 0 7px; height: 18px; line-height: 18px; border-radius: 9px; font-size: 11px; font-weight: 500;
  background: #eef1f5; color: #64748b; }
.gr-badge.gr-4 { background: #fef3c7; color: #b45309; }
.gr-badge.gr-9 { background: #ede9fe; color: #6d28d9; }
.gr-badge.gr-7, .gr-badge.gr-6, .gr-badge.gr-8 { background: #dbeafe; color: #1d4ed8; }
.tag-mini { margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #f1f5f9; color: #64748b; font-size: 11px; }

/* 登录/注册浮层 */
.auth-mask { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.auth-mask.hide { display: none; }
.auth-card { position: relative; width: 400px; max-width: 100%; background: #fff; border-radius: 14px; padding: 26px 28px 20px;
  box-shadow: 0 20px 60px rgba(15,23,42,.28); }
.auth-close { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border: 0; background: transparent;
  font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 6px; }
.auth-close:hover { background: var(--bg); color: var(--text); }
/* 登录门禁提示条（未登录时必须登录，浮层不可关闭） */
.auth-gate-tip { margin: -6px 0 14px; padding: 8px 10px; background: #fff7e6; border: 1px solid #ffe1a8; color: #a45b00;
  border-radius: 8px; font-size: 12.5px; line-height: 1.5; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-logo .alogo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.auth-logo b { display: block; font-size: 15px; }
.auth-logo small { color: var(--muted); font-size: 11px; }
.auth-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.auth-tab { border: 0; background: transparent; padding: 8px 16px; font-size: 13px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.af-label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.af-input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.af-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.af-row { display: flex; gap: 8px; }
.af-row .af-input { flex: 1; }
.af-row .btn { height: 38px; flex-shrink: 0; min-width: 106px; }
.af-between { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 2px; font-size: 12px; }
.af-between a { color: var(--primary); text-decoration: none; }
.af-check { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; }
.af-submit { width: 100%; height: 40px; margin-top: 16px; font-size: 14px; letter-spacing: 2px; }
.af-tip { min-height: 18px; margin-top: 8px; font-size: 12px; }
.af-tip.err { color: #dc2626; }
.af-tip.ok { color: #16a34a; }
.auth-foot { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot a { color: var(--primary); text-decoration: none; }
.auth-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--muted); line-height: 1.6; }
.auth-note code { background: #f1f5f9; padding: 1px 4px; border-radius: 3px; font-size: 11px; }

/* 未登录引导 */
.login-guide { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 56px 20px; text-align: center; }
.login-guide .lg-icon { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.login-guide h3 { font-size: 16px; margin-bottom: 8px; }
.login-guide code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; }

/* 升级会员页 */
.sec-title { font-size: 15px; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.sec-title small { font-size: 11px; font-weight: 400; color: var(--muted); }
.vip-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #1e293b, #334155); color: #e2e8f0; border-radius: 12px; padding: 18px 22px; }
.vip-hero.on { background: linear-gradient(120deg, #312e81, #4c1d95 55%, #6d28d9); }
.vh-left { display: flex; align-items: center; gap: 14px; }
.vh-avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex;
  align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.vh-name { font-size: 16px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.vh-sub { font-size: 12px; opacity: .82; }
.vh-sub .warn { color: #fca5a5; }
.vh-right { display: flex; gap: 26px; }
.vh-kv { font-size: 12px; opacity: .85; }
.vh-kv b { display: block; font-size: 17px; margin-top: 2px; }
.plan-groups { display: grid; gap: 14px; }
.plan-group { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.pg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.pg-head span { color: var(--muted); font-size: 11px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.plan-card { position: relative; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 14px 12px; cursor: pointer; transition: .15s; background: #fff; }
.plan-card:hover { border-color: #93c5fd; transform: translateY(-1px); }
.plan-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.plan-flag { position: absolute; right: 0; top: 0; background: var(--primary); color: #fff; font-size: 11px;
  padding: 1px 8px; border-radius: 0 9px 0 9px; }
.plan-flag.off { background: #f59e0b; }
.plan-days { font-size: 14px; font-weight: 600; }
.plan-days small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11px; }
.plan-price { margin: 8px 0 2px; }
.plan-price b { font-size: 22px; color: #b45309; }
.plan-price s { margin-left: 8px; font-size: 12px; color: var(--muted); }
.plan-per { font-size: 11px; color: var(--muted); }
.pay-box { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.pay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.pay-row:last-child { margin-bottom: 0; }
.pay-k { color: var(--muted); font-size: 12px; }
.pay-m { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.pay-m.disabled { opacity: .45; cursor: not-allowed; }
.pay-right { display: flex; align-items: center; gap: 16px; }
.pay-amount { font-size: 13px; color: var(--muted); }
.pay-amount b { font-size: 22px; color: #b45309; margin-left: 4px; }
.btn.lg { height: 40px; padding: 0 26px; font-size: 14px; }

/* 支付弹窗 */
.paym { display: flex; gap: 20px; align-items: flex-start; }
.paym-qr { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; display: flex; align-items: center; justify-content: center; min-width: 196px; min-height: 196px; }
.paym-info { flex: 1; font-size: 12px; line-height: 1.9; }
.paym-amount { font-size: 24px; font-weight: 700; color: #b45309; margin-bottom: 4px; }
.paym-line { color: var(--text); }
.paym-status { margin-top: 8px; color: var(--muted); }
.paym-info .ok { color: #16a34a; }
.paym-info .warn { color: #dc2626; }
/* 支付宝：跳转收银台的占位块 */
.paym-ali { width: 180px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.7; }
.paym-ali-logo { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  margin-bottom: 10px; border-radius: 12px; background: #1677ff; color: #fff; font-size: 26px; font-weight: 700; }
.paym-ali p { margin: 0; }
.paym-count { margin-top: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 权益对比表 */
.perm-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 520px; }
.perm-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: normal; }
.perm-table th, .perm-table td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.perm-table thead th { position: sticky; top: 0; background: #fafbfc; z-index: 2; cursor: default; }
.perm-table .pm-mod { background: #fafbfc; font-weight: 600; color: var(--text); vertical-align: top; width: 90px; }
.perm-table .pm-grade { text-align: center; width: 120px; }
.perm-table .pm-grade.gr-4 { color: #b45309; }
.perm-table .pm-grade.gr-9 { color: #6d28d9; }
.perm-table .pm-cell { text-align: center; }
.perm-table .yes { color: #16a34a; font-weight: 500; }
.perm-table .no { color: #d1d5db; }
.ord-table .mono, .mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.ok { color: #16a34a; } .warn { color: #dc2626; }

/* 会员中心 */
.acct-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.acct-card { flex: 1 1 420px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 18px; }
.acct-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.acct-row:last-child { border-bottom: 0; }
.acct-row span { color: var(--muted); }
.acct-stats { flex: 0 0 300px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.acct-stats .btn { grid-column: 1 / -1; height: 36px; }
.stat.ok .v { color: #16a34a; } .stat.warn .v { color: #dc2626; }
.quota-table .qbar { display: inline-block; width: 180px; height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.quota-table .qbar-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.acct-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }

/* ================= 数据读取过渡动画 ================= */
/* 顶部全局进度条：任一接口在途时显示，最后一个请求结束后淡出 */
.nprog { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .2s ease; overflow: hidden; }
.nprog.on { opacity: 1; }
.nprog::after { content: ''; display: block; width: 38%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), #60a5fa, transparent);
  animation: nprogRun 1s cubic-bezier(.45, .05, .55, .95) infinite; }

/* 骨架占位条 */
.sk { display: inline-block; height: 11px; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(90deg, #edf1f7 25%, #e0e6f1 37%, #edf1f7 63%);
  background-size: 400% 100%; animation: skShine 1.25s ease infinite; }
.sk-row > td { padding-top: 15px; padding-bottom: 15px; }
.sk-row:hover { background: transparent; }
.sk-block { border-radius: 10px; background: linear-gradient(90deg, #edf1f7 25%, #e0e6f1 37%, #edf1f7 63%);
  background-size: 400% 100%; animation: skShine 1.25s ease infinite; }

/* 表格容器加载态：顶部细进度条 */
.table-wrap.is-loading { position: relative; }
.table-wrap.is-loading::before { content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: barSlide .85s linear infinite; }

/* 行入场：逐行上浮淡入 */
tr.row-in { animation: rowIn .26s cubic-bezier(.22, .61, .36, 1) both; }
/* 视图切换：整块淡入 */
#view.fade > * { animation: viewIn .22s ease both; }

@keyframes nprogRun { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes skShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes barSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* 无障碍：跟随系统「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  .nprog::after, .sk, .sk-block, .table-wrap.is-loading::before { animation: none; }
  tr.row-in, #view.fade > * { animation: none; }
}

/* ===== 侧栏：说明图标（? 气泡）与关注配额括号 ===== */
.mi-help { display: inline-block; width: 14px; height: 14px; line-height: 14px; margin-left: 6px;
  border-radius: 50%; background: #38a3f1; color: #fff; font-size: 10px; font-style: normal;
  text-align: center; cursor: help; vertical-align: middle; font-weight: 700; }
.mi-quota { margin-left: 4px; color: #94a3b8; font-size: 12px; }

/* ===== Temu 经营数据（对齐原站 nav-time + 转置表格） ===== */
.biz-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.biz-day { display: inline-block; padding: 4px 14px; border: 1px solid var(--line, #e5e7eb);
  border-radius: 4px; color: var(--muted, #6b7280); text-decoration: none; font-size: 13px; cursor: pointer; }
.biz-day.active { background: #50b3f5; border-color: #50b3f5; color: #fff; }
.biz-range { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.biz-range input { border: 1px solid var(--line, #e5e7eb); border-radius: 4px; padding: 3px 6px;
  font-size: 12px; color: var(--text, #1f2329); background: #fff; }
.biz-range em { font-style: normal; color: var(--muted, #9ca3af); }
.biz-chart { margin: 8px 0 4px; }
.biz-wrap { margin-top: 14px; }
.biz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.biz-table th, .biz-table td { border: 1px solid var(--line, #e5e7eb); padding: 7px 10px; text-align: center; font-weight: normal; }
.biz-table thead th { background: rgba(127,127,127,.06); white-space: nowrap; }
.biz-table tbody th { text-align: left; white-space: nowrap; background: rgba(127,127,127,.04); }
.biz-corner { position: relative; min-width: 92px; height: 34px; padding: 0 !important; }
.biz-corner .biz-name { position: absolute; left: 10px; top: 4px; }
.biz-corner .biz-time { position: absolute; right: 10px; bottom: 4px; }

/* ================= 企业中心（子账号 / 组织架构 / 平台 / 店铺） ================= */
/* 顶部提示条：对齐原站 childaccount 的绿色 alert */
.ent-tip { background: #f0f9eb; border: 1px solid #d7efc2; color: #4b7a2b; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.ent-tip b { color: #2f7a20; font-weight: 600; margin: 0 2px; }

/* 表格：12 列，紧凑、可横向滚动 */
.ent-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ent-table thead th { background: #f7f8fa; color: #4b5563; font-weight: 600; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ent-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f3f6; color: var(--text); vertical-align: middle; }
.ent-table tbody tr:hover td { background: #fafbfd; }
.ent-table .ent-ck { width: 34px; text-align: center; }
.ent-table .ent-ops { white-space: nowrap; }
.ent-table .ent-acc { color: #2563eb; }
.ent-ell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-on { color: #16a34a; }
.ent-off { color: #dc2626; }

/* 行内小按钮（对齐原站 btn-primary / btn-success / btn-warning 三色） */
.ent-btn { height: 24px; padding: 0 9px; font-size: 12px; line-height: 22px; border-radius: 4px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: #475569; margin-right: 4px; }
.ent-btn:hover { border-color: var(--primary); color: var(--primary); }
.ent-btn.ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.ent-btn.ok:hover { background: #15803d; color: #fff; }
.ent-btn.warn { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ent-btn.warn:hover { background: #d97706; color: #fff; }

/* 批量操作条 */
.ent-batch { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ent-batch .btn.ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.ent-batch .btn.ok:hover { background: #15803d; color: #fff; }
.ent-batch .btn.warn { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ent-batch .btn.warn:hover { background: #d97706; color: #fff; }
.ent-batch-tip { font-size: 12px; color: var(--muted); }

/* 弹窗表单 */
.ent-lb { display: inline-block; width: 76px; flex: 0 0 76px; font-size: 13px; color: #4b5563; }
.ent-req { color: #dc2626; font-style: normal; }
.modal-box .f-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ent-modal-foot { justify-content: flex-end; margin-top: 16px; margin-bottom: 0 !important; }
.ent-check-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; background: #fcfcfd; }
.ent-check { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 2px; cursor: pointer; }
.ent-check.disabled { opacity: .55; cursor: not-allowed; }
.ent-check .ent-acc { color: var(--muted); font-size: 12px; }
.ent-taken { font-size: 11px; color: #dc2626; margin-left: 6px; }
.ent-delp { font-size: 13px; color: #4b5563; margin-bottom: 4px; }
/* 子账号 12 列：宽表横向滚动 + 操作列吸附右侧（避免按钮被裁） */
.ent-table.wide { min-width: 1280px; }
.ent-table th.ent-ops, .ent-table td.ent-ops { position: sticky; right: 0; background: #fff;
  box-shadow: -8px 0 10px -10px rgba(15, 23, 42, .35); z-index: 2; }
.ent-table thead th.ent-ops { background: #f7f8fa; }
.ent-table tbody tr:hover td.ent-ops { background: #fafbfd; }
.ent-table.wide + .pager, .ent-table + .pager { margin-top: 14px; }
.ent-table .ent-nowrap { white-space: nowrap; }

/* 企业子账号标记（主账号与子账号账号名相近，标出来避免混淆） */
.ubox .umeta .uchild { font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 4px;
  background: #eef2ff; color: #4338ca; border: 1px solid #dfe3ff; font-style: normal; }

/* 登录弹窗顶部：改用站点 LOGO（牛头标志）+ 品类说明 */
.auth-logo .alogo-img { width: 46px; height: 46px; object-fit: contain; display: block; flex: 0 0 46px; }
.auth-logo b { letter-spacing: .5px; }
.auth-logo small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
