/* 违规检测 · 网页版 样式（浅色） */
:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #e8ecf2;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9aa3af;
  --primary: #2b6cff;
  --primary-d: #1f56d6;
  --danger: #e5484d;
  --ok: #12a150;
  --radius: 10px;
}

/* hidden 必须真的隐藏（.login-wrap 的 display:flex 会压过 UA 的 [hidden] 规则） */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; }

/* ---------------- 按钮 ---------------- */
.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cfd8e6; background: #fafbfd; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.btn-danger { color: var(--danger); border-color: #f5c9cb; }
.btn-danger:hover { background: #fdf1f1; border-color: #f0b3b5; }
.btn-ghost { background: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px 26px;
  box-shadow: 0 12px 40px rgba(31, 45, 61, .07);
  text-align: center;
}
.login-head h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; }
.login-head p { margin: 0; color: var(--text-2); font-size: 13px; }

.qr-box {
  position: relative;
  width: 232px;
  height: 232px;
  margin: 22px auto 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
}
.qr-box img { width: 100%; height: 100%; display: block; object-fit: contain; }
.qr-mask {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13px;
}
.qr-spin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .9);
}
.spinner {
  width: 22px; height: 22px;
  border: 2px solid #dde3ec;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-tip { margin: 0; font-size: 13px; color: var(--primary); min-height: 20px; }
.login-note { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }

/* 引导页两个等宽大按钮：打开店铺后台 / 重新检测登录 */
.guide-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 22px 0 4px;
}
.guide-btn {
  flex: 1 1 0;
  height: 54px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  background: linear-gradient(135deg, #2b6cff, #7a3cf0);
  box-shadow: 0 8px 20px rgba(43, 108, 255, .28);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.guide-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.guide-btn:active { transform: translateY(0); filter: brightness(.97); }

/* ---------------- 顶部介绍（三行：标题 / 云端记录数 / 违规类型） ---------------- */
.hero { text-align: center; padding: 20px 20px 0; }
.hero-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.35;
}
.hero-name {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1f56d6;
}
@supports (-webkit-background-clip: text) {
  .hero-name {
    background: linear-gradient(135deg, #2b6cff, #7a3cf0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.hero-desc {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #c0392f;
}

/* 三行竖排版（标题一行、云端记录数一行、类型说明一行，都居中） */
.hero-stack { text-align: center; padding: 0; }
.hero-stack .hero-name {
  display: block;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.28;
}
.hero-stack .hero-count {
  display: inline-block;
  margin: 14px auto 0;
  padding: 6px 20px;
  border-radius: 999px;
  border: 1px solid #f6dcaa;
  background: linear-gradient(135deg, #fffaf0, #fff2d8);
  color: #b4530a;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(214, 158, 46, .14);
}
.hero-stack .hero-desc {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #c0392f;
}
/* 主界面里的那组稍微收一点，不挤占表格空间 */
.hero-main { padding: 16px 20px 2px; }
.hero-main .hero-name { font-size: 27px; letter-spacing: 1px; }
.hero-main .hero-count { margin-top: 10px; padding: 4px 16px; font-size: 19px; }
.hero-main .hero-desc { margin-top: 10px; font-size: 15px; }

/* ---------------- 没装插件：下载引导 ---------------- */
.install-wrap {
  background:
    radial-gradient(900px 420px at 50% -160px, #e7efff 0%, rgba(231, 239, 255, 0) 70%),
    var(--bg);
}
.install-card {
  position: relative;
  width: 700px;
  max-width: 100%;
  padding: 38px 44px 28px;
  border-radius: 20px;
  border: 1px solid #e4eaf5;
  box-shadow: 0 18px 50px rgba(31, 45, 61, .10);
  overflow: hidden;
}
.install-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2b6cff, #7a3cf0 55%, #f0a03c);
}
.install-card .hero-stack { padding: 0; }
.install-warn {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 24px auto 18px;
  padding: 10px 24px;
  border: 1px solid #ffd5d7;
  border-radius: 10px;
  background: #fff2f2;
  font-size: 18px;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: .5px;
}
.install-warn::before {
  content: "⚠";
  margin-right: 7px;
  font-size: 18px;
}
/* 两个安装包按钮并排（zip / crx）；窄屏自动换行 */
.install-dl {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 40px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  background: linear-gradient(135deg, #2b6cff, #7a3cf0);
  box-shadow: 0 10px 24px rgba(43, 108, 255, .30);
  transition: transform .16s, box-shadow .16s;
}
/* crx 是次选方案（新版 Chrome 会拦非商店来源），做成描边款 */
.install-btn-alt {
  color: var(--primary);
  background: #fff;
  border: 2px solid #c9d8ff;
  box-shadow: 0 6px 16px rgba(43, 108, 255, .12);
}
/* ★ 10-28 修「悬停白底白字」：下面 .install-btn:hover 写的是 color:#fff，
   与本条同为 (0,2,0) 优先级但定义在后 ⇒ 会把这里的字色覆盖掉；而背景又来自
   本条的 #fff，结果白底白字看不见。加 .install-btn 前缀提到 (0,3,0)，不依赖书写顺序。 */
.install-btn.install-btn-alt:hover {
  color: var(--primary-d);
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(43, 108, 255, .20);
}
.install-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(43, 108, 255, .40);
}
.install-steps {
  counter-reset: st;
  list-style: none;
  margin: 24px 0 0;
  padding: 18px 20px 8px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-2);
  background: #f8fafd;
  border: 1px solid #eef2f8;
  border-radius: 12px;
}
.install-steps li {
  position: relative;
  padding: 0 0 0 32px;
  margin-bottom: 11px;
}
.install-steps li:last-child { margin-bottom: 0; }
.install-steps li::before {
  counter-increment: st;
  content: counter(st);
  position: absolute;
  left: 0;
  top: 1px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #e9f0ff;
  color: #2b6cff;
  font-size: 12px;
  font-weight: 700;
  line-height: 21px;
  text-align: center;
}
.install-steps code {
  background: #eef2fa;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  color: #32517f;
}
.install-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.install-actions #btnRecheck {
  height: 44px;
  padding: 0 30px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
}
.install-card .login-note { margin-top: 16px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
/* 版本号：方便分辨「看到的是不是旧版」 */
.brand-ver { font-size: 11px; color: var(--text-3); font-weight: 400; }
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, .12);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.top-stat { font-size: 12px; color: var(--text-2); }

/* ---------------- 顶部两大主操作 ---------------- */
.actionbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px 20px 0;
}
.action-btn {
  width: 500px;
  height: 80px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.action-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.action-btn:active { transform: translateY(0); }
.action-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.action-violation {
  background: linear-gradient(135deg, #3b7bff, #1a4fd6);
  box-shadow: 0 8px 22px rgba(43, 108, 255, .28);
}
.action-goods {
  background: linear-gradient(135deg, #16a34a, #0f7a37);
  box-shadow: 0 8px 22px rgba(22, 163, 74, .26);
}

.action-hint {
  margin: 10px 20px 0;
  min-height: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

/* 步骤锁 / 6 小时冷却提醒：跟上面的操作提示同一列，颜色区分状态 */
.step-hint {
  margin: 4px 20px 0;
  min-height: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
}
.step-hint.ok { color: #15803d; }
.step-hint.wait { color: #b45309; }

/* ---------------- 三个栏目大按钮 ---------------- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px 4px;
}
.tab {
  width: 300px;
  height: 70px;
  border: 0;
  border-radius: 14px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.tab:hover { transform: translateY(-2px); }
.tab.active { color: #fff; }
.tab[data-tab="shops"] { background: #e6eeff; color: #2554c7; border: 1px solid #cfdcff; }
.tab[data-tab="records"] { background: #fdf0e0; color: #b8640a; border: 1px solid #f7ddbd; }
.tab[data-tab="goods"] { background: #fdeaea; color: #c0392f; border: 1px solid #f7cfcc; }
.tab[data-tab="shops"].active {
  color: #fff;
  background: linear-gradient(135deg, #3b7bff, #1a4fd6);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(43, 108, 255, .3);
}
.tab[data-tab="records"].active {
  color: #fff;
  background: linear-gradient(135deg, #f79b2a, #d97a08);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(239, 140, 26, .3);
}
.tab[data-tab="goods"].active {
  color: #fff;
  background: linear-gradient(135deg, #e8564a, #c9382a);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(220, 70, 58, .3);
}

/* 内容板块整体居中：宽屏下不再贴左，跟上面的标语/按钮/标签页对齐成一条中轴 */
.main { padding: 8px 20px 40px; max-width: 1400px; margin: 0 auto; }

@media (max-width: 1120px) {
  .action-btn { width: calc(50% - 12px); height: 70px; font-size: 21px; letter-spacing: 1px; }
  .tab { width: calc(33.333% - 12px); height: 60px; font-size: 18px; }
}
@media (max-width: 720px) {
  .action-btn, .tab { width: 100%; height: 58px; font-size: 18px; letter-spacing: 1px; }
}

/* ---------------- 卡片 ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.card-label { font-size: 12px; color: var(--text-2); }
.card b { font-size: 22px; font-weight: 600; letter-spacing: .3px; }
.card.danger b { color: var(--danger); }

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  min-width: 180px;
  outline: none;
}
.input:focus { border-color: var(--primary); }
.hint { font-size: 12px; color: var(--text-2); }

.notice {
  background: #f0f6ff;
  border: 1px solid #dbe7ff;
  color: #33517f;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 12px;
  line-height: 1.7;
}
/* 单行说明：居中、字号加大 */
.notice-one {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 13px 16px;
  line-height: 1.5;
}

/* 检查商品违规的进度：贴着上面那行说明显示，字号中等 + 一条细进度条 */
.gd-progress {
  margin: -4px 0 12px;
  padding: 10px 16px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  background: #f6f9ff;
  text-align: center;
}
.gd-progress-text {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #1f56d6;
}
.gd-progress-track {
  display: block;
  width: 100%;
  max-width: 560px;
  height: 6px;
  margin: 9px auto 0;
  border-radius: 4px;
  background: #dde8ff;
  overflow: hidden;
}
.gd-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #2b6cff, #7a3cf0);
  transition: width .25s ease;
}
/* 没有百分比时（刚起步、还不知道总量）只显示文字，不显示空条 */
.gd-progress.no-bar .gd-progress-track { display: none; }

/* ---------------- 违规分类筛选条（与客户端 exe 同款） ---------------- */
.type-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid #e3e6ea;
  border-radius: 999px;
  background: #f2f4f7;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}
.chip:hover { background: #e9edf4; }
.chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.chip-n { opacity: .75; font-size: 12px; }

/* 单元格里的小字（第二行） */
.cell-sub {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 2px;
  white-space: normal;
}
.detail-cell { max-width: 230px; white-space: normal; line-height: 1.55; font-size: 12.5px; }
.reason-cell { max-width: 180px; white-space: normal; font-size: 12.5px; color: var(--danger); }
.desc-cell { max-width: 200px; white-space: normal; font-size: 12.5px; color: var(--text-2); }

/* ---------------- 表格 ---------------- */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
}
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: center;
  font-weight: 500;
  color: var(--text-2);
  font-size: 12.5px;
  padding: 11px 14px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f4f9;
  vertical-align: middle;
  text-align: center;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcff; }
/* 表格内容统一居中（保留类名兼容老渲染） */
.ta-r { text-align: center; }
.w-check { width: 40px; }

.shop-cell { display: flex; align-items: center; justify-content: center; gap: 9px; }
.shop-cell img {
  width: 26px; height: 26px; border-radius: 6px; object-fit: cover;
  background: #eef1f6; flex: none;
}
.shop-avatar {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  background: #e8efff; color: #2b6cff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.shop-name { font-weight: 500; }
.shop-appid { font-size: 11.5px; color: var(--text-3); }

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 11.5px;
  line-height: 18px;
}
.badge-ok { background: #e9f8ef; color: var(--ok); }
.badge-warn { background: #fff4e5; color: #b76a00; }
.badge-bad { background: #fdecec; color: var(--danger); }
.badge-gray { background: #f1f3f7; color: var(--text-2); }

.muted { color: var(--text-3); }
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.title-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-2); }

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  z-index: 99;
  max-width: 80vw;
}
.toast.err { background: #b42318; }

@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 14px 12px 30px; }
  .login-card { width: 100%; max-width: 380px; padding: 26px 20px 20px; }
}


/* ---------------- 云端状态条 ---------------- */
.cloud-bar {
  display: flex; align-items: center; gap: 8px;
  max-width: 1012px; margin: 0 auto 10px; padding: 7px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; color: var(--text-2);
}
.cloud-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c2c8d0; flex: none;
}
.cloud-bar.on .cloud-dot { background: var(--ok); }
.cloud-bar.on { color: var(--text); }
.cloud-text { flex: 1; }

.cloud-panel {
  max-width: 1012px; margin: 0 auto 12px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.cloud-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.cloud-row > label { width: 82px; flex: none; font-size: 13px; color: var(--text-2); }
.cloud-row .input { flex: 1; max-width: 420px; }
.cloud-actions { margin-bottom: 4px; }
.cloud-note {
  margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-3);
}
