:root {
  /* 浅色 · 大厂质感调色板 */
  --bg: #f4f6fb;
  --bg-soft: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --ink: #0f172a;        /* 主文字 */
  --ink-2: #475569;      /* 次文字 */
  --ink-3: #94a3b8;      /* 弱文字 */

  --line: #e7ebf3;
  --line-2: #d7deea;

  --brand: #2563eb;      /* 主品牌蓝 */
  --brand-600: #1d4ed8;
  --brand-50: #eff4ff;
  --brand-100: #dbe6ff;

  --green: #16a34a;
  --green-50: #ecfdf3;
  --red: #e11d48;
  --red-50: #fff1f3;
  --amber: #b45309;

  --radius: 16px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 6px 20px rgba(16, 24, 40, .06), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .10);

  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 460px at 50% -200px, rgba(37, 99, 235, .10), transparent 72%),
    linear-gradient(180deg, #f8fafd 0%, #f4f6fb 32%, #f4f6fb 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部品牌栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, var(--brand-600)); color: #fff;
  font-weight: 800; font-size: 15px; box-shadow: var(--shadow-sm);
}
.logo-text { font-weight: 800; font-size: 17px; letter-spacing: .5px; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav-link { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--brand); }
.pill-free {
  font-size: 12.5px; font-weight: 600; color: var(--brand-600);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- 容器 ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 56px 0 30px; position: relative; }
.hero .badge {
  display: inline-block; font-size: 13px; letter-spacing: 1px; color: var(--brand-600);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 999px; padding: 6px 16px; margin-bottom: 22px; font-weight: 600;
}
.hero h1 {
  font-size: clamp(27px, 4.6vw, 44px); margin: 0 0 14px; font-weight: 800;
  color: var(--ink); letter-spacing: .5px; line-height: 1.25;
}
.hero .sub {
  font-size: clamp(18px, 2.4vw, 23px); margin: 0 0 16px; font-weight: 700;
  color: var(--brand-600);
}
.hero .desc { color: var(--ink-2); font-size: 16px; margin: 0 auto; max-width: 640px; }

/* 信任条 */
.trust { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin: 26px 0 6px; }
.trust .it { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.trust .it .ck { color: var(--green); font-weight: 800; }

/* ---------- 主卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); margin-top: 18px;
}

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin: 4px 0 30px; }
.step { flex: 1; text-align: center; position: relative; cursor: default; }
.step .dot {
  width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink-3);
  font-weight: 700; transition: all .35s ease; position: relative; z-index: 2;
}
.step .label { font-size: 12.5px; color: var(--ink-3); transition: color .3s; }
.step::after {
  content: ""; position: absolute; top: 19px; left: 50%; width: 100%; height: 2px;
  background: var(--line); z-index: 1; transition: background .4s;
}
.step:last-child::after { display: none; }
.step.active .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .35); transform: scale(1.06); }
.step.active .label { color: var(--ink); font-weight: 600; }
.step.done .dot { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.step.done .label { color: var(--ink-2); }
.step.active::after, .step.done::after { background: linear-gradient(90deg, var(--brand), var(--brand-100)); }

/* ---------- Panels ---------- */
.panel { display: none; animation: fadeUp .45s ease both; }
.panel.show { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.panel h2 { font-size: 20px; margin: 0 0 6px; color: var(--ink); }
.panel .hint { color: var(--ink-2); font-size: 14px; margin: 0 0 18px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: none; cursor: pointer; font-family: var(--font); font-size: 15px; font-weight: 600;
  color: #fff; padding: 12px 24px; border-radius: var(--radius-sm); transition: transform .15s, box-shadow .25s, background .25s, opacity .2s;
  background: linear-gradient(180deg, #3b82f6, var(--brand)); box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37, 99, 235, .38); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { color: var(--brand-600); border-color: var(--brand-100); }
.btn.btn-primary { background: linear-gradient(180deg, #3b82f6, var(--brand)); box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Upload dropzone ---------- */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 34px 20px; text-align: center;
  transition: all .25s; background: var(--surface-2); cursor: pointer;
}
.drop:hover, .drop.hover { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .06); }
.drop .ic { font-size: 34px; }
.drop .t1 { font-weight: 600; margin-top: 8px; color: var(--ink); }
.drop .t2 { color: var(--ink-3); font-size: 13px; }
.filemeta { margin-top: 14px; font-size: 14px; color: var(--brand-600); font-weight: 600; }
.err { color: var(--red); font-size: 13.5px; margin-top: 10px; min-height: 18px; }
.ok { color: var(--green); font-size: 13.5px; margin-top: 10px; min-height: 18px; }

/* ---------- Business name field ---------- */
.field { margin-top: 22px; }
.field label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; font-weight: 500; }
.field label .req { color: var(--red); }
.input {
  width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line-2); color: var(--ink); font-size: 15px; font-family: var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.field .sub { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }

/* ---------- Options ---------- */
.opt { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 12px; transition: all .22s; }
.opt:hover { border-color: var(--brand-100); }
.opt.locked { border-color: var(--brand-100); background: var(--brand-50); }
.opt .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: #fff; border: 1px solid var(--line); flex: none;
}
.opt.locked .ico { background: #fff; border-color: var(--brand-100); }
.opt .meta { flex: 1; }
.opt .meta .t { font-weight: 600; color: var(--ink); }
.opt .meta .d { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.opt .lock { color: var(--brand-600); font-size: 12px; font-weight: 600; }

/* checkbox switch */
.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: .25s; }
.slider::before { content: ""; position: absolute; height: 19px; width: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(19px); }
.opt.locked .switch { pointer-events: none; }

/* ---------- Progress ---------- */
.progress-wrap { text-align: center; padding: 10px 0; }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; margin: 18px auto; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0);
  transition: --p 1s linear; position: relative; }
.ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 2px 6px rgba(16, 24, 40, .05); }
.ring .pct { position: relative; font-size: 26px; font-weight: 800; color: var(--ink); }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 0; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3b82f6, var(--brand)); transition: width .6s ease; }

/* ---------- Result ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 22px; }
.stat { text-align: center; padding: 20px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.stat .num { font-size: 34px; font-weight: 800; line-height: 1; color: var(--ink); }
.stat .lab { color: var(--ink-2); font-size: 13px; margin-top: 8px; }
.stat.total .num { color: var(--brand-600); }
.stat.hit .num { color: var(--red); }
.stat.clean .num { color: var(--green); }

.preview { margin-top: 8px; max-height: 320px; overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-2); font-weight: 600; z-index: 1; }
tbody tr:hover { background: var(--brand-50); }
tr.hit td { color: var(--red); }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--red-50); color: var(--red); }

.foot { text-align: center; margin-top: 34px; color: var(--ink-3); font-size: 13px; }

/* ---------- 后台（console.html） ---------- */
.admin-wrap { max-width: 920px; margin: 28px auto 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .step .label { font-size: 11px; }
  .card { padding: 20px; }
  .trust { gap: 16px; }
}
