/* ============================================================
   电商平台竞品店铺数据追踪系统 - 公共样式
   扁平化橙白配色 / 移动端+PC端自适应
   本程序由【小马克程序定制】设计与制作，如有售后和开发需求，官网：https://xiaomaker.cn
   ============================================================ */

:root {
  --orange: #ff6a00;
  --orange-dark: #e85d00;
  --orange-light: #ff8c33;
  --orange-bg: #fff5ea;
  --orange-border: #ffd9a8;
  --white: #ffffff;
  --gray-1: #f7f7f9;
  --gray-2: #eceef1;
  --gray-3: #d0d4da;
  --gray-text: #6b7280;
  --text: #1f2329;
  --text-sub: #8a8f99;
  --green: #16a34a;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow: 0 2px 12px rgba(255, 106, 0, .08);
  --radius: 10px;
  --nav-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-1);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; display: block; }

/* ============ 导航栏 ============ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--orange-border);
  box-shadow: var(--shadow);
}
.navbar .nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  padding: 0 18px; display: flex; align-items: center; justify-content: space-between;
}
.navbar .logo {
  font-size: 17px; font-weight: 700; color: var(--orange); white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.navbar .logo .logo-dot {
  width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--orange), var(--orange-light));
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 800;
}
.navbar .menu { display: flex; align-items: center; gap: 4px; }
.navbar .menu a {
  padding: 8px 14px; border-radius: 8px; color: var(--text); font-weight: 500;
  transition: all .18s;
}
.navbar .menu a:hover { background: var(--orange-bg); color: var(--orange); }
.navbar .menu a.active { background: var(--orange); color: #fff; }
.navbar .nav-toggle { display: none; }

/* ============ 容器 ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 22px 18px 60px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; font-weight: 700; }
.page-head .sub { color: var(--text-sub); font-size: 13px; margin-top: 4px; }

/* ============ 卡片 ============ */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 16px; }

/* ============ 网格 ============ */
.grid { display: grid; gap: 16px; }
.grid-shop { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-prod { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ============ 店铺卡片 ============ */
.shop-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; text-align: center; cursor: pointer; transition: transform .18s, box-shadow .18s;
  border: 1px solid transparent;
}
.shop-card:hover { transform: translateY(-3px); border-color: var(--orange-border); box-shadow: 0 8px 24px rgba(255,106,0,.14); }
.shop-card .avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--orange-bg); object-fit: cover; border: 2px solid var(--orange-border);
}
.shop-card .avatar-ph {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--orange-bg); color: var(--orange); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--orange-border);
}
.shop-card .name { font-weight: 600; font-size: 15px; color: var(--text); }
.shop-card .display-name { color: var(--text-sub); font-size: 12px; margin-top: 2px; }
.shop-card .meta { display: flex; justify-content: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--gray-text); }
.shop-card .tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--orange-bg); color: var(--orange); margin-top: 8px;
}

/* ============ 商品卡片 ============ */
.prod-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s;
  border: 1px solid transparent;
}
.prod-card:hover { transform: translateY(-3px); border-color: var(--orange-border); }
.prod-card .thumb {
  width: 100%; aspect-ratio: 1/1; background: var(--gray-2); object-fit: cover;
}
.prod-card .thumb-ph { width: 100%; aspect-ratio: 1/1; background: var(--gray-2); display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 13px; }
.prod-card .body { padding: 10px 12px 12px; }
.prod-card .title { font-size: 13px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 40px; }
.prod-card .price { color: var(--orange); font-weight: 700; margin-top: 6px; font-size: 15px; }
.prod-card .meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-sub); }

/* ============ 小开关（链接单独采集开关） ============ */
.switch-mini {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 3px 8px; border-radius: 12px; font-size: 12px;
  border: 1px solid #f0c9a8; background: #fff7ee; color: #ff6a00;
  user-select: none; transition: background .15s, color .15s, border-color .15s;
}
.switch-mini input { margin: 0; width: 12px; height: 12px; accent-color: #ff6a00; cursor: pointer; }
.switch-mini:has(input:not(:checked)) {
  background: #f4f5f7; color: #8a8f99; border-color: #e1e3e7;
}

/* ============ 统计块 ============ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-box {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; border-left: 3px solid var(--orange);
}
.stat-box .num { font-size: 24px; font-weight: 700; color: var(--orange); }
.stat-box .label { color: var(--text-sub); font-size: 12px; margin-top: 2px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; 
/*  min-width: 560px; */
}
table.tbl th, table.tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--gray-2); font-size: 13px; }
table.tbl th { background: var(--orange-bg); color: var(--text); font-weight: 600; white-space: nowrap; }
table.tbl tr:hover td { background: #fffaf5; }
table.tbl td.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 标签徽章 ============ */
.badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 20px; line-height: 1.6; white-space: nowrap; }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-green { background: #e7f7ee; color: var(--green); }
.badge-gray { background: var(--gray-2); color: var(--gray-text); }
.badge-red { background: #fdeaea; color: var(--red); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500; transition: all .18s; white-space: nowrap;
  background: var(--gray-2); color: var(--text);
}
.btn:hover { opacity: .9; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: #fff; border: 1px solid var(--orange-border); color: var(--orange); }
.btn-outline:hover { background: var(--orange-bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger { background: #fdeaea; color: var(--red); }
.btn-block { width: 100%; }

/* ============ 输入框 ============ */
.input, .select, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-3); border-radius: 8px;
  font-size: 14px; color: var(--text); background: #fff; outline: none; transition: border .18s;
  font-family: inherit;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--orange); }
textarea.input { resize: vertical; min-height: 80px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); font-size: 13px; }

/* ============ 搜索栏 ============ */
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar .input { flex: 1; min-width: 160px; }

/* ============ 分页 ============ */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager .btn { min-width: 38px; }

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 50px 20px; color: var(--text-sub); }
.empty .icon { font-size: 40px; margin-bottom: 10px; opacity: .5; }

/* ============ 评分星 ============ */
.stars { color: var(--orange); letter-spacing: 1px; }
.stars .off { color: var(--gray-3); }

/* ============ 加载 ============ */
.loading { text-align: center; padding: 30px; color: var(--text-sub); }
.dot-loading { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--orange-border); border-top-color: var(--orange); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--gray-2); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; color: var(--text-sub); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ============ 商品详情历史时间线 ============ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--orange-border); }
.timeline .item { position: relative; margin-bottom: 16px; }
.timeline .item::before { content: ''; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--orange-border); }

/* ============ 图集 ============ */
.img-gallery { display: flex; gap: 8px; flex-wrap: wrap; }
.img-gallery img, .img-gallery .img-ph {
  width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-2); background: var(--gray-2); cursor: pointer;
}
.img-ph { display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 11px; }

/* ============ 柱状图(纯CSS) ============ */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 4px; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-chart .bar { width: 70%; background: linear-gradient(var(--orange), var(--orange-light)); border-radius: 6px 6px 0 0; min-height: 2px; transition: height .3s; }
.bar-chart .bar-label { font-size: 10px; color: var(--text-sub); white-space: nowrap; }

/* ============ 行分布 ============ */
.star-dist { display: flex; flex-direction: column; gap: 6px; }
.star-dist .row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.star-dist .row .lbl { width: 46px; color: var(--orange); }
.star-dist .row .track { flex: 1; height: 10px; background: var(--gray-2); border-radius: 6px; overflow: hidden; }
.star-dist .row .fill { height: 100%; background: var(--orange); border-radius: 6px; }
.star-dist .row .cnt { width: 40px; text-align: right; color: var(--text-sub); }

/* ============ 模态框 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal .modal-head { padding: 16px 20px; border-bottom: 1px solid var(--gray-2); font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal .modal-body { padding: 20px; }
.modal .modal-foot { padding: 14px 20px; border-top: 1px solid var(--gray-2); display: flex; justify-content: flex-end; gap: 10px; }
.modal .close-btn, .modal .modal-close { cursor: pointer; color: var(--text-sub); font-size: 21px; line-height: 1; background: none; border: none; padding: 0 2px; }
.modal .close-btn:hover, .modal .modal-close:hover { color: var(--text); }

/* ---------- 应用内确认框（替代原生 window.confirm，2026-10-01） ----------
   原来 46 处破坏性操作直接用浏览器原生弹窗：样式是浏览器 chrome（跟站内橙白主题完全两层皮）、
   而且会阻塞整个 JS 线程。这里用站内 .modal 重新做一套。
   z-index 取 500：高于 .modal-mask(200)、低于 tooltip(999)，保证从已打开的弹窗里再弹确认时压在最上面。 */
.cf-mask { z-index: 500; }
.cf-modal { max-width: 420px; }
.cf-modal .modal-body { padding: 18px 20px; }
.cf-p { margin: 0 0 9px; font-size: 14px; line-height: 1.75; color: var(--text); }
.cf-p:last-child { margin-bottom: 0; }
/* 破坏性操作的确认按钮用**实心红**：比 .btn-danger（淡红底）更醒目，
   同时和「取消」拉开对比 —— 不能让用户顺手点到确认。 */
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; }

/* ============ 后台布局 ============ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side { width: 216px; background: #1f2329; color: #cbd0d8; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; transition: width .18s ease; }
.admin-side .side-logo { padding: 18px; font-size: 16px; font-weight: 700; color: var(--orange); border-bottom: 1px solid #2a2f37; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.admin-side .side-menu { flex: 1 1 auto; padding: 6px 0; }
.admin-side .side-menu a { display: flex; align-items: center; gap: 12px; line-height: 1; padding: 12px 18px; color: #cbd0d8; border-left: 3px solid transparent; transition: background .15s, color .15s; white-space: nowrap; }
.admin-side .side-menu a svg { flex: 0 0 auto; display: block; }
.admin-side .side-menu a span { line-height: 1.2; }
.admin-side .side-menu a:hover { background: #2a2f37; color: #fff; }
.admin-side .side-menu a.active { background: #2a2f37; color: var(--orange); border-left-color: var(--orange); }
.admin-main { flex: 1; min-width: 0; background: var(--gray-1); }
.admin-top { height: var(--nav-h); background: #fff; border-bottom: 1px solid var(--gray-2); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 50; }
.admin-top .crumb { font-size: 15px; font-weight: 600; }
.admin-content { padding: 20px; }

/* ============ 独立 API 文档页（api/api-doc.html，无侧边栏、免登录） ============ */
.doc-page { min-height: 100vh; background: var(--gray-1); }
.doc-top { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--gray-2); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-top .doc-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.doc-top .doc-note { font-size: 12px; color: var(--text-sub); }
.doc-body { max-width: 1180px; margin: 0 auto; padding: 22px 24px 60px; }
@media (max-width: 760px) {
  .doc-top { padding: 12px 14px; }
  .doc-body { padding: 16px 14px 40px; }
}

