/* ============================================================
   极零科技工作室 · 公共样式
   视觉规范仿照用户提供参考页：白底 + 浅灰分区 + 黑色主按钮 + 细边框卡片
   顶部任务栏保留原有交互（悬浮胶囊 / 滚动收缩 / logo 果冻动效）
   ============================================================ */
:root {
  color-scheme: light;
  --white: #ffffff;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f3f5f7;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #8b95a5;
  --line: #e6e9ee;
  --line-strong: #d7dce3;
  --brand: #111827;
  --brand-hover: #2b3442;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --radius: 12px;
  --radius-small: 9px;
  --shadow-card: 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-hover: 0 14px 34px rgba(17, 24, 39, 0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  /* 后台 / 安装页兼容别名 */
  --muted: #8b95a5;
  --red: #c24146;
  --card: #ffffff;
}
*,
*::before,
*::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; color: var(--text); }
p { margin: 0; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.32); outline-offset: 3px; }
[hidden] { display: none !important; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: var(--mono); }

/* ---------- 通用按钮（仿参考页） ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.12);
}
.button-primary:hover { background: var(--brand-hover); box-shadow: 0 7px 18px rgba(17, 24, 39, 0.16); }
.button-outline {
  border-color: var(--line-strong);
  background: var(--white);
  color: var(--text-secondary);
}
.button-outline:hover { border-color: var(--text); color: var(--text); }
.button-text {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
}
.button-text:hover { color: #1d4ed8; transform: none; }
.button-lg { min-height: 48px; padding: 0 24px; font-size: 15px; }
.button:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 顶部任务栏（保留交互，仅换配色） ---------- */
.ds-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  margin: 0 auto;
  width: min(100% - 40px, 1120px);
  padding-top: 10px;
}
.ds-header-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: max-width .5s var(--ease), padding .5s var(--ease);
}
.ds-header-bar::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease-in-out, visibility 0s .35s;
  pointer-events: none;
}
.ds-header-bar.is-scrolled::before { opacity: 1; visibility: visible; transition: opacity .35s ease-in-out, visibility 0s; }
.ds-header-bar.is-scrolled { max-width: 900px; padding: 0 10px 0 16px; }

.brand { display: flex; align-items: center; gap: 9px; flex: none; text-decoration: none; transform-origin: center center; }
@keyframes brand-jelly {
  0% { transform: scale(1, 1); }
  26% { transform: scale(.88, .97); }
  44% { transform: scale(1.05, 1.015); }
  58% { transform: scale(.97, 1.003); }
  70% { transform: scale(1.018, .998); }
  80% { transform: scale(.992, 1.001); }
  89% { transform: scale(1.006, 1); }
  95% { transform: scale(.998, 1); }
  100% { transform: scale(1, 1); }
}
.brand.is-jelly { animation: brand-jelly .8s cubic-bezier(.25, .46, .45, .94) both; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; object-fit: contain; }
.brand-name { font-size: 15px; font-weight: 750; color: var(--text); }

.nav-desktop { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-small);
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}
.nav-link:hover { color: var(--text); background: var(--surface-muted); }

.nav-drop { position: relative; }
.chev { width: 12px; height: 12px; color: var(--text-muted); transition: transform 160ms ease; }
.nav-drop:hover .chev, .nav-drop.is-open .chev { transform: rotate(180deg); }
.drop-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity .2s, visibility .2s;
  z-index: 60;
}
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu, .nav-drop.is-open .drop-menu { opacity: 1; visibility: visible; }
.drop-panel {
  width: 288px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.drop-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-small); transition: background 160ms ease; }
