/* ============================================================================
   GPT Pay 门户 · 设计系统 v2
   视觉参考：ChatGPT 的克制骨架 + 现代 SaaS 的动效与层次
   —— 浅灰底 / 纯白卡片 / 渐变边框 / 光晕 / 入场动画 / 微交互
   零外部依赖：不加载任何 CDN 字体、图标、框架
   ============================================================================ */

/* ---------------------------------------------------------------- 变量 */
:root {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #ececee;

  --border: #e6e6e9;
  --border-strong: #d4d4d8;

  --text: #0d0d0d;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --text-inverse: #ffffff;

  --btn-bg: #0d0d0d;
  --btn-text: #ffffff;
  --btn-hover: #2f2f2f;

  /* 强调色 */
  --accent: #1a73e8;
  --accent-2: #1a73e8;
  --accent-hover: #1765cc;
  --accent-text: #ffffff;
  --accent-soft: #e9f1fe;

  --success: #10a37f;
  --success-bg: #e8f5f1;
  --danger: #ef4146;
  --danger-bg: #fdecec;
  --warn: #b45309;
  --warn-bg: #fef6e7;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow: 0 1px 3px rgb(0 0 0 / 0.05), 0 8px 24px -10px rgb(0 0 0 / 0.10);
  --shadow-hover: 0 4px 12px rgb(0 0 0 / 0.06), 0 24px 48px -16px rgb(0 0 0 / 0.18);
  --shadow-lg: 0 4px 32px rgb(0 0 0 / 0.10);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --nav-h: 62px;
  --maxw: 1120px;
}

html.dark {
  --bg: #121214;
  --surface: #1c1c1f;
  --surface-2: #17171a;
  --surface-3: #26262b;

  --border: #2e2e34;
  --border-strong: #3d3d45;

  --text: #f0f0f2;
  --text-muted: #9b9ba4;
  --text-subtle: #71717a;
  --text-inverse: #0d0d0d;

  --btn-bg: #ffffff;
  --btn-text: #0d0d0d;
  --btn-hover: #e5e5e5;

  --accent: #4c8df6;
  --accent-2: #4c8df6;
  --accent-hover: #6ea6f8;
  --accent-soft: #16233a;

  --success-bg: #14302a;
  --danger-bg: #35191b;
  --warn-bg: #2f2410;

  --shadow-sm: none;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  --shadow-hover: 0 24px 48px -16px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 8px 32px rgb(0 0 0 / 0.5);
}

/* ---------------------------------------------------------------- 重置 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 背景光晕：让页面不再是一块死白 */
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  animation: drift 22s var(--ease) infinite alternate;
}
.aurora .a1 { width: 620px; height: 620px; top: -280px; left: -140px;
  background: radial-gradient(circle, rgb(37 99 235 / .22), transparent 68%); }
.aurora .a2 { width: 520px; height: 520px; top: -180px; right: -120px;
  background: radial-gradient(circle, rgb(124 58 237 / .18), transparent 68%);
  animation-delay: -7s; }
.aurora .a3 { width: 460px; height: 460px; top: 380px; left: 42%;
  background: radial-gradient(circle, rgb(16 163 127 / .13), transparent 68%);
  animation-delay: -14s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}
html.dark .aurora span { opacity: .32; }

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 34px; line-height: 1.22; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
img, svg { max-width: 100%; vertical-align: middle; }

/* ---------------------------------------------------------------- 布局 */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.stack { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* ---------------------------------------------------------------- 顶栏 */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav-inner {
  height: 100%; display: flex; align-items: center; gap: 30px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-mark { width: 23px; height: 23px; display: grid; place-items: center; color: var(--text); }
.brand-mark .knot { width: 23px; height: 23px; display: block; }
/* 导航项：纯文字，当前页用字重 + 短下划线区分，不用底色块 */
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  position: relative; padding: 3px 0;
  color: var(--text-muted); font-size: 14px;
  transition: color .18s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 500; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px; background: var(--text);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- 侧栏（管理侧） */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex: none; background: var(--surface-2);
  border-right: 1px solid var(--border); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.side .side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 16px; margin-bottom: 2px;
  font-weight: 600; font-size: 15px; color: var(--text);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: color .18s var(--ease);
}
.side .side-brand:hover { color: var(--accent); text-decoration: none; }
.side-group {
  padding: 14px 10px 6px; font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-subtle);
}
.side a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.side a:hover { background: var(--surface-3); color: var(--text); }
.side a.active { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow-sm); }
.main { flex: 1; min-width: 0; padding: 32px 36px 64px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 24px; margin-bottom: 6px; }
.page-head p { color: var(--text-muted); font-size: 14px; }

