:root {
  --bg: #f0f2f5;
  --bg-subtle: #e8ecef;
  --card: #ffffff;
  --text: #111827;
  --text-secondary: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: #ecfdf5;
  --accent-border: #99f6e4;
  --sidebar: #0d1f1a;
  --sidebar-hover: #163028;
  --sidebar-active: #1a4035;
  --sidebar-text: #a7c4bc;
  --sidebar-text-active: #ffffff;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.35rem 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(20,184,166,.35);
}

.brand-title { font-weight: 700; color: #fff; font-size: 1.05rem; }
.brand-sub { font-size: 0.75rem; color: var(--sidebar-text); margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-footer { padding: 0.75rem; border-top: 1px solid rgba(255,255,255,.08); }

.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background .15s, color .15s;
}

.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); font-weight: 600; }
.nav-item.logout { color: #f87171; }
.nav-item.logout:hover { background: rgba(248,113,113,.12); color: #fca5a5; }
.nav-icon { opacity: 0.85; font-size: 0.9rem; width: 1.1rem; text-align: center; }

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20,184,166,.08), transparent),
    var(--bg);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 2rem 2.5rem;
}

.auth-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(45, 212, 191, 0.18), transparent 55%),
    linear-gradient(165deg, #0d1f1a 0%, #134e4a 48%, #0f766e 100%);
  min-height: 100vh;
}
.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 100vh;
  padding: 1.75rem 1.15rem 1.5rem;
}

/* ── Auth cards (login / register) ── */
.auth-card,
.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  padding: 1.55rem 1.45rem 1.35rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
}
.auth-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.auth-card h1,
.login-box h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.auth-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-form .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.auth-form .field label { margin: 0; }
.auth-form .field input {
  width: 100%;
  min-height: 2.55rem;
  box-sizing: border-box;
}
.auth-submit {
  width: 100%;
  min-height: 2.65rem;
  margin-top: 0.15rem;
  justify-content: center;
  font-weight: 650;
}
.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}
.auth-switch a {
  color: var(--accent-hover);
  font-weight: 650;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-switch-sep {
  margin: 0 0.35rem;
  color: var(--line-strong);
}
.auth-plans {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.auth-plans-title {
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.auth-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.auth-plan-chip {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #f8fffc;
  border: 1px solid var(--accent-border);
}
.auth-plan-chip strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 0.1rem;
}
.auth-plan-chip span {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.login-box h1 { font-size: 1.28rem; margin-bottom: 0.25rem; }
.login-box .login-logo,
.auth-card .login-logo {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 0.95rem;
  margin-bottom: 0;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(20,184,166,.32);
}

/* ── Page header ── */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { margin: 0 0 0.35rem; font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; }
.page-header .page-desc { color: var(--muted); font-size: 0.92rem; margin: 0; }
.page-header .page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.75rem; }
.page-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }

/* ── Cards（与行业/管理面板统一） ── */
.card,
.admin-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.card:hover { box-shadow: var(--shadow); }
.card-header,
.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.card-header h2,
.admin-panel-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}
.card.dim { opacity: 0.65; pointer-events: none; }
.card.dim .btn:not([disabled]) { pointer-events: auto; }

