/* =========================================================
   SSL 证书管理系统 · 样式表
   系统字体 + 中性灰阶（Tailwind 色板）/ 白色扁平顶栏 / 柔和投影卡片
   ========================================================= */

:root {
  --navy-900: #111827;
  --navy-800: #111827;
  --navy-700: #1f2937;
  --navy-600: #374151;
  --gold: #b45309;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;
  --success: #16a34a;
  --warning: #b45309;
  --error: #dc2626;

  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #d1d5db;
  --split: #e5e7eb;
  --bg-layout: #f9fafb;
  --bg-container: #fff;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-layout);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, p, ul { margin: 0; }

.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; line-height: 1.5; }
.break-all { word-break: break-all; }
.ellipsis { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.hidden { display: none !important; }

/* ---------- 顶部导航（白色扁平 · 细分割线） ---------- */

.topbar,
.apply-topbar {
  background: #fff;
  border-bottom: 1px solid var(--split);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { color: var(--primary); }

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.brand-sub { font-size: 11px; line-height: 1; color: var(--text-muted); white-space: nowrap; }

.topbar-divider { width: 1px; height: 24px; background: var(--split); flex: none; }

.nav {
  display: flex;
  gap: 0;
  flex: 1;
  min-width: 0;
  height: 60px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  flex: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.nav a:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.4); outline-offset: -4px; border-radius: 4px; }

.topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }

.badge-mock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 12px;
  white-space: nowrap;
}
.badge-mock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97706;
  flex: none;
}

/* ---------- 布局 ---------- */