/* ---------------------------------------------------------------- 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.card-tight { padding: 16px; }
.card-flat { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 15px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.stat-value.mono { font-family: var(--font-mono); font-size: 21px; }

/* ---------------------------------------------------------------- 页面标题区 */
.hero { text-align: center; margin-bottom: 34px; }
.hero h1 {
  display: block; font-size: 36px; font-weight: 600;
  color: var(--text); letter-spacing: -0.025em; line-height: 1.25;
}
.hero p { color: var(--text-muted); margin-top: 12px; font-size: 15px; }
.page-title { text-align: center; margin-bottom: 8px; }
.page-sub { text-align: center; color: var(--text-muted); margin-bottom: 28px; }

/* 徽标胶囊：克制，只作状态说明 */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted); font-size: 12.5px;
}
.eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------------------------------------------------------------- 地区选择器 */
.region-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
}
.region-label { font-size: 13.5px; color: var(--text-muted); }
.region-pills {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  flex-wrap: wrap; justify-content: center;
}
.region-pill {
  padding: 7px 18px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 13.5px; cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.region-pill:hover { color: var(--text); }
.region-pill.on {
  background: var(--surface); color: var(--text); font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------- 套餐卡片 */
.plan-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.plan-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 26px 24px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  animation: cardIn .6s var(--ease) backwards;
}
.plan-card:nth-child(1) { animation-delay: .04s; }
.plan-card:nth-child(2) { animation-delay: .12s; }
.plan-card:nth-child(3) { animation-delay: .20s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

/* 鼠标跟随光晕 */
.plan-card .cursor-glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity .3s; pointer-events: none;
}
.plan-card:hover .cursor-glow { opacity: 1; }

/* 推荐套餐：淡蓝描边（对齐官方，不喧宾夺主） */
.plan-card.featured {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  border-width: 1.5px;
  box-shadow: var(--shadow);
}
.plan-card.featured:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-hover);
}

.plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.plan-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.plan-title { font-size: 23px; font-weight: 600; letter-spacing: -0.025em; margin-bottom: 9px; }
.plan-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; min-height: 46px; }
.plan-cta { margin: 20px 0 22px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-amount {
  font-size: 34px; font-weight: 700; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.plan-amount.flip { opacity: 0; transform: translateY(-9px); }
.plan-period { font-size: 14px; color: var(--text-muted); }
.plan-tax { font-size: 12px; color: var(--text-subtle); margin-left: 4px; }
.plan-features { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.plan-features li { display: flex; gap: 11px; font-size: 14px; line-height: 1.5; align-items: flex-start; }
.plan-features li .fi {
  flex: none; display: grid; place-items: center; margin-top: 3px;
  color: var(--accent);
}
.plan-features li .ft { padding-top: 1px; }
.plan-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-subtle); line-height: 1.65;
}

/* 规格切换器（Pro 卡片右上角）：分段控件，白底+阴影的选中态 */
.plan-variants {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-3);
  border-radius: var(--radius-pill); flex: none;
}
.plan-variant {
  padding: 4px 15px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; line-height: 1.55;
  transition: color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.plan-variant:hover { color: var(--text); }
.plan-variant.on {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* 切换规格时的内容过渡 */
.plan-title, .plan-desc, .plan-features {
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.plan-card.switching .plan-title,
.plan-card.switching .plan-desc,
.plan-card.switching .plan-features { opacity: .3; transform: translateY(3px); }

/* 未开放的卡片与规格（灰化、不可购买） */
.plan-card.disabled { opacity: .55; filter: grayscale(.5); }
.plan-card.disabled:hover {
  transform: none; box-shadow: none; border-color: var(--border);
}
.plan-card.disabled .cursor-glow { display: none; }

.plan-variant.locked { opacity: .38; cursor: not-allowed; }
.plan-variant.locked:hover { color: var(--text-muted); }

.btn.is-locked {
  background: var(--surface-3); color: var(--text-subtle);
  pointer-events: none; box-shadow: none; cursor: not-allowed;
}

.spec {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border-radius: var(--radius-pill); font-size: 12.5px;
}
.spec span { padding: 3px 12px; border-radius: var(--radius-pill); color: var(--text-muted); }
.spec span.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 11px 22px; font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; line-height: 1.2;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease), opacity .2s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(.975); }

.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:not(:disabled):hover { background: var(--btn-hover); box-shadow: 0 8px 24px -8px rgb(0 0 0 / .45); }

.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent:not(:disabled):hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn-outline {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn-outline:not(:disabled):hover {
  border-color: var(--text); transform: translateY(-2px);
  box-shadow: 0 10px 28px -12px rgb(0 0 0 / .28);
}

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:not(:disabled):hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border-strong); }
.btn-danger:not(:disabled):hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-muted { background: var(--surface-3); color: var(--text-subtle); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------- 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 13.5px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.field .err { font-size: 12.5px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: inherit; font-size: 14.5px; line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; min-height: 100px; }
.select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.input-mono { font-family: var(--font-mono); font-size: 13.5px; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.choice:hover { border-color: var(--border-strong); transform: translateX(2px); }
.choice input { margin: 0; accent-color: var(--accent); width: 16px; height: 16px; }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-body { flex: 1; min-width: 0; }
.choice-title { font-weight: 500; font-size: 14.5px; }
.choice-sub { font-size: 12.5px; color: var(--text-muted); }
.choice-price { font-family: var(--font-mono); font-weight: 600; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { display: none; }
.switch-track {
  width: 40px; height: 23px; border-radius: var(--radius-pill);
  background: var(--surface-3); position: relative; transition: background .25s var(--ease); flex: none;
}
.switch-track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease);
}
.switch input:checked + .switch-track { background: var(--success); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }

/* ---------------------------------------------------------------- 订单摘要 */
.summary { display: flex; flex-direction: column; }
.summary-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: 0; }
.summary-row > span { color: var(--text-muted); flex: none; }
.summary-row > b { font-weight: 600; text-align: right; word-break: break-all; }
.summary-total { padding-top: 16px; }
.summary-total > b { font-size: 22px; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- 结账两栏 */
/* 左：填写区（宽）  右：订单信息 + 提交按钮（窄） */
.checkout {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr) 336px;
  align-items: stretch;
}
/* 两栏卡片等高：容器用 grid，卡片自动拉伸
   注意：不要用 height:100%，那会让卡片高度与 grid 行高循环依赖，导致内容被挤出容器 */
.checkout-main, .checkout-side { display: grid; }
.checkout-side .card { display: flex; flex-direction: column; }
.checkout-side .card-head { margin-bottom: 18px; }
.checkout-side .card-head h2 { font-size: 15px; }
.checkout-side .summary-row { padding: 16px 0; font-size: 14px; }
.checkout-side .summary-total { padding-top: 18px; }
.checkout-side .summary-total > b { font-size: 24px; }

/* 侧栏里的套餐信息 */
.order-plan { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.order-plan-name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.order-plan-title { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* 侧栏底部的服务说明：贴底对齐 */
.order-assurance {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-subtle); line-height: 1.8;
}
.order-assurance p { margin: 0; }
.order-assurance p + p { margin-top: 7px; }

/* 跨两栏的底部说明（居中） */
.checkout-note {
  grid-column: 1 / -1;
  justify-content: center; text-align: center;
}

@media (max-width: 920px) {
  .checkout { grid-template-columns: 1fr; }
  .checkout-side .card { height: auto; }
  .order-assurance { margin-top: 18px; }
}

/* ---------------------------------------------------------------- 订单列表 */
.order-list { display: flex; flex-direction: column; }
.order-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 12px; margin: 0 -12px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: background .18s var(--ease);
}
.order-row:first-child { padding-top: 10px; }
.order-row:last-child { border-bottom: 0; padding-bottom: 10px; }
a.order-row:hover { background: var(--surface-2); }
a.order-row:hover .order-row-arrow { opacity: 1; transform: translateX(2px); }
.order-row-main { flex: 1; min-width: 0; }
.order-row-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 600; margin-bottom: 5px;
}
.order-row-meta {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  word-break: break-all;
}
.order-row-action { flex: none; display: flex; gap: 8px; }
.order-row-arrow {
  flex: none; font-size: 13px; color: var(--accent);
  opacity: 0; transition: opacity .18s var(--ease), transform .18s var(--ease);
}

