/* proxyhub frontend: dense operational UI, themed (dark default + light), no build chain. */

:root {
  /* brand — shared across themes */
  --brand: #7c8cff;
  --brand-2: #34d3ee;
  --brand-grad: linear-gradient(135deg, #7c8cff 0%, #34d3ee 100%);
  --radius: 10px;
  --radius-sm: 7px;
}

/* ---- Dark theme (default) ---- */
:root,
[data-theme="dark"] {
  --bg: #0b0f1a;
  --bg-grad: radial-gradient(1200px 600px at 78% -8%, rgba(124, 140, 255, .12), transparent 60%),
             radial-gradient(900px 500px at 0% 0%, rgba(52, 211, 238, .07), transparent 55%);
  --surface: #131a2b;
  --surface-soft: #182135;
  --surface-2: #1d2840;
  --hover: #1a2336;
  --line: #2a3450;
  --line-soft: #222c44;
  --text: #e8edf8;
  --muted: #98a4bd;
  --faint: #6b7691;
  --accent: #7c8cff;
  --accent-strong: #93a0ff;
  --accent-soft: rgba(124, 140, 255, .16);
  --on-accent: #0b0f1a;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, .15);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, .15);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, .16);
  --shadow: 0 14px 40px rgba(0, 0, 0, .45);
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, .3);
  --input-bg: #0e1626;
  color-scheme: dark;
}

/* ---- Light theme ---- */
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-grad: radial-gradient(1100px 560px at 80% -10%, rgba(124, 140, 255, .14), transparent 60%),
             radial-gradient(800px 460px at 0% 0%, rgba(52, 211, 238, .10), transparent 55%);
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --surface-2: #eef2fb;
  --hover: #f6f9ff;
  --line: #d7deea;
  --line-soft: #e7ecf5;
  --text: #141b2d;
  --muted: #5d6885;
  --faint: #8a94a8;
  --accent: #4f5bdc;
  --accent-strong: #3f49c0;
  --accent-soft: #e4e7ff;
  --on-accent: #ffffff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --amber: #92560a;
  --amber-soft: #fef3c7;
  --red: #c52b2b;
  --red-soft: #fee2e2;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, .06);
  --input-bg: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand-grad);
  color: #0b0f1a;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .12s ease, transform .04s ease, box-shadow .12s ease, background .12s ease;
}

button:hover { filter: brightness(1.06); box-shadow: 0 4px 16px var(--accent-soft); }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .55; transform: none; filter: none; box-shadow: none; }

button.secondary {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 500;
}
button.secondary:hover { border-color: var(--accent); box-shadow: none; }

button.ghost {
  min-height: 28px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 4px 10px;
  font-size: 12.5px;
}
button.ghost:hover { border-color: var(--accent); color: var(--text); box-shadow: none; }
button.ghost.ok { color: var(--green); border-color: var(--green); }
button.ghost.danger { color: var(--red); border-color: var(--red); }

button.icon-btn {
  min-height: 26px;
  padding: 3px 9px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
button.icon-btn:hover { color: var(--text); box-shadow: none; }

button.danger,
button.secondary.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.danger-text { color: var(--red) !important; }
.ok-text { color: var(--green) !important; }

input, select, textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  padding: 7px 10px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 18px 64px;
}

.admin-shell { max-width: 1480px; }

.app-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(21px, 3vw, 25px); line-height: 1.2; letter-spacing: -.01em; }
h2 { margin-bottom: 2px; font-size: 17px; line-height: 1.25; }
h3 { margin: 14px 0 8px; font-size: 14px; }