.container { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-title { font-size: 20px; font-weight: 600; letter-spacing: 0.3px; margin: 0; }

.back-link { display: inline-block; color: var(--text-muted); font-size: 13px; margin-bottom: 4px; }

.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片（白底柔和投影） ---------- */

.card {
  background: var(--bg-container);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.empty { padding: 32px 0; text-align: center; color: var(--text-muted); }

.loading { padding: 48px 0; text-align: center; color: var(--text-muted); }

/* ---------- 统计卡片 ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-container);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
}
.stat-label { color: var(--text-muted); font-size: 13px; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--navy-800); }
.stat-value.ok { color: var(--success); }
.stat-value.processing { color: var(--primary); }
.stat-value.danger { color: var(--error); }

.balance-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.balance-main { font-size: 30px; font-weight: 600; color: var(--navy-900); }
.balance-sub { color: var(--text-muted); font-size: 13px; }

/* ---------- 按钮（实心蓝、圆角） ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn:active { background: var(--primary-active); border-color: var(--primary-active); color: #fff; }
.btn:disabled { background: #93c5fd; border-color: #93c5fd; color: #fff; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.4); outline-offset: 1px; }

/* 次要按钮：白底灰描边（过滤标签未选中态、弱化操作） */
.btn-ghost { background: #fff; border-color: var(--border); color: #374151; }
.btn-ghost:hover { background: #f9fafb; border-color: #9ca3af; color: var(--text); }
.btn-ghost:active { background: #f3f4f6; border-color: #9ca3af; color: var(--text); }

.btn-danger-text { background: transparent; border-color: transparent; color: var(--error); }
.btn-danger-text:hover { background: #fef2f2; border-color: transparent; color: #b91c1c; }

.btn-text { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn-text:hover { background: #f3f4f6; color: var(--text); border-color: transparent; }

.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 6px; }

.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: 8px; }

.btn-block { width: 100%; }

.btn-dashed { background: transparent; border: 1px dashed var(--primary); color: var(--primary); }
.btn-dashed:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  border-radius: 8px;
  font-size: 18px;
  color: var(--text-muted);
}
.btn-icon:hover { color: var(--error); border-color: transparent; background: #fef2f2; }

.inline { display: inline-flex; margin: 0; }

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 14px; color: var(--text); }
.field-label .field-req { color: var(--error); margin-left: 3px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field-link { font-size: 12.5px; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.field-link:hover { color: var(--primary); text-decoration: underline; }
.field-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.input, .select, textarea.input {
  height: 38px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
}
.select { appearance: auto; }
.input:hover, .select:hover { border-color: #9ca3af; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.input::placeholder { color: #9ca3af; }
.input:disabled, .select:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .field-span { grid-column: 1 / -1; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-form .input { width: 260px; }

.stack { display: flex; flex-direction: column; gap: 14px; }

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.radio-row:hover { background: #f9fafb; }
.radio-row.disabled { color: var(--text-muted); cursor: not-allowed; }
.radio-row input { accent-color: var(--primary); width: 16px; height: 16px; }

/* ---------- 表格（企业数据表） ---------- */

.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-weight: 700;
  color: #364153;
  font-size: 12px;
  background: #f9fafb;
  padding: 12px 16px;
  border-top: 1px solid var(--split);
  border-bottom: 1px solid var(--split);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--split); vertical-align: middle; color: #6a7282; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f9fafb; }
.table .mono { font-family: inherit; font-size: inherit; }
.table td.row-actions, .table td .row-actions { display: flex; gap: 12px; flex-wrap: wrap; }
td.row-actions .btn {
  height: auto;
  padding: 0;
  border-radius: 0;
  border-color: transparent;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
td.row-actions .btn:hover,
td.row-actions .btn:active {
  background: transparent;
  border-color: transparent;
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ---------- 状态标签（柔和底色） ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.chip.ok { color: #00a63e; background: #dcfce7; }
.chip.processing { color: #2563eb; background: #dbeafe; }
.chip.warn { color: #e17100; background: #fef3c6; }
.chip.danger { color: #e7000b; background: #ffe2e2; }
.chip.muted { color: #4a5565; background: #f3f4f6; }

/* ---------- 提示框（柔和底色） ---------- */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert.ok { background: #f0fdf4; color: #15803d; }
.alert.danger { background: #fef2f2; color: #b91c1c; }
.alert.info { background: #eff6ff; color: #1d4ed8; }
.alert.warn { background: #fffbeb; color: #b45309; }

/* ---------- 键值信息网格 ---------- */

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.kv { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.kv-span { grid-column: 1 / -1; }
.kv-label { flex: 0 0 84px; color: var(--text-muted); font-size: 13px; }
.kv-value { flex: 1; min-width: 0; word-break: break-word; }

/* ---------- DCV 验证块 ---------- */

.dcv-block {
  border: 1px solid var(--split);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: #f9fafb;
}
.dcv-block:last-child { margin-bottom: 0; }

.dcv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.dcv-domains { display: flex; gap: 8px; flex-wrap: wrap; }
.dcv-domain {
  font-weight: 600;
  font-size: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 1px 8px;
  border-radius: var(--radius-sm);
}
.dcv-meta { color: var(--text-secondary); font-size: 13px; margin-bottom: 10px; }

.dns-record {
  background: var(--bg-container);
  border: 1px solid var(--split);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  margin: 10px 0;
}
.dns-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--split); }
.dns-row:last-child { border-bottom: none; }
.dns-label { flex: 0 0 84px; color: var(--text-muted); font-size: 13px; }
.dns-row .mono { flex: 1; min-width: 0; }
.dns-row .btn { flex: 0 0 auto; }

.dcv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.section-label { font-size: 13px; color: var(--text-secondary); margin: 12px 0 0; }

details.help {
  margin-top: 12px;
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
details.help summary { cursor: pointer; color: var(--primary); user-select: none; }
details.help ol, details.help ul { margin: 8px 0 4px; padding-left: 20px; }
details.help li { margin-bottom: 4px; line-height: 1.6; }

/* ---------- 下载区 ---------- */

.download-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- 弹窗 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 40px;
  z-index: 1000;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-container);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 24px;
  border-bottom: 1px solid var(--split);
  background: #fff;
  border-radius: 12px 12px 0 0;
}
.modal-close {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 24px 20px;
}

/* ---------- 三步曲（客户申请页） ---------- */

.apply-body {
  background: var(--bg-layout);
  min-height: 100vh;
}

.apply-topbar-inner {
  max-width: 860px;
  margin: 0 auto;
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apply-container { max-width: 860px; margin: 0 auto; padding: 28px 16px 80px; }

.stepper { display: flex; margin: 8px 0 28px; }
.step { flex: 1; text-align: center; position: relative; color: var(--text-muted); }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  transition: all 0.2s;
}
.step-label { font-size: 13px; }
.step.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done .step-num { background: #f0fdf4; border-color: #bbf7d0; color: var(--success); }
.step.done .step-label { color: var(--success); }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 1px;
  background: var(--split);
}
.step.done:not(:last-child)::after { background: #bbf7d0; }

.product-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.product-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.meta-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chip {
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.domain-list-inputs { display: flex; flex-direction: column; gap: 10px; }
.domain-input-row { display: flex; gap: 8px; align-items: center; }

.order-head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.order-no-label { color: var(--text-muted); font-size: 13px; }
.order-no { font-size: 16px; font-weight: 600; }

.actions-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 签发成功 */
.issued-card { text-align: center; }
.issued-hero { padding: 12px 0 8px; }
.icon-success svg { width: 72px; height: 72px; }
.issued-title { font-size: 20px; font-weight: 600; margin: 14px 0 6px; color: var(--success); }

.date-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.date-card {
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: left;
}
.date-card .date-label { color: var(--text-muted); font-size: 13px; margin-bottom: 4px; }
.date-card .date-value { font-size: 16px; font-weight: 600; }

.issued-progress { margin: 8px 0 20px; text-align: left; }
.progress { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--success); transition: width 0.4s; }
.progress-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.cert-info-grid { margin-top: 8px; text-align: left; }
.issued-card .download-row { justify-content: center; }
.issued-card .section-label { text-align: left; }

/* 证书 / 私钥 PEM 文本块（可直接复制） */
.pem-block { margin-top: 12px; text-align: left; }
.pem-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pem-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.pem-hint { margin: 0 0 6px; }
.pem-pre {
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre;
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pem-pre:hover { border-color: #9ca3af; background: #f3f4f6; }

/* ---------- 证书交付计划（服务期内多次交付时间轴） ---------- */

.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.plan-head .card-title { margin-bottom: 0; }

.plan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.plan-stat {
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.plan-stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.plan-stat-value { font-size: 17px; font-weight: 600; color: var(--navy-800); }
.plan-stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.plan-stat-sub.warn { color: var(--warning); }

.plan-timeline { position: relative; margin: 4px 0 2px; padding-left: 18px; }
.plan-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.plan-node { position: relative; padding-bottom: 16px; }
.plan-node:last-child { padding-bottom: 0; }
.plan-dot {
  position: absolute;
  left: -18px;
  top: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
}
.plan-node.done .plan-dot { background: var(--success); border-color: var(--success); }
.plan-node.current .plan-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.plan-node.endpoint .plan-dot {
  width: 7px;
  height: 7px;
  top: 4px;
  left: -17px;
  background: var(--navy-900);
  border-color: var(--navy-900);
}
.plan-node-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-node-title { font-size: 14px; font-weight: 500; color: var(--text); }
.plan-node.endpoint .plan-node-title { font-weight: 600; color: var(--navy-800); }
.plan-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
}
.plan-badge.done { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.plan-badge.current { color: #1d4ed8; background: #eff6ff; border-color: var(--primary-border); font-weight: 500; }
.plan-badge.future { color: #4b5563; background: #f3f4f6; border-color: transparent; }
.plan-node-date { margin-left: auto; font-size: 13px; color: var(--text-secondary); }
.plan-node-meta { margin-top: 2px; }

.plan-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius-sm);
  line-height: 1.7;
}

/* ---------- 登录 / 错误页 ---------- */

.auth-body {
  background: var(--bg-layout);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-wrap { width: 100%; max-width: 400px; padding: 24px; }
.auth-card {
  background: var(--bg-container);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.auth-logo.warn { background: var(--error); color: #fff; }
.auth-title { text-align: center; font-size: 19px; letter-spacing: 0.3px; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.auth-foot { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 16px; }
.auth-card .stack { margin-top: 16px; }
.auth-card .alert { margin-bottom: 4px; }

/* ---------- 登录页（分屏版式） ---------- */

.auth-split { background: var(--bg-container); }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 44%) 1fr;
  min-height: 100vh;
}

/* 左侧品牌面板（深色证书主题） */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px 52px;
  color: #cbd5e1;
  background:
    radial-gradient(760px 460px at -12% -16%, rgba(37, 99, 235, 0.28), transparent 60%),
    radial-gradient(620px 420px at 118% 108%, rgba(29, 78, 216, 0.16), transparent 62%),
    linear-gradient(180deg, #101b31 0%, #0b1322 100%);
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 52px 52px;
}
.auth-brand > * { position: relative; }

.auth-brand-head { display: flex; align-items: center; gap: 12px; flex: none; }
.auth-brand-logo {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.95);
}
.auth-brand-name { font-size: 15px; font-weight: 600; color: #f8fafc; line-height: 1.35; }
.auth-brand-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }

.auth-brand-main { margin: auto 0; padding: 36px 0 24px; max-width: 470px; }
.auth-brand-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #60a5fa;
}
.auth-brand-headline {
  margin-top: 20px;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f8fafc;
}
.auth-brand-desc { margin-top: 18px; font-size: 14.5px; line-height: 1.85; color: #94a3b8; }
.auth-features { list-style: none; margin: 28px 0 0; padding: 0; }
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
  color: #cbd5e1;
}
.auth-feature-check { width: 16px; height: 16px; color: #60a5fa; flex: none; }

/* 右侧表单列 */
.auth-form-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px 26px;
  background: var(--bg-container);
}
.auth-form-card { width: 100%; max-width: 384px; margin-top: auto; }
.auth-form-title { font-size: 26px; font-weight: 600; letter-spacing: 0.4px; color: var(--navy-900); }
.auth-form-sub { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

.auth-form-card .stack { margin-top: 26px; gap: 18px; }
.auth-form-card .stack .field { margin-bottom: 0; }
.auth-form-card .alert { margin-top: 22px; }
.auth-form-card .alert + .alert { margin-top: 10px; }
.auth-form-card .alert + .stack { margin-top: 16px; }
.auth-form-card .input { height: 42px; }
.auth-form-card .captcha-img { height: 42px; }
.auth-form-card .btn-block { height: 44px; font-size: 15px; }
.auth-form-card .auth-links { margin-top: 26px; font-size: 13.5px; }

/* 认证页通道切换（密码/短信、邮箱/手机） */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  background: var(--bg-layout);
  border: 1px solid var(--split);
  border-radius: var(--radius);
}
.auth-tab {
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  background: var(--bg-container);
  color: var(--primary);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.auth-pane { display: none; margin-top: 20px; }
.auth-pane.active { display: block; }
.auth-pane .stack { margin-top: 0; }
.auth-pane .alert + .stack { margin-top: 14px; }
.auth-pane ~ .auth-links { margin-top: 26px; }

.auth-form-col .auth-foot { margin-top: 22px; margin-bottom: auto; }

@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { flex-direction: row; align-items: center; padding: 14px 24px; }
  .auth-brand::before { display: none; }
  .auth-brand-main { display: none; }
  .auth-brand-logo { width: 34px; height: 34px; font-size: 17px; border-radius: 9px; }
  .auth-brand-name { font-size: 14.5px; }
  .auth-form-col { padding: 40px 24px 24px; }
}
@media (max-width: 480px) {
  .auth-form-col { padding: 32px 20px 20px; }
  .auth-form-title { font-size: 23px; }
}

/* ---------- 验证码 ---------- */

.captcha-row { display: flex; align-items: stretch; gap: 8px; }
.captcha-row .input { flex: 1; min-width: 0; }
.captcha-img {
  width: 120px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #f9fafb;
  flex: none;
  display: block;
}

/* ---------- Toast ---------- */

.toast-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-container);
  border: 1px solid var(--split);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  max-width: 80vw;
  transition: opacity 0.25s;
}
.toast.ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.toast.danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.toast.hide { opacity: 0; }

/* ---------- 其他 ---------- */

.copy-inline { display: flex; align-items: center; gap: 8px; }

.link-url { max-width: 360px; }

.tips { padding-left: 18px; color: var(--text-secondary); font-size: 13px; line-height: 2; }

/* ---------- 找回链接页 ---------- */

.recover-card { max-width: 520px; margin: 24px auto; }
.recover-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 16px; }
.recover-actions { display: flex; gap: 10px; }

/* ---------- 访问提示页（首页） ---------- */

.link-sample {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-layout);
  border: 1px solid var(--split);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 12px;
  word-break: break-all;
  user-select: all;
}

/* ---------- 订单切换器（客户申请页） ---------- */

.switcher-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.switcher-label { font-size: 13px; color: var(--text-muted); }
.switcher-item {
  border: 1px solid var(--border);
  background: var(--bg-container);
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.switcher-item:hover { border-color: #9ca3af; color: var(--text); }
.switcher-item.active { border-color: var(--primary); color: #fff; background: var(--primary); }

/* ---------- 账户中心 ---------- */

.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; height: auto; }

.auth-links { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }

.topbar-user { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar-user .user-email {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--split);
}

.empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

.empty .muted { margin: 6px 0 0; }

/* =========================================================
   客户控制台（控制台版面 · 浅色顶栏 + 分组侧边栏）
   ========================================================= */

.console-body { background: var(--bg-layout); }

/* ---------- 控制台顶栏 ---------- */

.console-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--split);
}
.console-topbar-inner {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.console-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.console-brand .brand-name { color: var(--navy-800); }
.console-brand .brand-sub { color: var(--text-muted); }
.console-brand:hover .brand-name { color: var(--primary); }

.console-topright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.console-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--split);
  border-radius: 8px;
  background: #fff;
}
.console-balance-label { font-size: 12px; color: var(--text-muted); }
.console-balance-value { font-size: 14px; font-weight: 700; color: var(--text); }
.console-user {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.console-topright .btn-text { color: var(--text-secondary); }
.console-topright .btn-text:hover { background: #f3f4f6; color: var(--text); }

/* ---------- 骨架：侧边栏 + 主区 ---------- */

.console-shell {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 20px 48px;
}
.console-side {
  width: 208px;
  flex: none;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}
.console-side form { margin: 0; }
.side-group { padding: 4px 0; }
.side-group + .side-group { border-top: 1px solid var(--split); }
.side-group-title {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.side-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.side-link:hover { color: var(--text); background: #f9fafb; }
.side-link.active {
  color: var(--text);
  background: #f3f4f6;
  font-weight: 500;
}

.console-main { flex: 1; min-width: 0; }

/* ---------- 控制台页面标题 ---------- */

.console-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.console-page-title { font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.3; }
.console-page-sub { margin-top: 6px; color: var(--text-muted); font-size: 13px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 工具条（搜索 + 筛选） ---------- */

.console-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.console-search { display: flex; gap: 8px; align-items: center; }
.console-search .input { width: 230px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-label { font-size: 12.5px; color: var(--text-muted); margin-right: 2px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter-chip:hover { color: var(--text); border-color: #9ca3af; }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 订单表格扩展 ---------- */

.order-cn { font-weight: 500; color: #101828; }
.order-cn:hover { color: var(--primary); }
.order-idx { font-weight: 500; color: #101828; font-variant-numeric: tabular-nums; }
.row-sub { font-size: 12px; color: #99a1af; margin-top: 3px; }
.order-domain-tags { display: block; word-break: break-word; }
.domain-tag { display: inline; white-space: normal; }
.domain-tag + .domain-tag::before { content: '、'; }
.table .num { font-variant-numeric: tabular-nums; }

/* ---------- 列表分页 ---------- */

.pager-bar {
  display: flex;
  justify-content: center;
  margin: 6px 0 -20px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--split);
}
.pager { display: flex; align-items: center; gap: 4px; }
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13.5px;
  color: #101828;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
a.pager-btn:hover { background: #f3f4f6; }
.pager-btn.current { border-color: var(--primary); color: var(--primary); font-weight: 500; }
.pager-btn.disabled { color: #d1d5dc; cursor: default; }
.pager-arrow { color: var(--text-secondary); }
.pager-gap {
  min-width: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  user-select: none;
}

/* ---------- 日期范围查询 ---------- */

.date-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-range .input { width: 156px; }
.date-sep { color: var(--text-muted); font-size: 13px; }

/* ---------- 管理端列表工具条 ---------- */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.input-compact { width: 128px; }
.select-compact { width: 104px; }
.user-ops { display: flex; flex-direction: column; gap: 8px; }
.user-op-form { display: flex; align-items: center; gap: 6px; }

/* ---------- 购买证书 ---------- */

.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 4px; }
.product-card {
  position: relative;
  display: block;
  border: 1px solid var(--split);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: #9ca3af; box-shadow: var(--shadow); }
.product-card input { position: absolute; opacity: 0; pointer-events: none; }
.product-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.product-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.product-name { font-size: 15px; font-weight: 600; color: var(--text); }
.product-price { font-size: 20px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.product-price small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.product-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; }
.product-card.is-disabled { opacity: 0.6; cursor: not-allowed; }

.buy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #f9fafb;
  border: 1px solid var(--split);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
}
.buy-summary-amount { font-size: 22px; font-weight: 600; color: var(--text); }
.buy-summary-amount small { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.buy-summary-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.buy-balance { font-size: 13px; color: var(--text-secondary); }
.buy-balance strong { color: var(--text); }
.buy-balance.low strong { color: var(--error); }

/* ---------- 订单详情（控制台版） ---------- */

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: start;
}
.order-layout .plan-stats { grid-template-columns: 1fr; gap: 10px; }
.order-layout .plan-stat { padding: 10px 14px; }
.order-layout-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.order-layout-left .card, .order-layout-right .card { margin-bottom: 0; }

.console-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--split);
  margin-bottom: 18px;
}
.tab-btn {
  padding: 14px 2px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: #2563eb; border-bottom-color: #1d4ed8; font-weight: 700; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.cert-section + .cert-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--split); }
.cert-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
.cert-row { display: flex; gap: 10px; font-size: 13px; padding: 5px 0; min-width: 0; }
.cert-row-label { flex: none; width: 96px; color: var(--text-muted); }
.cert-row-value { color: var(--text); word-break: break-all; min-width: 0; }
.cert-grid .span-2 { grid-column: 1 / -1; }

/* ---------- 收银台（演示模式） ---------- */

.pay-body { background: var(--bg-layout); }
.pay-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.pay-card {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 24px;
  text-align: center;
}
.pay-brand { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.pay-amount { font-size: 34px; font-weight: 600; color: var(--navy-900); line-height: 1.2; }
.pay-method-line { margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.pay-qr {
  width: 178px;
  height: 178px;
  margin: 20px auto 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.pay-qr-mark { font-family: var(--mono); font-size: 26px; font-weight: 700; color: #9ca3af; letter-spacing: 2px; }
.pay-qr-live {
  width: 210px;
  height: 210px;
  margin: 20px auto 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.pay-qr-img { width: 100%; height: 100%; display: block; }
.pay-tips { font-size: 12.5px; color: var(--text-muted); margin: 10px 0 18px; line-height: 1.7; }
.pay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pay-state { padding: 22px 0 8px; }
.pay-state-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-state-mark.cancelled { background: #fef2f2; border-color: #fecaca; color: var(--error); }
.pay-state-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.pay-state-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.pay-demo-badge { display: inline-flex; margin-bottom: 14px; }

/* ---------- 充值弹窗 ---------- */

.recharge-modal { max-width: 440px; }
.recharge-modal .field { margin-bottom: 8px; }
.field-error { color: var(--error); font-size: 12.5px; margin-bottom: 8px; }
.input.invalid { border-color: var(--error); }
.input.invalid:focus { border-color: var(--error); box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16); }
.recharge-method-label { margin: 12px 0 8px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method:hover { border-color: #9ca3af; }
.pay-method.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pay-method.is-disabled { opacity: 0.55; cursor: not-allowed; }
.pay-method-name { font-size: 13.5px; color: var(--text); }
.pay-method-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  flex: none;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.pay-method.is-active .pay-method-dot { border-color: var(--primary); background: var(--primary); }
.pay-method.is-active .pay-method-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fff;
}
.recharge-note {
  margin-top: 14px;
  background: #eff6ff;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.recharge-note.wait { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.recharge-note.ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.recharge-note.danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ---------- 响应式（控制台） ---------- */

@media (max-width: 1080px) {
  .order-layout { grid-template-columns: 1fr; }
  .buy-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .console-shell { flex-direction: column; align-items: stretch; padding: 14px 14px 32px; }
  .console-side { width: 100%; position: static; max-height: none; }
  .buy-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .date-cards { grid-template-columns: 1fr; }
  .plan-stats { grid-template-columns: 1fr; }
  .topbar-inner { gap: 10px; }
  .nav a { padding: 0 10px; font-size: 13px; }
  .brand-sub { display: none; }
  .link-url { max-width: 180px; }
  .search-form .input { width: 160px; }
  .console-topbar-inner { padding: 0 14px; }
}

@media (max-width: 640px) {
  .brand-name { display: none; }
  .topbar-divider { display: none; }
  .topbar-right { gap: 8px; }
  .nav a { padding: 0 8px; font-size: 12.5px; }
  .topbar-user .user-email { display: none; }
  .console-user { display: none; }
  .console-brand .brand-name { display: none; }
  .console-balance { padding: 0 10px; }
  .console-search { width: 100%; }
  .console-search .input { width: auto; flex: 1; }
  .date-range { width: 100%; }
  .date-range .input { flex: 1; width: auto; min-width: 0; }
  .pager { gap: 2px; }
  .pager-btn { min-width: 30px; height: 30px; padding: 0 5px; }
  .pay-methods { grid-template-columns: 1fr; }
}
