:root {
  --bg: #f4f5f7;
  --sidebar: #1f2937;
  --sidebar-hover: #374151;
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* 登录注册页 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2937, #374151); }
.auth-card { width: 380px; background: #fff; border-radius: 12px; padding: 36px 32px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.auth-card .logo { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-card .logo span { color: var(--primary); }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; color: #374151; }
.form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: border .2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }
.btn { display: inline-block; padding: 10px 18px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; transition: background .2s; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #f3f4f6; color: var(--text); }
.btn-ghost:hover { background: #e5e7eb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-link a { color: var(--primary); }

/* 主布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar); color: #d1d5db; flex-shrink: 0; padding: 16px 0; }
.sidebar .brand { padding: 0 20px 16px; font-size: 18px; font-weight: 700; color: #fff; border-bottom: 1px solid #374151; }
.sidebar .brand span { color: var(--primary); }
.sidebar .nav-group { padding: 12px 20px 4px; font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 1px; }
.sidebar .nav-item { display: block; padding: 10px 20px; font-size: 14px; color: #d1d5db; border-left: 3px solid transparent; }
.sidebar .nav-item:hover, .sidebar .nav-item.active { background: var(--sidebar-hover); color: #fff; border-left-color: var(--primary); }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar .page-title { font-size: 16px; font-weight: 600; }
.topbar .user-info { font-size: 13px; color: var(--muted); }
.topbar .user-info a { color: var(--primary); margin-left: 12px; }
.content { flex: 1; padding: 24px; overflow: auto; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f9fafb; color: #374151; font-weight: 600; }
tr:hover td { background: #fafafa; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-green { background: #d1fae5; color: #065f46; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-gray { background: #f3f4f6; color: #4b5563; }

/* Hub 入口卡片 */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hub-card { background: #fff; border-radius: 12px; padding: 28px; cursor: pointer; transition: transform .2s, box-shadow .2s; border: 1px solid var(--border); }
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.hub-card .icon { font-size: 32px; margin-bottom: 12px; }
.hub-card h3 { font-size: 17px; margin-bottom: 6px; }
.hub-card p { font-size: 13px; color: var(--muted); }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 10px; padding: 24px; width: 480px; max-width: 90vw; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 工具 */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); font-size: 13px; }
.text-right { text-align: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.alert-err { background: #fee2e2; color: #991b1b; }
.alert-ok { background: #d1fae5; color: #065f46; }
.log-box { background: #111827; color: #d1d5db; padding: 12px; border-radius: 8px; font-family: monospace; font-size: 12px; height: 200px; overflow-y: auto; }

/* 点对点入口卡片 */
.hub-title { text-align: center; padding: 26px 20px 22px; }
.hub-title h2 { font-size: 22px; margin-bottom: 8px; }
.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.entry-card { background: #fff; border-radius: 12px; padding: 26px; border-top: 4px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; min-height: 290px; }
.entry-card.buy { border-top-color: #3b82f6; }
.entry-card.reclaim { border-top-color: #f59e0b; }
.entry-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.entry-badge { font-size: 22px; font-weight: 800; }
.entry-card.buy .entry-badge { color: #3b82f6; }
.entry-card.reclaim .entry-badge { color: #f59e0b; }
.entry-head h3 { font-size: 17px; }
.entry-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.entry-list { list-style: none; padding: 0; margin: 0 0 20px; }
.entry-list li { font-size: 13px; color: #4b5563; padding-left: 20px; position: relative; margin-bottom: 8px; }
.entry-list li::before { content: "✓"; position: absolute; left: 0; color: #10b981; font-weight: 700; }
.entry-btn { margin-top: auto; display: block; text-align: center; padding: 11px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 600; }
.entry-btn.buy { background: #3b82f6; }
.entry-btn.reclaim { background: #f59e0b; }
.entry-btn:hover { opacity: .9; }
@media (max-width: 760px) { .entry-grid { grid-template-columns: 1fr; } }

/* 分段选择（支付方式） */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-btn { background: #fff; border: none; padding: 8px 26px; font-size: 13px; cursor: pointer; color: #4b5563; }
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.active { background: var(--primary); color: #fff; }