.text-link { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.text-link:hover { text-decoration: underline; }

.top-actions .theme-toggle {
  min-height: 32px;
  width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 15px;
}
.top-actions .theme-toggle:hover { border-color: var(--accent); box-shadow: none; }

.surface {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  margin-bottom: 16px;
}

.auth-panel { max-width: 520px; }
body[data-page="admin"] .auth-panel { max-width: none; }

.section-head,
.toolbar,
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head { margin-bottom: 14px; }
.toolbar { margin-bottom: 16px; }
.toolbar h2 { font-size: 21px; }

.toolbar-actions,
.top-actions,
.form-actions,
.button-row,
.table-actions,
.filters,
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-actions { gap: 12px; }
.inline-form { max-width: 760px; }
.inline-form input { flex: 1 1 320px; }

.subtle { margin: 0; color: var(--muted); font-size: 13px; }

.mono, .copy-value, td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.clip {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.hidden { display: none !important; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  min-height: 86px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand-grad);
  opacity: .9;
}

.metric-label, .metric-hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.ok-metric strong { color: var(--green); }
.warn-metric strong { color: var(--amber); }
.bad-metric strong { color: var(--red); }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 4px 0 16px;
  overflow-x: auto;
}

.tab {
  border: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 16px;
}
.tab:hover { color: var(--text); filter: none; box-shadow: none; }
.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
  align-items: end;
}
.compact-form { grid-template-columns: repeat(2, minmax(160px, 1fr)) auto; }

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.wide-field { grid-column: span 5; }

.split-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.fold-section {
  margin: 14px 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.fold-section.split-section {
  padding-top: 0;
  border-top: 1px solid var(--line-soft);
}

.fold-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 11px 13px;
  color: var(--text);
  font-weight: 650;
}

.fold-section > summary::-webkit-details-marker { display: none; }

.fold-section > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.fold-section[open] > summary::before { content: "-"; }

.fold-body {
  padding: 0 13px 13px;
}

.fold-body > .section-head:first-child { margin-top: 0; }

.filters { justify-content: flex-end; }
.filters input, .filters select { width: auto; min-width: 150px; }
.compact-filters { flex: 1 1 auto; }
.compact-filters select { max-width: 310px; }

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 11px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .02em;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--hover); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 客户表的「账号 → 线路」两级分组 */
.data-table tr.acct-row td { background: var(--surface-soft); border-top: 2px solid var(--line); }
.data-table tr.acct-row:hover td { background: var(--surface-soft); }
.acct-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct-main { display: flex; align-items: center; gap: 12px; min-width: 260px; flex: 1 1 420px; flex-wrap: wrap; }
.acct-main > strong { font-size: 14px; overflow-wrap: anywhere; }
.acct-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct-head .table-actions { margin-left: auto; }
.acct-toggle { min-width: 58px; }
.data-table tr.line-row td:first-child { padding-left: 22px; }

/* 段切换下拉(线路操作区 / 换 IP),不占满整行 */
.seg-select { width: auto; min-width: 116px; min-height: 26px; padding: 2px 8px; font-size: 12px; }

