/* 悦信商户台 - 像素级复刻样式（2026-07-21 重建版） */
:root {
  --brand: #0ea5a5;
  --brand-dark: #0a8a8a;
  --brand-soft: #e6fafa;
  --brand-light: #f0fbfb;
  --secondary: #2f6bff;
  --bg: #f0f7ff;
  --card: #ffffff;
  --text: #1f2937;
  --text-2: #374151;
  --muted: #8b9aaf;
  --border: #e4eaf3;
  --border-light: #f0f4f9;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --sidebar-w: 210px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e6f1ff 0%, #f2f9ff 45%, #eef6ff 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
}
.login-page::before { width: 360px; height: 360px; background: #a5d8ff; left: 4%; top: 10%; }
.login-page::after { width: 420px; height: 420px; background: #d6eeff; right: 2%; bottom: 5%; }
.login-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.98), rgba(219,238,255,.75) 42%, rgba(165,207,255,.45) 68%, rgba(59,130,246,.15));
  box-shadow: inset -14px -14px 42px rgba(255,255,255,.9), inset 14px 14px 42px rgba(59,130,246,.12), 0 24px 80px rgba(59,130,246,.18);
  pointer-events: none;
}
.login-orb::after {
  content: '';
  position: absolute;
  top: 16%; left: 20%;
  width: 26%; height: 26%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%);
  filter: blur(1px);
}
.login-orb.o1 { width: 150px; height: 150px; left: 8%; top: 55%; }
.login-orb.o2 { width: 100px; height: 100px; right: 14%; top: 18%; }
.login-orb.o3 { width: 64px; height: 64px; left: 24%; bottom: 14%; }
.login-ring {
  position: absolute;
  width: 480px; height: 480px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
  opacity: .3;
}
.login-ring svg { width: 100%; height: 100%; fill: none; stroke: url(#ringGrad); stroke-width: 1.1; }

.login-card {
  width: 420px;
  max-width: 92vw;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(255,255,255,.5) inset;
  padding: 38px 36px 34px;
  position: relative;
  z-index: 2;
}
.login-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}
.login-brand .logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #22c1c1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 6px 16px rgba(14, 165, 165, .25);
}
.login-brand .logo svg { width: 22px; height: 22px; }
.login-brand .name { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; }
.login-brand .subname { font-size: 12px; color: var(--muted); margin-top: 2px; }
.login-sub { color: var(--muted); font-size: 13px; margin: 22px 0 24px; }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 22px; color: var(--text); }