.drop-item:hover { background: var(--surface-muted); }
.drop-icon { width: auto; height: 26px; max-width: 82px; flex: none; object-fit: contain; }
.drop-item b { display: block; font-size: 14px; font-weight: 650; line-height: 1.45; }
.drop-item small { display: block; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.drop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  padding: 10px 10px 6px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.drop-foot .arr { transition: transform 160ms ease; }
.drop-foot:hover .arr { transform: translateX(3px); }

.ds-locale-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-muted);
}
.ds-locale-toggle-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.ds-locale-toggle-item.is-active { background: var(--white); color: var(--text); box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08); }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
  color: var(--text);
}
.menu-btn:hover { background: var(--surface-muted); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  background: var(--white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
}
.mobile-menu-body { flex: 1; overflow-y: auto; padding: 6px 20px 18px; }
.mobile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}
.mobile-menu-item small { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.mobile-menu-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

/* ---------- 首屏 ---------- */
.hero { padding: 150px 0 94px; border-bottom: 1px solid var(--line); background: var(--white); text-align: center; }
.hero-inner { width: min(780px, 100%); margin: 0 auto; }
.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { max-width: 740px; margin: 0 auto 22px; font-size: clamp(38px, 6vw, 64px); font-weight: 780; letter-spacing: -0.055em; line-height: 1.12; }
.hero-lead { max-width: 600px; margin: 0 auto 30px; color: var(--text-secondary); font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-note { margin: 22px 0 0; color: var(--text-muted); font-size: 13px; }

/* ---------- 区块 ---------- */
.section { padding: 92px 0; scroll-margin-top: 84px; }
.section-muted { background: var(--bg); }
.section-heading { max-width: 650px; margin: 0 auto 42px; text-align: center; }
.section-kicker { margin-bottom: 14px; letter-spacing: 0.12em; }
.section h2 { margin: 0 0 16px; font-size: clamp(30px, 4vw, 42px); font-weight: 760; letter-spacing: -0.04em; line-height: 1.22; }
.section-intro { max-width: 610px; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.9; }
.section-heading .section-intro { margin: 0 auto; }

/* 理念 / 特性列表 */
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: center; gap: 88px; }
.feature-list { display: grid; gap: 0; margin-top: 34px; }
.feature-item { display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); }
.feature-item:last-child { border-bottom: 1px solid var(--line); }
.feature-index { padding-top: 3px; color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.feature-item h3 { margin: 0 0 3px; font-size: 16px; font-weight: 700; }
.feature-item p { color: var(--text-secondary); font-size: 14px; line-height: 1.75; }

.example-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.card-label { margin-bottom: 20px; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-showcase { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 24px; border-radius: 12px; background: var(--surface-muted); }
.brand-showcase img { width: 150px; height: 150px; object-fit: contain; }
.short-url { margin-top: 18px; color: var(--text); font-family: var(--mono); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
}
.card-footer a { color: var(--accent); font-weight: 650; text-decoration: none; }
.card-footer a:hover { color: #1d4ed8; }

/* 项目卡片（可交互方块） */
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms ease, border-color 180ms ease;
}
.project-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-logo { width: auto; height: 44px; max-width: 172px; flex: none; object-fit: contain; }
.project-badge {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.project-card h3 { font-size: 17px; font-weight: 700; }
.project-card p { flex: 1; color: var(--text-secondary); font-size: 14px; line-height: 1.75; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag { padding: 3px 8px; border-radius: 6px; background: var(--surface-muted); color: var(--text-muted); font-size: 12px; }
.project-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 14px; font-weight: 650; }
.project-link .arr { transition: transform 160ms ease; }
.project-card:hover .project-link .arr { transform: translateX(3px); }

/* 最近打赏 */
.recent-card {
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.recent-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.recent-item:last-child { border-bottom: 0; }
.recent-method {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.recent-method img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.recent-remark { flex: 1; min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { flex: none; color: var(--text-muted); font-size: 12px; }
.recent-amount { flex: none; color: var(--text); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.recent-loading { padding: 22px 20px; color: var(--text-muted); font-size: 14px; text-align: center; }

/* CTA */
.cta-section { padding: 28px 0 92px; background: var(--bg); }
.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 42px 48px;
  border-radius: 16px;
  background: var(--brand);
  color: var(--white);
}
.cta-card .section-kicker { margin-bottom: 12px; color: #93c5fd; }
.cta-card h2 { margin-bottom: 10px; color: var(--white); font-size: clamp(24px, 3vw, 34px); }
.cta-card p { color: #c7cfdb; font-size: 14px; }
.cta-card .button { flex: 0 0 auto; background: var(--white); color: var(--brand); box-shadow: none; }
.cta-card .button:hover { background: #eef2f7; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 34px 0 28px; border-top: 1px solid var(--line); background: var(--white); }
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { color: var(--text); font-size: 15px; font-weight: 750; text-decoration: none; }
.footer-links { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 160ms ease; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--text-secondary); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-provider { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); }
.footer-provider img { width: auto; height: 18px; max-width: 88px; object-fit: contain; }
.footer-icp { color: var(--text-muted); text-decoration: none; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--text);
  color: var(--white);
  box-shadow: var(--shadow-hover);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b4232a; }

/* ---------- 滚动入场（仅带 reveal-ready 的页面生效） ---------- */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
html.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .primary-nav { display: none; }
  .split-layout { grid-template-columns: 1fr; gap: 48px; }
  .example-card { width: min(360px, 100%); margin: 0 auto; }
  .cta-card { padding: 34px; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 32px, 560px); }
  .ds-header-wrapper { width: min(100% - 24px, 560px); }
  .ds-header-bar { min-height: 60px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 14px; }
  .nav-desktop { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding: 118px 0 68px; }
  .hero h1 { font-size: clamp(34px, 11vw, 48px); letter-spacing: -0.06em; }
  .hero-lead { font-size: 15px; }
  .hero-actions { flex-direction: column; gap: 14px; }
  .hero-actions .button { width: min(100%, 300px); }
  .section { padding: 68px 0; }
  .section h2 { font-size: 30px; }
  .cta-section { padding: 12px 0 68px; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 30px 24px; }
  .cta-card .button { width: 100%; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-links { justify-content: flex-start; gap: 12px 16px; }
  .recent-item { flex-wrap: wrap; }
  .recent-remark { flex-basis: 100%; order: 3; }
}
@media (min-width: 641px) { .menu-btn { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
  .ds-header-bar { transition: none; }
  .brand.is-jelly { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ============================================================
   后台 / 登录 / 安装页兼容样式
   ============================================================ */
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.nav nav { display: flex; gap: 26px; color: var(--muted); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.btn.light { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow-card); }
.form { width: min(100%, 420px); display: grid; gap: 14px; }
.form h1 { font-size: 40px; margin: 0 0 12px; }
.form input, .filters input, .filters select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.error { color: #dc2626; }
.success { color: #16a34a; }
.admin { padding: 55px 0; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 25px; flex-wrap: wrap; }
.admin-head h1 { font-size: 42px; margin: 10px 0 0; }
.admin-stats { color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filters input { max-width: 360px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: #fafbfc; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 99px; font-size: 12px; }
.paid { color: #15803d; background: #dcfce7; }
.wait { color: #a16207; background: #fef3c7; }
.refunded { color: #1d4ed8; background: #dbeafe; }
.ip-cell { font-family: var(--mono); font-size: 12px; color: var(--text-secondary); }
.mini-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.mini-btn:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-muted); }
.mini-btn.danger { color: var(--red); border-color: #f3d3d5; }
.mini-btn.danger:hover { background: #fdf2f2; }
.detail-row td { background: #fafbfc; white-space: normal; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 22px; padding: 4px 0; }
.detail-grid span { display: block; color: var(--muted); font-size: 12px; }
.detail-grid b { display: block; font-size: 13px; font-weight: 600; color: var(--text); word-break: break-all; }
@media (max-width: 760px) {
  .nav nav { display: none; }
  .admin-head { align-items: start; flex-direction: column; }
  .filters { flex-direction: column; }
}

/* ============================================================
   后台 v2 组件：仪表盘统计卡 / 设置表单 / 加载动画 / 人机验证
   ============================================================ */
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 5px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: pro0-spin .7s linear infinite;
}
.spinner.dark { border-color: rgba(17, 24, 39, .2); border-top-color: var(--text); }
@keyframes pro0-spin { to { transform: rotate(360deg); } }
.mini-btn.is-loading { opacity: .75; cursor: wait; }

.nav nav a.active { color: var(--text); font-weight: 700; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat-card b { display: block; font-size: 30px; font-family: var(--mono); letter-spacing: -.02em; line-height: 1.3; }
.stat-card span { color: var(--muted); font-size: 13px; }

.bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 170px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bars::-webkit-scrollbar { display: none; }
.bars .bar {
  flex: 1 1 0;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 18px;
  gap: 4px;
  min-width: 14px;
}
.bars .bar-count,
.bars .bar-label {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bars .bar-plot { display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.bars .bar-plot i {
  display: block;
  width: 100%;
  max-width: 42px;
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: var(--brand);
  transition: height .35s var(--ease);
}
.bars .bar:hover .bar-plot i { background: var(--brand-hover); }
.bars-many .bar-count { visibility: hidden; }
.bars-empty-wrap { align-items: center; justify-content: center; }
.bars-empty { color: var(--text-muted); font-size: 13px; }

.settings-card { max-width: 880px; }
.settings-card h2 { margin: 0 0 4px; font-size: 21px; }
.settings-card .hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="password"], .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.field .sub { color: var(--muted); font-size: 12px; line-height: 1.6; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.logo-preview { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-muted); }
.logo-preview img { width: auto; height: 38px; max-width: 200px; padding: 3px 6px; border-radius: 8px; background: #fff; object-fit: contain; }
.radio-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question { flex: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.captcha-tip { margin: -4px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .bars .bar-count { visibility: hidden; }
}

/* ============================================================
   后台 v3：手机 / 电脑双端适配 + 持续优化
   ============================================================ */

/* 通用优化 */
.wrap { width: min(1200px, calc(100% - 40px)); }
.admin { padding: 40px 0 90px; }
.admin-head { margin-bottom: 22px; }
.admin-head h1 { font-size: 38px; margin: 8px 0 0; }
.admin-stats { font-size: 13px; }
.btn { min-height: 40px; }
.mini-btn { min-height: 32px; padding: 6px 12px; }
.settings-card { max-width: 920px; }
.nav a, .nav button, .admin a, .admin button, .center a, .center button { -webkit-tap-highlight-color: transparent; }

/* 顶部导航（桌面：品牌 + 功能 + 快捷，单行） */
.nav {
  height: auto;
  min-height: 64px;
  flex-wrap: wrap;
  gap: 0 14px;
  padding: 0 max(18px, calc((100% - 1200px) / 2));
}
.nav .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.nav nav { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.nav nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.nav nav a:hover { color: var(--text); background: var(--surface-muted); }
.nav nav a.active { color: var(--text); background: var(--surface-muted); font-weight: 700; }
.nav-quick { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.nav-mini {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.nav-mini:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-muted); }

/* 表格（桌面） */
th { font-weight: 700; }
.orders-table { min-width: 1080px; }
.visits-table { min-width: 720px; }

/* ---------- 手机适配（≤880px） ---------- */
@media (max-width: 880px) {
  .wrap { width: calc(100% - 24px); }
  .admin { padding: 22px 0 70px; }
  .admin-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .admin-head h1 { font-size: 30px; }

  /* 导航：品牌+快捷一行，功能胶囊横滑一行 */
  .nav { padding: 0 12px; }
  .nav .brand { padding: 13px 0 10px; font-size: 15px; }
  .nav-quick { padding: 9px 0; gap: 6px; }
  .nav-mini { padding: 6px 11px; font-size: 12px; }
  .nav nav {
    order: 3;
    flex: 0 0 100%;
    gap: 8px;
    margin: 0 -12px;
    padding: 8px 12px 12px;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a {
    flex: none;
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #fff;
    font-size: 13px;
  }
  .nav nav a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

  /* 输入控件：16px 防 iOS 缩放，加大点击区域 */
  .filters input, .filters select, .field input, .field select, .field textarea, .form input {
    font-size: 16px;
    min-height: 46px;
  }
  .field textarea { min-height: 92px; }
  .filters .btn { min-height: 46px; width: 100%; }
  .radio-row { gap: 10px 16px; }
  .logo-preview { flex-wrap: wrap; }
  .logo-preview img { height: 32px; }
  .captcha-row { flex-wrap: wrap; }
  .captcha-row input { flex: 1 1 140px; }
  .stat-cards { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card b { font-size: 24px; }
  .bars { height: 142px; padding: 12px 12px 8px; gap: 5px; }

  /* 订单列表 → 卡片式 */
  .orders-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .orders-table { min-width: 0; }
  .orders-table thead { display: none; }
  .orders-table tbody { display: block; }
  .orders-table tr { display: block; }
  .orders-table tr.order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .04);
  }
  .orders-table tr.order-row:hover { background: #fff; }
  .orders-table td { display: block; border: 0; padding: 0; white-space: normal; }
  .orders-table td.c-no::before { content: attr(data-label) " "; }
  .orders-table td.c-no { order: 1; grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
  .orders-table td.c-amount { order: 2; align-self: center; font-size: 21px; font-weight: 750; }
  .orders-table td.c-status { order: 3; justify-self: end; align-self: center; }
  .orders-table td.c-type { order: 4; }
  .orders-table td.c-time { order: 5; justify-self: end; text-align: right; }
  .orders-table td.c-remark { order: 6; grid-column: 1 / -1; }
  .orders-table td.c-ip { order: 7; grid-column: 1 / -1; }
  .orders-table td.c-ops {
    order: 8;
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .orders-table td.c-ops .mini-btn { flex: 1; min-height: 40px; font-size: 14px; }
  .orders-table td.c-meta::before { content: attr(data-label) "："; display: block; margin-bottom: 2px; color: var(--text-muted); font-size: 11px; }
  .orders-table td.c-time::before { text-align: right; }

  .orders-table tr.detail-row {
    display: block;
    margin: -6px 0 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    background: #fafbfc;
  }
  .orders-table tr.detail-row td { border: 0; }
  .detail-grid { grid-template-columns: 1fr; gap: 8px; }

  /* 访问记录 → 卡片式 */
  .visits-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .visits-table { min-width: 0; }
  .visits-table thead { display: none; }
  .visits-table tbody { display: block; }
  .visits-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }
  .visits-table td { display: block; border: 0; padding: 0; white-space: normal; }
  .visits-table td.v-time { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; }
  .visits-table td.v-ip { font-family: var(--mono); font-size: 14px; font-weight: 650; }
  .visits-table td.v-page { justify-self: end; color: var(--text-secondary); font-size: 13px; }
  .visits-table td.v-ua { grid-column: 1 / -1; overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 420px) {
  .stat-card b { font-size: 21px; }
  .stat-card span { font-size: 12px; }
}

/* ============================================================
   后台 v4：弹窗提示 / 按钮式上传 / Logo 链接折叠 / 细节打磨
   ============================================================ */

/* 按钮手感 */
.btn { transition: transform .18s var(--ease), box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(17, 24, 39, .12); }
.btn.light:hover { box-shadow: 0 4px 12px rgba(17, 24, 39, .06); }
.btn:active { transform: translateY(0); }

/* 设置分区标题的小竖条 */
.settings-card h2 { display: flex; align-items: center; gap: 9px; }
.settings-card h2::before { content: ""; width: 4px; height: 18px; flex: none; border-radius: 2px; background: var(--brand); }

/* ---------- 居中弹窗（保存成功 / 失败） ---------- */
.ui-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; }
.ui-modal[hidden] { display: none !important; }
.ui-modal-mask { position: absolute; inset: 0; background: rgba(17, 24, 39, .42); opacity: 0; transition: opacity .2s ease; }
.ui-modal.is-open .ui-modal-mask { opacity: 1; }
.ui-modal-card {
  position: relative;
  width: min(340px, 100%);
  padding: 26px 24px 22px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(17, 24, 39, .22);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.ui-modal.is-open .ui-modal-card { opacity: 1; transform: none; }
.ui-modal-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 24px;
  font-weight: 800;
}
.ui-modal-card.is-error .ui-modal-icon { background: #fee2e2; color: #b4232a; }
.ui-modal-title { display: block; font-size: 17px; font-weight: 750; }
.ui-modal-text { margin: 8px 0 18px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.7; word-break: break-word; }
.ui-modal .btn { min-width: 120px; }

/* ---------- Logo 链接折叠（默认隐藏，点击 Logo 区展开） ---------- */
.logo-preview { cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.logo-preview:hover { border-color: var(--line-strong); }
.logo-preview-hint { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.logo-preview-chev { flex: none; color: var(--muted); font-size: 12px; transition: transform .18s ease; }
.logo-preview.is-open .logo-preview-chev { transform: rotate(180deg); }
.logo-preview-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}
.logo-preview-detail[hidden] { display: none !important; }
.logo-preview-detail code { flex: 1; min-width: 0; color: var(--text-secondary); font-family: var(--mono); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; word-break: break-all; }
.logo-preview-detail .mini-btn { flex: none; }

/* ---------- 按钮式上传 ---------- */
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.file-btn:hover { border-color: var(--text); background: var(--surface-muted); transform: translateY(-1px); }
.file-name { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.file-thumb[hidden] { display: none !important; }
.file-thumb img { display: block; width: 44px; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; object-fit: contain; }

@media (max-width: 880px) {
  .file-btn { min-height: 46px; }
  .logo-preview-detail { flex-direction: column; }
  .logo-preview-detail .mini-btn { align-self: flex-end; }
}

/* ============================================================
   后台 v5：时间范围切换 / IP 归属地 / 拉黑 / 分页
   ============================================================ */
.range-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}
.range-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.range-tab:hover { color: var(--text); background: #fff; }
.range-tab.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(17, 24, 39, .18);
}

td.v-geo { max-width: 230px; color: var(--text-secondary); font-size: 13px; }
td.v-geo .geo {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  vertical-align: bottom;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td.v-geo .geo.is-loaded { color: var(--text-secondary); }
.badge.blocked { color: #b4232a; background: #fee2e2; }
.inline-form { display: inline; }
td.v-ops { white-space: nowrap; }
.pager { display: flex; gap: 10px; margin: 14px 0 0; flex-wrap: wrap; }
.pager .btn { min-height: 36px; padding: 8px 16px; font-size: 13px; }

@media (max-width: 880px) {
  .range-tabs { display: flex; width: 100%; }
  .range-tab { flex: 1 1 0; min-height: 40px; padding: 0 6px; font-size: 13px; }
  .visits-table td.v-geo { grid-column: 1 / -1; max-width: none; }
  .visits-table td.v-ops {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .visits-table td.v-ops .mini-btn { min-height: 36px; }
  .pager .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   后台 v6：手感细节（表格悬停 / 按钮按压反馈 / 焦点可见）
   ============================================================ */
.visits-table tbody tr:hover td,
.orders-table tbody tr:hover td { background: #fafbfd; }
.btn:active, .mini-btn:active, .range-tab:active { transform: translateY(1px); }
.btn:focus-visible, .mini-btn:focus-visible, .range-tab:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }

/* ============================================================
   后台 v7：设置表单控件升级 + 自动保存（输入框 / 下拉 / 单选 / 上传）
   ============================================================ */
.settings-card .field { margin-bottom: 18px; }
.settings-card .field > label { display: block; font-size: 13px; font-weight: 650; color: var(--text-secondary); margin-bottom: 8px; }

.settings-card .field input[type="text"],
.settings-card .field input[type="number"],
.settings-card .field input[type="password"],
.settings-card .field textarea,
.settings-card .field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.settings-card .field textarea { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.settings-card .field input:hover,
.settings-card .field textarea:hover,
.settings-card .field select:hover { border-color: var(--line-strong); }
.settings-card .field input:focus,
.settings-card .field textarea:focus,
.settings-card .field select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.settings-card .field input::placeholder,
.settings-card .field textarea::placeholder { color: var(--text-muted); }
.settings-card .field input.is-invalid,
.settings-card .field textarea.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08); }

/* 下拉：自绘箭头 */
.settings-card .field select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}

/* 单选：分段式选择（手机 / 电脑都好用） */
.radio-row {
  display: flex;
  width: 100%;
  max-width: 520px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-muted);
}
.radio-row label {
  position: relative;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.radio-row label:hover { color: var(--text); }
.radio-row input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.radio-row label.is-on,
.radio-row label:has(input:checked) {
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 3px 10px rgba(17, 24, 39, .18);
}
.radio-row label:has(input:focus-visible) {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* 文件选择 */
.file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.file-btn:hover { border-color: var(--line-strong); background: #fafbfd; }
.file-name { color: var(--text-muted); font-size: 13px; }
.file-thumb img { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }

/* 自动保存提示胶囊 */
.autosave-chip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.24);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.autosave-chip.is-show { opacity: 1; transform: none; }
.autosave-chip.is-error { background: #b91c1c; }
.autosave-chip .mini-spinner { display: none; }
.autosave-chip.is-saving .mini-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: autosaveSpin .7s linear infinite;
}
@keyframes autosaveSpin { to { transform: rotate(360deg); } }

/* 卡片底部提示 */
.card-foot {
  margin: 10px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}
.card-foot a { color: var(--text); font-weight: 600; text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }

/* ============================================================
   后台 v8：流畅度 + 新组件（页面淡入 / 五栏统计 / 手动拉黑）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .wrap.admin { animation: adminIn .18s ease-out both; }
}
@keyframes adminIn { from { opacity: 0; transform: translateY(2px); } }

@media (min-width: 901px) {
  .stat-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat-cards .stat-card b { font-size: 26px; }
}

/* 手动拉黑输入行 */
.blacklist-add { display: flex; gap: 10px; max-width: 560px; margin: 0 0 14px; }
.blacklist-add input[type="text"] {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.blacklist-add input[type="text"]:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08); }
.blacklist-add .btn { min-height: 44px; }
@media (max-width: 640px) {
  .blacklist-add { flex-wrap: wrap; }
  .blacklist-add input[type="text"] { flex: 1 1 100%; }
  .blacklist-add .btn { width: 100%; }
}

/* ============================================================
   后台 v9：批量操作 + IP 类型徽章（IDC / 代理 / 移动 / 家庭）
   ============================================================ */
.batch-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.batch-bar .check-all-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.batch-bar .check-all-wrap:hover { border-color: var(--line-strong); }
.batch-bar .batch-num { color: var(--text-muted); font-size: 13px; }
.batch-bar .mini-btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.batch-bar .mini-btn:disabled { opacity: .45; cursor: not-allowed; }
.batch-bar input[type="checkbox"] { width: 17px; height: 17px; accent-color: #111827; margin: 0; }

th.v-check { width: 34px; }
td.v-check { width: 34px; text-align: center; }
td.v-check input { width: 17px; height: 17px; accent-color: #111827; margin: 0; cursor: pointer; }

.ipkind {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.7;
  vertical-align: 1px;
  white-space: nowrap;
}
.ipkind-idc    { background: #ffedd5; color: #c2410c; }
.ipkind-proxy  { background: #fee2e2; color: #b4232a; }
.ipkind-mobile { background: #dbeafe; color: #1d4ed8; }
.ipkind-home   { background: #f1f5f9; color: #475569; }

@media (max-width: 880px) {
  .visits-table tr { position: relative; }
  .visits-table td.v-check { position: absolute; top: 10px; right: 12px; width: auto; }
  .batch-bar .mini-btn { flex: 1; justify-content: center; }
}

/* ============================================================
   后台 v10：手机端精简显示（次要字段自动隐藏，电脑端不变）
   ============================================================ */
@media (max-width: 880px) {
  .v-hide-m { display: none !important; }
}

/* ============================================================
   后台 v11：登录页重设计 / 退款弹窗 / 访问地图 / 系统信息
   ============================================================ */

/* ---------- 登录页：左侧品牌面板 + 右侧登录表单 ---------- */
.login-body { margin: 0; background: #f6f5f1; }
.login-shell { display: flex; min-height: 100vh; }

.login-hero {
  position: relative;
  flex: 0 0 56%;
  min-height: 100vh;
  padding: 40px 54px 34px;
  background: #0d1014;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 95% at 28% 18%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 95% at 28% 18%, #000 25%, transparent 78%);
}
.login-hero::after {
  content: "";
  position: absolute;
  right: -190px;
  bottom: -230px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(116, 158, 255, .38), rgba(116, 158, 255, 0) 62%);
}
.hero-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.hero-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.hero-logo-img { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.hero-name { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.hero-mid { position: relative; z-index: 2; max-width: 520px; }
.hero-kicker {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .42);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .34em;
}
.hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hero-sub { margin: 0 0 26px; color: rgba(255, 255, 255, .62); font-size: 15px; line-height: 1.8; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips span {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .78);
  font-size: 12.5px;
}
.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .35);
  font-size: 12px;
}
.hero-dots { display: inline-flex; gap: 5px; }
.hero-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .3); }

.login-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #f6f5f1;
}
.login-mobile-brand { display: none; }
.login-card {
  width: min(378px, 100%);
  padding: 34px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .08);
}
.login-kicker { margin: 0 0 10px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .3em; }
.login-title { margin: 0 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { margin: 0 0 22px; color: var(--text-muted); font-size: 13px; }
.lf-field { display: block; margin-bottom: 14px; }
.lf-field > span { display: block; margin-bottom: 7px; color: var(--text-secondary); font-size: 12.5px; font-weight: 650; }
.lf-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfa;
  color: var(--text);
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.lf-field input:focus { outline: none; border-color: #111827; background: #fff; box-shadow: 0 0 0 4px rgba(17, 24, 39, .08); }
.lf-pass { position: relative; }
.lf-pass input { padding-right: 64px; }
.lf-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
}
.lf-eye:hover { background: #f1f1ee; color: var(--text); }
.lf-error {
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid #f3d1d1;
  border-radius: 10px;
  background: #fdf1f1;
  color: #b4232a;
  font-size: 13px;
  animation: lfShake .4s ease;
}
.lf-captcha { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lf-captcha-q {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  border: 1px dashed #d9d5ca;
  border-radius: 10px;
  background: #faf9f5;
  font-weight: 700;
  letter-spacing: .08em;
}
.lf-captcha input { flex: 1 1 auto; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.lf-tip { margin: 6px 0 12px; color: #b45309; font-size: 12px; }
.login-btn { width: 100%; min-height: 50px; margin-top: 8px; border-radius: 12px; font-size: 15px; letter-spacing: .08em; }
.login-btn em { font-style: normal; }
.login-btn .spinner { margin-right: 8px; }
.login-btn .spinner[hidden] { display: none; }
.login-foot { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; color: var(--text-muted); font-size: 12.5px; }
.login-foot a { color: var(--text-secondary); text-decoration: none; }
.login-foot a:hover { color: var(--text); }
.login-foot i { width: 3px; height: 3px; border-radius: 50%; background: #d5d2c8; }

@keyframes lfUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lfShake { 0%, 100% { transform: none; } 22% { transform: translateX(-5px); } 66% { transform: translateX(5px); } }
.hero-mid > * { animation: lfUp .62s cubic-bezier(.22, .8, .28, 1) both; }
.hero-mid > *:nth-child(2) { animation-delay: .08s; }
.hero-mid > *:nth-child(3) { animation-delay: .16s; }
.hero-mid > *:nth-child(4) { animation-delay: .24s; }
.login-card { animation: lfUp .58s .06s cubic-bezier(.22, .8, .28, 1) both; }

@media (max-width: 880px) {
  .login-shell { display: block; }
  .login-hero { display: none; }
  .login-main { min-height: 100vh; align-items: flex-start; justify-content: flex-start; padding: 28px 20px 48px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 26px; color: var(--text-muted); font-size: 13px; }
  .login-mobile-brand b { color: var(--text); font-size: 15px; }
  .login-card { width: 100%; padding: 6px 2px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .login-kicker { display: none; }
  .login-title { font-size: 30px; margin-bottom: 8px; }
  .lf-field input, .lf-captcha input { font-size: 16px; }
  .lf-field input { height: 50px; }
  .login-btn { min-height: 52px; margin-top: 10px; }
}

/* ---------- 退款：自定义确认弹窗 ---------- */
.rf-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.rf-modal[hidden] { display: none !important; }
.rf-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, .46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .26s ease;
}
.rf-modal.is-open .rf-mask { opacity: 1; }
.rf-card {
  position: relative;
  width: min(408px, 100%);
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(10, 12, 16, .3);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(.955);
  transition: opacity .28s cubic-bezier(.22, .8, .28, 1), transform .28s cubic-bezier(.22, .8, .28, 1);
}
.rf-modal.is-open .rf-card { opacity: 1; transform: none; }
.rf-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #fdf1f1;
  color: #b4232a;
  font-size: 23px;
  font-style: normal;
}
.rf-title { display: block; font-size: 18px; font-weight: 780; }
.rf-order { margin: 8px 0 2px; color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.rf-amount { margin: 6px 0 10px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.rf-note { margin: 0 0 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.rf-actions { display: flex; gap: 10px; }
.rf-actions .btn { flex: 1; min-height: 44px; }
.rf-ok { border-color: #b4232a; background: #b4232a; color: #fff; }
.rf-ok:hover { background: #9c1e24; border-color: #9c1e24; }
.rf-ok:disabled { opacity: .6; cursor: wait; }
.rf-ok em { font-style: normal; }
.rf-ok .spinner { margin-right: 6px; }
.rf-ok .spinner[hidden] { display: none; }

/* ---------- 访问地图 ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); gap: 18px; align-items: start; }
.map-card { position: relative; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.map-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; color: var(--text-muted); font-size: 12px; }
.map-legend i { width: 14px; height: 10px; border-radius: 3px; }
.map-wrap { position: relative; margin-top: 4px; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.prov { stroke: #fff; stroke-width: .7; fill: #eef1f5; transition: fill .25s ease, opacity .2s ease; }
.prov.lvl-1 { fill: #e2ebf3; }
.prov.lvl-2 { fill: #b6ccdf; }
.prov.lvl-3 { fill: #7d9fbd; }
.prov.lvl-4 { fill: #41678a; }
.prov.lvl-5 { fill: #16293c; }
.prov:hover { opacity: .84; }
.map-legend i.lvl-1 { background: #e2ebf3; }
.map-legend i.lvl-2 { background: #b6ccdf; }
.map-legend i.lvl-3 { background: #7d9fbd; }
.map-legend i.lvl-4 { background: #41678a; }
.map-legend i.lvl-5 { background: #16293c; }
.map-tip {
  position: absolute;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -135%);
  box-shadow: 0 8px 22px rgba(17, 24, 39, .3);
}
.map-tip[hidden] { display: none; }
.map-note { margin: 10px 0 0; color: var(--text-muted); font-size: 12px; }
.map-side { padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.map-side h2 { margin: 0 0 12px; font-size: 15px; }
.muted { color: var(--text-muted); font-size: 13px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; }
.rank-i { flex: none; width: 18px; color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-align: center; }
.rank-n { flex: none; min-width: 52px; font-weight: 650; }
.rank-bar { flex: 1 1 auto; height: 6px; border-radius: 99px; background: #f0f1f3; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #9db9d2, #1d3b55); }
.rank-c { flex: none; font-weight: 750; }
.map-side-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--text-muted);
  font-size: 12.5px;
}
.map-side-foot b { color: var(--text); }

@media (max-width: 880px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-card, .map-side { padding: 12px; border-radius: 14px; }
  .map-tip { display: none; }
  .rank li { padding: 6px 0; }
}

/* ---------- 系统信息（仪表盘） ---------- */
.sys-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 16px 0 22px;
  padding: 13px 16px;
  border: 1px dashed #ddd9cf;
  border-radius: 14px;
  background: #fbfaf7;
  color: var(--text-muted);
  font-size: 12.5px;
}
.sys-line b { color: var(--text); font-weight: 650; }

/* 修正：登录页左侧标题/品牌不受全局标题颜色影响 */
.login-hero .hero-title { color: #fff; }
.login-hero .hero-name { color: #fff; }

/* 修正：登录页主区域纵向排列（移动端品牌行 + 登录卡片上下堆叠） */
.login-main { flex-direction: column; }

/* 访问地图：限制桌面端高度，首屏更完整 */
.map-wrap svg { max-height: 640px; }
@media (max-width: 880px) {
  .map-wrap svg { max-height: none; }
}
