:root {
  --bg: #0c0c13;
  --bg-elevated: #15151f;
  --bg-card: #191924;
  --border: #26263a;
  --text: #e7e7ef;
  --text-dim: #92929f;
  --accent: #7c5cff;
  --accent-2: #a78bfa;
  --accent-soft: rgba(124, 92, 255, 0.15);
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --radius: 10px;
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: rgba(12, 12, 19, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.brand .logo-dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  margin-left: 32px;
  overflow-x: auto;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-elevated); color: var(--text); }
.nav-links a.active { background: var(--accent-soft); color: var(--accent-2); }

.badge-new, .badge-hot {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: 2px;
}
.badge-new { background: var(--green); color: #06281d; }
.badge-hot { background: var(--red); color: #2a0d0d; }

.auth-area { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-primary:hover { opacity: 0.92; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: var(--red); color: #2a0d0d; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.user-chip .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-menu {
  position: absolute; top: 44px; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 160px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  display: none; overflow: hidden; z-index: 60;
}
.user-menu.open { display: block; }
.user-menu a, .user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 14px; font-size: 13px; color: var(--text);
  background: none; border: none; cursor: pointer;
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg-elevated); }

/* ---------- 容器 ---------- */
.container { max-width: 1680px; margin: 0 auto; padding: 20px 24px 60px; }

.page-title {
  font-size: 22px; font-weight: 700; text-align: center; margin: 18px 0 20px;
  letter-spacing: 0.5px;
}
.page-title .accent { color: var(--accent-2); }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--text-dim); min-width: 40px; }
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-dim);
  background: transparent;
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.search-box {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 220px;
}
.search-box input {
  background: none; border: none; outline: none; color: var(--text);
  font-size: 13px; width: 100%;
}

/* ---------- 表格 ---------- */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
thead th {
  text-align: left; padding: 12px 14px; color: var(--text-dim);
  border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: var(--bg-elevated); }
tbody tr:last-child td { border-bottom: none; }

.tag-pill {
  font-size: 11px; padding: 2px 8px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-2); white-space: nowrap;
}
.hot-dots { display: inline-flex; gap: 2px; }
.hot-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.hot-dots span.on { background: var(--red); }

.link-btn { color: var(--accent-2); font-size: 12px; }
.link-btn:hover { text-decoration: underline; }

.pagination {
  display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px;
}

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-dim);
}

