/* ========================================================================
   CDN 授权中心 · 设计系统
   明亮现代 / 铺满屏幕 / 仪表盘式
   ======================================================================== */

:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --accent: #06b6d4;
  --violet: #7c3aed;

  --ok: #10b981;
  --ok-bg: #ecfdf5;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #0ea5e9;
  --info-bg: #f0f9ff;

  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e9edf5;
  --line-2: #f1f4fa;
  --text: #101828;
  --text-2: #475467;
  --muted: #8a94a6;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .04);
  --sh-2: 0 2px 8px rgba(16, 24, 40, .06);
  --sh-3: 0 12px 32px rgba(16, 24, 40, .10);

  --sidebar-w: 236px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d6dbe6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c2c9d8; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 布局骨架 ============================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 60%, var(--accent) 130%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .32);
  flex-shrink: 0;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 14.5px; letter-spacing: .2px; }
.brand-txt span { font-size: 11px; color: var(--muted); }

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 20px;
}
.nav-group { margin-bottom: 4px; }
.nav-title {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .8px;
  padding: 12px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: all .15s;
  position: relative;
  cursor: pointer;
}
.nav-item:hover { background: var(--line-2); color: var(--text); }
.nav-item.active {
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.nav-item .pill {
  margin-left: auto;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
}

.side-foot {
  padding: 12px;
  border-top: 1px solid var(--line-2);
  flex-shrink: 0;
}
.side-card {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #e5e7fb;
  border-radius: var(--r);
  padding: 12px;
}
.side-card b { font-size: 12.5px; display: block; margin-bottom: 3px; }
.side-card p { font-size: 11.5px; color: var(--text-2); margin-bottom: 9px; }
.side-card .btn-side {
  background: var(--brand); color: #fff; border: none;
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 550;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; cursor: pointer; transition: .15s;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .22);
}
.side-card .btn-side:hover {
  background: var(--brand-600); color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .32);
}
.side-card .btn-side-warn {
  background: #f59e0b; color: #fff; border: none;
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 550;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; cursor: pointer; transition: .15s;
  box-shadow: 0 2px 6px rgba(245, 158, 11, .22);
}
.side-card .btn-side-warn:hover {
  background: #d97706; color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, .32);
}

/* ============================ 主区 ============================ */
.main { display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  flex-shrink: 0;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--text); font-size: 16px; font-weight: 650; display: block; line-height: 1.2; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 13px;
  width: 230px;
}
.search input { border: none; background: none; outline: none; width: 100%; font-size: 13px; }
.search input::placeholder { color: var(--muted); }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--text-2);
  position: relative;
  transition: .15s;
}
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid #fff;
}

.avatar {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 22px;
  transition: .15s;
}
.avatar:hover { background: var(--line-2); }
.ava {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.avatar .who { line-height: 1.2; }
.avatar .who b { font-size: 13px; display: block; }
.avatar .who span { font-size: 11px; color: var(--muted); }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 40px;
}

