/* 取阅 · 设计系统（无构建，纯 CSS） */
:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --accent: #ea580c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-50: #ecfdf5;
  --green-700: #047857;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-700: #b45309;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding-left: 1.2em; }
code, pre { font-family: var(--mono); font-size: 12.5px; }

.boot { padding: 80px 24px; text-align: center; color: var(--gray-500); }

/* ---------- 布局 ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 720px; margin: 0 auto; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--gray-500); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

/* ---------- 顶栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--gray-200);
}
.navbar-inner { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gray-900); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav-link { padding: 6px 12px; border-radius: 8px; color: var(--gray-600); font-size: 14px; }
.nav-link:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.nav-link.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px; background: var(--gray-100); color: var(--gray-600);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; text-transform: uppercase;
  border: none; cursor: pointer;
}
.menu {
  position: absolute; right: 16px; top: 60px; background: #fff; border: 1px solid var(--gray-200);
  border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; z-index: 40;
}
.menu-item { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 8px;
  color: var(--gray-700); background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.menu-item:hover { background: var(--gray-100); text-decoration: none; }
.menu-sep { height: 1px; background: var(--gray-100); margin: 6px 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-800); text-decoration: none; }
.btn-secondary { background: #fff; border-color: var(--gray-300); color: var(--gray-700); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); text-decoration: none; }
.btn-danger { background: #fff; border-color: var(--red-200); color: var(--red-600); }
.btn-danger:hover:not(:disabled) { background: var(--red-50); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--gray-300); border-radius: 8px;
  background: #fff; font: inherit; color: var(--gray-900); outline: none;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.hint { font-size: 12px; color: var(--gray-500); }
.error { font-size: 12px; color: var(--red-600); }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }

/* ---------- 卡片 / 分区 ---------- */
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.section-title { font-size: 18px; font-weight: 700; }
.panel { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-body { padding: 18px; }

/* ---------- 徽标 ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--gray-100); color: var(--gray-600); font-size: 12px; font-weight: 500; }
.pill-ok { background: var(--green-50); color: var(--green-700); }
.pill-warn { background: var(--amber-50); color: var(--amber-700); }
.pill-danger { background: var(--red-50); color: var(--red-700); }
.pill-brand { background: var(--brand-50); color: var(--brand-700); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--gray-500); font-size: 12px; text-transform: none;
  padding: 10px 12px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; background: var(--gray-50); }
.table td { padding: 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:hover td { background: var(--gray-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 48px 16px; text-align: center; color: var(--gray-500); }

/* ---------- 弹窗 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.45); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 820px; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--gray-100); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 落地页 ---------- */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: 40px; letter-spacing: -0.02em; }
.hero .lead { max-width: 620px; margin: 16px auto 0; color: var(--gray-600); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }
.hero-demo { max-width: 720px; margin: 40px auto 0; background: #0f172a; color: #e2e8f0; border-radius: 12px;
  padding: 18px 20px; text-align: left; font-family: var(--mono); font-size: 12.5px; overflow-x: auto; }
.hero-demo .dim { color: #94a3b8; }
.hero-demo .ok { color: #34d399; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.feature { padding: 20px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--gray-600); font-size: 13.5px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan { padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.plan.recommended { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.plan .price { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.plan ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--gray-600); }
.plan li::before { content: '✓'; color: var(--green-700); margin-right: 6px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* ---------- 认证页 ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--gray-600); margin-top: 16px; }

/* ---------- 阅读 ---------- */
.split { display: grid; grid-template-columns: 380px 1fr; gap: 0; border: 1px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden; background: #fff; min-height: 70vh; }
.list-pane { border-right: 1px solid var(--gray-200); overflow-y: auto; max-height: calc(100vh - 140px); }
.reader-pane { overflow-y: auto; max-height: calc(100vh - 140px); padding: 28px 32px; }
.tl-item { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); cursor: pointer; display: block; color: inherit; }
.tl-item:hover { background: var(--gray-50); text-decoration: none; }
.tl-item.active { background: var(--brand-50); }
.tl-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.tl-meta { font-size: 12px; color: var(--gray-500); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.article h1 { font-size: 26px; margin-bottom: 12px; }
.article-meta { color: var(--gray-500); font-size: 13px; margin-bottom: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.article-body h2 { font-size: 19px; margin: 24px 0 10px; }
.article-body p { margin: 12px 0; color: var(--gray-800); line-height: 1.85; }
.article-body img { max-width: 100%; border-radius: 8px; }
.locked { padding: 40px; text-align: center; color: var(--gray-500); }

/* ---------- 订阅表 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.spacer { flex: 1; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }

/* ---------- 提示条 ---------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  background: var(--amber-50); border: 1px solid var(--amber-200); color: #92400e; font-size: 13px; margin-bottom: 16px; }
.banner.info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }
.banner.danger { background: var(--red-50); border-color: var(--red-200); color: var(--red-700); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--gray-900); color: #fff; padding: 10px 16px;
  border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 100; font-size: 13px; max-width: 360px; }
.toast.error { background: var(--red-600); }
.toast.success { background: var(--green-700); }

/* ---------- 后台 ---------- */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-side { background: #fff; border-right: 1px solid var(--gray-200); padding: 16px 10px; }
.admin-group { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 10px 6px; }
.admin-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--gray-700); font-size: 13.5px; }
.admin-link:hover { background: var(--gray-100); text-decoration: none; }
.admin-link.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.admin-main { padding: 24px; overflow-x: auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { padding: 16px; }
.kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--gray-500); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 12px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--gray-600);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--brand-700); border-color: var(--brand-600); font-weight: 600; }

/* ---------- 收银台 ---------- */
.qr { width: 220px; height: 220px; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 12px; }
.qr svg { width: 100%; height: 100%; }
.price-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.price-line.total { border-top: 1px solid var(--gray-100); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 16px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .list-pane { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--gray-200); }
  .reader-pane { max-height: none; padding: 20px; }
  .admin { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; gap: 4px; border-right: 0; border-bottom: 1px solid var(--gray-200); }
  .admin-group { display: none; }
  .hero h1 { font-size: 30px; }
  .nav-links { display: none; }
}

.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--brand-500), var(--brand-700)); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar-label { font-size: 11px; color: var(--gray-500); white-space: nowrap; }

.nav-burger { display: none; margin-left: auto; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700); font-size: 16px; cursor: pointer; }
.mobile-panel { position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; z-index: 40; }
@media (max-width: 900px) { .nav-burger { display: inline-flex; align-items: center; justify-content: center; } }