@media (max-width: 720px) {
  .order-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .order-row-action { justify-content: flex-end; }
  .order-row-arrow { opacity: 1; text-align: right; }
}

/* ---------------------------------------------------------------- 查询表单 */
.query-form { display: flex; gap: 10px; }
.query-form .input { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- 时间线 */
.timeline {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
}
.tl-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 13.5px; }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--surface-3); border: 2px solid var(--border-strong);
  box-sizing: content-box;
}
.tl-item.done .tl-dot { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.tl-item.failed .tl-dot { background: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.tl-label { color: var(--text-muted); }
.tl-item.done .tl-label { color: var(--text); }
.tl-time { margin-left: auto; font-size: 12.5px; color: var(--text-subtle); font-family: var(--font-mono); }

/* ---------------------------------------------------------------- 凭证 */
.voucher-box {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.voucher-label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.voucher-code {
  display: block; font-family: var(--font-mono); font-size: 16px;
  font-weight: 600; letter-spacing: 0.02em; color: var(--text);
  word-break: break-all;
}
.voucher-state { flex: none; }

@media (max-width: 720px) {
  .voucher-code { font-size: 14px; }
}

/* ---------------------------------------------------------------- 支付二维码 */
.qr-box { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.qr-frame {
  padding: 12px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: box-shadow .3s var(--ease);
}
.qr-frame:hover { box-shadow: var(--shadow-hover); }
.qr-img { display: block; width: 216px; height: 216px; object-fit: contain; }
.qr-amount {
  margin: 18px 0 0; font-size: 28px; font-weight: 700;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.qr-tip { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---------------------------------------------------------------- 表格 */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface);
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .03em;
  text-transform: uppercase; color: var(--text-subtle);
  padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr { transition: background .18s var(--ease); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td.right, table.tbl th.right { text-align: right; }

/* ---------------------------------------------------------------- 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500; line-height: 1.6;
  background: var(--surface-3); color: var(--text-muted);
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-bad { background: var(--danger-bg); color: var(--danger); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- 提示 */
.alert {
  display: flex; gap: 11px; padding: 14px 17px;
  border-radius: var(--radius); font-size: 13.5px; line-height: 1.6;
  border: 1px solid var(--border);
}
.alert-ok { background: var(--success-bg); border-color: transparent; color: var(--success); }
.alert-bad { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.alert-warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.alert-info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------------------------------------------------------------- 空状态 */
.empty {
  padding: 56px 24px; text-align: center; color: var(--text-muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 6px; }

/* ---------------------------------------------------------------- 日志 */
.logbox {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; color: var(--text-muted);
  max-height: 320px; overflow: auto; margin: 0;
}

/* ---------------------------------------------------------------- 步骤条 */
.steps-wrap { display: flex; justify-content: center; margin-bottom: 32px; }
.steps { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; }
.step { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-subtle); }
.step-num {
  width: 29px; height: 29px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  background: var(--surface-3); color: var(--text-subtle);
  transition: all .3s var(--ease);
}
.step.done .step-num { background: var(--success); color: #fff; }
.step.done { color: var(--text-muted); }
.step.active .step-num { background: var(--accent); color: #fff; }
.step.active { color: var(--text); font-weight: 500; }
.step-line { width: 52px; height: 1px; background: var(--border-strong); margin: 0 16px; }

/* ---------------------------------------------------------------- 分隔 */
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------------------------------------------------------------- 主题切换 */
/* 主题切换：无边框圆形图标按钮 */
.theme-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.theme-btn:hover { color: var(--text); background: var(--surface-3); }
.theme-btn:active { transform: scale(.94); }

/* ---------------------------------------------------------------- 入场 */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------- 客服浮窗 */
.support-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-text);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.support-fab:hover { transform: translateY(-3px); }
@media (max-width: 720px) {
  .support-fab { right: 14px; bottom: 14px; padding: 10px 15px; }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1000px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 24px 20px 56px; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .plan-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container, .container-narrow, .container-wide { padding: 0 16px; }
  .shell { flex-direction: column; }
  .side {
    width: 100%; flex-direction: row; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--border); padding: 8px;
  }
  .side-brand, .side-group { display: none; }
  .side a { white-space: nowrap; }
  .nav-inner { gap: 16px; padding: 0 16px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13.5px; }
  h1 { font-size: 26px; }
  .plan-title { font-size: 20px; }
  .region-pill { padding: 6px 13px; font-size: 13px; }
}

/* ---------------------------------------------------------------- 返回上一步 */
.page-back-row { margin-bottom: 18px; }
.page-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--text-muted);
  text-decoration: none; padding: 5px 2px;
  transition: color .16s ease, transform .16s ease;
}
.page-back svg { flex: none; transition: transform .16s ease; }
.page-back:hover { color: var(--text); text-decoration: none; }
.page-back:hover svg { transform: translateX(-2px); }

/* 首页套餐网格下的免责小字：上句浅绿、下句浅红（比语义色再淡一档） */
.plans-footnote {
  margin: 22px auto 0; text-align: center;
  font-size: 15px; line-height: 1.9;
}
.footnote-good { color: #6bb9a3; }
.footnote-warn { color: #e89699; }

/* ---------------------------------------------------------------- 联系客服 */
.contact-hero { text-align: center; margin-bottom: 26px; }
.contact-logo { display: inline-flex; color: var(--text); margin-bottom: 18px; }
.contact-logo .knot { width: 46px; height: 46px; display: block; }
.contact-hero h1 {
  display: block; font-size: 32px; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.25;
}
.contact-hero p {
  color: var(--text-muted); margin-top: 10px; font-size: 14.5px;
  line-height: 1.65; max-width: 540px; margin-left: auto; margin-right: auto;
}

/* 截图上传 */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 30px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-subtle);
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.dropzone-input { display: none; }
.dropzone-main { font-size: 14px; font-weight: 500; color: var(--text); }
.dropzone:hover .dropzone-main, .dropzone.drag .dropzone-main { color: inherit; }
.dropzone-sub { font-size: 12.5px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:not(:empty) { margin-top: 14px; }
.thumb {
  position: relative; width: 76px; height: 76px;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(0 0 0 / .55); color: #fff; font-size: 15px; line-height: 1;
}
.thumb-del:hover { background: rgb(0 0 0 / .78); }

/* ================================================================ 管理侧 */
/* 侧栏在长页面滚动时固定，移动端取消（那时它变成横向条） */
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-logout { margin-top: auto; color: var(--text-subtle); }
.side a svg { width: 15px; height: 15px; flex: none; opacity: .8; }
.side a.active svg { opacity: 1; }
.side-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
}
.side-footer {
  margin-top: auto; padding: 14px 10px 4px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.side-user {
  font-size: 12.5px; color: var(--text-subtle);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-footer a { padding: 4px 6px; font-size: 12.5px; }

/* 定价表 */
.price-table .num { text-align: right; }
.cost-cell { line-height: 1.4; }
.cost-cell b { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.cost-cell span { display: block; font-size: 11.5px; color: var(--text-subtle); margin-top: 2px; }
.input-price {
  width: 96px; padding: 7px 10px; text-align: right;
  font-family: var(--font-mono); font-size: 13px;
}
.price-table tr.is-manual { background: var(--accent-soft); }
.price-table tr.is-manual:hover { background: var(--accent-soft); }
.price-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
}
.price-footer p { margin: 0; max-width: 62ch; }

/* 测试模式横幅 */
.test-banner {
  margin: 0 0 20px; padding: 11px 16px;
  border-radius: var(--radius); border: 1px solid #f3d7a0;
  background: #fdf3dd; color: #8a5b16; font-size: 13.5px; line-height: 1.6;
}
html.dark .test-banner { background: #2c2412; border-color: #4a3b17; color: #e0b55c; }

/* 操作反馈 toast（flash 渲染，自动淡出） */
.toast {
  position: fixed; top: 18px; right: 24px; z-index: 100;
  padding: 11px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-hover); font-size: 13.5px;
  animation: toast-in .25s var(--ease), toast-out .4s var(--ease) 3s forwards;
}
.toast-ok { border-left: 3px solid var(--success); }
.toast-err { border-left: 3px solid var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* 登录页 */
.admin-login { max-width: 380px; margin: 0 auto; padding: 76px 24px 56px; text-align: center; }
.admin-login-mark { display: inline-flex; color: var(--text); margin-bottom: 18px; }
.admin-login-mark .knot { width: 42px; height: 42px; display: block; }
.admin-login h1 { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.admin-login-sub { color: var(--text-muted); font-size: 14px; margin: 8px 0 24px; }
.admin-login .card { text-align: left; }

/* 待办条目：左边一条颜色杠表示紧急度 */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
}
.todo-item.todo-warn { border-left-color: #d97706; }
.todo-item.todo-bad { border-left-color: var(--danger); }
.todo-item.todo-info { border-left-color: var(--accent); }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; font-size: 14.5px; }
.todo-desc { color: var(--text-muted); font-size: 13px; margin-top: 3px; line-height: 1.55; }

.todo-empty { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.todo-empty-mark {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: var(--success-bg); color: var(--success);
}
.todo-empty b { font-size: 14.5px; }
.todo-empty p { margin-top: 3px; }

/* 语义色 */
.text-ok { color: var(--success) !important; }
.text-bad { color: var(--danger) !important; }
.text-warn { color: var(--warn) !important; }

/* 管理侧表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 500; color: var(--text-subtle); font-size: 12.5px;
  padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.nowrap { white-space: nowrap; }

/* 看板里的紧凑事件流 */
.event-mini { display: flex; flex-direction: column; }
.event-mini-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.event-mini-row:last-child { border-bottom: 0; }
.event-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-subtle); }
.event-dot.event-info { background: var(--accent); }
.event-dot.event-warn { background: #d97706; }
.event-dot.event-error { background: var(--danger); }
.event-mini-msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-mini-time {
  color: var(--text-subtle); font-size: 12px;
  font-family: var(--font-mono); flex: none;
}

@media (max-width: 720px) {
  .side { position: static; height: auto; overflow: visible; }
  .side-logout { margin-top: 0; }
  .todo-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-login { padding: 48px 20px 40px; }
}

/* ---------------------------------------------------------------- 会话（双端共用） */
.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.chat-head h1 { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.chat-head-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 5px; }
.chat-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.chat-head-actions form { margin: 0; }

.chat-panel {
  display: flex; flex-direction: column;
  height: min(62vh, 560px); padding: 0; overflow: hidden;
}
.chat-stream {
  flex: 1; overflow-y: auto; padding: 20px 20px 6px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-row { display: flex; }
.chat-row.me { justify-content: flex-end; }
.chat-bubble {
  max-width: 76%; padding: 10px 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 14px; line-height: 1.6; word-break: break-word;
}
.chat-row.me .chat-bubble {
  background: var(--accent); border-color: transparent; color: var(--accent-text);
}
.chat-text { white-space: pre-wrap; }
.chat-time {
  display: block; margin-top: 5px; font-size: 11.5px;
  color: var(--text-subtle); font-family: var(--font-mono);
}
.chat-row.me .chat-bubble .chat-time { color: rgb(255 255 255 / .72); }
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-file {
  display: block; width: 84px; height: 84px;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
}
.chat-file img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chat-form { border-top: 1px solid var(--border); padding: 12px 16px; }
.chat-form-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input {
  flex: 1; resize: none; min-height: 40px; max-height: 120px;
  line-height: 1.5; padding: 10px 12px;
}
.chat-attach {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.chat-attach:hover { color: var(--text); background: var(--surface-2); }

/* 管理侧对话：左消息区 + 右信息栏 */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.chat-side { position: sticky; top: 20px; }
.chat-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chat-page-actions { display: flex; align-items: center; gap: 8px; }
.chat-page-actions form { margin: 0; }

/* 管理侧会话列表 */
.conv-list { display: flex; flex-direction: column; }
.conv-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
  color: inherit; text-decoration: none;
}
.conv-row:last-child { border-bottom: 0; }
.conv-row:hover { background: var(--surface-2); text-decoration: none; }
.conv-main { flex: 1; min-width: 0; }
.conv-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.conv-meta { color: var(--text-subtle); font-size: 12.5px; margin-top: 4px; }
.conv-preview {
  color: var(--text-muted); font-size: 13px; margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-time { color: var(--text-subtle); font-size: 12px; font-family: var(--font-mono); flex: none; }
.conv-row.has-unread .conv-title { color: var(--accent); }

@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-side { position: static; }
}

/* ---------------------------------------------------------------- 管理侧表单与详情 */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 20px;
}
.filter-bar .input { margin: 0; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

.mini-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.input-mini {
  width: 56px; padding: 5px 8px !important; text-align: center;
}

/* 订单详情：Session 原样 dump 与人工操作 */
.session-wrap { margin-top: 10px; }
.session-dump {
  margin: 0 0 10px; padding: 12px 14px; max-height: 300px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-all;
}
.flag-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.flag-row:last-child { border-bottom: 0; }
.flag-row form { margin: 0; }

/* 卡池「完整信息」行内展开 */
.card-details { display: inline-block; vertical-align: middle; }
.card-details summary {
  cursor: pointer; user-select: none; list-style: none;
}
.card-details summary::-webkit-details-marker { display: none; }
.card-details-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 10px 12px; margin: 8px 0 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 卡池：银行卡式卡片 */
.add-panel { margin-bottom: 20px; }
.add-panel > summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; cursor: pointer; user-select: none; list-style: none;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-muted); font-size: 13.5px;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel > summary:hover { color: var(--text); border-color: var(--border-strong); }
.add-panel[open] > summary {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.add-form {
  margin-top: 14px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.add-form .btn { margin-top: 4px; }

.vcard-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.vcard {
  display: flex; flex-direction: column; gap: 15px;
  padding: 20px 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.vcard:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.vcard.is-off { opacity: .62; }
.vcard.is-off:hover { opacity: 1; }

.vcard-top { display: flex; align-items: center; justify-content: space-between; }
.vcard-badges { display: flex; align-items: center; gap: 8px; }
.vcard-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-muted);
}
.vcard-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-subtle); }
.vcard-state.on i { background: var(--success); }
.vcard-state.off i { background: var(--text-subtle); }
.vcard-region { font-size: 12px; color: var(--text-subtle); letter-spacing: .03em; }

/* 卡分组徽标 */
.grp-badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 500;
}
.grp-general { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.grp-plus { background: var(--accent-soft); color: var(--accent); }
.grp-pro { background: #f3e8ff; color: #7c3aed; }
html.dark .grp-pro { background: #2e1a4d; color: #c4b5fd; }

.vcard-number {
  font-family: var(--font-mono); font-size: 18px; font-weight: 500;
  letter-spacing: .08em; color: var(--text);
}
.vcard.revealed .vcard-number { font-size: 16.5px; letter-spacing: .05em; }

/* 卡余额行（本身就是编辑器，改完自动保存） */
.vcard-balance {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.vcard-balance .vcard-label { margin-bottom: 0; }
.input-money {
  width: 96px; text-align: right; font-family: var(--font-mono);
}

.vcard-cols { display: flex; flex-wrap: wrap; gap: 22px; }
.vcard-col { min-width: 0; }
.vcard-label {
  display: block; margin-bottom: 3px;
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-subtle);
}
.vcard-val {
  font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; color: var(--text);
}

.vcard-meta { font-size: 12.5px; color: var(--text-subtle); line-height: 1.55; }

.vcard-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.vcard-actions .mini-inline { margin: 0; }
.danger-link { color: var(--text-subtle); }
.danger-link:hover { color: var(--danger); background: var(--danger-bg); }

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