/* ============ 后台技术支持 ============ */
.tech-support {
  position: fixed; right: 14px; bottom: 14px; z-index: 150; text-align: center;
}
.tech-support .ts-text { font-size: 12px; color: var(--text-sub); cursor: help; padding: 4px 8px; }
.tech-support .ts-tip {
  display: none; position: absolute; bottom: 24px; right: 0; width: 240px;
  background: #1f2329; color: #fff; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.7; text-align: left;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.tech-support:hover .ts-tip { display: block; }
.tech-support .ts-tip a { color: var(--orange-light); }

/* ============ 登录页 ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fff5ea 0%, #ffe7cf 100%); padding: 20px; }
.login-box { background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(255,106,0,.18); padding: 34px; width: 100%; max-width: 380px; }
.login-box .lb-logo, .register-box .lb-logo { text-align: center; margin-bottom: 22px; }
.login-box .lb-logo .dot, .register-box .lb-logo .dot { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), var(--orange-light)); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 800; }
.login-box .lb-logo h2, .register-box .lb-logo h2 { font-size: 18px; color: var(--text); margin: 0; }
.login-box .lb-logo p, .register-box .lb-logo p { font-size: 12px; color: var(--text-sub); margin-top: 6px; margin-bottom: 0; }

/* ============ 站点 Logo 位（后台可配置 site_logo）============
   约定：<方框 data-logo-box> 里放一个 [data-brand-dot] 占位 + 一个 <img data-brand-logo>。
   没配 Logo 时显示占位色块（站点名首字），配了就把 .has-logo 打开、换成图片。
   这几处都是「站点标识」出现的位置：登录页 / 注册页 / 官网 / 用户端侧边栏 / 后台侧边栏。 */
[data-logo-box] .brand-img { display: none; }
[data-logo-box].has-logo .brand-img { display: block; }
[data-logo-box].has-logo [data-brand-dot] { display: none; }
/* 登录页 / 注册页：方形 Logo，居中 */
.lb-mark { display: block; }
.lb-mark .brand-img { width: 56px; height: 56px; object-fit: contain; margin: 0 auto 10px; border-radius: 12px; }
/* 侧边栏：小尺寸方形 Logo，与菜单项左对齐 */
.brand-mark {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff6a00, #ff8c33);
  color: #fff; font-size: 14px; font-weight: 800;
}
.brand-mark.has-logo { background: none; }
.brand-mark .brand-img { width: 100%; height: 100%; object-fit: contain; }
/* 官网头部：稍大 */
.site-logo .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 17px; }

/* ============ 注册须知（登录页 / 注册页）============ */
.notice-body { white-space: pre-wrap; font-size: 13px; line-height: 1.95; color: var(--text); max-height: 64vh; overflow-y: auto; }
.notice-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.7; color: var(--text-sub); cursor: pointer; }
.notice-check input { width: 15px; height: 15px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--orange); cursor: pointer; }
.notice-check a, .notice-link { color: var(--orange); text-decoration: none; border-bottom: 1px dashed rgba(255,106,0,.5); }
.notice-check a:hover, .notice-link:hover { border-bottom-style: solid; }
.notice-foot { margin-top: 14px; text-align: center; font-size: 12px; color: var(--text-sub); line-height: 1.8; }
.login-tip { text-align: center; margin-top: 14px; font-size: 12px; color: var(--text-sub); }
.login-tip b { color: var(--orange); }