/* 新增类面板：浅青绿底 */
.card.card-create,
.create-user-panel,
.category-create-panel {
  background: linear-gradient(180deg, #f8fffc 0%, #fff 55%);
  border-color: var(--accent-border);
}

h1, h2, h3 { color: var(--text); }
.muted { color: var(--muted); font-size: 0.9rem; }
.small { font-size: 0.82rem; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.85em; background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; color: #374151; }

/* ── Stats ── */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 4px 0 0 4px;
}

.stat-card.warn::before { background: var(--warn); }
.stat-card.info::before { background: #6366f1; }

.stat-label { color: var(--muted); font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; }
.stat-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1.2; }
.stat-value.sm { font-size: 1.15rem; font-weight: 600; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead { background: #f9fafb; }
th {
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td.actions {
  vertical-align: middle;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

/* ── Forms ── */
input, select, textarea, button {
  font: inherit;
  border-radius: var(--radius-sm);
}

input, select, textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}

input:disabled, select:disabled, textarea:disabled {
  background: #f3f4f6;
  color: var(--muted);
  cursor: not-allowed;
}

textarea { width: 100%; min-height: 100px; resize: vertical; line-height: 1.5; }
label { display: block; margin: 0 0 0.3rem; font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); }

.field { min-width: 140px; }
.field-grow { flex: 1; min-width: 160px; }

.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin: 0.5rem 0; }
.stack > * + * { margin-top: 0.85rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}

/* ── 添加账号表单 ── */
.account-create-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.15rem;
}
.account-create-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 1fr) minmax(140px, 0.85fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}
.account-create-row-api {
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.4fr);
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.account-create-form .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.account-create-form .field label { margin: 0; }
.account-create-form .field input,
.account-create-form .field select {
  width: 100%;
  min-height: 2.55rem;
}
.account-create-form .field-action .btn {
  min-height: 2.55rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.account-create-form .label-spacer {
  display: block;
  line-height: 1;
  user-select: none;
  visibility: hidden;
}
@media (max-width: 860px) {
  .account-create-row,
  .account-create-row-api {
    grid-template-columns: 1fr 1fr;
  }
  .account-create-form .field-action { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .account-create-row,
  .account-create-row-api {
    grid-template-columns: 1fr;
  }
}

/* ── 群发任务表单 ── */
.bc-form-rows { display: flex; flex-direction: column; gap: 1rem; }
.bc-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}
.bc-col { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.bc-col-sm { max-width: 180px; }
.bc-col input,
.bc-col select {
  width: 100%;
  min-height: 2.55rem;
}
.bc-col input[type="date"],
.bc-col input[type="time"],
.bc-col input[type="datetime-local"] {
  width: 100%;
  min-height: 2.7rem;
  padding-right: 0.65rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
  background: #fff;
}

.schedule-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.schedule-tab {
  display: block;
  cursor: pointer;
  margin: 0;
}
.schedule-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.schedule-tab-body {
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.schedule-tab-body strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.schedule-tab-body small { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.schedule-tab input:checked + .schedule-tab-body {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.schedule-panel {
  margin-top: 0.25rem;
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}
.schedule-panel.is-hidden,
.is-hidden { display: none !important; }
.bc-group-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0 0.35rem;
}
.bc-actions { margin-top: 0.5rem; }

@media (max-width: 720px) {
  .bc-row { grid-template-columns: 1fr; }
  .bc-col-sm { max-width: none; }
  .schedule-type-tabs { grid-template-columns: 1fr; }
}

/* ── Buttons ── */
.btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  vertical-align: middle;
}

.btn:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(13,148,136,.3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.secondary { background: #374151; }
.btn.secondary:hover { background: #1f2937; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; box-shadow: 0 2px 8px rgba(220,38,38,.3); }

.btn.ghost {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--accent-border);
}
.btn.ghost:hover { background: #d1fae5; }

.btn.small { padding: 0.35rem 0.75rem; font-size: 0.8rem; min-height: 2rem; }

.actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  vertical-align: middle;
}
.actions > * {
  margin: 0 !important;
  flex: 0 0 auto;
}
.actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
}
.actions .btn {
  min-height: 2rem;
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  line-height: 1;
}
.inline-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}
.inline-actions form {
  display: inline-flex;
  margin: 0;
}
.row-edit {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.row-edit > input,
.row-edit > select {
  flex: 1 1 120px;
  min-width: 100px;
  max-width: 220px;
}
.row-edit .inline-actions {
  flex: 0 0 auto;
}

/* ── Flash & hints ── */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.flash.ok {
  background: var(--accent-soft);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.flash.err {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.flash a { color: inherit; font-weight: 600; }

.support-link {
  color: var(--accent, #0d9488);
  font-weight: 600;
  text-decoration: none;
}
.support-link:hover { text-decoration: underline; }

.hint { margin: 0.75rem 0 0; padding: 0.65rem 0.85rem; border-radius: var(--radius-sm); font-size: 0.88rem; }
.hint.ok-hint { background: var(--accent-soft); color: #065f46; border: 1px solid #a7f3d0; }
.hint.warn-hint { background: var(--warn-soft); color: #92400e; border: 1px solid #fde68a; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #f3f4f6;
  color: var(--text-secondary);
}

.badge.on { background: #d1fae5; color: #047857; }
.badge.ok { background: #d1fae5; color: #047857; }
.badge.off { background: #f3f4f6; color: var(--muted); }
.badge.warn { background: #fef3c7; color: #b45309; }

/* ── Login (legacy class kept for compatibility) ── */
.login-box {
  width: 100%;
  max-width: 420px;
}

.login-steps { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.login-steps .step {
  flex: 1; min-width: 130px;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #f9fafb;
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  transition: all .2s;
}

.login-steps .step .num {
  display: inline-flex;
  width: 1.5rem; height: 1.5rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: #e5e7eb;
  margin-right: 0.4rem;
  font-weight: 700;
  font-size: 0.78rem;
}

.login-steps .step.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}

.login-steps .step.active .num { background: var(--accent); color: #fff; }
.login-steps .step.done { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.login-steps .step.done .num { background: #22c55e; color: #fff; }

/* ── Account card in list ── */
.account-cell strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.account-cell .phone { color: var(--muted); font-size: 0.82rem; }
.inline-form { margin-top: 0.65rem; padding-top: 0.65rem; border-top: 1px dashed var(--line); }

.divider { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.empty-state p { margin: 0.25rem 0; }

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.link-back:hover { text-decoration: underline; }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  background: #9ca3af;
}

.status-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }

/* ── Secret field (api_id / api_hash) ── */
.secret-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.secret-field .secret-input {
  width: 100%;
  padding-right: 2.4rem;
}

.secret-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--muted);
  border-radius: 4px;
  transition: color .15s, background .15s;
}

.secret-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

table input[type="checkbox"] {
  width: 1rem; height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Billing plans ── */
.billing-tip {
  flex-wrap: wrap;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: box-shadow .15s, border-color .15s;
}
.billing-tip:hover {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.billing-tip-text { flex: 1 1 220px; }
.billing-tip-support { flex: 0 0 auto; }
.billing-tip a {
  cursor: pointer;
  pointer-events: auto;
}

.billing-waiting {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #6ee7b7 !important;
}
.billing-waiting.is-paid {
  background: linear-gradient(135deg, #d1fae5, rgba(255, 255, 255, 0.95)) !important;
  border-color: rgba(4, 120, 87, 0.35) !important;
}
.billing-waiting-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex: 1 1 260px;
}
.billing-waiting-dot {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.55);
  animation: waiting-pulse 1.4s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes waiting-pulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(13, 148, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}
.billing-waiting-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.billing-paid-flash {
  border-color: rgba(4, 120, 87, 0.22);
  background: linear-gradient(135deg, #ecfdf5, rgba(255, 255, 255, 0.92));
}
.is-hidden { display: none !important; }
.pulse-once {
  animation: waiting-pulse 1s ease-out 2;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  min-height: 2rem;
}
.order-pay-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ── Billing page polish ── */
.billing-hero {
  margin-bottom: 1rem;
}
.page-kicker,
.status-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.billing-hero h1 { margin-bottom: 0.25rem; font-size: 1.45rem; }
.billing-hero .page-desc { font-size: 0.88rem; }
.card-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.status-panel {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 70%);
  box-shadow: var(--shadow-sm);
}
.status-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.status-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.status-kicker { display: none; }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge.is-ok {
  background: var(--accent-soft);
  color: #047857;
  border-color: var(--accent-border);
}
.status-badge.is-warn {
  background: var(--warn-soft);
  color: #b45309;
  border-color: #fcd34d;
}
.status-badge.is-muted {
  background: #f3f4f6;
  color: #6b7280;
  border-color: var(--line);
}
.status-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.status-tile {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.status-tile.accent {
  background: #ecfdf5;
  border-color: var(--accent-border);
}
.status-tile.wide {
  grid-column: auto;
}
.status-tile-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.status-tile-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}
.status-tile-value .muted { color: var(--muted); }

.plans-section {
  scroll-margin-top: 1.25rem;
}
.plans-section.plans-focus {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35), var(--shadow);
  border-color: var(--accent-border);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.95rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.plan-card.is-current {
  border-color: var(--accent);
  background: #f8fffc;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.08);
}
.plan-card.is-current::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--accent);
}

.plan-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.02em;
}
.plan-badge.warn {
  background: var(--warn);
}

.plan-card-top {
  margin-bottom: 0.7rem;
  padding-right: 3.2rem;
}
.plan-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  color: var(--accent-hover);
}
.plan-amount {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-unit {
  font-size: 0.8rem;
  font-weight: 600;
}
.plan-period {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.plan-features {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0 0;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.plan-features li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.feat-label { color: var(--muted); }
.feat-val { font-weight: 600; color: var(--text); }

.plan-pay {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
}
.plan-chain-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.plan-chain {
  width: 100%;
  min-height: 2.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  background: #fff;
  font-size: 0.85rem;
}
.plan-cta {
  width: 100%;
  margin-top: 0.1rem;
  justify-content: center;
  min-height: 2.35rem;
  font-weight: 600;
}

.orders-section .table-wrap {
  margin-top: 0.25rem;
  border-radius: 8px;
  overflow: hidden;
}
.orders-section .empty-state {
  padding: 1.15rem 1rem;
  text-align: center;
  color: var(--muted);
  background: #fafbfc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}
.orders-section .empty-state p { margin: 0; }

@media (max-width: 900px) {
  .status-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-tile.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .status-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-tile.wide { grid-column: 1 / -1; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .sidebar-brand { border-bottom: none; padding: 1rem; }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0.5rem 0.5rem;
    flex: none;
    width: 100%;
  }
  .sidebar-footer { border-top: none; padding: 0 0.5rem 0.75rem; width: 100%; }
  .main-area { margin-left: 0; }
  .app-shell { flex-direction: column; }
  .wrap { padding: 1.25rem 1rem 2rem; }
}

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.5rem; }
}

/* ── 工作台限速设置 ── */
.settings-lead { margin: 0 0 1.1rem; }
.rate-settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.rate-section {
  padding: 1rem 1.1rem;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.rate-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rate-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
  font-size: 0.72rem;
  font-weight: 600;
}
.rate-grid {
  display: grid;
  gap: 1rem 1.25rem;
}
.rate-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rate-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rate-settings-form .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.rate-settings-form .field label { margin: 0; }
.rate-settings-form .field input,
.rate-settings-form .field select {
  width: 100%;
  min-height: 2.55rem;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}
.rate-footer {
  display: flex;
  justify-content: flex-start;
}
.rate-danger-zone {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.rate-danger-copy {
  flex: 1;
  min-width: 220px;
}
.rate-danger-copy strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.rate-danger-copy p { margin: 0; }
@media (max-width: 860px) {
  .rate-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .rate-grid-2,
  .rate-grid-3 { grid-template-columns: 1fr; }
}

/* —— 全站页脚客服 —— */
.site-footer-wrap {
  padding-top: 0;
  padding-bottom: 1.75rem;
}
.site-footer {
  margin-top: 0.5rem;
}
.site-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(13, 148, 136, 0.16);
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
  box-shadow: var(--shadow-sm);
}
.auth-page .site-footer {
  width: min(420px, 100%);
  margin-top: 0;
}
.auth-page .site-footer-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.auth-page .site-footer-copy {
  text-align: center;
  min-width: 0;
}
.auth-page .site-footer-lead {
  font-size: 0.95rem;
}
.auth-page .site-footer-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  justify-content: stretch;
}
.auth-page .support-btn {
  min-width: 0 !important;
  width: 100% !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
}
.auth-page .support-btn-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
}
.auth-page .support-btn-text {
  width: 100%;
}
.auth-page .support-btn-num {
  font-size: 0.82rem;
  word-break: break-all;
}
.auth-page .support-btn-cta {
  align-self: stretch;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .auth-page .site-footer-actions {
    grid-template-columns: 1fr;
  }
  .auth-plans-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer-copy { min-width: 7rem; }
.site-footer-kicker {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.site-footer-lead {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.site-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  flex: 1 1 auto;
}
.support-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.45rem 0.6rem 0.45rem 0.5rem;
  min-width: min(230px, 100%);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.support-btn-tg {
  background: linear-gradient(160deg, #edf8ff 0%, #e8f4fc 100%);
  border-color: rgba(37, 150, 190, 0.22);
}
.support-btn-wa {
  background: linear-gradient(160deg, #edfbf3 0%, #e8f7ee 100%);
  border-color: rgba(22, 163, 74, 0.2);
}
.support-btn:hover { transform: translateY(-1px); }
.support-btn-tg:hover {
  border-color: rgba(14, 116, 144, 0.4);
  box-shadow: 0 6px 14px rgba(14, 116, 144, 0.12);
}
.support-btn-wa:hover {
  border-color: rgba(22, 163, 74, 0.4);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.12);
}
.support-btn:active { transform: translateY(0); }
.support-btn-icon {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
}
.support-btn-tg .support-btn-icon {
  background: linear-gradient(145deg, #38bdf8, #0284c7);
}
.support-btn-wa .support-btn-icon {
  background: linear-gradient(145deg, #4ade80, #16a34a);
}
.support-btn-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.support-btn-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.support-btn-tg .support-btn-name { color: #0e7490; }
.support-btn-wa .support-btn-name { color: #15803d; }
.support-btn-num {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  word-break: break-all;
  line-height: 1.25;
}
.support-btn-cta {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 24, 39, 0.06);
  white-space: nowrap;
}
.support-btn:hover .support-btn-cta {
  color: var(--text);
  background: #fff;
}
.support-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
@media (max-width: 720px) {
  .site-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .site-footer-actions { justify-content: stretch; }
  .support-btn { min-width: 0; width: 100%; }
}

/* —— 管理后台表单内部 —— */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.admin-section {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.admin-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-hover);
  text-transform: uppercase;
}
.admin-fields {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0.7rem 0.85rem;
  width: 100%;
}
.admin-fields .field {
  min-width: 0 !important;
  width: auto !important;
  display: flex !important;
  flex-direction: column;
  gap: 0.28rem;
}
.admin-fields .field label {
  display: block;
  margin: 0;
}
.admin-fields .field input,
.admin-fields .field select {
  width: 100%;
  min-height: 2.35rem;
  box-sizing: border-box;
}
.admin-fields .field-span-2 { grid-column: span 2; }
.admin-checks {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
label.check-chip,
.check-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  width: auto !important;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f9fafb;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.check-chip input {
  margin: 0;
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--accent);
}
.check-chip.accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-hover);
}
.admin-form-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-table-wrap { margin-top: 0.15rem; }
.feat-pill {
  display: inline-flex;
  align-items: center;
  margin-right: 0.25rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
  font-size: 0.72rem;
  font-weight: 600;
}

.plan-admin-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  width: 100%;
}
.plan-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plan-admin-card.is-off {
  background: #fafafa;
  opacity: 0.92;
}
.plan-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--line);
}
.plan-admin-code {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.plan-admin-title {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.plan-admin-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.plan-admin-card .admin-form-actions {
  margin-top: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}
.plan-admin-card .admin-form-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1100px) {
  .plan-admin-grid { grid-template-columns: 1fr 1fr; }
  .admin-fields { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .admin-fields .field-span-2 { grid-column: span 2; }
}
@media (max-width: 720px) {
  .plan-admin-grid { grid-template-columns: 1fr; }
  .admin-fields,
  .plan-admin-fields { grid-template-columns: 1fr !important; }
  .admin-fields .field-span-2 { grid-column: auto; }
}

/* —— 公开落地页 —— */
.landing-page {
  --font-display: "Outfit", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Manrope", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(20, 184, 166, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(13, 148, 136, 0.1), transparent 50%),
    linear-gradient(180deg, #eef5f4 0%, #f3f6f8 40%, #eef2f5 100%);
}
.landing-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}
.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0 1.1rem;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.landing-brand .brand-icon {
  width: 38px;
  height: 38px;
  font-size: 0.78rem;
}
.landing-brand-text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.landing-nav > a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
}
.landing-nav > a:not(.btn):hover { color: var(--accent-hover); }
.landing-main { padding-bottom: 0.5rem; }

.landing-page .hero {
  padding: 0.85rem 0 1.35rem;
}
.landing-page .hero-eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.landing-page .hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 2.45rem);
  margin: 0 0 0.65rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 16em;
}
.landing-page .hero > p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 42rem;
  line-height: 1.75;
  font-size: 1.02rem;
}
.landing-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
  align-items: center;
}
.landing-page .actions .btn {
  min-height: 2.55rem;
  height: auto;
  padding: 0.6rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.landing-page .btn.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.landing-page .btn.secondary:hover {
  background: #fff;
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.landing-page .grid.stats {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0.15rem 0 1.35rem;
}
.landing-page .stat {
  position: relative;
  overflow: hidden;
  padding: 1.05rem 1.15rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.landing-page .stat::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -12px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  pointer-events: none;
}
.landing-page .stat:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
}
.landing-page .stat .label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.landing-page .stat .value {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.landing-page .panel {
  padding: 1.25rem 1.3rem;
  margin-bottom: 1.05rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.landing-page .panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.landing-page .panel-lead {
  margin: -0.25rem 0 1rem;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.75;
  max-width: 48rem;
}
.landing-page .audience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.landing-page .audience-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}
.landing-page .audience-tags span:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.landing-page .home-features {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.landing-page .home-feature {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.landing-page .home-feature:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.landing-page .home-feature strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.landing-page .home-feature span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.landing-page .pricing-panel {
  background:
    radial-gradient(520px 180px at 100% 0%, rgba(13, 148, 136, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.9);
  scroll-margin-top: 1.25rem;
}
.landing-page .pricing-copy h2 { margin-bottom: 0.45rem; }
.landing-page .pricing-copy p {
  margin: 0 0 1.1rem;
  color: var(--text-secondary);
  max-width: 38rem;
  line-height: 1.7;
}
.landing-page .pricing-modes {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.85rem;
}
.landing-page .pricing-mode {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}
.landing-page .pricing-mode strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.2rem;
}
.landing-page .pricing-mode span {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}
.landing-page .site-footer {
  margin-top: 1.5rem;
}

@media (max-width: 720px) {
  .landing-shell { width: min(1120px, calc(100% - 1.25rem)); }
  .landing-topbar { flex-wrap: wrap; }
  .landing-brand-text { font-size: 0.92rem; }
  .landing-page .hero h1 { max-width: none; }
}

/* —— 仪表盘统计卡 —— */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.dash-stat {
  margin-bottom: 0;
}
.dash-stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--accent-hover);
  padding: 0.15rem 0 0.2rem;
}
.dash-stat-value-sm {
  font-size: 1.25rem;
  font-weight: 700;
}
@media (max-width: 860px) {
  .dash-stats { grid-template-columns: 1fr; }
}
.category-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}
.category-create-form .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.category-create-form .field label { margin: 0; }
.category-create-form .field input {
  width: 100%;
  min-height: 2.55rem;
  box-sizing: border-box;
}
.category-create-form .field-action .btn {
  min-height: 2.55rem;
  padding-left: 1.35rem;
  padding-right: 1.35rem;
  white-space: nowrap;
}
.category-create-form .label-spacer {
  display: block;
  line-height: 1;
  user-select: none;
  visibility: hidden;
}
@media (max-width: 720px) {
  .category-create-form {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .category-create-form .field-action .btn {
    width: 100%;
  }
}