/* ============================ 通用元件 ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
}
.card-h h3 { font-size: 14.5px; font-weight: 650; }
.card-h .sub { font-size: 12px; color: var(--muted); }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px; }
.card-b.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-5 { grid-template-columns: repeat(5, 1fr); }
.g-auto { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.g-21 { grid-template-columns: 2fr 1fr; }
.g-12 { grid-template-columns: 1fr 2fr; }
.g-31 { grid-template-columns: 3fr 1.35fr; }
@media (max-width: 1400px) {
  .g-5 { grid-template-columns: repeat(3, 1fr); }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
  .g-31, .g-21, .g-12, .g-3, .g-2 { grid-template-columns: 1fr; }
}

/* 统计卡 */
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 17px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
  transition: .18s;
}
.stat:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.stat .lbl { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 27px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 2px; }
.stat .val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .foot { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.stat .si {
  position: absolute; right: 14px; top: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
}
.stat .bar { height: 5px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-top: 9px; }
.stat .bar i { display: block; height: 100%; border-radius: 4px; }

.trend-up { color: var(--ok); font-weight: 600; }
.trend-dn { color: var(--danger); font-weight: 600; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px;
  white-space: nowrap;
}
.b-ok { background: var(--ok-bg); color: #047857; }
.b-warn { background: var(--warn-bg); color: #b45309; }
.b-danger { background: var(--danger-bg); color: #b91c1c; }
.b-info { background: var(--info-bg); color: #0369a1; }
.b-gray { background: #f2f4f8; color: #475467; }
.b-brand { background: var(--brand-50); color: var(--brand-600); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 9px;
  font-size: 13px; font-weight: 550;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.btn:active { background: var(--brand-100); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .26);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand));
  color: #fff; border-color: transparent;
  box-shadow: 0 5px 16px rgba(79, 70, 229, .42);
  filter: none;
}
.btn-on-dark {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, .26);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.btn-ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn-ok:hover { color: #fff; filter: brightness(1.05); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fadada; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 14.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--brand-50); border-color: transparent; color: var(--brand); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link { color: var(--brand); font-weight: 550; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 16px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.2px;
  vertical-align: middle;
}
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; }
.t-wrap { overflow-x: auto; }

.u-cell { display: flex; align-items: center; gap: 9px; }
.u-cell .ava { width: 30px; height: 30px; font-size: 11px; }
.u-cell b { font-size: 13.2px; font-weight: 600; display: block; line-height: 1.25; }
.u-cell span { font-size: 11.5px; color: var(--muted); }

.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; }

/* 表单 */
.field { margin-bottom: 15px; }
.field > label {
  display: block;
  font-size: 12.8px; font-weight: 600; color: var(--text-2);
  margin-bottom: 6px;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.inp {
  width: 100%; height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  outline: none;
  transition: .15s;
  color: var(--text);
}
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; min-height: 78px; }
select.inp { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.inp-group { display: flex; align-items: center; gap: 8px; }
.inp-suffix { font-size: 13px; color: var(--muted); white-space: nowrap; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
/* 自定义付款单选卡片（替代原生 radio，避免“白色圆圈”观感） */
.pay-opt {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: #fff;
  cursor: pointer; transition: .15s;
}
.pay-opt:hover { border-color: #c7cdda; }
.pay-opt.on { border-color: var(--brand); background: var(--brand-50); }
.pay-opt .radio {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #c2cad8; position: relative; transition: .15s;
}
.pay-opt.on .radio { border-color: var(--brand); }
.pay-opt.on .radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--brand);
}
.pay-opt b { font-size: 13.5px; }
.pay-opt label { font-size: 12px; color: var(--muted); display: block; }

.switch .track {
  display: inline-block;
  width: 40px; height: 22px; border-radius: 22px;
  background: #cfd6e2; position: relative; transition: .2s; flex-shrink: 0;
  border: 1px solid #b7c0d0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08);
  vertical-align: middle;
}
.switch .track::after {
  content: ""; position: absolute;
  top: 50%; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
}
.switch input:checked + .track {
  background: var(--brand); border-color: var(--brand);
  box-shadow: inset 0 1px 2px rgba(79, 70, 229, .25);
}
.switch input:checked + .track::after { transform: translateY(-50%) translateX(20px); }
.switch .sw-txt { font-size: 13px; color: var(--text-2); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; position: relative; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.check .box {
  display: inline-block; box-sizing: border-box;
  width: 16px; height: 16px; border-radius: 4px;
  background: #fff; border: 1.5px solid #c2cad8;
  vertical-align: middle; flex-shrink: 0;
  position: relative; transition: .12s;
}
.check .box::after {
  content: ""; position: absolute;
  left: 4px; top: 1px; width: 6px; height: 10px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  opacity: 0; transition: .12s;
}
.check:hover .box { border-color: var(--brand); }
.check input:checked ~ .box { background: var(--brand); border-color: var(--brand); }
.check input:checked ~ .box::after { opacity: 1; }
.check:has(input:checked) { color: var(--text); }
.check input:focus-visible ~ .box { box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }

.seg {
  display: inline-flex; background: var(--line-2);
  border-radius: 9px; padding: 3px; gap: 2px;
}
.seg button {
  padding: 5px 13px; border-radius: 7px;
  font-size: 12.8px; color: var(--text-2); font-weight: 550;
  transition: .15s;
}
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--sh-1); }

/* 空态 / 提示条 */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { opacity: .35; margin-bottom: 10px; }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 4px; }
.empty p { font-size: 12.5px; }

.tip {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r);
  font-size: 12.8px; line-height: 1.6;
}
.tip.info { background: var(--info-bg); color: #0c4a6e; border: 1px solid #cfeaff; }
.tip.warn { background: var(--warn-bg); color: #92400e; border: 1px solid #fde9c0; }
.tip.ok { background: var(--ok-bg); color: #065f46; border: 1px solid #c7f0dd; }
.tip svg { flex-shrink: 0; margin-top: 1px; }
.tip b { display: block; margin-bottom: 2px; }

/* 模态 */
.mask {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .42);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  z-index: 200;
  padding: 24px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
.modal {
  background: #fff;
  border-radius: var(--r-xl);
  width: 560px; max-width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-3);
  animation: pop .2s cubic-bezier(.2, .9, .3, 1);
}
.modal.wide { width: 800px; }
.modal.slim { width: 440px; }
.modal-h {
  padding: 17px 20px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px;
}
.modal-h h3 { font-size: 15.5px; font-weight: 650; }
.modal-h .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 20px; overflow-y: auto; flex: 1; }
.modal-f {
  padding: 14px 20px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 9px;
  background: #fcfdff; border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* Toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 400; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: #101828; color: #fff;
  padding: 11px 16px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--sh-3);
  display: flex; align-items: center; gap: 8px;
  animation: pop .2s ease;
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }

/* 描述列表 */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 20px; }
.dl .di label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
.dl .di div { font-size: 13.5px; font-weight: 550; }

/* 进度条 */
.pbar { height: 7px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 5px; transition: width .5s; }

/* 时间线 */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
}
.tl-item.done::before { background: var(--brand); }
.tl-item.gray::before { border-color: #cfd6e4; }
.tl-item b { font-size: 13.2px; display: block; }
.tl-item span { font-size: 11.8px; color: var(--muted); }

/* 套餐卡 */
.plan {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
  position: relative; transition: .2s; display: flex; flex-direction: column;
}
.plan:hover { border-color: #cdd3e6; box-shadow: var(--sh-2); transform: translateY(-2px); }
.plan.hot { border-color: var(--brand); box-shadow: 0 8px 26px rgba(79, 70, 229, .14); }
.plan.cur { border-color: var(--ok); background: linear-gradient(180deg, #f6fffb, #fff 40%); }
.plan .tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .3);
}
.plan .tag.g { background: var(--ok); box-shadow: 0 3px 10px rgba(16, 185, 129, .3); }
.plan h4 { font-size: 16px; font-weight: 700; }
.plan .desc { font-size: 12.2px; color: var(--muted); margin: 3px 0 14px; min-height: 34px; }
.plan .price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 3px; }
.plan .price b { font-size: 31px; font-weight: 750; letter-spacing: -1px; }
.plan .price i { font-size: 15px; font-style: normal; font-weight: 650; }
.plan .price span { font-size: 12.5px; color: var(--muted); }
.plan .orig { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-bottom: 14px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 14px 0 18px; flex: 1; }
.plan li { display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--text-2); }
.plan li b { color: var(--text); font-weight: 650; }
.plan li.off { color: #b3bac7; }
.tick { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--ok-bg); color: var(--ok); }
.tick.no { background: #f2f4f8; color: #b3bac7; }

/* 授权码 */
.keybox {
  display: flex; align-items: center; gap: 10px;
  background: #0f172a; color: #e2e8f0;
  border-radius: var(--r); padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; letter-spacing: .5px;
  overflow: hidden;
}
.keybox .k { flex: 1; overflow-x: auto; white-space: nowrap; }
.keybox button { color: #94a3b8; display: grid; place-items: center; padding: 4px; border-radius: 6px; }
.keybox button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.keybox.wrap { align-items: flex-start; }
.keybox.wrap .k { white-space: pre-wrap; word-break: break-all; overflow: visible; line-height: 1.6; padding: 2px 0; }
.keybox.mini { padding: 9px 12px; font-size: 12px; gap: 8px; background: #1e293b; }
.keybox.mini .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lic-card .card-b { padding: 16px; }

/* 英雄卡（授权总览） */
.hero {
  border-radius: var(--r-xl);
  padding: 22px 24px;
  color: #fff;
  background:
    radial-gradient(900px 260px at 88% -30%, rgba(6, 182, 212, .55), transparent 60%),
    radial-gradient(600px 300px at 10% 130%, rgba(168, 85, 247, .5), transparent 60%),
    linear-gradient(120deg, #4338ca, #6d28d9);
  position: relative; overflow: hidden;
  box-shadow: 0 12px 30px rgba(79, 70, 229, .22);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .06);
}
.hero-top { display: flex; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.hero h2 { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.hero .sub { font-size: 12.8px; opacity: .82; margin-top: 3px; }
.hero .badge { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(4px); }
.hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-top: 20px; position: relative; z-index: 1;
}
.hero-cell {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r); padding: 12px 14px;
  backdrop-filter: blur(6px);
}
.hero-cell label { font-size: 11.5px; opacity: .8; display: block; }
.hero-cell b { font-size: 20px; font-weight: 700; display: block; margin-top: 2px; letter-spacing: -.3px; }
.hero-cell b small { font-size: 12px; opacity: .75; font-weight: 500; }
.hero-cell .mini { height: 4px; background: rgba(255, 255, 255, .22); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.hero-cell .mini i { display: block; height: 100%; background: #fff; border-radius: 3px; }

/* 功能开关格 */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.feat {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: #fcfdff;
}
.feat .fi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.feat label { font-size: 12px; color: var(--muted); display: block; }
.feat b { font-size: 13px; }
.feat.no { opacity: .55; }
.feat-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; max-width: 280px; }
.feat-chip { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.feat-chip.on  { background: var(--brand-50, #eef2ff); color: var(--brand, #6366f1); }
.feat-chip.off { background: #f1f5f9; color: #cbd5e1; }
.feat-count { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--muted, #64748b); padding: 2px 6px; border-radius: 4px; background: #f8fafc; }

/* 登录页 */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 980px) { .auth-wrap { grid-template-columns: 1fr } .auth-side { display: none !important } }
.auth-side {
  background:
    radial-gradient(800px 400px at 20% 10%, rgba(6, 182, 212, .4), transparent 55%),
    radial-gradient(700px 500px at 90% 90%, rgba(168, 85, 247, .45), transparent 55%),
    linear-gradient(150deg, #312e81, #4c1d95);
  color: #fff; padding: 52px 56px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(700px 500px at 50% 40%, #000, transparent);
}
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 384px; }
.auth-box { position: relative; }
.auth-box h1 { font-size: 25px; font-weight: 700; letter-spacing: -.4px; }
.auth-box .lead { font-size: 13.5px; color: var(--muted); margin: 6px 0 26px; }
.role-badge {
  position: absolute; top: 0; right: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100);
}
.role-badge.warn { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.role-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 入口选择页 */
.back-entry { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.back-entry:hover { color: var(--brand); }
.role-cards { display: flex; flex-direction: column; gap: 14px; }
.role-card {
  display: flex; align-items: center; gap: 15px; text-align: left;
  padding: 18px 18px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; cursor: pointer; transition: .15s; text-decoration: none; color: inherit;
}
.role-card:hover { border-color: var(--brand); box-shadow: 0 8px 22px rgba(79, 70, 229, .12); transform: translateY(-1px); }
.role-card .rc-ico {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand));
}
.role-card.admin .rc-ico { background: linear-gradient(135deg, #c026d3, #7c3aed); }
.role-card .rc-main { flex: 1; }
.role-card .rc-main b { font-size: 15.5px; display: block; }
.role-card .rc-main label { font-size: 12.8px; color: var(--muted); }
.role-card .rc-arrow { color: var(--line-2); flex-shrink: 0; transition: .15s; }
.role-card:hover .rc-arrow { color: var(--brand); transform: translateX(3px); }

/* 原型导航 */
.proto-body { background: #0b1020; color: #e6e9f5; min-height: 100vh; }

/* 杂项 */
.flex { display: flex; align-items: center; }
.gap-6 { gap: 6px } .gap-8 { gap: 8px } .gap-10 { gap: 10px } .gap-12 { gap: 12px } .gap-16 { gap: 16px }
.mla { margin-left: auto }
.mb-16 { margin-bottom: 16px } .mb-12 { margin-bottom: 12px } .mb-8 { margin-bottom: 8px } .mb-20 { margin-bottom: 20px }
.mt-16 { margin-top: 16px } .mt-12 { margin-top: 12px } .mt-8 { margin-top: 8px } .mt-20 { margin-top: 20px }
.muted { color: var(--muted) } .t2 { color: var(--text-2) }
.fs12 { font-size: 12px } .fs13 { font-size: 13px } .fs11 { font-size: 11.5px }
.fw6 { font-weight: 600 } .fw7 { font-weight: 700 }
.tr { text-align: right } .tc { text-align: center }
.wrap-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.nowrap { white-space: nowrap; }
.pointer { cursor: pointer; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.page-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.page-head .right { margin-left: auto; display: flex; gap: 9px; align-items: center; }

.filters {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2); background: #fcfdff;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.filters .inp { width: auto; height: 32px; font-size: 12.8px; }
.filters .search { padding: 4px 12px; height: 32px; background: #fff; }

.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line-2);
  font-size: 12.8px; color: var(--muted);
}
.pager .pgs { margin-left: auto; display: flex; gap: 4px; }
.pager .pg {
  min-width: 29px; height: 29px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: 7px;
  display: grid; place-items: center; font-size: 12.5px; color: var(--text-2); background: #fff;
}
.pager .pg:hover { border-color: var(--brand); color: var(--brand); }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* 图表容器 */
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: flex; align-items: center; gap: 8px; font-size: 12.8px; }
.dl-row .dot { width: 9px; height: 9px; border-radius: 3px; }
.dl-row b { margin-left: auto; font-variant-numeric: tabular-nums; }

.rank-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.rank-row .rk {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--text-2); flex-shrink: 0;
}
.rank-row .rk.t1 { background: #fff4d6; color: #b45309 }
.rank-row .rk.t2 { background: #eef0f6; color: #475467 }
.rank-row .rk.t3 { background: #fbe9dd; color: #9a3412 }
/* 套餐功能比对矩阵 */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 920px; }
.matrix thead th {
  position: sticky; top: 0; z-index: 2;
  background: #fbfcff; border-bottom: 1px solid var(--line);
  padding: 12px 10px; font-size: 13.5px;
}
.matrix tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle;
}
.matrix tbody td.tc { text-align: center; }
.matrix tbody td.hl { background: #fff7ec; }
.matrix thead th.hl {
  background: linear-gradient(180deg, #fff5e6, #fbfcff);
  box-shadow: inset 0 -2px 0 #f59e0b;
}
.matrix tbody tr.grp td {
  background: #f6f8fb; padding: 8px 14px;
  border-bottom: 1px solid var(--line-2);
  border-top: 1px solid var(--line);
}
.matrix tbody tr.grp b {
  font-size: 12.5px; letter-spacing: .5px;
  color: var(--text-2); text-transform: uppercase;
}
.matrix tbody tr.cta td { background: #fbfcff; padding: 14px 8px; border-bottom: none; }
.matrix tbody tr.cta td:first-child { background: #f6f8fb; }
.matrix tbody td .fs11 { font-size: 10.5px; line-height: 1.3; color: var(--muted); margin-top: 2px; }
.matrix tbody tr:hover td:not(.hl) { background: #fafbfd; }
.matrix thead th:first-child { text-align: left; }

/* 一期范围标记：暂不开发（二期功能 / 用户后台） */
.nav-item.nav-defer { opacity:.5; cursor:not-allowed; color:#94a3b8; }
.nav-item.nav-defer:hover { background:transparent; }
.pill-defer { background:#f1f5f9; color:#94a3b8; margin-left:auto; font-weight:600; }
.role-card.disabled { opacity:.55; cursor:not-allowed; }
.role-card.disabled:hover { transform:none; box-shadow:none; border-color:#e6e9f0; }
.phase-banner { background:#fff7ed; color:#c2410c; border-bottom:1px solid #fed7aa; padding:9px 16px; text-align:center; font-size:13px; font-weight:600; }