.empty-cell, .empty-state {
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.inline-copy, .copy-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.copy-row {
  width: 100%;
  justify-content: space-between;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 7px 9px;
  margin: 6px 0;
}

.copy-value { overflow-wrap: anywhere; font-size: 13px; }

.badge, .tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tag { border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }

.badge.on, .badge.free { background: var(--green-soft); color: var(--green); }
.badge.off, .badge.neutral { background: var(--surface-2); color: var(--muted); }
.badge.pending, .badge.assigned { background: var(--accent-soft); color: var(--accent-strong); }
.badge.expired, .badge.down { background: var(--red-soft); color: var(--red); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }

.msg {
  display: none;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.msg.show { display: block; }
.msg.err { border: 1px solid var(--red); background: var(--red-soft); color: var(--red); }
.msg.ok { border: 1px solid var(--green); background: var(--green-soft); color: var(--green); }
.msg.info { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.export-box { min-height: 72px; margin-bottom: 12px; background: var(--input-bg); }

.mobile-list { display: none; }

.line-card, .plan-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}
.line-card + .line-card { margin-top: 10px; }

.kv {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.plan-card { display: grid; gap: 8px; }
.plan-card:hover { border-color: var(--accent); }
.plan-card h3 { margin: 0; }
.plan-price { font-size: 23px; font-weight: 750; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); }

.result-panel { margin-top: 12px; }
.result-line { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 10px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(6, 9, 18, .58);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.modal {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal h3 { margin-top: 0; font-size: 17px; }
.modal p { color: var(--muted); overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head, .toolbar { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; justify-content: flex-start; }
  .filters input, .filters select { flex: 1 1 170px; }
  .form-grid, .compact-form, .import-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide-field { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .app-shell { padding: 16px 12px 42px; }
  .app-top { align-items: flex-start; flex-direction: column; }
  .metrics, .form-grid, .compact-form, .import-grid { grid-template-columns: 1fr; }
  .line-table-wrap { display: none; }
  .mobile-list { display: block; }
  .compact-filters select { max-width: none; }
  .tabs { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .surface { padding: 14px; }
}

/* ===== Self-service portal additions (2026-06-29) ===== */

/* Auth tabs (login / register) */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tab {
  flex: 1; background: var(--surface-soft); color: var(--muted);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 9px 0; font-weight: 600; cursor: pointer;
}
.auth-tab.active { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }

.checkbox-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.checkbox-row input { width: auto; margin: 0; }
.inline-toggle { margin-right: 4px; }

/* Public storefront */
.store-panel { margin-top: 16px; }
.skeleton-card {
  height: 150px; border-radius: var(--radius); border: 1px solid var(--line-soft);
  background: linear-gradient(100deg, var(--surface-soft) 30%, var(--hover) 50%, var(--surface-soft) 70%);
  background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Expiry reminder banner */
.banner {
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px;
  font-size: 14px; font-weight: 500; border: 1px solid var(--line);
}
.banner-warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.banner-danger { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* Bulk action bar */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 12px;
}
.col-check { width: 34px; text-align: center; }
.col-check input, .row-check { width: auto; margin: 0; }

/* Row state highlights */
tr.row-expired td { background: var(--red-soft); }
tr.row-soon td { background: var(--amber-soft); }
.line-card.row-expired { border-color: var(--red); }
.line-card.row-soon { border-color: var(--amber); }

/* Connectivity test result */
.check-result { margin-top: 4px; font-size: 12px; }

/* Usage bars in metrics */
.usage-bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; margin-top: 6px; }
.usage-bar { width: 8px; height: 100%; background: var(--surface-soft); border-radius: 2px; display: flex; align-items: flex-end; overflow: hidden; }
.usage-fill { display: block; width: 100%; background: var(--brand-grad); border-radius: 2px; }

/* Deposit pay panel (QR + address) */
.deposit-pay { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.qr-box { background: #fff; padding: 10px; border-radius: var(--radius-sm); line-height: 0; }
.deposit-left { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Toasts */
.toast-host {
  position: fixed; right: 18px; bottom: 18px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px);
}
.toast {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 14px; box-shadow: var(--shadow-soft);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; cursor: pointer;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.info { border-left-color: var(--accent); }

@media (max-width: 720px) {
  .deposit-pay { flex-direction: column; }
  .toast-host { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ===== Help page ===== */
.help-list { margin: 0; padding-left: 20px; line-height: 1.9; color: var(--text); }
.help-list.mono li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 13px; }
.help-block { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.help-block:first-of-type { border-top: 0; }
.help-block h3 { margin: 0 0 4px; font-size: 15px; }
.faq details { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq summary::marker { color: var(--accent); }
.faq p { margin: 8px 0 0; }
.support-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.support-card {
  flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface-soft); text-decoration: none; color: var(--text);
}
.support-card:hover { border-color: var(--accent); }

.table-actions .checkbox-row.auto-renew, .button-row .checkbox-row.auto-renew { font-size: 12px; white-space: nowrap; }

/* ===== Marketing site (homepage / pricing / auth nav) 2026-06-29 ===== */
.app-shell.narrow { max-width: 560px; }
.brand-link { color: inherit; text-decoration: none; }

/* Sticky top nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft);
}
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.nav-brand { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-login { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }

/* Buttons */
.btn-primary, .btn-ghost {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; text-align: center;
}
.btn-primary { background: var(--brand-grad); color: #0b0f1a; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-primary.sm, .btn-ghost.sm { padding: 7px 14px; font-size: 14px; }
.btn-primary.block { display: block; width: 100%; margin-top: 10px; }

.landing { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; margin-top: 22px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 72px 0 56px; }
.hero-eyebrow { color: var(--accent-strong); font-weight: 700; font-size: 14px; letter-spacing: .04em; margin: 0 0 14px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 18px; }
.hero-sub { color: var(--muted); font-size: 17px; line-height: 1.7; margin: 0 0 26px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { color: var(--faint); font-size: 13px; margin-top: 18px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-soft); }
.hero-card-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.hero-card-row span { color: var(--muted); }
.hero-card-code { margin-top: 16px; background: var(--input-bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; color: var(--accent-strong); word-break: break-all; }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 8px 0 40px; }
.stat { background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat b { display: block; font-size: 28px; color: var(--text); }
.stat span { color: var(--muted); font-size: 13px; }

/* Sections */
.section { padding: 54px 0; }
.section.alt { background: var(--surface-soft); border-radius: var(--radius); padding: 48px 28px; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 { font-size: clamp(23px, 4.2vw, 30px); margin: 0 0 8px; letter-spacing: -.01em; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; }
.feature-ico { font-size: 26px; margin-bottom: 10px; }
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { text-align: center; padding: 10px; }
.step-n { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* Regions */
.region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.region-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; text-align: center; }
.region-flag { font-size: 40px; }
.region-card h3 { margin: 10px 0 4px; }

.narrow-block { max-width: 760px; margin: 0 auto; }

/* CTA band */
.cta-band { text-align: center; padding: 60px 20px; margin: 20px 0 60px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.cta-band h2 { font-size: 28px; margin: 0 0 8px; }
.cta-band .btn-primary { margin-top: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--surface-soft); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
.footer-col h4 { font-size: 14px; margin: 0 0 12px; color: var(--text); }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-copy { text-align: center; padding: 16px; border-top: 1px solid var(--line-soft); margin: 0; }

/* Pricing page */
.pricing-bar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.pricing-note { max-width: 760px; margin: 28px auto 0; line-height: 1.8; }
.pricing-note a { color: var(--accent); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 44px 0 36px; }
  .hero h1 { font-size: 34px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .steps, .region-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

/* 验证码输入行（登录/注册页） */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-row button { white-space: nowrap; flex-shrink: 0; }

/* --- 现代化基线：色彩方案 · 键盘焦点 · 动效偏好 --- */

/* Let native controls (scrollbars, autofill, date pickers) match the theme. */
:root { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* A clear focus ring for keyboard users on interactive elements that don't
   already show focus. Inputs keep their own :focus border+ring above; using
   :focus-visible means mouse clicks don't get an outline, only keyboard nav. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
.tab:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Respect the OS "reduce motion" setting: keep the UI usable but calm. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- 微交互（第二梯队）：悬停浮起 · tab 下划线滑入 · 卡片淡入 ---
   所有过渡/动画在上面的 prefers-reduced-motion 规则下被中和，无需单独 gating。 */

/* Cards lift slightly on hover for tactile feedback. */
.plan-card, .feature, .stat, .hero-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .12s ease;
}
.plan-card:hover, .feature:hover, .hero-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* Smooth the table row hover instead of an instant flip. */
.data-table td { transition: background .12s ease; }

/* Tabs: an underline that slides in on hover/active (replaces the static inset
   shadow so the indicator animates). */
.tab { position: relative; transition: color .15s ease; }
.tab::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transform-origin: center; transition: transform .18s ease;
}
.tab:hover::after, .tab.active::after { transform: scaleX(1); }
.tab.active { box-shadow: none; }

/* Gentle fade-in for plan cards as they render (opacity only, so it never
   fights the hover-lift transform above). */
@keyframes cardIn { from { opacity: 0; } to { opacity: 1; } }
.plan-card { animation: cardIn .26s ease both; }