/* ---------- 登录/注册 ---------- */
.auth-page {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,92,255,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(167,139,250,0.12), transparent 40%),
    var(--bg);
  padding: 20px;
}
.auth-card {
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.auth-card h1 {
  font-size: 20px; text-align: center; margin: 0 0 6px;
  background: linear-gradient(135deg, #fff, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-card p.subtitle { text-align: center; color: var(--text-dim); font-size: 13px; margin: 0 0 26px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text);
  font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button { white-space: nowrap; }

.form-error {
  background: rgba(248,113,113,0.12); color: var(--red);
  border: 1px solid rgba(248,113,113,0.3);
  padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; display: none;
}
.form-success {
  background: rgba(52,211,153,0.12); color: var(--green);
  border: 1px solid rgba(52,211,153,0.3);
  padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; display: none;
}

.auth-submit { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-dim); margin-top: 18px; }
.auth-switch a { color: var(--accent-2); font-weight: 600; }

/* ---------- 资料包 ---------- */
.pack-section h2 {
  font-size: 16px; margin: 26px 0 12px; color: var(--text);
  border-left: 3px solid var(--accent); padding-left: 10px;
}
.pack-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.pack-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.pack-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pack-icon { font-size: 24px; }
.pack-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pack-desc { font-size: 12px; color: var(--text-dim); }

/* ---------- 通用 ---------- */
.notice-banner {
  background: var(--accent-soft); color: var(--accent-2);
  border: 1px solid rgba(124,92,255,0.3);
  border-radius: var(--radius); padding: 10px 14px; font-size: 12.5px;
  margin-bottom: 14px; line-height: 1.7;
}

footer {
  text-align: center; color: var(--text-dim); font-size: 12px; padding: 30px 0 40px;
}

/* ---------- 会员标识 ---------- */
.member-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 4px; vertical-align: 1px;
  background: linear-gradient(135deg, #f5b942, #f97316); color: #2a1500; font-weight: 700;
}
.member-badge.permanent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

/* ---------- 资料包详情页 ---------- */
.breadcrumb { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent-2); }
.pack-detail-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.pack-detail-icon { font-size: 40px; }
.pack-detail-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.pack-detail-meta { font-size: 12.5px; color: var(--text-dim); display: flex; gap: 14px; flex-wrap: wrap; }

.file-table th, .file-table td { padding: 10px 14px; }
.file-icon { margin-right: 8px; }

.lock-box {
  margin-top: 20px; background: var(--bg-elevated); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.lock-box .lock-title { font-size: 14px; color: var(--text-dim); margin-bottom: 16px; }
.price-tiers { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto 18px; }
.price-tier {
  display: flex; justify-content: space-between; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.price-tier .tier-name { color: var(--text-dim); }
.price-tier .tier-price { font-weight: 700; color: var(--accent-2); }
.price-tier.recommend { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 会员开通页 ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 24px 0; }
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 24px; position: relative; display: flex; flex-direction: column;
}
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(124,92,255,0.2); }
.plan-card .plan-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.plan-card .plan-price { font-size: 32px; font-weight: 800; margin: 10px 0; }
.plan-card .plan-price small { font-size: 13px; color: var(--text-dim); font-weight: 400; }
.plan-card .plan-desc { font-size: 12.5px; color: var(--text-dim); margin-bottom: 16px; }
.plan-benefits { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan-benefits li { font-size: 13px; padding: 6px 0; color: var(--text); display: flex; gap: 8px; }
.plan-benefits li::before { content: "✓"; color: var(--green); font-weight: 700; }
.plan-tag {
  position: absolute; top: -10px; right: 20px; background: linear-gradient(135deg, #f5b942, #f97316);
  color: #2a1500; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700;
}

/* ---------- 个人中心 ---------- */
.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(124,92,255,0.18), rgba(167,139,250,0.08));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 20px;
}
.profile-header .who { display: flex; align-items: center; gap: 14px; }
.profile-header .avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.profile-header .name { font-size: 17px; font-weight: 700; }
.profile-header .expiry { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }

.profile-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.profile-nav {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.profile-nav button {
  display: block; width: 100%; text-align: left; padding: 13px 18px; background: none; border: none;
  color: var(--text-dim); font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.profile-nav button:last-child { border-bottom: none; }
.profile-nav button:hover { background: var(--bg-elevated); color: var(--text); }
.profile-nav button.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

.profile-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px;
  min-height: 300px;
}
.profile-panel h3 { margin-top: 0; font-size: 15px; }
.profile-field { margin-bottom: 14px; max-width: 420px; }
.profile-field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.profile-field input, .profile-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-size: 13px; outline: none;
}
.profile-field input:disabled { color: var(--text-dim); }

.orders-table th, .orders-table td { padding: 10px 14px; }
.order-status { font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.order-status.paid { background: rgba(52,211,153,0.15); color: var(--green); }
.order-status.pending { background: rgba(251,191,36,0.15); color: var(--yellow); }

/* ---------- 沙箱支付弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none;
  align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; width: 340px; text-align: center;
}
.modal-box .sandbox-tag {
  display: inline-block; font-size: 11px; background: rgba(251,191,36,0.15); color: var(--yellow);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 10px;
}
.modal-box .amount { font-size: 28px; font-weight: 800; margin: 10px 0 4px; }
.modal-box p { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.plan-admin-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; max-width: 520px;
}
.plan-admin-card h4 { margin: 0 0 12px; font-size: 14px; }

/* ---------- 首页多标签导航 ---------- */
.home-tab-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
}
.home-tab-btn {
  position: relative;
  padding: 9px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.home-tab-btn:hover { border-color: var(--accent); color: var(--text); }
.home-tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.home-tab-btn .badge-new, .home-tab-btn .badge-hot { position: absolute; top: -8px; right: -6px; }

.tab-panel { display: block; }

/* ---------- 投递进展表 ---------- */
.app-toolbar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap;
}
.app-toolbar .hint { margin-left: auto; font-size: 12px; color: var(--text-dim); }

.app-table-wrap { overflow-x: auto; }
table.app-table { min-width: 1400px; }
table.app-table td {
  min-width: 90px; cursor: text; position: relative;
}
table.app-table td.editing { padding: 4px 6px; }
table.app-table td.editing input {
  width: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--bg-elevated); color: var(--text); font-size: 13px; outline: none;
}
.app-table .col-check { width: 36px; text-align: center; }
.priority-dots { display: inline-flex; gap: 3px; cursor: pointer; }
.priority-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.priority-dots span.on { background: var(--red); }
.status-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 5px; background: var(--bg-elevated);
  color: var(--text-dim); display: inline-block; cursor: pointer;
}
.status-pill.stage { background: rgba(248,113,113,0.15); color: var(--red); }
.status-pill.waiting { background: var(--accent-soft); color: var(--accent-2); }
.status-pill.passed { background: rgba(52,211,153,0.15); color: var(--green); }
.status-pill.failed { background: rgba(148,148,159,0.2); color: var(--text-dim); }

/* ---------- 笔试真题汇总 ---------- */
.qb-search-box {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.qb-search-box input {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 14px; outline: none;
}
.qb-search-box input:focus { border-color: var(--accent); }
.qb-stats { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.qb-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; text-align: center; min-width: 120px; }
.qb-stat .num { font-size: 20px; font-weight: 800; color: var(--accent-2); }
.qb-stat .label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ---------- 专属备考资料 ---------- */
.consulting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.consulting-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 26px;
}
.consulting-card .cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.consulting-card .cc-title { font-size: 17px; font-weight: 700; }
.consulting-card .cc-price { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; }
.consulting-card ul { list-style: none; padding: 0; margin: 18px 0; }
.consulting-card ul li { display: flex; gap: 10px; font-size: 13.5px; padding: 7px 0; color: var(--text); }
.consulting-card ul li .n {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}

.qr-modal-box { text-align: center; }
.qr-modal-box img { width: 220px; height: 220px; border-radius: 8px; background: #fff; padding: 10px; }
.qr-placeholder {
  width: 220px; height: 220px; border-radius: 8px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 12px;
  margin: 0 auto; padding: 16px; text-align: center;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  table { min-width: 700px; }
}
