/* ==========================================================================
   定位分销系统 · 前台视觉系统
   基调：纸白底 + 近黑文字 + 单一钴蓝强调；细线分区，等宽数字，动效只做位移/透明度
   ========================================================================== */

:root {
    --ink: #101319;
    --ink-soft: #39424e;
    --muted: #6a7280;
    --line: #e2e0da;
    --line-strong: #cdc9c0;
    --paper: #f6f4ef;
    --card: #ffffff;
    --accent: #2148c8;
    --accent-ink: #17328f;
    --accent-soft: #eef1fb;
    --ok: #0f6b4b;
    --ok-soft: #e8f4ee;
    --warn: #9a5b0b;
    --warn-soft: #fbf1e2;
    --danger: #a92a20;
    --danger-soft: #fbebe9;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(16, 19, 25, .04), 0 12px 28px -18px rgba(16, 19, 25, .35);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --ease: cubic-bezier(.22, .61, .36, 1);
    /* 兼容旧页面的变量名 */
    --primary: var(--accent);
    --primary-dark: var(--accent-ink);
    --primary-hover: var(--accent-ink);
    --dark: var(--ink);
    --gray: var(--muted);
    --text: var(--ink);
    --text-light: var(--muted);
    --border: var(--line);
    --border-color: var(--line);
    --bg: var(--paper);
    --white: #fff;
    --success: var(--ok);
    --success-bg: var(--ok-soft);
    --error: var(--danger);
    --error-bg: var(--danger-soft);
    --light-gray: var(--paper);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--card);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.015em; margin: 0; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 顶部滚动进度 */
.scroll-progress {
    position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90;
    background: var(--accent); transform: scaleX(var(--progress, 0));
    transform-origin: 0 50%; transition: transform .1s linear;
}