.segmented {
  display: flex; background: #f1f5f9; border-radius: 10px; padding: 4px; margin-bottom: 24px;
}
.segmented button {
  flex: 1; border: none; background: transparent; padding: 9px 0; border-radius: 8px;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.segmented button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.field label .required { color: var(--danger); margin-right: 4px; }
.field .input-wrap {
  display: flex; align-items: center; border: 1px solid var(--border);
  border-radius: 10px; padding: 0 14px; transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
.field .input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 165, 165, .08); }
.field .input-wrap svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.field input {
  flex: 1; height: 46px; border: none; outline: none; font-size: 15px;
  padding: 0 12px; background: transparent; color: var(--text);
}
.field .toggle {
  border: none; background: transparent; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; padding: 4px;
}
.btn {
  width: 100%; height: 46px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .05s; margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.secondary:hover { background: var(--brand-light); }
.btn.sm { width: auto; height: 34px; padding: 0 16px; font-size: 13px; white-space: nowrap; }
.btn.outline { background: #fff; color: var(--text-2); border: 1px solid var(--border); }
.btn.outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.btn.danger { background: var(--danger); }
.btn.warn { background: #f59e0b; }
.btn.warn:hover { background: #d97706; }
.btn.ghost { background: transparent; color: var(--text-2); border: 1px solid transparent; }
.btn.ghost:hover { background: var(--border-light); }
.btn.sm.danger { background: #fff; color: var(--danger); border: 1px solid #fecdd3; }
.btn.sm.danger:hover { background: #fff1f2; }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 10px; text-align: center; }
.login-float {
  position: fixed; right: 28px; bottom: 28px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: #fff; border: none;
  box-shadow: 0 8px 24px rgba(14, 165, 165, .35);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: transform .2s, box-shadow .2s;
}
.login-float:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14, 165, 165, .45); }
.login-float:active { transform: translateY(0); }
.login-float svg { width: 26px; height: 26px; }
.login-float-tip {
  position: fixed; right: 92px; bottom: 36px;
  max-width: 220px; padding: 10px 14px;
  background: rgba(15,23,42,.85); color: #fff;
  font-size: 13px; border-radius: 10px;
  opacity: 0; transform: translateX(10px);
  animation: tipIn .3s forwards;
  pointer-events: none; z-index: 11;
}
@keyframes tipIn { to { opacity: 1; transform: translateX(0); } }
.login-float-tip.out { opacity: 0; transform: translateX(10px); transition: all .3s; }
.login-torus {
  position: absolute; right: 4%; bottom: 6%;
  width: 320px; height: 320px;
  pointer-events: none; opacity: .55; z-index: 1;
  transform: rotate(-15deg);
}
.login-torus svg { width: 100%; height: 100%; }

/* ============ 控制台布局 ============ */
.console { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; left: 0; top: 0; height: 100vh;
  z-index: 20;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border-light);
}
.side-brand .logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #22c1c1);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.side-brand .logo svg { width: 18px; height: 18px; }
.side-brand .name { font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--text); }
.side-brand .role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.side-menu { flex: 1; overflow-y: auto; padding: 8px 10px 14px; }
.nav-group-title { font-size: 11px; color: var(--muted); padding: 12px 10px 6px; font-weight: 500; }

.nav-item, .nav-group {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); cursor: pointer; font-size: 13px; margin-bottom: 2px; user-select: none;
  transition: background .12s, color .12s;
  position: relative;
}
.nav-item svg, .nav-group svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover, .nav-group:hover { background: #f8fafc; color: var(--text); }
.nav-item.active, .nav-group.active {
  background: var(--brand-light); color: var(--brand); font-weight: 600;
}
.nav-item.active::before, .nav-group.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand); border-radius: 0 3px 3px 0;
}
.nav-item .arrow { margin-left: auto; font-size: 11px; transition: transform .2s; }
.nav-item.expanded .arrow { transform: rotate(180deg); }
.nav-sub { padding-left: 26px; margin-bottom: 4px; display: none; }
.nav-sub.open { display: block; }
.nav-sub .nav-item { font-size: 13px; padding: 8px 12px; margin-bottom: 1px; }
.nav-sub .nav-item.active::before { top: 6px; bottom: 6px; }
.nav-unread {
  margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

.main-area { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: var(--card); border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar h1 { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  height: 34px; padding: 0 14px; border: 1px solid var(--border); background: #fff; border-radius: 8px;
  color: var(--text-2); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.topbar-btn:hover { border-color: var(--brand); color: var(--brand); }
.topbar-btn svg { width: 15px; height: 15px; }
.icon-btn {
  width: 34px; height: 34px; border: none; background: transparent; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: #f1f5f9; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; cursor: pointer;
}

.view { padding: 20px; flex: 1; }

/* ============ 通用组件 ============ */
.page-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm);
  padding: 20px; margin-bottom: 16px;
}
.page-card .pc-title {
  font-size: 15px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between;
}

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px;
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: space-between; position: relative;
}
.stat-card .info { flex: 1; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-card .unit { font-size: 13px; color: var(--text); font-weight: 600; margin-left: 2px; }
.stat-card .delta { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.stat-card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.stat-card .icon svg { width: 22px; height: 22px; }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px;
  margin-bottom: 16px; font-size: 13px; border: 1px solid transparent;
}
.banner.info { background: #eff6ff; border-color: #dbeafe; color: #1e40af; }
.banner.warn { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.banner.danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.banner .b-icon { width: 20px; height: 20px; flex-shrink: 0; }
.banner .b-main { flex: 1; }
.banner .b-title { font-weight: 600; margin-bottom: 3px; }
.banner .b-action {
  margin-left: auto; border: none; padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; white-space: nowrap;
  font-weight: 500;
}
.banner.info .b-action { background: var(--brand); color: #fff; }
.banner.info .b-action:hover { background: var(--brand-dark); }
.banner.warn .b-action { background: var(--ok); color: #fff; }
.banner.warn .b-action:hover { background: #059669; }
.banner.danger .b-action { background: #fff; color: var(--danger); border: 1px solid var(--danger); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; color: #cbd5e1; }
.empty-state .title { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty-state .desc { font-size: 13px; }

/* 表格 */
.yx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yx-table th, .yx-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.yx-table th { color: var(--text-2); font-weight: 600; font-size: 13px; background: #fafbfc; }
.yx-table tbody tr:hover { background: #f8fafc; }
.yx-table .actions { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.yx-table .action { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.yx-table .action.edit { color: var(--brand); }
.yx-table .action.del { color: var(--danger); }
.yx-table .action:hover { opacity: .8; }
.yx-table .tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.yx-table .tag.online { background: #dcfce7; color: #166534; }
.yx-table .tag.offline { background: #f1f5f9; color: #64748b; }

/* 分页 */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 16px; }
.pagination button {
  width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pagination button:hover { border-color: var(--brand); color: var(--brand); }
.pagination button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 搜索框 */
.search-bar { position: relative; }
.search-bar input {
  width: 260px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0 32px 0 12px;
  font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 165, 165, .08); }
.search-bar svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }

/* 标签 */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag.primary { background: var(--brand-light); color: var(--brand); }
.tag.success { background: #dcfce7; color: #166534; }
.tag.warn { background: #fef3c7; color: #92400e; }
.tag.danger { background: #fee2e2; color: #991b1b; }
.tag.info { background: #dbeafe; color: #1e40af; }
.tag.light { background: #f1f5f9; color: #475569; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.form-group label .required { color: var(--danger); margin-right: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px;
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; background: #fff;
}
.form-group textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 165, 165, .08); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border-light); margin-bottom: 20px; gap: 24px; }
.tabs .tab { padding: 10px 0; font-size: 14px; color: var(--muted); cursor: pointer; position: relative; }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--brand); font-weight: 600; }
.tabs .tab svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }
.tabs .tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px 2px 0 0; }

/* Segmented inline */
.seg {
  display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 3px;
}
.seg button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 6px;
  font-size: 13px; color: var(--muted); cursor: pointer; transition: all .12s;
}
.seg button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* ============ 首页 ============ */
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hero-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; box-shadow: var(--shadow-sm); flex: 1; }
.hero-card .eyebrow { font-size: 12px; color: var(--brand); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.hero-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.hero-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.hero-card .btn { width: auto; min-width: 120px; margin-top: 14px; padding: 0 22px; white-space: nowrap; }

.announce-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.announce-box h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.announce-box h3 svg { width: 16px; height: 16px; }
.announce-box p { color: var(--text-2); font-size: 13px; line-height: 1.6; }

.compliance-card { background: #fff5f7; border: 1px solid #fecdd3; border-radius: 12px; padding: 18px 20px; }
.compliance-card h3 { font-size: 14px; font-weight: 600; color: #9f1239; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.compliance-card h3 svg { width: 16px; height: 16px; }
.compliance-card p { color: #9f1239; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.compliance-card .btn { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; margin-top: 6px; }
.compliance-card .btn:hover { background: #ffe4e6; }

.channel-health { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.channel-health h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ch-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.ch-item:last-child { border-bottom: none; }
.ch-item .name { font-weight: 600; width: 80px; }
.ch-item .tag { margin-right: auto; }
.ch-item .meta { color: var(--muted); font-size: 13px; }
.ch-item .bar { width: 120px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.ch-item .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.ch-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-icon svg { width: 18px; height: 18px; }
.num-cell { font-weight: 600; font-size: 14px; }
.api-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.api-stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.api-stat .label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.api-stat .value { font-size: 22px; font-weight: 700; color: var(--text); }
.api-stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ============ API 接入渠道卡片 ============ */
.api-channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.api-channel-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.api-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.api-card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--brand-light);
  color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.api-card-icon svg { width: 22px; height: 22px; }
.api-card-status { font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.api-card-status.online { background: #e6fffa; color: #0d9488; }
.api-card-status.offline { background: #f1f5f9; color: #64748b; }
.api-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.api-card-meta { font-size: 13px; color: var(--text-2); margin-bottom: 14px; line-height: 1.8; }
.api-card-label { color: var(--muted); }
.api-card-code-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.api-card-code {
  position: relative;
  background: #f8fafc; border: 1px solid var(--border-light); border-radius: 8px;
  padding: 12px; overflow: auto; height: 150px; margin-bottom: 14px;
}
.api-card-code pre {
  margin: 0; padding-top: 28px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px; line-height: 1.6; color: var(--text-2); white-space: pre; word-break: normal;
}
.api-card-copy {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  height: 26px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--brand);
  font-size: 12px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: all .15s; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.api-card-copy:hover { background: var(--brand-light); border-color: var(--brand); }
.api-card-footer { display: flex; gap: 8px; }
.api-card-footer .btn { margin: 0; }
.api-card-footer .btn.outline { flex: 1; }
.api-card-footer .btn.ghost.danger { width: 36px; padding: 0; justify-content: center; }

/* ============ 在线聊天 ============ */
.chat-view { display: grid; grid-template-columns: 280px 1fr 280px; gap: 14px; height: calc(100vh - var(--topbar-h) - 40px); }
.chat-list { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.chat-tabs { display: flex; border-bottom: 1px solid var(--border-light); }
.chat-tabs .ct { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--muted); cursor: pointer; position: relative; }
.chat-tabs .ct.active { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.chat-tabs .ct.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); }
.chat-status-bar { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-light); align-items: center; }
.chat-status-bar .s { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; cursor: pointer; border: 1px solid transparent; }
.chat-status-bar .s.active { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.chat-status-bar .s { background: #f1f5f9; color: var(--text-2); }
.chat-status-bar .s:not(.active) .status-dot { display: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
.status-dot.busy { background: #f59e0b; }
.status-dot.offline { background: #94a3b8; }
.chat-sub-tabs { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
.chat-sub-tabs .st { font-size: 13px; color: var(--muted); cursor: pointer; }
.chat-sub-tabs .st.active { color: var(--brand); font-weight: 600; }
.chat-search { padding: 8px 12px; border-bottom: 1px solid var(--border-light); }
.chat-search input { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 28px 0 10px; font-size: 13px; outline: none; }
.chat-search input:focus { border-color: var(--brand); }
.chat-count { padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border-light); }
.chat-items { flex: 1; overflow-y: auto; }
.chat-item { padding: 12px 14px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background .12s; display: flex; gap: 10px; align-items: flex-start; }
.chat-item:hover { background: #f8fafc; }
.chat-item.active { background: var(--brand-light); border-left: 3px solid var(--brand); }
.chat-item .ci-avatar { flex-shrink: 0; }
.chat-item .ci-avatar .msg-av { width: 40px; height: 40px; font-size: 15px; }
.chat-item .ci-main { flex: 1; min-width: 0; }
.chat-item .ci-rated { background: #f0fdf4; color: #15803d; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }
.chat-item .ci-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.chat-item .ci-name { font-weight: 600; font-size: 14px; }
.chat-item .ci-time { font-size: 12px; color: var(--muted); }
.chat-item .ci-msg { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.chat-item .ci-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.chat-item .ci-agent { color: var(--muted); }
.chat-item .ci-unread { background: var(--danger); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.chat-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.chat-head .ch-left { display: flex; flex-direction: column; gap: 2px; }
.chat-head .ch-name { font-weight: 600; font-size: 15px; }
.chat-head .ch-agent { font-size: 12px; color: var(--muted); }
.chat-head .ch-actions { display: flex; align-items: center; gap: 8px; }
.chat-head .ch-actions .icon-btn { width: 32px; height: 32px; }
.chat-head .ch-actions .btn.sm { height: 32px; }
.chat-head .dropdown { position: relative; }
.chat-head .dropdown-menu {
  position: absolute; right: 0; top: 38px; background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); min-width: 120px; z-index: 10; padding: 6px 0; display: none;
}
.chat-head .dropdown-menu.open { display: block; }
.chat-head .dropdown-menu .dm-item { padding: 8px 14px; font-size: 13px; cursor: pointer; }
.chat-head .dropdown-menu .dm-item:hover { background: #f8fafc; }
.chat-head .transfer-menu { min-width: 160px; }
.chat-head .transfer-menu .tm-item { display: flex; align-items: center; justify-content: space-between; }
.chat-head .transfer-menu .dot { width: 8px; height: 8px; border-radius: 50%; }
.chat-head .transfer-menu .dot.on { background: var(--ok); }
.chat-head .transfer-menu .dot.off { background: var(--muted); }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fafbfc; }
.chat-loadmore {
  align-self: center; padding: 6px 14px; border: 1px dashed var(--border); border-radius: 20px; font-size: 12px;
  color: var(--muted); cursor: pointer; background: #fff; margin-bottom: 8px;
}
.chat-loadmore:hover { border-color: var(--brand); color: var(--brand); }
.msg { max-width: 80%; display: flex; align-items: flex-end; gap: 8px; position: relative; margin-bottom: 2px; }
.msg .msg-av { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.msg .msg-av-def { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.msg .msg-bubble { padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.55; position: relative; word-break: break-word; white-space: pre-wrap; }
.msg.in { align-self: flex-start; }
.msg.in .msg-bubble { background: #fff; border: 1px solid var(--border-light); border-top-left-radius: 3px; }
.msg.out { align-self: flex-end; flex-direction: row-reverse; }
.msg.out .msg-bubble { background: var(--brand); color: #fff; border-top-right-radius: 3px; }
.msg .msg-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; opacity: .75; }
.msg.in .msg-meta { color: var(--muted); }
.msg.out .msg-meta { color: rgba(255, 255, 255, .8); justify-content: flex-end; }
.msg .msg-time { font-size: 11px; }
.msg .read-tick { font-size: 11px; opacity: .85; }
.msg .msg-img { max-width: 220px; max-height: 200px; border-radius: 8px; display: block; }
.msg .msg-cap { margin-top: 6px; font-size: 12px; opacity: .9; }
.msg .msg-rich a { color: inherit; text-decoration: underline; }
.msg .msg-rich b { font-weight: 700; }
.msg .msg-rich em { font-style: italic; }
.msg-day { align-self: center; font-size: 12px; color: var(--muted); margin: 4px 0; }
.msg-day span { background: #eef1f7; padding: 2px 10px; border-radius: 10px; }
.chat-ended-bar { padding: 8px 16px; background: #fff7ed; color: #b45309; font-size: 13px; text-align: center; border-bottom: 1px solid var(--border-light); }
.rating-result { padding: 14px 16px; background: #f0fdf4; border-top: 1px solid var(--border-light); font-size: 13px; }
.rating-result .rr-title { font-weight: 600; color: #15803d; margin-bottom: 6px; }
.rating-result .rr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.rating-result .rr-tags span { background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.rating-result .rr-comment { color: var(--text-2); font-style: italic; }
.typing-row { padding: 0 16px; font-size: 12px; color: var(--muted); min-height: 18px; }

.chat-search-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border-light); background: #fff;
}
.chat-search-bar input { flex: 1; height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; outline: none; }
.chat-search-bar input:focus { border-color: var(--brand); }
.chat-search-bar .count { font-size: 12px; color: var(--muted); }
.search-results {
  position: absolute; left: 294px; right: 294px; top: var(--topbar-h); background: #fff; border: 1px solid var(--border);
  border-radius: 0 0 8px 8px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; z-index: 15; display: none;
}
.search-results.open { display: block; }
.sr-item { padding: 10px 14px; border-bottom: 1px solid var(--border-light); cursor: pointer; font-size: 13px; }
.sr-item:hover { background: #f8fafc; }
.sr-item .sr-role { display: inline-block; width: 36px; font-size: 11px; color: #fff; background: var(--brand); border-radius: 4px; text-align: center; margin-right: 8px; }
.sr-item .sr-role.visitor { background: var(--muted); }
.sr-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

.chat-input { padding: 10px 14px; border-top: 1px solid var(--border-light); background: #fff; }
.chat-input-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.chat-input-tools .tool { width: 28px; height: 28px; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.chat-input-tools .tool:hover { background: #f1f5f9; color: var(--brand); }
.chat-input-tools .tool svg { width: 17px; height: 17px; }
.chat-input-area { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-area textarea {
  flex: 1; height: 60px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px;
  outline: none; resize: none; line-height: 1.5; transition: border-color .15s;
}
.chat-input-area textarea:focus { border-color: var(--brand); }
.chat-input-area .send {
  width: 80px; height: 40px; border: none; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.chat-input-area .send:hover { background: var(--brand-dark); }
.chat-input-area .send svg { width: 16px; height: 16px; }

.chat-right { display: flex; flex-direction: column; gap: 14px; }
.chat-right .card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; flex: 1; display: flex; flex-direction: column; }
.chat-right .card .cr-tabs { display: flex; border-bottom: 1px solid var(--border-light); }
.chat-right .card .cr-tab { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.chat-right .card .cr-tab.active { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.chat-right .card .cr-body { flex: 1; overflow-y: auto; padding: 10px; }
.quick-phrase { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: all .12s; background: #fff; }
.quick-phrase:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ============ 历史会话 / 服务报表 / 客服列表等 ============ */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-header h2 { font-size: 16px; font-weight: 600; }
.page-header .actions { display: flex; gap: 10px; align-items: center; }
.page-header .search-bar input { width: 220px; }

.invite-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.invite-card .ic-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.invite-card .ic-header h3 { font-size: 15px; font-weight: 600; }
.invite-card .ic-tag { background: var(--brand-light); color: var(--brand); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.invite-card .code-box { background: #eff6ff; border: 1px dashed #bfdbfe; border-radius: 8px; padding: 12px; text-align: center; margin-bottom: 12px; }
.invite-card .code-box .label { font-size: 12px; color: #3b82f6; margin-bottom: 4px; }
.invite-card .code-box .code { font-size: 20px; font-weight: 700; color: #2563eb; letter-spacing: 3px; }
.invite-card .code-box .tip { font-size: 12px; color: #64748b; margin-top: 4px; }
.invite-card .link-row { display: flex; align-items: center; gap: 10px; }
.invite-card .link-row input { flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 13px; }
.invite-card .link-row .btn { width: auto; margin: 0; padding: 0 18px; }
.invite-card .reset { color: var(--muted); font-size: 13px; cursor: pointer; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.invite-card .reset:hover { color: var(--brand); }
.invite-card .reset svg { width: 14px; height: 14px; }

/* 客服成员列表 */
.member-card { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.member-card .mc-stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; flex: 1; margin-right: 14px; display: flex; align-items: center; justify-content: space-between; }
.member-card .mc-stat:last-child { margin-right: 0; }
.member-card .mc-stat .mc-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.member-card .mc-stat .mc-value { font-size: 22px; font-weight: 700; color: var(--text); }
.member-card .mc-stat .mc-value.purple { color: #8b5cf6; }
.member-card .mc-stat .mc-icon { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

/* 配置中心 */
.config-banner { background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.config-banner .cb-icon { color: var(--secondary); }
.config-banner .cb-title { font-size: 14px; font-weight: 600; color: #1e40af; margin-bottom: 2px; }
.config-banner .cb-title .tag { font-size: 11px; margin-left: 6px; }
.config-banner .cb-desc { font-size: 12px; color: #3b82f6; }
.config-banner .cb-link { display: flex; flex: 1; gap: 10px; margin: 0 16px; }
.config-banner .cb-link input { flex: 1; height: 38px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 0 12px; font-size: 13px; }
.config-banner .cb-link .btn { width: auto; margin: 0; padding: 0 16px; height: 38px; font-size: 13px; }

.avatar-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-upload .av { width: 64px; height: 64px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.avatar-upload .av svg { width: 28px; height: 28px; }
.avatar-upload .av-actions { display: flex; gap: 8px; }

/* APP下载 */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.app-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 30px; text-align: center; box-shadow: var(--shadow-sm); }
.app-card .ac-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.app-card .ac-icon svg { width: 32px; height: 32px; }
.app-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.app-card p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.app-card .ac-btn { border: 1px solid var(--brand); color: var(--brand); background: #fff; padding: 8px 24px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.app-card .ac-btn:hover { background: var(--brand-light); }

/* 弹层/快捷键帮助 */
.yxw-pop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 100; display: flex; align-items: center; justify-content: center;
}
.yxw-pop.yxw-hidden { display: none; }
.yxw-pop-box { background: #fff; border-radius: 12px; box-shadow: var(--shadow); width: 420px; max-width: 92vw; padding: 20px; }
.yxw-pop-title { font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.yxw-pop-close { cursor: pointer; color: var(--muted); font-size: 20px; }
.yxw-pop-close:hover { color: var(--text); }
.sh-list { list-style: none; }
.sh-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border-light); }
.sh-list li:last-child { border-bottom: none; }
.sh-list kbd { display: inline-block; min-width: 24px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; background: #f8fafc; font-family: monospace; font-size: 12px; color: var(--text); }

.yxw-hidden { display: none !important; }

/* ============ 新增组件：开关/常用语/FAQ/模板/套餐 ============ */
.switch-row { display: flex; align-items: center; gap: 12px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 12px; transition: .25s; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .25s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch-label { font-size: 13px; color: var(--text-2); }

.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; transition: box-shadow .15s; }
.row-item:hover { box-shadow: 0 0 0 2px var(--brand-light); }
.ri-idx { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ri-text { flex: 1; font-size: 14px; color: var(--text); }
.ri-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ri-actions .action { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); padding: 4px 8px; border-radius: 6px; cursor: pointer; background: none; border: 1px solid transparent; }
.ri-actions .action.edit:hover { color: var(--brand); border-color: var(--brand-light); background: var(--brand-light); }
.ri-actions .action.danger:hover { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.ri-actions .action svg { width: 13px; height: 13px; }
.phrase-list { max-height: 480px; overflow-y: auto; }

.faq-list {  }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 10px; background: #fff; user-select: none; }
.faq-q span { display: inline-flex; width: 24px; height: 24px; border-radius: 6px; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; flex-shrink: 0; }
.faq-a { padding: 0 16px; font-size: 13px; color: var(--text-2); line-height: 1.7; max-height: 0; overflow: hidden; transition: all .25s; }
.faq-item.open .faq-a { padding: 0 16px 14px; max-height: 200px; }

.pc-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-row.cols-2 .form-group { flex: 1; }
select { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 14px; color: var(--text); background: #fff; outline: none; }
select:focus { border-color: var(--brand); }
.checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }

.avatar-section { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.av-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.av-actions { display: flex; gap: 8px; }

.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tpl-card { border: 2px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .2s; }
.tpl-card:hover { border-color: var(--brand-light); }
.tpl-card.active { border-color: var(--brand); }
.tpl-thumb { height: 100px; position: relative; display: flex; align-items: center; justify-content: center; }
.tpl-badge { position: absolute; left: 8px; top: 8px; background: var(--brand); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.tpl-preview { display: flex; flex-direction: column; gap: 8px; width: 70%; }
.tpl-msg { font-size: 11px; padding: 6px 10px; border-radius: 8px; max-width: 80%; }
.tpl-msg.l { background: #fff; color: #334155; align-self: flex-start; }
.tpl-msg.r { background: var(--brand); color: #fff; align-self: flex-end; }
.tpl-name { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.tpl-tag { display: inline-block; margin: 0 12px 10px; font-size: 11px; color: var(--brand); background: var(--brand-light); padding: 2px 8px; border-radius: 4px; }

.plan-card { border: 1px solid var(--brand); border-radius: 12px; padding: 24px; background: linear-gradient(135deg, #f0fdfa, #fff); }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.plan-name { font-size: 20px; font-weight: 700; color: var(--brand); }
.plan-price { font-size: 28px; font-weight: 700; color: var(--text); }
.plan-meta { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.plan-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.pf-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.pf-item svg { width: 16px; height: 16px; color: var(--ok); }
.pf-item.off { color: var(--muted); }
.pf-item.off svg { color: var(--muted); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card { border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; text-align: center; transition: box-shadow .2s; }
.price-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.price-card.popular { border-color: var(--brand); position: relative; }
.p-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; padding: 3px 14px; border-radius: 10px; font-weight: 600; }
.p-name { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.p-amount { font-size: 28px; font-weight: 700; color: var(--brand); margin-bottom: 16px; }
.p-amount sub { font-size: 14px; font-weight: 400; color: var(--muted); }
.p-feats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.p-feats span { font-size: 13px; color: var(--text-2); }
.p-feats span::before { content: '✓ '; color: var(--ok); font-weight: 600; }

.required { color: var(--danger); margin-right: 2px; }
.tab-content { padding-top: 18px; }
