:root {
  --accent: #1f4aa8;
  --accent-light: #ddeafc;
  --accent-dark: #17365d;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #6b7a90;
  --line: rgba(31, 74, 168, 0.18);
  --line-strong: rgba(31, 74, 168, 0.34);
  --ok-fg: #1e7a46;
  --ok-bg: #e7f5ec;
  --err-fg: #b42318;
  --err-bg: #fdecea;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 32px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 18px; font-weight: 700; color: var(--accent-dark); letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.who { color: var(--muted); font-size: 15px; }
.inline { display: inline; }

/* ---------- 容器 ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 28px 24px 56px; }
.container.wide { max-width: min(1800px, 96vw); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.card-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ---------- 登录 / 注册 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 38px 36px 32px;
  box-shadow: 0 12px 32px rgba(23, 54, 93, 0.08);
}
.auth-title { margin: 0 0 8px; font-size: 26px; color: var(--accent-dark); }
.auth-sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 15px; }
.auth-foot.muted { font-size: 14px; }
.auth-foot + .auth-foot { margin-top: 8px; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 20px; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--accent-dark); }

.input {
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9aa7bb; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 74, 168, 0.14); }

/* ---------- 图形验证码 ---------- */
.captcha-row { display: flex; align-items: center; gap: 12px; }

/* 密码框：右侧眼睛按钮切换明文显示 */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 46px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s;
}
.pw-toggle:hover { color: var(--accent); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle .icon-eye-off { display: none; }
.pw-toggle.is-on .icon-eye { display: none; }
.pw-toggle.is-on .icon-eye-off { display: block; }
.captcha-row .input { flex: 1; min-width: 0; letter-spacing: 3px; }
.captcha-img {
  flex: none;
  width: 138px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.captcha-img:hover { border-color: var(--accent); }

/* ---------- 公告正文 ---------- */
.notice-body {
  font-size: 15px;
  line-height: 1.85;
  color: #37475c;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-light); }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2b5fc9, #1f4aa8);
  border-color: #1f4aa8;
  color: #fff;
}

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

.btn-danger { background: #fff; color: var(--err-fg); border-color: var(--err-fg); }
.btn-danger:hover { background: var(--err-bg); }

.btn-mini { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

/* ---------- 提示 ---------- */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 15px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: rgba(30, 122, 70, .25); }
.alert-err { background: var(--err-bg); color: var(--err-fg); border-color: rgba(180, 35, 24, .25); }

/* ---------- 账号信息 ---------- */
.kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 32px; }
.kv-item { display: flex; flex-direction: column; gap: 4px; }
.kv-item dt { font-size: 13px; color: var(--muted); }
.kv-item dd { margin: 0; font-size: 16px; font-weight: 600; }

/* ---------- 许可卡片 ---------- */
.license { border-radius: 12px; padding: 22px 24px; border: 1px solid transparent; }
.license-ok { background: var(--ok-bg); border-color: rgba(30, 122, 70, .25); }
.license-off { background: #f2f5f9; border-color: var(--line); }
.license-badge { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.license-ok .license-badge { color: var(--ok-fg); }
.license-off .license-badge { color: var(--accent-dark); }
.license-meta { font-size: 15px; color: #37475c; }

/* ---------- 概览统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.stat-num { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search { display: flex; gap: 10px; align-items: center; }
.search .input { width: 300px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left;
  padding: 10px 10px;
  background: #eef3fc;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f7faff; }
.strong { font-weight: 600; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.col-actions { width: 1%; white-space: nowrap; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag-off { background: #eef1f6; color: #6b7a90; }
.tag-info { background: var(--accent-light); color: var(--accent-dark); }
.tag-err { background: var(--err-bg); color: var(--err-fg); }

/* ---------- 工具条右侧 / 下拉框 / 复选项 ---------- */
.toolbar-right { display: flex; align-items: center; gap: 14px; }
.select {
  height: 42px;
  width: 180px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  font-size: 14px;
}
.check-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent-dark); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.card-sub { margin: -6px 0 16px; }
.form-section {
  margin: 6px 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ---------- 接口文档 ---------- */
.doc-list { display: flex; flex-direction: column; gap: 18px; }
.doc-item { display: flex; flex-direction: column; gap: 6px; }
.doc-text { margin: 0; font-size: 14px; line-height: 1.8; color: #445268; }
.doc-code {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f8fd;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.75;
  color: #23406b;
  overflow-x: auto;
  white-space: pre;
}

/* ---------- 顶部横向栏目 ---------- */
.tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  padding: 0 2px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.tab:hover { color: var(--accent); text-decoration: none; }
.tab.active { color: var(--accent-dark); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 后台布局（左侧导航） ---------- */
.admin-body { display: flex; align-items: stretch; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 224px;
  width: 224px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 20px;
  background: var(--card);
  border-right: 1px solid var(--line);
}
.side-brand {
  padding: 0 10px 22px;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: .3px;
}
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #33445c;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--accent-light); text-decoration: none; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 18px;
}
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; }
.side-user { font-size: 15px; font-weight: 700; color: var(--accent-dark); padding: 0 10px; }
.side-role { font-size: 13px; color: var(--muted); padding: 0 10px 12px; }
.btn-block { width: 100%; height: 42px; }

.admin-main { flex: 1; min-width: 0; padding: 26px 30px 52px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-head h1 { margin: 0; font-size: 26px; color: var(--accent-dark); line-height: 1.3; }
.admin-head .muted { margin: 4px 0 0; }

/* ---------- 控制台图表 ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.chart-card { margin-bottom: 0; padding: 20px 22px 18px; display: flex; flex-direction: column; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.chart-head .card-title { margin: 0; font-size: 17px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: #e8edf5; stroke-width: 1; }
.chart .grid text { fill: #93a1b5; font-size: 11px; }
.chart .x-label { fill: #93a1b5; font-size: 11px; }
.chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-active { stroke: var(--accent); }
.chart .line-new { stroke: #2f9e63; }
.chart .area { stroke: none; }
.chart .area-active { fill: var(--accent-light); opacity: .75; }
.chart .area-new { fill: #dff3e8; opacity: .8; }
.chart .dot-active { fill: var(--accent); }
.chart .dot-new { fill: #2f9e63; }
.chart .bar { fill: var(--accent); opacity: .82; }
.chart .bar:hover { opacity: 1; }
.chart .bar-revenue { fill: #2f9e63; }

.legend { display: flex; align-items: center; gap: 14px; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-active { background: var(--accent); }
.sw-new { background: #2f9e63; }

/* ---------- 世界地图 ---------- */
.geo-map {
  width: 100%;
  background: radial-gradient(130% 110% at 50% -10%, #ffffff 0%, #eaf2fc 55%, #dce8f7 100%);
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  overflow: hidden;
  min-height: 180px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 3px rgba(23, 54, 93, .06);
}
.geo-map.dragging { cursor: grabbing; }
.geo-map svg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.geo-map svg path {
  pointer-events: auto;
  transition: filter .16s ease;
}
.geo-map svg path.has-users:hover { filter: brightness(1.1) saturate(1.15); }
.map-loading { padding: 60px 0; text-align: center; color: var(--muted); font-size: 14px; }
.geo-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.geo-scale i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #dde7f3 0%, #d6efe1 28%, #a9dfbe 52%, #72c694 76%, #227a4a 100%);
}
.geo-legend {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
  max-height: 118px;
  overflow-y: auto;
}
.geo-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #37475c; }
.geo-name { flex: 0 0 auto; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-bar { flex: 1; height: 6px; background: #eef3fc; border-radius: 3px; overflow: hidden; }
.geo-bar i { display: block; height: 100%; background: #2f9159; border-radius: 3px; max-width: 100%; }
.geo-count { flex: 0 0 auto; font-weight: 700; color: var(--accent-dark); }

/* 控制台内的紧凑表格 */
.table-compact { font-size: 13px; }
.table-compact th { padding: 8px 8px; font-size: 12px; }
.table-compact td { padding: 7px 8px; }

.link { font-size: 13px; font-weight: 600; }

@media (max-width: 1280px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-body { flex-direction: column; }
  .sidebar { position: static; width: 100%; flex: none; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; }
  .side-foot { display: none; }
  .admin-main { padding: 20px 16px 40px; }
}

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }

/* ---------- 编辑弹窗 ---------- */
.dialog {
  border: none;
  padding: 0;
  width: min(580px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 26px 70px rgba(23, 54, 93, .26);
}
.dialog-wide { width: min(1080px, 94vw); }
.dialog-form-wide { width: min(820px, 94vw); }
.dialog::backdrop { background: rgba(23, 54, 93, .40); backdrop-filter: blur(2px); }
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-title { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.dialog-sub { margin-top: 7px; font-size: 13px; color: var(--muted); }
.dialog-close {
  flex: none;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--accent); background: var(--accent-light); }
.dialog-body {
  padding: 22px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  max-height: calc(88vh - 96px);
}
.dlg-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 26px;
  margin: 0;
}
.dlg-meta dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.dlg-meta dd { margin: 0; font-size: 14px; line-height: 1.5; word-break: break-all; }
.dlg-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f6f8fc;
}
.dlg-license.is-active { background: var(--ok-bg); border-color: rgba(30, 122, 70, .24); }
.dlg-license-label { font-size: 13px; color: var(--muted); }
.dlg-license-value { font-size: 14px; font-weight: 600; }
.dlg-license.is-active .dlg-license-value { color: var(--ok-fg); }
.dlg-license-value.is-banned { color: var(--err-fg); }
.dlg-group { display: flex; flex-direction: column; gap: 11px; }
.dlg-label { font-size: 14px; font-weight: 600; }
.dlg-form { display: flex; gap: 12px; }
.dlg-form .input { flex: 1; height: 42px; }
.dlg-form .btn { height: 42px; padding: 0 24px; }
.dlg-form-trial { flex-wrap: wrap; }
.dlg-form-trial select.input { flex: 1 1 100%; }
.dlg-hint { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.dlg-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 8px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}
.chip:hover { background: var(--accent-light); }
.dlg-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.dlg-danger .btn { height: 42px; padding: 0 22px; flex: none; }
.dlg-danger[hidden] { display: none; }

/* ---------- 支付配置 ---------- */
.form-subtitle { margin: 10px 0 0; font-size: 16px; font-weight: 700; color: var(--accent-dark); }
.field-hint { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.textarea {
  height: auto;
  min-height: 118px;
  padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7faff;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
}
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.switch-row em { font-style: normal; font-weight: 400; }
.plan-edit {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
}
.plan-edit-head { display: flex; align-items: baseline; justify-content: space-between; }
.plan-edit-name { font-size: 16px; font-weight: 700; color: var(--accent-dark); }
.plan-edit-meta { font-size: 13px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.gen-row { align-items: flex-end; justify-content: flex-start; gap: 14px; }
.gen-row .field { width: 190px; }
.stepper { display: flex; align-items: stretch; gap: 6px; }
.stepper .input { flex: 1; min-width: 0; padding: 0 8px; text-align: center; cursor: default; }
.stepper-btns { flex: none; display: flex; flex-direction: column; gap: 4px; }
.stepper-btn {
  width: 30px;
  height: 21px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}
.stepper-btn:hover:not(:disabled) { background: var(--accent-light); border-color: var(--accent); }
.stepper-btn:disabled { color: #b8c2d3; background: #f4f6fa; cursor: not-allowed; }

/* ---------- 用户反馈 ---------- */
.feedback-item { padding: 20px 0; border-top: 1px solid var(--line); }
.feedback-item:first-of-type { border-top: none; padding-top: 4px; }
.feedback-reply {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--accent-light);
}
.feedback-reply .field-label { margin-bottom: 6px; }
.code-line {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #f7faff;
  color: var(--accent-dark);
  font-size: 13.5px;
  word-break: break-all;
}
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.tag-wait { background: #fff5e6; color: #9a6413; }

/* ---------- 用户端套餐 ---------- */
#plans { scroll-margin-top: 20px; }
.plan-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.plan-head .card-title { margin: 0; }
.plan-head .field-hint { margin: 6px 0 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.plan-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(23, 54, 93, .08); }
.plan-card-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f7faff, #edf4ff);
  box-shadow: 0 10px 24px rgba(31, 74, 168, .12);
}
.plan-card-featured:hover { transform: translateY(-2px); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
}
.plan-name { font-size: 16px; font-weight: 700; color: var(--accent-dark); }
.plan-price { font-size: 27px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.plan-currency { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-days { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.plan-monthly { font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.plan-save { font-size: 12px; font-weight: 600; color: #c2571a; }
.plan-points { margin-bottom: 8px; font-size: 12px; color: var(--muted); opacity: .85; }
.plan-card .btn { width: 100%; margin-top: auto; }
.license + .btn { margin-top: 16px; }
.btn:disabled,
.btn:disabled:hover {
  background: #f2f5f9;
  border-color: var(--line-strong);
  color: var(--muted);
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .grid-2, .grid-3, .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 16px 18px; }
  .container { padding: 20px 16px 40px; }
  .auth-card { padding: 28px 22px 24px; }
  .search .input { width: 100%; }
  .dlg-meta { grid-template-columns: 1fr; }
  .dlg-danger { flex-direction: column; align-items: flex-start; }
}

/* ---------- 语言切换（前台） ---------- */
.user-topbar { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.lang-switch { display: flex; align-items: center; gap: 8px; margin: 0; }
.lang-switch-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang-select {
  height: 38px;
  min-width: 132px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background-color: var(--card);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2317365d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lang-select:hover { border-color: var(--accent); }
.lang-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 74, 168, .14); }
.lang-select option { font-weight: 400; color: var(--text); }
.lang-switch-fixed {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  padding: 5px 7px 5px 10px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(23, 54, 93, .10);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 卡密兑换确认弹窗 */
.dialog-confirm { width: min(460px, 94vw); }
.dialog-confirm .dialog-body { gap: 18px; }
.redeem-code-preview {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent-light);
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  word-break: break-all;
}
.dlg-actions { display: flex; justify-content: flex-end; gap: 12px; }