/* ---------- 导航 ---------- */
header.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background .3s var(--ease);
}
header.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .95); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 1.02rem; font-weight: 650; letter-spacing: .01em; color: var(--ink);
}
.logo i { color: var(--accent); font-size: .95rem; }
.logo .logo-mark {
    width: 26px; height: 26px; border: 1px solid var(--line-strong); border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    position: relative; padding: 8px 12px; font-size: .92rem; color: var(--ink-soft);
    border-radius: var(--radius-sm); transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a.btn { margin-left: 6px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-family: inherit; font-size: .92rem; font-weight: 600; letter-spacing: .01em;
    cursor: pointer; text-align: center; white-space: nowrap;
    transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn i { font-size: .88em; transition: transform .18s var(--ease); }
.btn:hover i.fa-arrow-right, .btn:hover .btn-arrow { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(16, 19, 25, .03); }

/* ---------- 首屏 ---------- */
.hero {
    position: relative; padding: 84px 0 72px; overflow: hidden;
    background:
        radial-gradient(120% 90% at 12% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(180deg, var(--paper) 0%, #fbfaf7 100%);
    border-bottom: 1px solid var(--line);
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(16, 19, 25, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 19, 25, .05) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 78%);
    opacity: .9;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
.badge {
    display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
    background: #fff; color: var(--ink-soft); font-size: .76rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(2rem, 3.4vw + 1rem, 3.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.18; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.02rem; max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 34px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stats div span.num {
    display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.hero-stats div span.txt { display: block; font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

.hero-card {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}
.hero-card::after {
    content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent 60%); opacity: .55;
}
.hero-card h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.step { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step .num {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-strong);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: .76rem; color: var(--accent); background: var(--accent-soft);
}
.step b { display: block; font-size: .93rem; font-weight: 600; }
.step span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

/* ---------- 区块 ---------- */
section { padding: 76px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head .kicker { display: block; font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; color: var(--accent); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.85rem); font-weight: 700; margin-bottom: 10px; }
.section-head p { color: var(--muted); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
    transition: border-color .2s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.role-card { position: relative; }
.role-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.role-card .index { font-family: var(--mono); font-size: .74rem; color: var(--muted); letter-spacing: .12em; }
.role-card h3 { font-size: 1.06rem; margin: 10px 0 8px; display: flex; align-items: center; gap: 9px; }
.role-card h3 i { color: var(--accent); font-size: .9em; }
.role-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.role-card li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--ink-soft); font-size: .9rem; border-top: 1px solid var(--line); }
.role-card li:first-child { border-top: 0; }
.role-card li i { color: var(--ok); font-size: .72rem; margin-top: 7px; }

/* ---------- 价格 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.price-card {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.price-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.price-card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.price-card.hot::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.price-tag { align-self: flex-start; margin-bottom: 14px; padding: 3px 9px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.price-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.price { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price small { font-family: var(--font); font-size: .82rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price-desc { flex-grow: 1; color: var(--muted); font-size: .88rem; margin: 12px 0 22px; }
.price-card .btn { width: 100%; }
.empty-tip { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- 页脚 ---------- */
footer.site-footer { background: var(--ink); color: #b9bec7; padding: 40px 0; font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner a { color: #d7dbe2; transition: color .2s var(--ease); }
.footer-inner a:hover { color: #fff; }
footer .dot { color: #4a525e; margin: 0 6px; }

/* ---------- 登录 / 注册 ---------- */
.auth-body {
    min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
    background: var(--paper);
}
.auth-brand {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px; background: var(--ink); color: #e8eaee; overflow: hidden;
}
.auth-brand::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(70% 60% at 20% 0%, #000 0%, transparent 80%);
    mask-image: radial-gradient(70% 60% at 20% 0%, #000 0%, transparent 80%);
}
.auth-brand .brand-top { position: relative; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.auth-brand .brand-top i { color: #8fa8ff; }
.auth-brand .brand-main { position: relative; max-width: 20em; }
.auth-brand h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.15rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.35; margin-bottom: 16px; }
.auth-brand p { color: #a7aeb9; font-size: .93rem; }
.auth-brand .brand-foot { position: relative; display: flex; gap: 26px; font-family: var(--mono); font-size: .76rem; color: #8992a0; letter-spacing: .06em; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-container { width: 100%; max-width: 424px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.auth-header { margin-bottom: 26px; }
.auth-header h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-header p { color: var(--muted); font-size: .9rem; }
.auth-header p a { color: var(--accent); font-weight: 600; }
.auth-header p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .02em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .form-group { margin-bottom: 16px; }
.form-control {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form-control::placeholder { color: #a3a9b3; }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33, 72, 200, .12); }
.form-control[readonly] { background: var(--paper); font-family: var(--mono); font-size: .82rem; }
.btn-block { width: 100%; }
.auth .btn.btn-block { margin-top: 6px; padding: 12px; }
.auth-note { margin-top: 16px; color: var(--muted); font-size: .8rem; text-align: center; line-height: 1.6; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-align: center; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .88rem; border: 1px solid; }
.alert-danger { background: var(--danger-soft); border-color: #f1cfcb; color: #7d1c14; }
.alert-success { background: var(--ok-soft); border-color: #c9e5d7; color: #0b4f37; }
.alert-info { background: var(--accent-soft); border-color: #d5ddf7; color: #1b3a9e; }
.alert-warning { background: var(--warn-soft); border-color: #f0dcc0; color: #7a4708; }

/* ---------- 用户中心 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .kicker { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; color: var(--accent); margin-bottom: 8px; }
.page-head h1 { font-size: 1.45rem; font-weight: 650; }
.page-head .meta { color: var(--muted); font-size: .84rem; }
.dashboard-container { display: flex; min-height: 100vh; background: var(--paper); }
.sidebar {
    position: fixed; top: 0; left: 0; z-index: 100; width: 248px; height: 100%;
    display: flex; flex-direction: column; padding: 26px 18px;
    background: var(--ink); color: #c6ccd6; border-right: 1px solid #1c212b;
    transition: transform .3s var(--ease);
}
.sidebar-header { padding-bottom: 20px; margin-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar-header h2 { font-size: 1rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 9px; }
.sidebar-header h2 i { color: #8fa8ff; }
.sidebar-header p { margin: 10px 0 0; font-size: .84rem; color: #9aa3b0; }
.sidebar-header p strong { color: #eef1f5; font-weight: 600; }
.sidebar-nav { flex: 1; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 2px;
    border-radius: var(--radius-sm); color: #b6bdc9; font-size: .9rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.sidebar-nav li a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-nav li a.active { background: rgba(143, 168, 255, .14); color: #fff; box-shadow: inset 2px 0 0 #8fa8ff; }
.sidebar-nav li a i { width: 18px; text-align: center; opacity: .8; }
.main-content { flex: 1; min-width: 0; margin-left: 248px; padding: 34px clamp(20px, 3vw, 44px); }
.header-bar { display: none; }
.header-bar h1 { font-size: 1.05rem; }

.dashboard-container .card { padding: 22px 24px; margin-bottom: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; padding: 0 !important; overflow: hidden; }
.stat-card { padding: 22px 24px; text-align: left; border-left: 1px solid var(--line); }
.stat-card:first-child { border-left: 0; }
.stat-card .value {
    font-family: var(--mono); font-size: 1.95rem; font-weight: 600; letter-spacing: -.03em; color: var(--ink);
    line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stat-card .label { color: var(--muted); font-size: .82rem; margin-top: 4px; letter-spacing: .03em; }
.stat-card .btn { margin-top: 4px; width: 100%; }

.tab-container { display: flex; gap: 2px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-container::-webkit-scrollbar { display: none; }
.tab-link {
    position: relative; padding: 10px 14px 12px; cursor: pointer; font-size: .9rem; font-weight: 500;
    color: var(--muted); white-space: nowrap; transition: color .18s var(--ease);
}
.tab-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s var(--ease);
}
.tab-link:hover { color: var(--ink); }
.tab-link.active { color: var(--ink); font-weight: 600; }
.tab-link.active::after { transform: scaleX(1); }
.tab-content { display: none; animation: tabIn .3s var(--ease); }
.tab-content.active { display: block; }
@keyframes tabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tab-content h3 { font-size: 1.02rem; font-weight: 650; }
.tab-content > p { color: var(--muted); font-size: .88rem; margin: 6px 0 16px; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-responsive { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: #fbfaf7; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: #fbfaf7; }
td .form-control { padding: 6px 8px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; }
.badge-agent { background: var(--accent-soft); color: var(--accent-ink); border-color: #d9e1f8; }
.badge-buyer { background: var(--ok-soft); color: var(--ok); border-color: #cfe6da; }
.badge-wait { background: var(--warn-soft); color: var(--warn); border-color: #eeddc3; }
.badge-done { background: var(--ok-soft); color: var(--ok); border-color: #cfe6da; }
.badge-cancel { background: #f1f0ed; color: var(--muted); border-color: var(--line); }

.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.package-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: left; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.package-item:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.package-item .p-name { font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.package-item .p-times { font-family: var(--mono); font-size: 1.55rem; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.package-item .p-price { font-family: var(--mono); color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }

.referral-link-box { display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.referral-link-box input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); padding: 8px; outline: none; }
.copy-btn { padding: 8px 14px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-family: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: background .18s var(--ease); }
.copy-btn:hover { background: var(--accent-ink); }

.btn-sm { padding: 5px 10px; border-radius: 5px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft); font-family: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; transition: all .16s var(--ease); }
.btn-sm:hover { border-color: var(--ink); color: var(--ink); }
.btn-muted { background: #f6f5f2; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8d2119; border-color: #8d2119; color: #fff; }
.inline-form { display: inline; }

.modal { display: none; position: fixed; inset: 0; z-index: 1001; overflow: auto; background: rgba(16, 19, 25, .45); backdrop-filter: blur(2px); }
.modal-content {
    position: relative; width: 92%; max-width: 480px; margin: 9vh auto; padding: 28px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgba(16, 19, 25, .5);
    animation: modalIn .25s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-content h2 { font-size: 1.15rem; margin-bottom: 10px; }
.modal-content p { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.close-btn { position: absolute; top: 14px; right: 18px; color: var(--muted); font-size: 22px; font-weight: 400; cursor: pointer; line-height: 1; transition: color .16s; }
.close-btn:hover { color: var(--ink); }
.modal .btn-primary { margin-top: 6px; }

/* ---------- 定位链接不可用 ---------- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--paper); }
.error-box { width: 100%; max-width: 400px; padding: 36px 32px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.error-box .icon {
    width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--danger-soft); color: var(--danger); border: 1px solid #f1cfcb;
    font-family: var(--mono); font-size: 1rem; font-weight: 600;
}
.error-box h1 { font-size: 1.05rem; margin-bottom: 8px; }
.error-box p { color: var(--muted); font-size: .9rem; }

/* ---------- 采集页 ---------- */
.collect-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; padding: 24px;
    background: var(--paper);
    background-image:
        linear-gradient(to right, rgba(16, 19, 25, .04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 19, 25, .04) 1px, transparent 1px);
    background-size: 64px 64px;
    color: var(--ink);
}
.collect-box { width: 100%; max-width: 380px; text-align: center; padding: 40px 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.spinner { width: 34px; height: 34px; margin: 0 auto 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.collect-box p { font-size: 1rem; font-weight: 600; }
.collect-box .hint { margin-top: 8px; font-size: .84rem; color: var(--muted); font-weight: 400; }

/* ---------- 入场动效 ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .hero { padding: 56px 0 48px; }
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-stats { gap: 26px; }
    section { padding: 54px 0; }
    .auth-body { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-panel { min-height: 100vh; }
}
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .header-bar {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        margin-bottom: 18px; padding: 12px 14px; background: #fff;
        border: 1px solid var(--line); border-radius: var(--radius);
    }
    .menu-toggle { font-size: 1.05rem; background: none; border: none; cursor: pointer; color: var(--ink); padding: 4px 6px; }
    .backdrop { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(16, 19, 25, .45); }
    .backdrop.active { display: block; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 18px; }
    .nav { height: 62px; }
    .nav-links a:not(.btn) { padding: 8px; font-size: .88rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero-stats { flex-wrap: wrap; gap: 18px 28px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { border-left: 1px solid var(--line); }
    .stat-card:nth-child(odd) { border-left: 0; }
    .stat-card:nth-child(n+3) { border-top: 1px solid var(--line); }
    .main-content { padding: 20px 16px; }
    .modal-content { margin: 12vh auto; padding: 22px; }
    .auth-container { padding: 26px 22px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
