/* 海角订阅 · 公共样式（深色单强调色） */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --card: #14171f;
  --card-2: #181c26;
  --line: #232734;
  --line-strong: #30374a;
  --text: #e7eaf0;
  --muted: #98a1b3;
  --faint: #5f687a;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --danger: #ff5d5d;
  --danger-soft: rgba(255, 93, 93, 0.1);
  --success: #35c98a;
  --success-soft: rgba(53, 201, 138, 0.1);
  --warning: #f0b45a;
  --warning-soft: rgba(240, 180, 90, 0.1);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -160px, rgba(91, 140, 255, 0.11), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

::selection {
  background: rgba(91, 140, 255, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

.mono {
  font-family: var(--mono);
}

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.hidden {
  display: none !important;
}

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

.between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 13, 18, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 140, 255, 0.32);
  flex: none;
}

.brand-mark svg {
  width: 17px;
  height: 17px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, filter 0.16s ease, transform 0.16s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active:not([disabled]) {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover:not([disabled]) {
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover:not([disabled]) {
  background: var(--card-2);
  border-color: var(--line-strong);
}

.btn-danger {
  border-color: rgba(255, 93, 93, 0.34);
  color: var(--danger);
}

.btn-danger:hover:not([disabled]) {
  background: var(--danger-soft);
  border-color: rgba(255, 93, 93, 0.55);
}

.btn-quiet {
  color: var(--muted);
}

.btn-quiet:hover:not([disabled]) {
  color: var(--text);
  background: var(--card-2);
}

.btn-sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-ghost.is-loading::after,
.btn-danger.is-loading::after {
  border-color: rgba(231, 234, 240, 0.2);
  border-top-color: var(--text);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 表单 ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field > label,
.label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1218;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

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

.input:hover:not([disabled]) {
  border-color: #2b3140;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.15);
}

.input[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea.input {
  min-height: 86px;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 1px), calc(100% - 11px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.form-ok {
  margin: 0;
  color: var(--success);
  font-size: 13px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge.active,
.badge.success,
.badge.done {
  border-color: rgba(53, 201, 138, 0.28);
  background: var(--success-soft);
  color: var(--success);
}

.badge.expired,
.badge.danger {
  border-color: rgba(255, 93, 93, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.pending,
.badge.warn {
  border-color: rgba(240, 180, 90, 0.28);
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.processing,
.badge.accent {
  border-color: rgba(91, 140, 255, 0.3);
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.cancelled,
.badge.muted {
  border-color: var(--line);
  background: rgba(152, 161, 179, 0.06);
  color: var(--muted);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

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

.divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.mt-16 {
  margin-top: 16px;
}

/* ---------- 标签页 ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  appearance: none;
  flex: none;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 表格 ---------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #11141b;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

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

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 720px) {
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 10px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
  }

  tbody tr:hover {
    background: var(--card);
  }

  td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    text-align: right;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
  }

  td[data-label=""]::before {
    display: none;
  }

  .cell-actions {
    justify-content: flex-end;
  }

  .pager {
    justify-content: center;
  }
}

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-mask.is-open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: modalIn 0.16s ease-out;
}

.modal-lg {
  max-width: 660px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.modal-x {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-x:hover {
  background: var(--card-2);
  color: var(--text);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 20px;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 20px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: #1b1f2a;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
  animation: toastIn 0.18s ease;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.is-out {
  animation: toastOut 0.18s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 600px) {
  .toasts {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}

/* ---------- 空状态 / 骨架屏 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  border: 1px dashed #2c3242;
  border-radius: var(--radius);
  background: rgba(20, 23, 31, 0.45);
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 19px;
}

.empty strong {
  color: var(--text);
  font-weight: 600;
}

.skel {
  border-radius: 8px;
  background: linear-gradient(90deg, #181c26 25%, #1e2330 37%, #181c26 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skel-line {
  height: 12px;
}

.skel-line.w40 {
  width: 40%;
}

.skel-line.w60 {
  width: 60%;
}

.skel-line.w80 {
  width: 80%;
}

.skel-card {
  height: 132px;
  border-radius: var(--radius);
}

.skel-stat {
  height: 96px;
  border-radius: var(--radius);
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

/* ---------- 落地页 ---------- */
.hero {
  position: relative;
  padding: 76px 0 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(91, 140, 255, 0.24);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  max-width: 820px;
  margin: 20px 0 16px;
  font-size: clamp(30px, 5.2vw, 52px);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero .lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.point {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 23, 31, 0.6);
  color: var(--muted);
  font-size: 12.5px;
}

.point svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.section {
  padding: 24px 0 60px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.plan-card.is-picked {
  border-color: rgba(91, 140, 255, 0.55);
}

.plan-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.plan-desc {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 46px;
}

.plan-price strong {
  font-size: 34px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.plan-price .unit {
  color: var(--muted);
  font-size: 12.5px;
}

.periods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.period {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.period:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.period.is-active {
  border-color: rgba(91, 140, 255, 0.65);
  background: var(--accent-soft);
  color: var(--text);
}

.period .p-price {
  color: var(--accent);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.plan-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.plan-node {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

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

/* ---------- 登录 / 注册 ---------- */
.auth-tabs {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1218;
}

.auth-tabs button {
  flex: 1;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tabs button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.auth-alt {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.link-btn {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- 用户中心 ---------- */
.page {
  padding: 26px 0 60px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 23, 31, 0.7);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.meta-pill b {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.sub-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.sub-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.sub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sub-name {
  margin: 0;
  font-size: 17px;
  font-weight: 680;
}

.sub-expire {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 13px;
}

.sub-expire b {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.sub-url {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1218;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.sub-url code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-buy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.plan-buy .btn-block {
  width: 100%;
}

.redeem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

@media (max-width: 520px) {
  .plan-buy {
    grid-template-columns: 1fr;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.info-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1218;
}

.info-label {
  color: var(--muted);
  font-size: 11.5px;
}

.info-value {
  margin-top: 2px;
  font-size: 15px;
  word-break: break-all;
}

.info-value.num {
  font-variant-numeric: tabular-nums;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 800px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 后台 ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0 60px;
}

.admin-side {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.admin-nav-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.admin-nav-btn:hover {
  background: var(--card-2);
  color: var(--text);
}

.admin-nav-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.admin-nav-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.admin-main {
  min-width: 0;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-head h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.toolbar .input {
  width: auto;
}

.toolbar form {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.toolbar .search {
  flex: 1;
  min-width: 150px;
  max-width: 300px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stat-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.stat-value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stat-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 1020px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 16px;
  }

  .admin-side {
    top: 64px;
    z-index: 20;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: none;
  }

  .admin-side::-webkit-scrollbar {
    display: none;
  }

  .admin-nav-btn {
    width: auto;
    white-space: nowrap;
    padding: 8px 11px;
  }

  .admin-nav-btn svg {
    display: none;
  }
}

@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

.plan-admin-list {
  display: grid;
  gap: 12px;
}

.plan-admin-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.plan-admin-card .plan-admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-admin-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
}

.plan-admin-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.price-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1218;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.price-chip b {
  color: var(--text);
  font-weight: 600;
}

.node-line {
  margin-top: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11.5px;
  word-break: break-all;
}

.code-list {
  width: 100%;
  max-height: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1218;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}

.qr-box {
  display: grid;
  place-items: center;
  width: min(260px, 100%);
  margin: 0 auto;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
}

.qr-box svg {
  display: block;
  width: 100%;
  height: auto;
}

.qr-url {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  word-break: break-all;
}

.forbidden {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 70px 20px;
  text-align: center;
}

.forbidden-code {
  color: var(--danger);
  font-size: 44px;
  font-weight: 760;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.forbidden h1 {
  margin: 0;
  font-size: 22px;
}

.forbidden p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .hero {
    padding: 48px 0 34px;
  }

  .header-inner {
    height: 58px;
  }

  .brand {
    font-size: 14px;
  }

  .nav-actions .btn {
    padding: 7px 10px;
    font-size: 12.5px;
  }

  .nav-actions .hide-sm {
    display: none;
  }

  .section {
    padding-bottom: 44px;
  }

  .page {
    padding-top: 18px;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .top-meta {
    width: 100%;
    justify-content: space-between;
  }

  .card {
    padding: 16px;
  }

  .sub-card {
    padding: 16px;
  }

  .admin-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .toolbar .search {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 14px;
  }

  .plan-card {
    padding: 17px;
  }

  .modal-mask {
    padding: 10px;
  }
}