/* ============ 注册页：邀请码醒目领取入口 ============ */
.invite-cta {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; margin-bottom: 10px; cursor: pointer;
  border: 1px dashed var(--orange); border-radius: 9px; background: var(--orange-bg);
  color: var(--orange); font-size: 13px; font-weight: 700; line-height: 1; transition: all .15s;
}
.invite-cta:hover { background: var(--orange); color: #fff; border-style: solid; }
.invite-cta svg { display: block; flex: 0 0 auto; }
.invite-cta .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e53e3e; animation: blink 1.2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.invite-input { max-width: 230px; }
/* 从好友邀请链接进入（?invite=xxx）时，CTA 变为「已完成」静态提示 */
.invite-cta-done,
.invite-cta:disabled {
  cursor: default; border-style: solid; border-color: #c6ecd3; background: #eaf7ee; color: #15803d;
}
.invite-cta-done:hover { background: #eaf7ee; color: #15803d; }
/* 邀请来源提示条 */
.invite-banner {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px;
  border-radius: 9px; background: var(--orange-bg); border: 1px solid var(--orange-border);
  color: #b45309; font-size: 12.5px; line-height: 1.6;
}
.invite-banner svg { flex: 0 0 auto; }
.invite-banner b { color: var(--orange); letter-spacing: 1px; }

/* ============ API文档 ============ */
.api-block { border: 1px solid var(--gray-2); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.api-block .api-head { background: var(--orange-bg); padding: 12px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.api-block .method { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.api-block .method.get { background: #dbeafe; color: var(--blue); }
.api-block .method.post { background: #e7f7ee; color: var(--green); }
.api-block .path { font-family: monospace; font-size: 13px; color: var(--text); word-break: break-all; }
.api-block .api-body { padding: 14px 16px; }
.api-block .api-body h4 { margin: 10px 0 6px; font-size: 13px; color: var(--orange); }
.api-block pre { background: #1f2329; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 12px; line-height: 1.6; }
.api-block table.params { width: 100%; font-size: 12px; }
.api-block table.params th, .api-block table.params td { padding: 6px 8px; border-bottom: 1px solid var(--gray-2); text-align: left; }
/* 采集对接文档按「数据类型」分组（链接详情 / 评论 / 店铺 / 关键词），每组含拉取 + 回推两个接口 */
.api-group { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; margin: 24px 0 10px; }
.api-group:first-of-type { margin-top: 18px; }
.api-group .g-no {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
}

/* ============ Toast ============ */
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 300; padding: 10px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.15); opacity: 0; transition: opacity .25s, top .25s; pointer-events: none; }
.toast.show { opacity: 1; top: 80px; }
.toast.success { background: #e7f7ee; color: var(--green); }
.toast.error { background: #fdeaea; color: var(--red); }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .navbar .nav-toggle { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
  .navbar .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .navbar .menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0; background: #fff; flex-direction: column;
    border-bottom: 1px solid var(--orange-border); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .25s; gap: 0;
  }
  .navbar .menu.open { max-height: 320px; }
  .navbar .menu a { padding: 12px 18px; border-radius: 0; }
  .navbar .menu a.active { background: var(--orange-bg); color: var(--orange); }

  .admin-side { width: 64px; }
  /* 窄屏等价于折叠态：只留 Logo 方框，别把 .brand-mark 也一起隐藏（它本身是 span） */
  .admin-side .side-logo .side-logo-name { display: none; }
  .admin-side .side-logo { justify-content: center; padding: 18px 6px; }
  .admin-side .side-menu a { padding: 12px; text-align: center; font-size: 11px; }
}
@media (max-width: 520px) {
  .grid-shop, .grid-prod { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .page-head h1 { font-size: 18px; }
  .stat-box .num { font-size: 20px; }
  .img-gallery img, .img-gallery .img-ph { width: 64px; height: 64px; }
}

/* ============ 用户端补充 ============ */
.top-user { font-size: 13px; font-weight: 600; color: var(--text); }
.top-credit { font-size: 12px; background: var(--orange-bg); color: var(--orange); padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-grid .stat-box { margin: 0; padding: 16px; background: #fff; border: 1px solid var(--gray-2); border-radius: 10px; }
.key-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--orange-bg); border-radius: 8px; padding: 10px 14px; font-family: monospace; font-size: 13px; word-break: break-all; }
.key-line .key-val { flex: 1; min-width: 200px; }
.step-list { counter-reset: step; padding-left: 0; list-style: none; }
.step-list li { position: relative; padding-left: 36px; margin-bottom: 14px; counter-increment: step; }
.step-list li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
/* 注意：文件顶部 img{display:block} 是全局的，块级元素不受 text-align:center 影响。
   凡依赖居中的图片容器，必须显式给图片加 margin:0 auto，否则会偏左（宽度差的一半）。 */
.qr-box { text-align: center; padding: 10px; }
.qr-box img { width: 200px; height: 200px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--gray-2); margin: 0 auto; }
.login-links { margin-top: 12px; font-size: 13px; color: var(--text-sub); display: flex; justify-content: space-between; }
.login-links a { color: var(--orange); text-decoration: none; }

/* ============ 马克数据 SaaS 扩展：图标按钮 / 悬浮提示 / 分页 ============ */
svg.feather { vertical-align: middle; }
.icon-fallback { font-size: 11px; }

/* 侧边导航图标对齐 */
.side-menu a { display: flex; align-items: center; gap: 12px; }
.side-menu a svg.feather { flex: 0 0 auto; display: block; }
.side-logo { display: flex; align-items: center; gap: 10px; }

/* ============ 侧边栏折叠 / 展开 + 底部客服 ============ */
.admin-side .side-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid #2a2f37; }
.side-cs {
  flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; white-space: nowrap;
  background: #262b33; color: #f0b98a; border: 1px solid #343a44; transition: all .15s;
}
.side-cs:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.side-cs svg { flex: 0 0 auto; display: block; }
.side-toggle {
  flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #262b33; color: #9aa2ad; border: 1px solid #343a44; transition: all .15s;
}
.side-toggle:hover { color: var(--orange); border-color: var(--orange); }
.side-toggle svg { display: block; }

/* 折叠态：只留图标 */
.admin-side.collapsed { width: 64px; }
.admin-side.collapsed .side-logo { justify-content: center; padding: 18px 6px; }
/* 折叠态只留 Logo 方框，隐藏站点名文字。
   注意选择器必须精确到 .side-logo-name：Logo 方框本身也是 <span>（.brand-mark），
   用「> span:not(...)」会连方框一起隐藏掉。 */
.admin-side.collapsed .side-logo > .side-logo-name { display: none; }
.admin-side.collapsed .side-menu a { justify-content: center; gap: 0; padding: 12px 0; }
.admin-side.collapsed .side-menu a span { display: none; }
.admin-side.collapsed .side-foot { flex-direction: column; padding: 10px 6px; }
.admin-side.collapsed .side-cs { width: 100%; padding: 10px 0; }
.admin-side.collapsed .side-cs span { display: none; }

/* ============ 侧边栏底部账户区（昵称 / 剩余积分 / 授权有效期 / 退出）============
   位置：导航菜单下方、联系客服按钮上方。
   结构：.side-account（容器）
           ├── a.sa-main     上半部分，整块可点，通往会员中心
           │     ├── span.sa-user   昵称
           │     ├── span.sa-item   剩余积分
           │     └── span.sa-item   授权有效期
           └── button.sa-logout     退出登录
   （原来这套信息堆在页面右上角，现按需求整体搬到侧边栏最下方） */
.admin-side .side-account {
  flex: 0 0 auto; margin: 0 10px 4px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  background: #262b33; border: 1px solid #343a44; border-radius: 10px;
}
.admin-side .side-account .sa-main {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 5px 9px; border-radius: 8px;
  text-decoration: none; color: inherit; transition: background .15s;
}
.admin-side .side-account .sa-main:hover { background: #2f353e; }
.side-account .sa-user {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 12px; font-weight: 700; color: #e8ebef;
  padding-bottom: 7px; border-bottom: 1px dashed #3a414b;
}
.side-account .sa-user svg { flex: 0 0 auto; display: block; }
.side-account .sa-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-account .sa-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.side-account .sa-k { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #8b939e; white-space: nowrap; }
.side-account .sa-k em { font-style: normal; }
.side-account .sa-k svg { display: block; flex: 0 0 auto; }
.side-account .sa-v {
  font-size: 13px; font-weight: 800; color: #f0b98a; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.side-account .sa-v.is-warn { color: #ff8f8f; }
.side-account .sa-short { display: none; }
.side-account .sa-logout {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-family: inherit;
  background: #2b3138; color: #c3cad3; border: 1px solid #363d46;
  transition: color .15s, border-color .15s, background .15s;
}
.side-account .sa-logout:hover { color: #ff8f8f; border-color: #8d5555; background: #332a2a; }
.side-account .sa-logout svg { display: block; flex: 0 0 auto; }
/* 折叠态：上下堆叠、隐藏文字标签，只留图标与数值，日期缩短为 MM-DD */
.admin-side.collapsed .side-account { margin: 0 6px 4px; padding: 6px; gap: 4px; }
.admin-side.collapsed .side-account .sa-main { padding: 2px; gap: 6px; }
.admin-side.collapsed .side-account .sa-user { justify-content: center; padding-bottom: 5px; }
.admin-side.collapsed .side-account .sa-user-name { display: none; }
.admin-side.collapsed .side-account .sa-item { flex-direction: column; gap: 2px; align-items: center; }
.admin-side.collapsed .side-account .sa-k em { display: none; }
.admin-side.collapsed .side-account .sa-v { font-size: 11px; }
.admin-side.collapsed .side-account .sa-full { display: none; }
.admin-side.collapsed .side-account .sa-short { display: inline; }
.admin-side.collapsed .side-account .sa-logout { padding: 8px 0; }
.admin-side.collapsed .side-account .sa-logout span { display: none; }

/* 客服二维码弹窗 */
.cs-qr-box { text-align: center; padding: 4px 0 0; }
.cs-qr-box img { width: 220px; height: 220px; object-fit: contain; border-radius: 10px; border: 1px solid var(--gray-2); background: #fff; margin: 0 auto; }
.cs-qr-box .cs-qr-ph { width: 220px; height: 220px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--gray-3, #d7dbe2); border-radius: 10px; color: var(--text-sub); font-size: 13px; padding: 0 18px; line-height: 1.7; }
.cs-title { font-weight: 700; font-size: 14px; margin-bottom: 14px; }

/* 顶部用户信息图标对齐 */
.top-user, .top-credit { display: inline-flex; align-items: center; gap: 4px; }
/* 顶部授权状态提示（未开通 / 已到期 / 即将到期），点击直达会员中心 */
.top-lic {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.top-lic.warn { background: #fdecec; color: #dc2626; }
.top-lic.warn:hover { background: #fbd5d5; color: #b91c1c; }
.top-lic.soon { background: #fff4e8; color: #b45309; }
.top-lic.soon:hover { background: #ffe6cc; color: #92400e; }

/* 图标按钮（操作列）
   【2026-10-01 统一描边框】原来只有 primary/success 带彩色边框，其余用的是
   --gray-2(#eceef1) 的浅灰框 —— 在白色表格里几乎看不见，一列图标长得像"裸图标"，
   密度和观感都不齐。现在**所有操作区的图标按钮统一为主题橙描边 + 橙色图标**，
   悬浮时整块填充橙色（与主按钮同一套语言），一眼就能看出"这里可以点"。
   语义差异不再靠边框颜色区分，只保留两个例外：
     · 立即采集（success）例外保留下方的绿色悬浮填充 —— 与"删除"形成对照；
     · 删除（danger）悬浮填充红色 —— 破坏性操作在按下前给一次颜色预警。
   边框全部是主题橙，所以整列仍然是统一的一套。 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; margin: 0 2px;
  border: 1px solid var(--orange-border); background: #fff; color: var(--orange);
  border-radius: 7px; cursor: pointer; transition: all .15s; vertical-align: middle;
}
.icon-btn:hover { border-color: var(--orange); color: #fff; background: var(--orange); }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
/* 下面三个类名保留（全站模板都在用），边框与基础样式一致，只覆盖悬浮填充色 */
.icon-btn-primary { color: var(--orange); border-color: var(--orange-border); }
.icon-btn-primary:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.icon-btn-danger { color: var(--orange); border-color: var(--orange-border); }
.icon-btn-danger:hover { border-color: var(--red); color: #fff; background: var(--red); }
.icon-btn-success { color: var(--orange); border-color: var(--orange-border); }
.icon-btn-success:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* 悬浮提示 */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(3px);
  background: rgba(30, 30, 34, .94); color: #fff; font-size: 12px; line-height: 1.4;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; visibility: hidden; transition: all .15s; z-index: 999; font-weight: 400;
}
[data-tip]::before {
  content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgba(30, 30, 34, .94);
  opacity: 0; visibility: hidden; transition: all .15s; z-index: 999;
}
[data-tip]:hover::after, [data-tip]:hover::before { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* 分页条 */
.pager-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pager-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pager-jump { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-sub); }
.pager-input { width: 62px; height: 30px; padding: 2px 8px; text-align: center; }
.pager-info { margin-right: 6px; }
.pager-bar .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 客服图标按钮（输入框内嵌） */
.field-icon-wrap { position: relative; }
.field-icon-wrap .input { padding-right: 40px; }
.field-icon-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; background: transparent; color: var(--orange);
  cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.field-icon-btn:hover { background: var(--orange-bg); }

/* 客服二维码弹层 */
.cs-pop { text-align: center; }
.cs-pop img { width: 220px; height: 220px; object-fit: contain; border-radius: 10px; border: 1px solid var(--gray-2); background: #fff; margin: 0 auto; }
.cs-tip-text { font-size: 13px; color: var(--text-sub); margin: 10px 0 12px; line-height: 1.7; }

/* 积分中心购买卡密卡片 */
.recharge-grid { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .recharge-grid { grid-template-columns: 1fr; } }
.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 会员中心（credits.html）============
   两块新内容：① 系统授权使用费（授权卡 + 套餐 + 兑换）；② 邀请奖励（邀请码 + 规则 + 明细）*/

/* 兑换行：输入框 + 三个按钮（立即兑换 / 联系客服购买 / 扫码自助购买）排在同一行
   桌面端一行放下，窄屏自动换行，避免三行堆叠把页面撑高 */
.buy-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.buy-line .input { flex: 1 1 220px; max-width: 320px; }
.buy-line .buy-actions { flex: 0 1 auto; }

/* 账户概览卡：剩余积分 + 系统授权有效期并排放在页面最前面
   （需求：积分信息前置并与授权时间放一起；采集单价不再展示）
   突出处理：数值放大到 40px / 800 字重 / 橙色，标签加左侧色条，
   让它成为整页第一眼就能抓住的两个数字。 */
.acct-card { margin-bottom: 16px; }
.acct-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0; }
.acct-item { min-width: 0; padding: 6px 26px 6px 16px; position: relative; }
.acct-item::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: var(--gray-3, #d7dbe2);
}
.acct-item:first-child::before { background: linear-gradient(180deg, #ff8c33, #ff6a00); }
.acct-item + .acct-item { border-left: 1px solid var(--gray-2, #eef0f3); padding-left: 26px; padding-right: 0; }
.acct-k {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: var(--text-sub); letter-spacing: .3px;
}
.acct-v {
  font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: .5px;
  margin: 8px 0 0; color: var(--text); font-variant-numeric: tabular-nums;
}
.acct-item:first-child .acct-v { color: var(--orange); }
/* 授权生效时到期日用主色，失效/未开通用红色 */
.acct-v.is-ok { color: #16a34a; }
.acct-v.is-warn { color: var(--red, #dc2626); }
.acct-sub { font-size: 12px; color: var(--text-sub); line-height: 1.8; margin-top: 6px; }

/* ---- 剩余积分旁的「计费说明」小图标 ----
   数值是 40px 大字号，图标若按普通 inline 排会贴在数字基线下方显得飘；
   所以数值与图标放进 flex 行并垂直居中。 */
.acct-v-row { display: flex; align-items: center; gap: 9px; }
.bill-btn {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-3, #d7dbe2); border-radius: 50%;
  background: #fff; color: var(--text-sub); line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.bill-btn:hover { color: var(--orange); border-color: var(--orange); background: #fff8f2; }
.bill-btn svg { width: 15px; height: 15px; }

/* ---- 积分计费说明弹窗 ---- */
/* 兑换比例单独放大：用户最先想确认的是"我的钱能换多少积分" */
.bill-rate {
  text-align: center; padding: 14px 12px; border-radius: 10px;
  background: #fff8f2; border: 1px solid var(--orange-border, #ffd9b8);
}
.bill-rate-v { font-size: 22px; font-weight: 800; color: var(--orange); letter-spacing: .5px; }
.bill-rate-t { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.7; }
/* 「不成功不扣积分」单独用绿色强调条，不混在单价表里 */
.bill-key {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  padding: 10px 12px; border-radius: 8px; background: #f0fdf4;
  border: 1px solid #bbe7c9; color: #15803d; font-size: 12.5px; line-height: 1.8;
}
.bill-key svg { flex: 0 0 auto; margin-top: 2px; }
.bill-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-sub); line-height: 2; }
/* 注：账户概览卡下方的 .acct-actions 按钮行已按需求整体迁到「兑换码兑换」卡内
   （购买授权卡 / 购买积分卡 / 套餐介绍 / 兑换记录 紧跟在「立即兑换」后面），
   这里不再保留该行的样式，避免留下无元素匹配的死代码。 */
/* 「购买积分卡」用绿色实心：授权卡=品牌橙（系统授权使用费），积分卡=绿（采集成本消耗费） */
.btn-buy-credit {
  background: #16a34a; border: 1px solid #16a34a; color: #fff;
}
.btn-buy-credit:hover { background: #15803d; border-color: #15803d; color: #fff; }
@media (max-width: 760px) {
  .acct-grid { grid-template-columns: 1fr; }
  .acct-item { padding: 6px 0 6px 14px; }
  .acct-item + .acct-item { border-left: 0; border-top: 1px solid var(--gray-2, #eef0f3); padding-top: 16px; margin-top: 16px; padding-left: 14px; }
  .acct-v { font-size: 32px; }
}

/* ============ 兑换码兑换（页面独立模块，不再收在按钮/弹窗里）============
   一行里承载「输入码 → 立即兑换 → 买卡/查套餐/查记录」的完整闭环：
   四个动作按钮紧跟在「立即兑换」后面，用户输码时就能看到去哪里拿码。
   按钮宽度交给内容撑开（flex:0 1 auto），窄屏整行换行，不会压扁输入框。 */
.redeem-mod { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.redeem-mod .input {
  flex: 1 1 220px; max-width: 380px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
}
.redeem-mod .btn { min-width: 118px; justify-content: center; }
/* 兑换动作与购买动作之间的竖分隔线；窄屏换行后它会孤立在行尾，所以直接隐藏 */
.redeem-sep { width: 1px; align-self: stretch; min-height: 26px; background: var(--gray-2, #eef0f3); margin: 0 2px; }
@media (max-width: 1000px) { .redeem-sep { display: none; } }

/* ============ 邀请好友：链接行与操作按钮分行，避免元素挤压 ============ */
.inv-block { display: flex; flex-direction: column; gap: 12px; }
.inv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-row .inv-label { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
/* 邀请码单独占位，等宽数字，避免和按钮抢空间时被压扁 */
.inv-row .inv-code { flex: 0 0 auto; min-width: 132px; text-align: center; }
/* 按钮组：窄屏时可整组换到下一行，不会把邀请码挤变形 */
.inv-row .inv-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-meta {
  display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-sub); line-height: 1.9;
}
.inv-meta b { color: var(--text); }
.inv-meta .inv-total b { color: var(--orange); }

/* 卡片内标题行：左标题 + 右操作（会员中心邀请卡 / 积分明细卡） */
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-head h3 { margin: 0; font-size: 15px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
/* 邀请码一行展示 */
.inv-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 授权状态大卡 */
.lic-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lic-hero-main { flex: 1 1 320px; min-width: 260px; }
.lic-hero .lic-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; font-weight: 700; }
.lic-hero .lic-expire { font-size: 22px; font-weight: 800; margin: 8px 0 2px; letter-spacing: .5px; }
.lic-hero .lic-sub { font-size: 12px; color: var(--text-sub); line-height: 1.8; }
.lic-hero-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* 剩余天数进度条 */
.lic-bar { height: 8px; border-radius: 99px; background: var(--gray-2, #eef0f3); overflow: hidden; margin: 12px 0 6px; max-width: 460px; }
.lic-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff8c33, #ff6a00); transition: width .4s; }
.lic-bar.warn > i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.lic-bar.danger > i { background: linear-gradient(90deg, #f87171, #dc2626); }

/* 授权提示条（未开通 / 已过期 / 即将到期） */
.lic-alert { border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.8; margin: 0 0 16px; }
.lic-alert.danger { background: #fdecec; color: #b91c1c; border: 1px solid #f7c9c9; }
.lic-alert.warn { background: #fff6e8; color: #b45309; border: 1px solid #ffe0b8; }
.lic-alert.ok { background: #eaf7ee; color: #15803d; border: 1px solid #c6ecd3; }

/* 套餐卡片 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.plan-item {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--gray-2, #e9ecf1); border-radius: 12px; background: #fff;
  padding: 18px 16px 16px; transition: box-shadow .15s, border-color .15s;
}
.plan-item:hover { border-color: #ffc79a; box-shadow: 0 6px 18px rgba(255, 106, 0, .1); }
.plan-item.recommend { border-color: var(--orange, #ff6a00); box-shadow: 0 6px 18px rgba(255, 106, 0, .14); }
.plan-item .plan-badge {
  position: absolute; top: -10px; right: 14px; background: var(--orange, #ff6a00); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap;
}
.plan-item .plan-name { font-size: 15px; font-weight: 700; }
.plan-item .plan-price { font-size: 26px; font-weight: 800; color: var(--orange, #ff6a00); line-height: 1.1; }
.plan-item .plan-price small { font-size: 12px; font-weight: 500; color: var(--text-sub); margin-left: 4px; }
.plan-item .plan-meta { font-size: 12px; color: var(--text-sub); line-height: 1.8; flex: 1 1 auto; }
.plan-item .btn { margin-top: 4px; }
/* 套餐卡下方的「购买」按钮：撑满卡片宽度，三张卡的按钮底部对齐（.plan-meta 是 flex:1 撑开的） */
.plan-item .btn-buy-plan { width: 100%; justify-content: center; }

/* 邀请码 / 邀请链接 */
.inv-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 800;
  letter-spacing: 2px; color: var(--orange, #ff6a00);
  background: #fff6ee; border: 1px dashed #ffc79a; border-radius: 8px; padding: 8px 16px;
}
.inv-link-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.inv-link-row .input { flex: 1 1 300px; font-size: 12px; }
.inv-stat { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.inv-rule { font-size: 13px; line-height: 1.9; color: var(--text-sub); background: #fafbfc; border: 1px solid var(--gray-2, #eef0f3); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; }

/* 双栏布局（原「积分流水 / 邀请明细」两栏用）
   需求要求左右并列；窄屏（<=1024px）自动堆叠成一列，避免表格被压扁。
   注：V8 起邀请明细与积分流水已迁到会员中心 credits.html，这里保留样式供其它页面复用 */
.profile-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1024px) { .profile-split { grid-template-columns: 1fr; } }
.split-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ============ 采集明细（collect.html）============
   批次进度条 + 关键词概览；表格其余部分复用通用 .tbl / .cell-media 样式 */
.batch-line { padding: 10px 0; border-bottom: 1px dashed var(--gray-2, #eef0f3); }
.batch-line:last-of-type { border-bottom: 0; }
.batch-line .bl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-bottom: 7px; }
.batch-line .bl-num { font-weight: 700; color: var(--text); }
.batch-line .bl-track { height: 8px; border-radius: 99px; background: #f1f3f6; overflow: hidden; }
.batch-line .bl-track i { display: block; height: 100%; border-radius: 99px; background: var(--orange); transition: width .35s; }
.batch-line.is-ok .bl-track i { background: var(--green, #16a34a); }
.batch-line.is-run .bl-track i { background: linear-gradient(90deg, var(--orange), #ffb066); }
.batch-kw {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--orange-bg, #fff6ee);
  font-size: 12px; color: var(--text-sub); line-height: 1.9;
}
.batch-kw b { color: var(--text); }

/* ============ 关键词追踪（keywords.html）============
   顶部四步流程说明：让用户一眼看懂"填完之后会发生什么" */
.kw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.kw-step {
  display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.7;
  color: var(--text-sub); background: #fafbfc; border: 1px solid var(--gray-2, #eef0f3);
  border-radius: 10px; padding: 10px 12px;
}
.kw-step b {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--orange);
  color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ============ 数据中心（data.html）============
   图表全部为原生 SVG / DOM 手绘，这里只负责容器与网格布局 */
.data-grid { display: grid; gap: 14px; margin-bottom: 16px; align-items: stretch; }
.data-grid.two { grid-template-columns: 2fr 1fr; }
.data-grid.even { grid-template-columns: 1fr 1fr; }
.data-grid.three { grid-template-columns: repeat(3, 1fr); }
/* 同一行里两张卡高度差很大时（例如"库存健康度 3 条柱" vs "价格分象限 散点+计数"），
   默认的 align-items:stretch 会把矮的那张拉到和高的同高，内容顶在上方、底下空一大片，
   看着像加载失败。这一类行改成各按自身内容高度排。 */
.data-grid.start { align-items: start; }
@media (max-width: 1180px) { .data-grid.two, .data-grid.even, .data-grid.three { grid-template-columns: 1fr; } }

/* 时间范围切换（分段控件） */
.range-tabs { display: inline-flex; align-items: center; align-self: center; background: #f2f4f7; border-radius: 8px; padding: 3px; gap: 2px; }
.range-tabs button {
  border: 0; background: transparent; font-family: inherit; font-size: 13px; color: var(--text-sub);
  padding: 6px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.range-tabs button:hover { color: var(--text); }
.range-tabs button.active { background: #fff; color: var(--orange); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* 图表容器：SVG 自适应宽度 */
.chart-box { width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); margin-top: 10px; line-height: 1.8; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.chart-empty { padding: 40px 10px; text-align: center; color: var(--text-sub); font-size: 13px; }

/* 平台分布：环形图 + 图例并排（2026-10-01）
   为什么必须限宽：环形图的 viewBox 是 1:1 的「0 0 156 156」，
   而 .chart-box svg 是 width:100%、height:auto —— 在「最近采集动态(2fr) + 平台分布(1fr)」
   这一行里，平台列内容宽约 350px，于是 SVG 被拉成 350×350 的正方形，
   整行高度被顶到 400px+，把「最近采集动态」一起撑高（它的自然高度只有 ~190px）。
   平台分布只回答"哪几个平台、各占多少"，信息量很小，不配占这么大一块。
   → 限成 160px 方图，图例挪到右侧竖排；卡片高度由邻居决定，图在里面垂直居中。
   实测：环形图 350×350 → 160×160，「最近采集动态」所在行高度回到由列表自己决定。 */
.plat-wrap { display: flex; align-items: center; gap: 16px; }
.chart-donut { flex: 0 0 auto; width: 160px; max-width: 160px; }
/* 卡片被 grid 拉到和邻居一样高时，缩小的环形图如果顶在上方、空白全堆在底下会显得空荡
   —— 让它垂直居中。 */
.plat-card { display: flex; flex-direction: column; }
.plat-card > h3 { flex: 0 0 auto; }
.plat-card .plat-wrap { flex: 1 1 auto; }
.chart-legend-col { flex: 1 1 auto; min-width: 0; flex-direction: column; flex-wrap: nowrap; gap: 6px; margin-top: 0; }
/* 窄屏（媒体查询已把网格压成一列）时并排会挤，改回上下堆叠并居中 */
@media (max-width: 640px) {
  .plat-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
  .chart-donut { margin: 0 auto; }
  .chart-legend-col { flex-direction: row; flex-wrap: wrap; }
}

/* 横向条形（站点分布 / 价格区间 / 活跃店铺） */
.hbar { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.hb-name { flex: 0 0 92px; font-size: 12px; color: var(--text-sub); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { flex: 1 1 auto; height: 10px; border-radius: 99px; background: #f1f3f6; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 99px; transition: width .35s; }
.hb-val { flex: 0 0 auto; min-width: 62px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text); }

/* 排行榜 / 动态列表 */
.mini-list { display: flex; flex-direction: column; }
.mini-list .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--gray-2, #eef0f3); }
.mini-list .row:last-child { border-bottom: 0; }
.mini-list .rank {
  flex: 0 0 22px; height: 22px; border-radius: 6px; background: #f4f5f7; color: var(--text-sub);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.mini-list .rank.top { background: var(--orange); color: #fff; }
.mini-list .txt { flex: 1 1 auto; min-width: 0; }
.mini-list .txt b { display: block; font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .txt small { display: block; font-size: 11px; color: var(--text-sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .val { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--orange); }

/* ============ 列表主图缩略图 ============ */
.tbl-thumb { display: inline-block; vertical-align: middle; object-fit: cover; border-radius: 6px; border: 1px solid var(--gray-2); background: #fff; flex: 0 0 auto; }
.tbl-thumb-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--gray-1, #f6f7f9); color: #b9bfc9; border-style: dashed; }
.tbl-thumb-ph svg { display: block; }
/* 图片槽：加载失败时 img 隐藏，露出虚线占位底，避免破图 */
.tbl-thumb-slot { display: inline-block; vertical-align: middle; flex: 0 0 auto; position: relative; overflow: hidden; border-radius: 6px; border: 1px dashed var(--gray-2); background: var(--gray-1, #f6f7f9); }
.tbl-thumb-slot .tbl-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.cell-media { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-media .cell-text { min-width: 0; }
.recharge-qr { text-align: center; padding: 14px; background: #fffaf4; border: 1px dashed #f3c7a8; border-radius: 10px; }
.recharge-qr img { width: 170px; height: 170px; object-fit: contain; border-radius: 8px; margin: 0 auto; }

/* 带图标的普通按钮 */
.btn-has-icon { display: inline-flex; align-items: center; gap: 5px; }

/* ============ 通用小字提示 / 等宽字（原仅定义在 logs.html，提到全局） ============ */
.mini-tip { font-size: 12px; color: var(--text-sub); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ============ 店铺 ↔ 商品链接 双向关联 ============
   店铺页「链接数」可点击 → 锁定该店铺下的链接；链接页「所属店铺」可点击 → 回看店铺信息 */
.link-num {
  color: var(--orange); text-decoration: none;
  border-bottom: 1px dashed rgba(255, 106, 0, .5); cursor: pointer;
}
.link-num:hover { color: #e05f00; border-bottom-style: solid; }
.shop-link {
  color: var(--text); font-weight: 600; text-decoration: none;
  border-bottom: 1px dashed var(--gray-3, #c9cfd8); cursor: pointer;
}
.shop-link:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* ============ 系统设置页：真瀑布流布局（admin/settings.html） ============
   ⚠️ 这里曾经用 CSS 多列（column-width）实现，但多列的本质是「填满第一列再填第二列」，
   浏览器会为平衡两侧高度而在列尾留白，导致「同一竖排上下两张卡的间隔」看起来被旁边卡片的高度带偏。
   现在由 JS（App.masonry）+ 绝对定位实现真瀑布流：
     · 按 DOM 顺序，每张卡放进「当前最矮的那一列」；
     · 同列相邻卡片的间距恒等于 gap（16px），与任何其他卡片的高度无关。
   CSS 只负责兜底：JS 未执行/失败时回落到多列（.settings-grid 本身仍保留 column-width）。 */
.settings-grid {
  column-width: 420px;
  column-gap: 16px;
  display: block;
}
/* JS 接管后关掉多列，由绝对定位排布（避免两套布局互相干扰） */
.settings-grid.masonry-on {
  column-width: auto;
  column-count: auto;
  column-gap: 0;
  position: relative;
}
.settings-grid.masonry-on > * {
  position: absolute;
  /* 卡片位置由 JS 写内联样式；断行相关的属性一律失效 */
  break-inside: auto;
  -webkit-column-break-inside: auto;
}
/* 卡片：上下间隔统一由 margin-bottom 提供（JS 接管后改由 top 偏移控制，内联 margin 会归零） */
.settings-grid .card {
  padding: 0;
  margin: 0 0 16px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  /* 避免卡片内部出现 margin 越界导致列高计算异常 */
  overflow: visible;
}
/* 清掉 .card + .card 的 margin-top，否则同一列里第 2 张起会被多顶 16px */
.settings-grid .card + .card { margin-top: 0; }
/* 末张卡片的 margin-bottom 在分列高度里可能被吞掉，这里兜底，保证与操作条至少 16px */
.settings-grid .card:last-child { margin-bottom: 16px; }

/* 注意：以下 .card-title / .card-body 必须限定在 .settings-grid 内。
   admin/apikeys.html 自带同名 .card-title（无内边距，配合 .card-head-row 使用），
   若不限定作用域，这里的 padding 会泄漏过去、把那边卡片标题顶歪。 */
.settings-grid .card-title {
  padding: 15px 18px 0; font-size: 14px; font-weight: 700;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.settings-grid .card-title-tip { font-size: 12px; font-weight: 400; color: var(--text-sub); }
.settings-grid .card-body { padding: 13px 18px 18px; }
.field-hint { font-size: 12px; line-height: 1.8; color: var(--text-sub); margin-top: 10px; }
.switch-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.switch-line input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); cursor: pointer; }

/* 注册须知内容框：默认文案是多段落纯文本，行高放大、允许纵向拉伸 + 手动拖高 */
.notice-textarea {
  min-height: 260px;
  font-size: 12.5px;
  line-height: 1.8;
  resize: vertical;
  font-family: inherit;
}

/* 会员授权 / 邀请奖励：统计条与统计小卡
   用途：后台 settings.html、users.html 顶部的一排数字指标（生效中 / 已过期 / 累计奖励…）。
   注意：在 .settings-grid 内会自动换行；在弹窗表格上方用 margin-bottom 控制间距。 */
.lic-stat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.lic-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  min-width: 84px; padding: 8px 12px; border-radius: 8px;
  background: var(--gray-2, #f4f5f7); border: 1px solid transparent;
}
.lic-chip b { font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--text, #222); }
.lic-chip i { font-size: 11px; font-style: normal; color: var(--text-sub, #8a8f99); margin-top: 2px; white-space: nowrap; }
.lic-chip.c-green  { background: #eaf7ee; } .lic-chip.c-green b  { color: #16a34a; }
.lic-chip.c-orange { background: #fff4e8; } .lic-chip.c-orange b { color: var(--orange, #ff6a00); }
.lic-chip.c-red    { background: #fdecec; } .lic-chip.c-red b    { color: #dc2626; }

/* 二维码编辑：左预览 + 右表单 */
.qr-edit { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-edit-preview { flex: 0 0 auto; text-align: center; }
.qr-edit-label { font-size: 12px; color: var(--text-sub); margin-top: 8px; }
.qr-edit-form { flex: 1 1 240px; min-width: 220px; }

/* 底部操作条：多列容器的高度不含末张卡片的 margin-bottom（实测间距为 0），
   所以这里补回 16px，保证与瀑布流末尾保持一致的视觉间隔 */
.settings-actions {
  margin-top: 16px; padding: 14px 18px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* ============ 系统设置：顶部 tab 分组（2026-10-01 重构） ============
   原来 11 张卡片平铺在一个瀑布流里（.settings-grid 走 column-width 多列 + JS 绝对定位排布），
   找一项设置要在整屏里来回扫，所以按维度切成 6 个 tab。
   注意：卡片标题样式（.settings-grid .card-title 等）是**限定在 .settings-grid 内**的，
   所以每个 tab 面板里仍然保留一层 .settings-grid —— 只是把它从"多列瀑布流"改成普通网格。 */
.set-tabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.set-tab {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--white); border: 1px solid var(--gray-2); border-left: 3px solid transparent;
  border-radius: 10px; box-shadow: var(--shadow); transition: all .15s;
  font-family: inherit;
}
.set-tab:hover { border-color: var(--orange-border); border-left-color: var(--orange-border); }
.set-tab:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.set-tab.active {
  border-color: var(--orange-border); border-left-color: var(--orange);
  background: var(--orange-bg);
}
.set-tab-name { font-size: 14px; font-weight: 700; color: var(--text); }
.set-tab.active .set-tab-name { color: var(--orange); }
.set-tab-tip { font-size: 12px; color: var(--text-sub); line-height: 1.5; }

.set-panel { display: none; }
.set-panel.active { display: block; }
/* tab 内不再用瀑布流：面板切换时那套绝对定位会留下错位的空白 */
.set-panel .settings-grid {
  column-width: auto; column-count: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 16px; align-items: start;
}
/* 网格里卡片之间的间距由 gap 提供，卡片自身的 margin 会叠加成双倍间距 */
.set-panel .settings-grid .card { margin: 0; }
.set-panel .settings-grid .card:last-child { margin-bottom: 0; }
/* 表格型卡片（采集方式 / 触发器）横向内容多，让它独占整行 ——
   否则被挤进半列时表头会被压成竖排、读不出来 */
.set-panel .settings-grid .card.wide { grid-column: 1 / -1; }

/* ============ 控制台：新手引导清单 ============
   做成可点的整行（点哪一步就去哪一页），完成的打勾并压暗 ——
   让"还剩几步"一眼可见，而不是给一大段说明文字让人自己读。 */
.guide-list { display: flex; flex-direction: column; gap: 2px; }
.guide-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px;
  border-radius: 8px; text-decoration: none; color: inherit; transition: background .15s;
}
.guide-item:hover { background: var(--gray-1); }
.guide-dot {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--gray-2); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.guide-item.done .guide-dot { border-color: #16a34a; background: #16a34a; }
.guide-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.guide-txt b { font-size: 13px; font-weight: 600; color: var(--text); }
.guide-txt small { font-size: 11.5px; color: var(--text-sub); line-height: 1.5; }
.guide-item.done .guide-txt b { color: var(--text-sub); text-decoration: line-through; }

/* ============ 商品对比表 ============
   一列一个商品、一行一个指标。首列吸左 + 表头吸顶 ——
   横向滚动到第 8 款商品时，如果指标名列跟着滚走，剩下的数字就没人认识了。 */
.cmp-wrap { overflow: auto; max-height: 62vh; }
.cmp-tbl th, .cmp-tbl td { white-space: nowrap; vertical-align: middle; }
.cmp-tbl .cmp-k {
  position: sticky; left: 0; z-index: 2; background: var(--gray-1);
  text-align: left; font-weight: 600; color: var(--text-sub); min-width: 92px;
}
.cmp-tbl thead th { position: sticky; top: 0; z-index: 3; background: var(--white); }
.cmp-tbl thead .cmp-k { z-index: 4; background: var(--gray-1); }
.cmp-tbl .cmp-h { text-align: center; min-width: 132px; }
.cmp-tbl .cmp-h a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-decoration: none; }
.cmp-tbl .cmp-t { font-size: 12px; font-weight: 600; max-width: 128px; }
.cmp-tbl td { text-align: center; font-size: 13px; }
/* 最优值高亮：淡橙底 + 加粗。不用整格填色 —— 一行里有十几个格子，填满会晃眼 */
.cmp-tbl .cmp-best { background: var(--orange-bg); font-weight: 700; color: var(--orange); }

/* ============ 采集明细：失败原因 / 批次旁的导出按钮 ============
   失败原因挂在状态徽章下面。用两行截断而不是单行：常见原因（"采集方自报状态为 error
   （商品已下架）"）单行会被切掉最关键的后半句，那就白显示了；完整内容走 title 悬浮。 */
.fail-reason {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  max-width: 170px; margin-top: 4px; overflow: hidden;
  font-size: 11px; line-height: 1.45; color: #c0392b; word-break: break-word;
}
/* 批次号 + 导出图标排一行（图标不换行，批次号可截断） */
.batch-line { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.batch-line .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ AI Skill 页：风险提示 / IP 白名单 / 临时令牌 ============ */
.risk-card { border-left: 4px solid var(--orange); }
.risk-card h3 { color: var(--orange); }
.risk-demo {
  background: #fff5ea; border: 1px dashed var(--orange-border); border-radius: 8px;
  padding: 10px 14px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all; margin: 10px 0 0;
}
.risk-list { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--text-sub); line-height: 1.9; }
.risk-list li { margin-bottom: 2px; }

.ip-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray-1); border: 1px solid var(--gray-2); border-radius: 20px;
  padding: 4px 6px 4px 12px; font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace; margin: 0 8px 8px 0;
}

/* ============================================================
   控制台开屏（dashboard.html）
   设计意图：登录后的第一屏要"有余量"——背景不是纯白卡片堆叠，而是一条
   带光斑与网格纹理的品牌色横幅，把「今天采了多少、整体采到哪了」摆到最显眼处。
   注意：横幅内所有文字都是白字，因此内部元素的颜色一律不要用 --text（深色）。
   ============================================================ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 16px; color: #fff; margin-bottom: 18px; padding: 26px 28px;
  background: linear-gradient(118deg, #ff8f33 0%, #ff6a00 46%, #dd5300 100%);
  box-shadow: 0 14px 34px rgba(255, 106, 0, .26);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 26px; align-items: center;
}
/* 网格纹理：只铺在左上角，靠 mask 渐隐到右下，避免整块变成格子布 */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .15) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(130% 130% at 6% 0%, #000 0%, rgba(0, 0, 0, .28) 46%, transparent 74%);
  mask-image: radial-gradient(130% 130% at 6% 0%, #000 0%, rgba(0, 0, 0, .28) 46%, transparent 74%);
}
.hero-orb {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 34%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 68%);
  animation: heroOrb 12s ease-in-out infinite;
}
.hero-orb.o1 { width: 230px; height: 230px; right: -46px; top: -78px; }
.hero-orb.o2 { width: 150px; height: 150px; right: 200px; bottom: -86px; opacity: .72; animation-delay: -4s; }
.hero-orb.o3 { width: 92px; height: 92px; left: 40%; top: -44px; opacity: .55; animation-delay: -8s; }
@keyframes heroOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-18px, 15px, 0) scale(1.14); }
}
.hero-main, .hero-side { position: relative; z-index: 1; min-width: 0; }

.hero-hi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.hero-hi .hi-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .3);
}
.hero-badge {
  font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 99px;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .34);
}
.hero-date { font-size: 12.5px; opacity: .92; margin-top: 7px; line-height: 1.8; }

/* 四个大数字（今日 / 近 7 天 / 连续活跃 / 店铺） */
.hero-kpis { display: flex; gap: 26px; flex-wrap: wrap; margin: 18px 0 2px; }
.hero-kpi .k { display: flex; align-items: center; gap: 5px; font-size: 12px; opacity: .9; }
.hero-kpi .v { font-size: 27px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.hero-kpi .v small { font-size: 12px; font-weight: 600; opacity: .88; margin-left: 3px; }
.hero-kpi .d { font-size: 12px; font-weight: 700; margin-left: 7px; color: #fff; }
.hero-kpi .d.up { color: #b7ffcd; }
.hero-kpi .d.down { color: #ffd0c2; }

/* 状态胶囊：授权 / 积分 / 待采集 / 自动采集，点击直达对应页面 */
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; transition: background .18s, transform .18s;
}
.hero-chip:hover { background: rgba(255, 255, 255, .3); color: #fff; transform: translateY(-1px); }
.hero-chip.is-warn { background: rgba(255, 255, 255, .92); border-color: #fff; color: #c2410c; }
.hero-chip.is-warn:hover { color: #9a3412; }

/* 横幅按钮：主按钮白底橙字，其余为半透明描边 */
.hero-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn.hero-btn {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .34);
  color: #fff; padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 600;
}
.btn.hero-btn:hover { background: rgba(255, 255, 255, .3); color: #fff; transform: translateY(-1px); }
.btn.hero-btn-main {
  background: #fff; border: 1px solid #fff; color: var(--orange);
  padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(160, 60, 0, .18);
}
.btn.hero-btn-main:hover { background: #fff6ee; color: var(--orange-dark); transform: translateY(-1px); }

.hero-side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.hero-ring svg { display: block; width: 176px; height: 176px; }
.hero-side-tip { font-size: 12px; line-height: 1.85; text-align: center; opacity: .95; }
.hero-side-tip b { font-weight: 800; }

/* 指标卡：在通用 .stat-box 上加强——右上角图标、悬浮上浮、可点击 */
.stat-box.db-stat {
  display: block; position: relative; text-decoration: none; color: inherit;
  padding: 16px 46px 16px 16px; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.stat-box.db-stat:hover { transform: translateY(-3px); border-color: var(--orange-border); box-shadow: 0 10px 22px rgba(255, 106, 0, .13); color: inherit; }
.stat-box.db-stat .db-ico {
  position: absolute; right: 13px; top: 14px;
  width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange-bg); color: var(--orange);
}
.stat-box.db-stat .num { font-size: 25px; }
.stat-box.db-stat .num.is-text { font-size: 19px; line-height: 34px; }
.stat-box.db-stat.is-ok .db-ico { background: #e7f7ee; color: var(--green); }
.stat-box.db-stat.is-ok .num { color: var(--green); }
.stat-box.db-stat.is-warn .db-ico { background: #fff5e6; color: #d97706; }
.stat-box.db-stat.is-warn .num { color: #d97706; }
.stat-box.db-stat.is-alert .db-ico { background: #fdeaea; color: var(--red); }
.stat-box.db-stat.is-alert .num { color: var(--red); }

/* 快捷操作宫格 */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.quick-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--gray-2); border-radius: 10px; color: var(--text);
  transition: transform .18s, border-color .18s, background .18s;
}
.quick-item:hover { transform: translateY(-2px); border-color: var(--orange-border); background: var(--orange-bg); color: var(--orange); }
.quick-item .qi-ico {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange-bg); color: var(--orange); transition: background .18s;
}
.quick-item:hover .qi-ico { background: #fff; }
.quick-item .qi-txt { min-width: 0; }
.quick-item b { display: block; font-size: 13px; font-weight: 600; }
.quick-item small { display: block; font-size: 11px; color: var(--text-sub); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-item:hover small { color: inherit; opacity: .8; }

/* 榜单/动态列表里的标题是可点链接，去掉下划线保留悬停变色 */
.mini-list a.txt { text-decoration: none; }
.mini-list a.txt:hover b { color: var(--orange); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; gap: 18px; }
  .hero-side { flex-direction: row; justify-content: center; gap: 18px; width: 100%; }
  .hero-ring svg { width: 132px; height: 132px; }
  .hero-hi { font-size: 19px; }
  .hero-kpi .v { font-size: 23px; }
  .hero-kpis { gap: 20px; }
}
@media (max-width: 560px) {
  .hero-side { flex-direction: column; }
  .hero-ring svg { width: 118px; height: 118px; }
  .hero-acts .btn { padding: 7px 12px; font-size: 12px; }
}
.ip-chip .ip-del {
  border: none; background: transparent; color: var(--red); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%;
}
.ip-chip .ip-del:hover { background: #fdeaea; }
.bind-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-sub); }
.toolbar-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============================================================
 * 消息通知（V9）：顶栏铃铛 / 下拉面板 / 消息中心 / 通知弹窗
 * 颜色口径沿用全站：橙=品牌，蓝=通知，绿=好消息，黄=提醒，红=重要
 * ============================================================ */

/* 顶栏右侧工具区：铃铛与原有按钮并排（避免 space-between 把三个元素摊开） */
.admin-top .top-right { display: flex; align-items: center; gap: 10px; }

/* ---------- 铃铛 + 未读角标 ---------- */
.notice-bell { position: relative; }
.notice-bell .nb-btn {
  position: relative; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--gray-2); background: #fff; color: var(--text-sub);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.notice-bell .nb-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
.notice-bell .nb-btn svg { display: block; }
.nb-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-style: normal;
  line-height: 17px; text-align: center; font-weight: 700; box-shadow: 0 0 0 2px #fff;
}
.nb-badge[hidden] { display: none; }

/* ---------- 下拉面板 ---------- */
.nb-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 372px; max-width: 92vw;
  background: #fff; border: 1px solid var(--gray-2); border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .13); z-index: 120; overflow: hidden;
}
.nb-panel[hidden] { display: none; }
.nb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--gray-2); font-size: 13px;
}
.nb-head .notice-link { font-size: 12px; }
.nb-list { max-height: 340px; overflow-y: auto; }
.nb-item {
  display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px;
  border-bottom: 1px solid var(--gray-1); text-decoration: none; color: var(--text);
}
.nb-item:hover { background: var(--gray-1); }
.nb-item .nb-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; opacity: .45; }
.nb-item.unread .nb-dot { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 106, 0, .12); }
.nb-item .nb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nb-item .nb-main b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-item.unread .nb-main b { color: var(--text); }
.nb-item:not(.unread) .nb-main b { color: var(--text-sub); font-weight: 500; }
.nb-item .nb-main em {
  font-style: normal; font-size: 12px; color: var(--text-sub); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-item .nb-time { flex: 0 0 auto; font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.nb-foot { padding: 10px 14px; }
.nb-foot .nb-all {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: var(--orange); text-decoration: none;
}
.nb-foot .nb-all:hover { text-decoration: underline; }

/* 侧边菜单上的未读角标 */
.side-menu a { position: relative; }
.side-menu a .side-badge {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--red); color: #fff; font-size: 10px; font-style: normal; font-weight: 700;
  min-width: 17px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px;
  text-decoration: none;      /* 角标在 <a> 内，否则会跟菜单文字一起被下划线划到 */
}
.admin-side.collapsed .side-menu a .side-badge {
  right: 6px; top: 10px; transform: none; min-width: 14px; height: 14px; line-height: 14px; font-size: 9px; padding: 0 3px;
}

/* ---------- 通知弹窗（登录后弹出 / 详情） ---------- */
.notice-pop .np-title { display: inline-flex; align-items: center; gap: 8px; }
.notice-pop .np-ico {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.notice-pop .np-ico svg { display: block; }
.notice-pop .np-meta { font-size: 12px; color: var(--text-sub); margin-bottom: 12px; }
.notice-pop .notice-body { max-height: 56vh; }

/* ---------- 消息中心页面 ---------- */
.notice-tabs { display: flex; gap: 6px; }
.notice-tab {
  padding: 5px 14px; border-radius: 20px; font-size: 13px; text-decoration: none;
  color: var(--text-sub); background: var(--gray-1); border: 1px solid transparent;
}
.notice-tab:hover { color: var(--orange); }
.notice-tab.active { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-border); font-weight: 600; }
.notice-tab b { font-weight: 700; }

.notice-list { display: flex; flex-direction: column; }
.notice-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px;
  border-bottom: 1px solid var(--gray-2);
}
.notice-item:last-child { border-bottom: none; }
.notice-item.unread { background: linear-gradient(90deg, rgba(255, 106, 0, .05), rgba(255, 106, 0, 0) 55%); }
.notice-item .ni-ico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.notice-item .ni-ico svg { display: block; }
.notice-item.unread .ni-ico { box-shadow: 0 0 0 3px rgba(255, 106, 0, .08); }
.notice-item .ni-main { flex: 1 1 auto; min-width: 0; }
.notice-item .ni-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.notice-item:not(.unread) .ni-title { color: var(--text-sub); font-weight: 500; }
.notice-item .ni-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; }
.notice-item .ni-sum { font-size: 13px; color: var(--text-sub); line-height: 1.75; margin-top: 5px; }
.notice-item .ni-meta { font-size: 12px; color: var(--text-sub); margin-top: 6px; }
.notice-item .ni-ops { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

@media (max-width: 760px) {
  .nb-panel { width: 320px; }
  .notice-item { flex-wrap: wrap; }
  .notice-item .ni-ops { width: 100%; justify-content: flex-end; }
}

/* ============================================================
 * 后台「消息通知」页：变量快捷插入 / 触达预览 / 触达明细
 * ============================================================ */
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 200px; margin-bottom: 14px; }
.var-bar { font-size: 12px; color: var(--text-sub); margin-top: 8px; line-height: 2; }
.var-chip {
  display: inline-block; margin: 0 6px 0 0; padding: 1px 8px; border-radius: 20px;
  background: var(--orange-bg); color: var(--orange); text-decoration: none;
  border: 1px solid var(--orange-border); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px;
}
.var-chip:hover { background: var(--orange); color: #fff; }
.reach-preview {
  background: var(--gray-1); border: 1px solid var(--gray-2); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; line-height: 1.9;
}
.reach-preview b { color: var(--orange); }
.reach-preview .mini-tip { display: block; }
.reach-sum { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.reach-sum .rs-item { display: flex; flex-direction: column; gap: 2px; }
.reach-sum .rs-item b { font-size: 21px; font-weight: 800; }
.reach-sum .rs-item span { font-size: 12px; color: var(--text-sub); }
.reach-filter { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

/* ---------- 控制台阻断类告警弹窗（授权失效 / 积分不足） ---------- */
.block-alert + .block-alert.has-split {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--gray-2);
}
.block-alert .ba-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.block-alert .ba-ico {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.block-alert .ba-ico svg { display: block; }
.block-alert .ba-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.95; color: var(--text-sub); }
.block-alert .ba-list li { margin-bottom: 2px; }

/* ============================================================
   链接列表（links.html）· 2026-09-30 重做
   ① 采集开关：原来的「复选框 + 开/关徽章」拼在一起，复选框小而徽章抢眼，
      一行两个开关显得脏。改成标准滑动开关（轨道 + 圆点），颜色即状态。
   ② 采集频率：从"只能进弹窗改"改成行内可点 —— 频率本身就是最常改的字段。
   ③ 原页面链接：加外链图标与悬浮提示，明确"点开是去虾皮原页面"。
   ④ 链接分析弹窗：KPI + 趋势小图 + 结论卡片 + 历史快照表。
   ============================================================ */

/* ---- ① 滑动开关 ---- */
.tl-sw { position: relative; display: inline-flex; align-items: center; cursor: pointer; vertical-align: middle; flex: 0 0 auto; }
.tl-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tl-sw .track {
  display: block; width: 38px; height: 20px; border-radius: 20px; background: #d8dde4;
  position: relative; transition: background .18s;
}
.tl-sw .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .18s;
}
.tl-sw input:checked + .track { background: var(--orange); }
.tl-sw input:checked + .track::after { transform: translateX(18px); }
.tl-sw:hover .track { filter: brightness(.96); }
.tl-sw input:focus-visible + .track { box-shadow: 0 0 0 3px var(--orange-bg); }
.tl-sw[disabled], .tl-sw input:disabled { cursor: not-allowed; opacity: .5; }

/* ---- ② 采集频率（行内改） ---- */
.fq-cell { display: inline-flex; align-items: center; gap: 4px; }
.fq-btn {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid var(--gray-2); background: #fff; color: var(--text);
  border-radius: 20px; padding: 2px 9px; font-size: 12px; line-height: 1.75;
  transition: all .15s; white-space: nowrap;
}
.fq-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
.fq-btn svg { display: block; }
.fq-btn.is-off { color: var(--gray-text); }
/* 浮层：必须 position:fixed 挂在 body 上 —— 表格外层是 overflow-x:auto 的容器，
   跟着单元格做 absolute 定位会被裁掉（还会把表格撑出滚动条）。 */
.fq-pop {
  position: fixed; z-index: 300; width: 176px; background: #fff;
  border: 1px solid var(--gray-2); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16); padding: 7px;
}
.fq-pop .fq-hd { font-size: 11px; color: var(--text-sub); padding: 4px 8px 6px; }
.fq-pop .fq-opt {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: transparent; text-align: left; cursor: pointer;
  font-size: 12.5px; padding: 7px 9px; border-radius: 7px; color: var(--text);
}
.fq-pop .fq-opt:hover { background: var(--orange-bg); color: var(--orange); }
.fq-pop .fq-opt.on { background: var(--orange); color: #fff; }
.fq-pop .fq-custom { border-top: 1px dashed var(--gray-2); margin-top: 5px; padding: 7px 4px 2px; display: flex; gap: 6px; align-items: center; }
.fq-pop .fq-custom input { width: 68px; height: 30px; padding: 2px 8px; }
.fq-pop .fq-custom .btn { height: 30px; padding: 0 10px; }
/* 频率浮层底部的一句后果说明（目前只有「追踪店铺」页用）：
   店铺频率是"整店默认值"，改完会带动该店下没单独设过频率的链接 ——
   这条要写在**点之前**。链接页的频率只作用于自己那一条，不需要这句。 */
.fq-pop .fq-note {
  font-size: 11px; color: var(--text-sub); line-height: 1.6;
  padding: 6px 6px 2px; margin-top: 5px; border-top: 1px dashed var(--gray-2);
}

/* ---- ③ 原页面外链 ---- */
.ext-link { position: relative; display: inline-flex; align-items: baseline; gap: 5px; color: var(--text); text-decoration: none; }
.ext-link:hover { color: var(--orange); }
.ext-link .ext-ico { flex: 0 0 auto; opacity: .45; position: relative; top: 1px; }
.ext-link:hover .ext-ico { opacity: 1; }
.ext-link .ext-ico svg { display: block; }

/* ---- ④ 链接分析弹窗 ---- */
.an-head { display: flex; gap: 12px; align-items: flex-start; }
.an-head .an-thumb { flex: 0 0 auto; }
.an-head .an-meta { min-width: 0; }
.an-head .an-title { font-size: 13.5px; font-weight: 600; line-height: 1.6; color: var(--text); }
.an-head .an-sub { font-size: 11.5px; color: var(--text-sub); margin-top: 4px; line-height: 1.8; }
.an-sec { margin-top: 16px; }
.an-sec > .an-sec-t { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 9px; }
.an-kpi { background: #f7f8fa; border: 1px solid var(--gray-2); border-radius: 9px; padding: 8px 10px; }
.an-kpi .k { font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.an-kpi .v { font-size: 15px; font-weight: 700; margin-top: 3px; color: var(--text); }
.an-kpi .d { font-size: 11px; margin-top: 2px; color: var(--text-sub); }
.an-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .an-charts { grid-template-columns: 1fr; } }
.an-chart { border: 1px solid var(--gray-2); border-radius: 9px; padding: 8px 10px 4px; background: #fff; }
.an-chart .ct { font-size: 11.5px; color: var(--text-sub); display: flex; justify-content: space-between; }
.an-chart svg { display: block; width: 100%; height: auto; }
.an-ins {
  display: flex; gap: 9px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--gray-2);
  background: #f7f8fa; margin-bottom: 7px;
}
.an-ins.good { background: #f2fbf5; border-color: #c6ebd5; }
.an-ins.warn { background: #fff7f0; border-color: #f4d3b0; }
.an-ins.info { background: #f6f8fb; border-color: #e1e6ed; }
.an-ins .ai-ico { flex: 0 0 auto; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.an-ins.good .ai-ico { color: #16a34a; }
.an-ins.warn .ai-ico { color: #d97706; }
.an-ins.info .ai-ico { color: #64748b; }
.an-ins .ai-t { font-size: 12.5px; font-weight: 700; color: var(--text); }
.an-ins .ai-x { font-size: 12.5px; color: var(--text-sub); line-height: 1.85; margin-top: 2px; }
.an-hist { max-height: 260px; overflow: auto; }
.an-hist table.tbl th { position: sticky; top: 0; z-index: 1; }
.an-empty { font-size: 12.5px; color: var(--text-sub); line-height: 1.9; }
.tl-hint { font-size: 12px; color: var(--text-sub); line-height: 1.85; display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 10px; }
.tl-hint svg { flex: 0 0 auto; margin-top: 3px; }

/* ============================================================
   skill.html 精简版（2026-09-30）
   原来四块长文字常驻页面（风险卡 / 安装教程 5 条 / 接口清单 / 安全说明），
   现在全部收进弹窗，主界面只留一行警示 + 三张「入口卡」。
   ============================================================ */
/* 下载区的紧凑警示条：风险必须说，但不用占半屏 */
.sk-warn { display: flex; align-items: center; gap: 8px; background: var(--orange-bg); border: 1px solid var(--orange-border); border-radius: 9px; padding: 9px 12px; font-size: 12.5px; color: var(--text); margin: 0 0 12px; }
.sk-warn svg { flex: 0 0 auto; color: var(--orange); }
.sk-warn b { color: var(--orange); }
.sk-warn a { margin-left: auto; color: var(--orange); text-decoration: underline; cursor: pointer; white-space: nowrap; font-weight: 600; }
/* 「?」帮助小圆钮：挂在卡片标题旁，点开常见问题弹窗 */
.sk-help { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--gray-2); background: #fff; color: var(--text-sub); font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; }
.sk-help:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
/* 使用指南入口卡：一眼是三行导航，不再是三屏文档 */
.sk-guide { display: flex; flex-direction: column; gap: 8px; }
.sk-guide-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--gray-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.sk-guide-item:hover { border-color: var(--orange); background: var(--orange-bg); }
.sk-guide-item .sgi-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--orange-bg); color: var(--orange); display: inline-flex; align-items: center; justify-content: center; }
.sk-guide-item .sgi-t { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.sk-guide-item .sgi-t b { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }
.sk-guide-item .sgi-go { flex: 0 0 auto; color: var(--text-sub); display: inline-flex; }
.sk-guide-item:hover .sgi-go { color: var(--orange); }

/* ============================================================
   第十六轮（2026-09-30）
   ① 链接分析弹窗升级：多维度指标矩阵 / 逐次环比 / 星级分布
   ② 重点关注：心形按钮 + watch.html 卡片清单
   ③ links.html：表头排序 + 高级筛选面板
   ============================================================ */

/* ---------- 心形「重点关注」按钮（商品链接 / 追踪店铺 / 追关键词 三页共用） ----------
   三种状态：常态 主题橙描边 + 空心 / 悬浮 淡玫红底 / 已关注 实心玫红（边框同步转玫红）。
   2026-10-01：与操作列其它图标按钮统一成 30×30、7px 圆角、主题橙描边 ——
   它原来是 26px 无边框的圆，混在一列有框图标里显得"掉队"（用户反馈操作区图标要统一带框）。
   已关注为什么用玫红而不是品牌橙：全站橙色已被"主按钮 / 可点击"占满，
   收藏态需要能和"可以点"区分开，否则扫一列全是橙色反而看不出哪些已关注。 */
.wbtn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; margin: 0 2px; border-radius: 7px;
  border: 1px solid var(--orange-border); background: #fff; color: var(--orange);
  cursor: pointer; vertical-align: middle;
  transition: color .15s, background .15s, border-color .15s, transform .12s;
}
.wbtn svg { display: block; }
.wbtn:hover { color: #f43f5e; background: #fff1f4; border-color: #f43f5e; }
.wbtn:active { transform: scale(.9); }
.wbtn.on { color: #f43f5e; background: #fff1f4; border-color: #fbcfe0; }
.wbtn.on:hover { color: #e11d48; background: #ffe4ea; border-color: #e11d48; }
.wbtn[disabled] { opacity: .45; cursor: default; transform: none; }

/* ---------- 链接分析弹窗 ---------- */
.an-modal { max-width: 880px; }
.an-modal .modal-body { padding: 16px 18px 6px; }
.an-sec-t .an-hint { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--text-sub); text-align: right; }
.an-sec-t .an-hint b { color: var(--text); font-weight: 700; }
.an-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.an-note { font-size: 11.5px; color: var(--text-sub); line-height: 1.9; margin-top: 8px; background: var(--gray-1); border-radius: 8px; padding: 7px 10px; }
.an-note b { color: var(--text); }
.an-mx-na { color: #c2c7d0; }
table.tbl td.nowrap, table.tbl th.nowrap { white-space: nowrap; }
/* 红涨绿跌：与国内看盘习惯一致，也与站内其它涨跌配色统一。
   只在弹窗内生效，避免污染后台其它地方可能用到的 .up/.down。 */
.an-modal .up { color: #dc2626; }
.an-modal .down { color: #16a34a; }
.an-modal .flat { color: var(--text-sub); }

/* ---------- 指标全景矩阵（12 列，本页主角） ---------- */
/* 12 列必然横向溢出：外层给独立滚动容器，首列与表头都吸边，
   这样滚到右边时还能看清"这一行是哪个指标"。 */
.an-mx { border: 1px solid var(--gray-2); border-radius: 10px; max-height: 54vh; overflow: auto; }
.an-mx table.tbl.an-mx-tbl { min-width: 880px; }
.an-mx table.tbl.an-mx-tbl th,
.an-mx table.tbl.an-mx-tbl td { padding: 7px 9px; font-size: 12px; white-space: nowrap; vertical-align: middle; }
.an-mx table.tbl.an-mx-tbl th { position: sticky; top: 0; z-index: 3; background: var(--orange-bg); font-size: 11.5px; }
.an-mx table.tbl.an-mx-tbl th.mx-first { left: 0; z-index: 4; }
.an-mx table.tbl.an-mx-tbl td.mx-first {
  position: sticky; left: 0; z-index: 2; background: #fff;
  border-right: 1px solid var(--gray-2);
}
.an-mx table.tbl.an-mx-tbl tr:hover td { background: #fffaf5; }
.an-mx table.tbl.an-mx-tbl tr:hover td.mx-first { background: #fffaf5; }
/* 「最新」是大家最常看的一列，给一点底色，扫视时先落地 */
.an-mx table.tbl.an-mx-tbl td.mx-last { background: rgba(255,106,0,.07); font-weight: 700; }
.an-mx table.tbl.an-mx-tbl tr:hover td.mx-last { background: #fff2e4; }
.an-mx .mx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.an-mx .mx-first b { font-weight: 600; color: var(--text); }
.an-mx td.mx-swing { min-width: 100px; }
.an-mx .mx-sw-n { font-size: 10.5px; color: var(--text-sub); margin-left: 5px; }
.an-mx td.mx-sp { padding-right: 14px; }
.an-sp { display: block; }
/* 波动幅度条：越满 = 区间内波动越剧烈（一眼看出哪个指标不稳定） */
.an-bar { display: inline-block; width: 58px; height: 6px; border-radius: 99px; background: var(--gray-2); overflow: hidden; vertical-align: middle; }
.an-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffb066, #ff6a00); }
/* 极值单元格里的时间小字（"最低价是 09-12 出现的"） */
.an-at { display: block; font-size: 10.5px; font-style: normal; color: var(--text-sub); line-height: 1.5; margin-top: 1px; }
/* 矩阵表头 12 列都要解释口径，但表头贴在 overflow 容器顶部，
   默认朝上的 tooltip 会被裁掉 —— 这里改成朝下 + 允许换行。 */
.an-mx-tbl th[data-tip]::after {
  top: calc(100% + 7px); bottom: auto;
  white-space: normal; width: 190px; text-align: center; line-height: 1.5;
}
.an-mx-tbl th[data-tip]::before {
  top: calc(100% + 2px); bottom: auto;
  border-top-color: transparent; border-bottom-color: rgba(30, 30, 34, .94);
}

/* ---------- 逐次环比明细（14 列） ---------- */
table.tbl.an-step-tbl { min-width: 820px; }
table.tbl.an-step-tbl th, table.tbl.an-step-tbl td { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

/* ---------- 买家评论星级分布 ---------- */
.an-dist { display: flex; flex-direction: column; gap: 7px; }
.an-dist-row { display: flex; align-items: center; gap: 10px; }
.an-dist-row .lb { flex: 0 0 46px; font-size: 11.5px; color: var(--text-sub); }
.an-dist-row .bar { flex: 1 1 auto; height: 9px; border-radius: 99px; background: var(--gray-1); overflow: hidden; }
.an-dist-row .bar i { display: block; height: 100%; border-radius: 99px; }
.an-dist-row .nm { flex: 0 0 96px; text-align: right; font-size: 11.5px; color: var(--text-sub); }
.an-chips { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.an-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 11px; border-radius: 99px; border: 1px solid; }
.an-chip b { font-weight: 800; }
.an-chip.good { background: #eaf7ee; border-color: #c6ecd3; color: #15803d; }
.an-chip.mid { background: #fff7e8; border-color: #ffe0b8; color: #b45309; }
.an-chip.bad { background: #fdecec; border-color: #f7c9c9; color: #b91c1c; }

/* ---------- 表格排序表头（links.html） ---------- */
table.tbl th.th-sort { cursor: pointer; user-select: none; -webkit-user-select: none; }
table.tbl th.th-sort:hover { color: var(--orange); }
table.tbl th.th-sort .s-ico { font-style: normal; font-size: 10px; margin-left: 4px; color: #c2c7d0; display: inline-block; }
table.tbl th.th-sort:hover .s-ico, table.tbl th.th-sort.on .s-ico, table.tbl th.th-sort.on { color: var(--orange); }

/* ---------- 高级筛选面板（links.html） ----------
   默认收起：一开页就摊开一大片表单会把表格挤到屏幕外，
   点「筛选排序」才展开，展开后是一张独立的浅色卡。 */
.flt-panel { background: #fff; border: 1px solid var(--gray-2); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; }
.flt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 10px 18px; }
.flt-f { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.flt-f > span { flex: 0 0 62px; color: var(--text-sub); }
.flt-f > em { font-style: normal; color: var(--text-sub); }
.flt-f .input, .flt-f .select { flex: 1 1 auto; min-width: 0; padding: 6px 9px; font-size: 12.5px; }
.flt-f .input { min-width: 66px; }
.flt-f.flt-w { grid-column: 1 / -1; }
.flt-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.flt-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--gray-2); flex-wrap: wrap; }
.flt-tip { flex: 1 1 240px; font-size: 11.5px; color: var(--text-sub); line-height: 1.7; }

/* ---------- 重点关注页（watch.html） ---------- */
.wl-guide { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wl-guide-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  background: #fff1f4; color: #f43f5e;
  display: inline-flex; align-items: center; justify-content: center;
}
.wl-guide-ico svg { display: block; }
.wl-guide-tx { flex: 1 1 240px; min-width: 0; font-size: 12.5px; color: var(--text-sub); line-height: 1.9; }
.wl-guide-tx b { color: var(--text); }

.wl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--gray-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.wl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gray-2); background: #fff; border-radius: 99px;
  padding: 5px 12px; font-size: 12.5px; color: var(--text-sub);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.wl-tab b { min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; color: var(--text); background: var(--gray-2); border-radius: 99px; padding: 0 6px; }
.wl-tab:hover { border-color: var(--orange-border); color: var(--orange); }
.wl-tab:hover b { background: var(--orange-bg); color: var(--orange); }
.wl-tab.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.wl-tab.on b { background: rgba(255,255,255,.26); color: #fff; }
.wl-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.wl-search .input { width: 190px; padding: 6px 10px; font-size: 12.5px; }

.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); gap: 14px; }
.wl-card {
  background: #fff; border: 1px solid var(--gray-2); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 3px rgba(31,35,41,.04);
  transition: border-color .15s, box-shadow .15s;
}
.wl-card:hover { border-color: var(--orange-border); box-shadow: var(--shadow); }
.wl-card-hd { display: flex; align-items: center; gap: 8px; }
.wl-type { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--gray-1); color: var(--text-sub); }
.wl-type-shop { background: #eef4ff; color: #2563eb; }
.wl-type-link { background: var(--orange-bg); color: var(--orange); }
.wl-type-keyword { background: #eaf7ee; color: #15803d; }
.wl-time { margin-left: auto; font-size: 11px; color: var(--text-sub); white-space: nowrap; }

.wl-main { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.wl-main:hover { background: var(--gray-1); }
.wl-thumb { flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.wl-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; border: 1px solid var(--gray-2); background: #fff; }
.wl-thumb-ph { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9px; border: 1px dashed var(--gray-2); background: var(--gray-1); color: #b9bfc9; }
.wl-tx { min-width: 0; flex: 1 1 auto; }
.wl-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-sub { font-size: 11px; color: var(--text-sub); margin-top: 3px; line-height: 1.75; word-break: break-all; }

.wl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* 不允许 grow：五张 chip 挤得下就一行，挤不下最后一张按自身宽度换行，
   否则换行的那张会被拉满整行，看起来像一条奇怪的横幅 */
.wl-chips .lic-chip { flex: 0 1 auto; min-width: 0; padding: 6px 9px; border-radius: 8px; }
.wl-chips .lic-chip b { font-size: 15px; }

.wl-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--gray-1); border-radius: 9px; padding: 8px 6px; }
.wl-num { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.wl-num i { font-style: normal; font-size: 10.5px; color: var(--text-sub); white-space: nowrap; }
.wl-num b { font-size: 13px; font-weight: 700; color: var(--text); }

.wl-card-ft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--gray-2); }
.wl-card-ft .btn { text-decoration: none; }

.wl-miss { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.8; color: #b45309; background: #fff6e8; border: 1px solid #ffe0b8; border-radius: 9px; padding: 8px 10px; }
.wl-miss svg { flex: 0 0 auto; margin-top: 3px; }
.wl-warn { display: inline-flex; align-items: center; font-size: 11.5px; color: #b45309; background: #fff6e8; border: 1px solid #ffe0b8; border-radius: 99px; padding: 3px 10px; }
.wl-card.is-missing { border-style: dashed; }

@media (max-width: 520px) {
  .wl-nums { grid-template-columns: repeat(2, 1fr); }
  .wl-search { margin-left: 0; width: 100%; }
  .wl-search .input { flex: 1 1 auto; width: auto; }
  .flt-f > span { flex: 0 0 54px; }
}

