/* ============================================================
   webcx 主样式表 · 浅色商业风
   ============================================================ */

/* ── CSS 变量 ─────────────────────────────────────────────── */
:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light:#eff6ff;
  --accent:       #7c3aed;
  --success:      #16a34a;
  --warning:      #d97706;
  --danger:       #dc2626;
  --danger-light: #fef2f2;

  --bg:           #f8fafc;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10);

  --navbar-h: 60px;
}

/* ── 重置 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ── 布局容器 ─────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 导航栏 ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--navbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  display: flex; align-items: center;
  height: 100%; gap: 32px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px;
  color: var(--text-primary); text-decoration: none;
  flex-shrink: 0;
}
.brand-icon { color: var(--primary); font-size: 28px; }
.navbar-menu {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-link {
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-link:hover, .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 积分徽章 */
.points-badge {
  display: flex; align-items: center; gap: 4px;
  background: var(--primary-light); color: var(--primary);
  padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
}
.vip-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .5px;
}

/* 用户下拉 */
.user-info { position: relative; display: flex; align-items: center; gap: 8px; }
.user-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 12px;
  font-size: 13px; color: var(--text-primary);
  cursor: pointer; transition: background .15s;
}
.user-btn:hover { background: var(--bg); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 160px; overflow: hidden; z-index: 200;
}
/* dropdown shown via JS mouseenter/mouseleave */
.dropdown-item {
  display: block; padding: 10px 16px;
  font-size: 14px; color: var(--text-primary);
  transition: background .12s;
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.text-danger { color: var(--danger) !important; }

/* ── 按钮 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── 表单 ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-primary);
}
.required { color: var(--danger); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-primary);
  background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── 提示框 ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px; border: 1px solid;
}
.alert-error {
  background: var(--danger-light); color: var(--danger);
  border-color: #fecaca;
}
.alert-success {
  background: #f0fdf4; color: var(--success);
  border-color: #bbf7d0;
}
.alert-warning {
  background: #fffbeb; color: var(--warning);
  border-color: #fde68a;
}
.alert-info {
  background: var(--primary-light); color: var(--primary);
  border-color: #bfdbfe;
}

/* ── 认证页面 ─────────────────────────────────────────────── */
.auth-page { background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%); }
.auth-container {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 24px;
}
.auth-logo {
  margin-bottom: 20px;
  a { display: flex; align-items: center; gap: 10px;
      text-decoration: none; color: var(--text-primary); }
  .brand-name { font-size: 22px; font-weight: 700; }
  .brand-icon.large { font-size: 30px; }
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.auth-form { margin-top: 16px; }
.auth-footer {
  text-align: center; margin-top: 20px;
  font-size: 14px; color: var(--text-secondary);
}

/* ── 公告横幅 ─────────────────────────────────────────────── */
.announcement-banner {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; text-align: center; padding: 10px 24px;
  font-size: 14px;
}
.banner-icon { margin-right: 6px; }

/* ── 主内容区 ─────────────────────────────────────────────── */
.main-content { padding: 40px 0; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  text-align: center; padding: 40px 0 80px;
}
.hero-title {
  font-size: 50px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}
.hero-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 32px; }
.hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.hero-balance { font-size: 14px; color: var(--text-secondary); }

/* ── Section ──────────────────────────────────────────────── */
.section { margin-bottom: 40px; }
.section-title {
  font-size: 20px; font-weight: 700;
  margin-bottom: 20px; color: var(--text-primary);
}

/* ── 产品卡片 ─────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-2px);
}
.product-cover {
  width: 100%; height: 160px; object-fit: cover;
}
.product-cover-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
  display: flex; align-items: center; justify-content: center;
}
.cover-icon { font-size: 40px; color: var(--primary); opacity: .5; }
.product-body { padding: 16px; }
.product-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.product-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 14px; font-weight: 600; color: var(--primary); }

/* ── 文章卡片 ─────────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s; display: block;
}
.article-card:hover { box-shadow: var(--shadow-lg); }
.article-cover { width: 100%; height: 140px; object-fit: cover; }
.article-body { padding: 14px 16px; }
.article-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.article-desc { font-size: 13px; color: var(--text-secondary); }

/* ── 特点区 ──────────────────────────────────────────────── */
.features-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.feature-item { text-align: center; }
.feature-icon { font-size: 44px; line-height: 44px; margin-bottom: 10px; }
.feature-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-item p { font-size: 13px; color: var(--text-secondary); }

/* ── 通用卡片 ─────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 16px; font-weight: 600;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* ── 统计数字 ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── 表格 ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  background: var(--bg); padding: 12px 14px; text-align: left;
  font-weight: 600; color: var(--text-secondary); font-size: 13px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  color: var(--text-primary); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ── 状态徽章 ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
}
.badge-success { background: #f0fdf4; color: var(--success); }
.badge-warning { background: #fffbeb; color: var(--warning); }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-info    { background: var(--primary-light); color: var(--primary); }
.badge-default { background: var(--bg); color: var(--text-secondary); }

/* ── 弹窗 ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 999;
}
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 90%; max-width: 480px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  h3 { font-size: 16px; font-weight: 600; }
}
.modal-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--text-muted);
}
.modal-body { padding: 20px 24px; font-size: 14px; line-height: 1.7; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}


/* ── 分页 ─────────────────────────────────────────────────── */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 24px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px; display: flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary);
  cursor: pointer; background: var(--surface); transition: all .15s;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── 倒计时按钮（查询冷却用） ─────────────────────────────── */
.btn-countdown {
  background: var(--bg) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
  cursor: not-allowed !important;
}

/* ── 页脚 ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0; text-align: center;
  font-size: 13px; color: var(--text-muted);
  background: var(--surface);
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text-secondary); }

/* ── 响应式 ──────────────────────────────────────────────── */
@media (max-width: 795px) {
  .form-row { grid-template-columns: 1fr; }
  .hero-title { font-size: 30px; }
  .auth-card { padding: 28px 20px; }
  .features-section { padding: 24px 16px; }
  .navbar-menu { display: none; }
}