/**
 * 永恒陪伴 · Cecho 粉紫亮色主题
 * 结构参考 ok.lovecho.cn Bots / Profile / CreateBot 样式
 */

:root {
  --cecho-pink: #ec78ba;
  --cecho-pink-light: #f4a7d3;
  --cecho-pink-soft: #ffd6ec;
  --cecho-purple: #a855f7;
  --cecho-purple-soft: #9d75ff;
  --cecho-ink: #1a152d;
  --cecho-ink-muted: rgba(26, 21, 45, .58);
  --cecho-ink-soft: rgba(26, 21, 45, .42);
  --cecho-border: rgba(236, 120, 186, .22);
  --cecho-border-strong: rgba(236, 120, 186, .36);
  --cecho-panel: #ffffff;
  --cecho-panel-muted: #fdf9fc;
  --cecho-page: #f6f2fa;
  --cecho-glass: rgba(255, 255, 255, .88);

  --primary: var(--cecho-pink);
  --primary-light: #f38ac8;
  --primary-dark: #d958a8;
  --primary-glow: rgba(236, 120, 186, .14);

  --secondary: var(--cecho-purple);
  --secondary-light: #b873ff;
  --secondary-dark: #9333ea;

  --accent: var(--cecho-purple-soft);
  --success: #22c55e;
  --success-bg: #ecfdf3;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #8b7a96;
  --info-bg: #f5f0f8;

  --bg: var(--cecho-page);
  --bg-warm: #fffafd;
  --bg-surface: var(--cecho-panel);
  --bg-elevated: #fff;
  --bg-card: var(--cecho-panel);
  --border: var(--cecho-border);
  --border-light: rgba(236, 120, 186, .12);
  --divider: rgba(236, 120, 186, .1);

  --text: var(--cecho-ink);
  --text-secondary: rgba(26, 21, 45, .72);
  --text-muted: var(--cecho-ink-muted);
  --text-inverse: #fff;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs: 0 1px 2px rgba(236, 120, 186, .06);
  --shadow-sm: 0 8px 24px rgba(236, 120, 186, .08);
  --shadow: 0 16px 40px rgba(190, 83, 177, .1);
  --shadow-md: 0 24px 70px rgba(190, 83, 177, .12);
  --shadow-lg: 0 28px 90px rgba(190, 83, 177, .14);
  --shadow-glow: 0 0 0 3px rgba(236, 120, 186, .16);
  --shadow-card: 0 12px 32px rgba(190, 83, 177, .08), inset 0 1px rgba(255, 255, 255, .9);
  --shadow-card-hover: 0 24px 62px rgba(224, 94, 170, .16);

  --app-sidebar-w: 252px;
  --cecho-gradient: linear-gradient(135deg, #ec78ba, #a855f7);
  --cecho-gradient-soft: linear-gradient(90deg, #ec78ba, #a855f7, #38bdf8);
}

body::before {
  background:
    radial-gradient(ellipse 70% 50% at 8% -10%, rgba(236, 120, 186, .12), transparent 58%),
    radial-gradient(ellipse 55% 45% at 92% 100%, rgba(168, 85, 247, .08), transparent 55%);
}

::selection {
  background: rgba(236, 120, 186, .22);
}

::-webkit-scrollbar-thumb {
  background: rgba(236, 120, 186, .28);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 120, 186, .42);
}

/* ── Global controls ── */
.btn-primary {
  background: var(--cecho-gradient);
  border: 1px solid rgba(236, 120, 186, .28);
  box-shadow: 0 12px 24px rgba(236, 120, 186, .22);
  font-weight: 700;
  transition: filter .22s ease, box-shadow .22s ease, transform .22s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 34px rgba(236, 120, 186, .28);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: rgba(236, 120, 186, .24);
  color: var(--primary-dark);
}

.btn-outline:hover {
  border-color: rgba(236, 120, 186, .42);
  color: var(--primary-dark);
  background: rgba(236, 120, 186, .08);
}

.btn-secondary {
  background: linear-gradient(135deg, #8d51db, #7d63ff);
  box-shadow: 0 14px 34px rgba(133, 83, 255, .22);
}

.nav-logo .logo-icon,
.app-brand-icon {
  background: var(--cecho-gradient);
  box-shadow: 0 8px 22px rgba(236, 120, 186, .28);
  border-radius: 10px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background: rgba(236, 120, 186, .1);
}

.card {
  border: 1px solid var(--cecho-border);
  border-radius: var(--radius-sm);
  background: var(--cecho-panel);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: rgba(236, 120, 186, .32);
  box-shadow: var(--shadow-card-hover);
}

.card-accent {
  background:
    radial-gradient(circle at 8% 0%, rgba(236, 120, 186, .12), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(253, 244, 251, .92));
  border-color: var(--cecho-border-strong);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--cecho-pink);
  box-shadow: var(--shadow-glow);
}

.auth-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 120, 186, .12), transparent 34%),
    radial-gradient(circle at 85% 90%, rgba(168, 85, 247, .08), transparent 40%),
    var(--cecho-page);
}

.auth-card {
  border: 1px solid var(--cecho-border);
  box-shadow: var(--shadow-md);
}

.hero-badge {
  background: rgba(236, 120, 186, .12);
  border: 1px solid rgba(236, 120, 186, .24);
  color: var(--primary-dark);
}

.hero h1 .highlight,
.hero-stat .num {
  color: var(--primary-dark);
}

.feature-card .icon-ring {
  background: rgba(236, 120, 186, .1);
  border-color: rgba(236, 120, 186, .18);
}

.badge-active {
  background: var(--success-bg);
  color: #15803d;
}

.badge-bound {
  background: rgba(236, 120, 186, .12);
  color: var(--primary-dark);
  border: 1px solid rgba(236, 120, 186, .18);
}

.badge-inactive {
  background: var(--info-bg);
  color: var(--info);
}

/* ── App shell ── */
body.app-shell {
  background: var(--cecho-page);
}

body.app-shell::before {
  z-index: -2;
}

.app-sidebar {
  width: var(--app-sidebar-w);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 120, 186, .14), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, .1), transparent 42%),
    linear-gradient(180deg, #f0e9f6 0%, #e8e0f0 52%, #e3dbeb 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid rgba(236, 120, 186, .2);
  box-shadow: 2px 0 32px rgba(190, 83, 177, .1), inset -1px 0 rgba(255, 255, 255, .35);
}

.app-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(236, 120, 186, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent);
}

.app-brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.app-quota-card {
  margin: 14px 12px 6px;
  padding: 14px 16px;
  border: 1px solid rgba(236, 120, 186, .22);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 8% 0%, rgba(236, 120, 186, .14), transparent 38%),
    rgba(255, 255, 255, .92);
}

.app-quota-label {
  color: var(--cecho-ink-soft);
}

.app-quota-value {
  color: var(--primary-dark);
  font-size: 1.15rem;
  font-weight: 800;
}

.app-quota-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.app-nav-section {
  padding: 12px 14px 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--cecho-ink-soft);
}

.app-nav-link {
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 650;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition:
    border-color .22s ease,
    background .22s ease,
    color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.app-nav-link:hover {
  background: rgba(255, 255, 255, .42);
  color: var(--text);
  border-color: rgba(236, 120, 186, .16);
  transform: translateX(2px);
}

.app-nav-link.active {
  color: var(--primary-dark);
  background:
    radial-gradient(circle at 50% 100%, rgba(236, 120, 186, .18), transparent 62%),
    rgba(255, 255, 255, .55);
  border-color: rgba(236, 120, 186, .26);
  box-shadow: 0 12px 28px rgba(236, 120, 186, .12), inset 3px 0 0 var(--cecho-pink);
}

.app-nav-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-dark);
}

.app-sidebar-footer {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .22));
  border-top: 1px solid rgba(236, 120, 186, .14);
}

.app-logout-btn {
  border: 1px solid rgba(236, 120, 186, .16);
  background: rgba(255, 255, 255, .45);
  font-weight: 650;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.app-logout-btn:hover {
  transform: translateY(-1px);
  color: var(--danger);
  border-color: rgba(239, 68, 68, .24);
  background: var(--danger-bg);
}

.app-user-avatar {
  background:
    radial-gradient(circle at 30% 20%, #f0abfc, #9333ea 68%);
  color: #fff;
  border: 1px solid rgba(236, 120, 186, .24);
  font-weight: 800;
}

.app-main {
  margin-left: var(--app-sidebar-w);
  background: var(--cecho-page);
}

.app-topbar {
  height: 58px;
  padding: 0 24px;
  background: rgba(240, 233, 246, .72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(236, 120, 186, .16);
}

.app-topbar-title h1 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cecho-ink);
}

.app-topbar-quota {
  color: var(--primary-dark);
  background: rgba(236, 120, 186, .1);
  border-color: rgba(236, 120, 186, .2);
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 18px 24px 36px;
  box-sizing: border-box;
}

.app-content .container {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* ── Console layout (Bots page) ── */
.console-page {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.console-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(236, 120, 186, .22);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 120, 186, .08), transparent 34%),
    rgba(255, 255, 255, .72);
  box-shadow: 0 24px 70px rgba(190, 83, 177, .1), inset 0 1px rgba(255, 255, 255, .85);
  backdrop-filter: blur(20px);
}

.console-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--cecho-ink-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  transition:
    border-color .22s ease,
    background .22s ease,
    color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.console-tab-icon,
.console-tab-crown {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--primary-dark);
  background: rgba(236, 120, 186, .12);
  flex-shrink: 0;
  transition: background .22s ease, transform .22s ease;
}

.console-tab:hover {
  color: var(--cecho-ink);
  border-color: rgba(236, 120, 186, .18);
  background: rgba(255, 255, 255, .45);
  transform: translateY(-1px);
}

.console-tab:hover .console-tab-icon,
.console-tab:hover .console-tab-crown {
  background: rgba(236, 120, 186, .18);
  transform: scale(1.04);
}

.console-tab.active {
  color: var(--cecho-ink);
  border-color: rgba(236, 120, 186, .28);
  background:
    radial-gradient(circle at 50% 100%, rgba(236, 120, 186, .2), transparent 62%),
    rgba(255, 255, 255, .58);
  box-shadow: 0 16px 34px rgba(236, 120, 186, .14);
  transform: translateY(-1px);
}

.console-tab-icon svg {
  width: 16px;
  height: 16px;
}

.console-tab-crown {
  font-size: 0;
}

.console-tab-crown::before {
  content: "";
  width: 18px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(6% 90%, 94% 90%, 88% 35%, 62% 58%, 50% 12%, 38% 58%, 12% 35%);
}

.console-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 76px;
  height: 3px;
  border-radius: 999px;
  background: var(--cecho-gradient-soft);
  box-shadow: 0 0 18px rgba(236, 120, 186, .45);
  transform: translateX(-50%);
}

.console-content,
.console-section {
  min-width: 0;
  display: grid;
  gap: 18px;
  animation: consoleSectionIn .22s ease-out both;
}

@keyframes consoleSectionIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(236, 120, 186, .18);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 120, 186, .12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(253, 246, 252, .92));
  box-shadow: 0 24px 70px rgba(190, 83, 177, .08), inset 0 1px rgba(255, 255, 255, .95);
  transition: border-color .18s ease, box-shadow .18s ease;
  animation: consoleSectionIn .22s ease-out both;
}

.section-hero:hover {
  border-color: rgba(236, 120, 186, .28);
  box-shadow: 0 24px 62px rgba(190, 83, 177, .12);
}

.section-hero.compact {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 104px;
  max-height: 104px;
  padding: 16px 20px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 7% 0%, rgba(236, 120, 186, .16), transparent 36%),
    rgba(255, 255, 255, .94);
}

.section-hero.compact > div:first-child {
  min-width: 0;
}

.section-hero h2 {
  margin: 4px 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--cecho-ink);
}

.section-hero.compact h2 {
  margin: 4px 0 5px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.eyebrow {
  margin: 0;
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1;
}

.muted {
  color: var(--cecho-ink-muted);
}

.section-hero.compact .muted {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: .8125rem;
  line-height: 1.42;
}

.metric-card {
  min-width: 112px;
  padding: 14px 18px;
  border: 1px solid rgba(236, 120, 186, .16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
  text-align: right;
}

.section-hero.compact .metric-card {
  min-width: 72px;
  max-width: 76px;
  padding: 9px 10px;
  text-align: center;
}

.metric-card span {
  display: block;
  color: var(--cecho-ink-soft);
  font-size: .8125rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--cecho-ink);
  line-height: 1.1;
}

.section-hero.compact .metric-card strong {
  font-size: 1.55rem;
}

/* ── Bot grid ── */
.bot-grid,
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.bot-card,
.char-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(236, 120, 186, .16);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 120, 186, .12), transparent 42%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    background .22s ease;
  color: inherit;
  animation: botCardIn .2s ease-out both;
}

.char-card-wrap {
  cursor: default;
}

.char-card-link {
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.char-card-delete,
.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #f56c6c;
  cursor: pointer;
  opacity: .72;
  transition:
    opacity .2s ease,
    background .2s ease,
    color .2s ease,
    transform .2s ease;
}

.char-card-wrap:hover .char-card-delete,
.char-card-delete:focus-visible {
  opacity: 1;
}

.char-card-delete:hover {
  background: rgba(245, 108, 108, .14);
  color: #e64545;
}

.char-card-delete:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.char-card-delete svg {
  width: 16px;
  height: 16px;
  display: block;
}

.bot-grid .bot-card:nth-child(1),
.bot-grid .char-card:nth-child(1) { animation-delay: .04s; }
.bot-grid .bot-card:nth-child(2),
.bot-grid .char-card:nth-child(2) { animation-delay: .08s; }
.bot-grid .bot-card:nth-child(3),
.bot-grid .char-card:nth-child(3) { animation-delay: .12s; }
.bot-grid .bot-card:nth-child(4),
.bot-grid .char-card:nth-child(4) { animation-delay: .16s; }
.bot-grid .bot-card:nth-child(5),
.bot-grid .char-card:nth-child(5) { animation-delay: .20s; }
.bot-grid .bot-card:nth-child(n+6),
.bot-grid .char-card:nth-child(n+6) { animation-delay: .24s; }

@keyframes botCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-card::before,
.char-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  opacity: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, .45) 44%, transparent 68%);
  transform: translateX(-70%);
  transition: opacity .22s ease, transform .48s ease;
  pointer-events: none;
}

.bot-card:hover,
.char-card-wrap:hover {
  border-color: rgba(236, 120, 186, .42);
  box-shadow: 0 24px 62px rgba(224, 94, 170, .16);
  transform: translateY(-4px);
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 120, 186, .16), transparent 42%),
    rgba(255, 255, 255, .98);
}

.bot-card:hover::before,
.char-card-wrap:hover::before {
  opacity: 1;
  transform: translateX(72%);
}

.bot-head,
.char-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.bot-title,
.char-card-title-wrap {
  min-width: 0;
}

.bot-initial,
.char-card .char-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  border: 1px solid rgba(236, 120, 186, .24);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(236, 120, 186, .48), rgba(110, 63, 220, .28)),
    rgba(255, 255, 255, .72);
  box-shadow: 0 12px 28px rgba(236, 120, 186, .18);
}

.bot-title strong,
.char-card .char-name {
  display: block;
  color: var(--cecho-ink);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-title span,
.char-card .status-dot {
  margin-top: 8px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
}

.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--offline {
  color: #ef4444;
}

.status-dot--offline::before {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .18);
}

.status-dot--online {
  color: #22c55e;
}

.status-dot--online::before {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .18);
}

.char-card .char-desc {
  margin: 0;
  color: var(--cecho-ink-muted);
  font-size: .875rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bot-meta,
.char-card .char-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: none;
}

.open-hint,
.char-card-enter {
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  transform: translateX(-4px);
}

.bot-card:hover .open-hint,
.char-card-wrap:hover .char-card-enter {
  opacity: 1;
  transform: translateX(0);
}

.char-card-inner {
  display: contents;
}

/* ── Membership / pricing ── */
.billing-hero {
  position: relative;
  min-height: 162px;
  overflow: hidden;
  border-color: rgba(168, 85, 247, .32) !important;
  background:
    radial-gradient(circle at 92% 10%, rgba(168, 85, 247, .14), transparent 34%),
    radial-gradient(circle at 8% 0%, rgba(236, 120, 186, .12), transparent 38%),
    linear-gradient(135deg, rgba(236, 120, 186, .08), rgba(168, 85, 247, .06)),
    rgba(255, 255, 255, .94) !important;
}

.billing-hero h2 {
  font-size: 2.2rem;
}

.vip-pill {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--primary-dark);
  font-weight: 800;
  border: 1px solid rgba(236, 120, 186, .28);
  border-radius: 999px;
  background: rgba(236, 120, 186, .1);
}

.pricing-grid,
.console-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.pricing-card,
.console-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(236, 120, 186, .2);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 92% 12%, rgba(168, 85, 247, .1), transparent 34%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.pricing-card:hover,
.console-plan-card:hover {
  border-color: rgba(236, 120, 186, .42);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.plan-tag,
.console-plan-badge {
  align-self: flex-start;
  padding: 4px 9px;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  border-radius: 999px;
  background: var(--cecho-gradient);
}

.plan-name {
  align-self: flex-start;
  padding: 6px 11px;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 900;
  border: 1px solid rgba(236, 120, 186, .24);
  border-radius: 999px;
  background: rgba(236, 120, 186, .08);
}

.pricing-card strong,
.console-plan-price {
  color: var(--cecho-ink);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.usage-panel,
.console-quota-summary {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(236, 120, 186, .22);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 12% 0%, rgba(236, 120, 186, .12), transparent 38%),
    rgba(255, 255, 255, .94);
}

.usage-bar-wrap {
  padding: 6px;
  border: 1px solid rgba(236, 120, 186, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.usage-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(236, 120, 186, .08);
}

.usage-bar i,
.usage-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cecho-gradient-soft);
  box-shadow: 0 0 24px rgba(236, 120, 186, .28);
}

/* ── Guides / notices ── */
.notice-hero {
  background:
    radial-gradient(circle at 8% 0%, rgba(157, 117, 255, .1), transparent 36%),
    radial-gradient(circle at 92% 0%, rgba(236, 120, 186, .08), transparent 34%),
    rgba(255, 255, 255, .94) !important;
}

.notice-panel,
.console-announcement {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(236, 120, 186, .24);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 10% 0%, rgba(236, 120, 186, .1), transparent 38%),
    rgba(255, 255, 255, .94);
}

.notice-panel-head span,
.console-announcement-tag {
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 900;
}

.notice-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--primary-dark);
  font-weight: 900;
  border: 1px solid rgba(236, 120, 186, .28);
  border-radius: 999px;
  background: rgba(236, 120, 186, .1);
  box-shadow: 0 14px 34px rgba(190, 83, 177, .1);
}

.plan-quota {
  align-self: flex-start;
  display: inline-flex;
  padding: 6px 11px;
  color: var(--primary-dark);
  font-size: .875rem;
  font-weight: 900;
  border: 1px solid rgba(236, 120, 186, .18);
  border-radius: 999px;
  background: rgba(236, 120, 186, .08);
}

.plan-buy-btn {
  width: 100%;
  margin-top: auto;
}

.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.usage-head h3 {
  margin: 4px 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
}

.usage-addon {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 12px 14px;
  text-align: right;
  border: 1px solid rgba(236, 120, 186, .2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
}

.usage-addon span {
  color: var(--cecho-ink-soft);
  font-size: .8125rem;
}

.usage-addon strong {
  color: var(--cecho-ink);
  font-size: 1.5rem;
  font-weight: 900;
}

.usage-addon-buy {
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
}

.notice-content {
  margin: 0;
  line-height: 1.75;
}

.notice-panel-head strong {
  display: block;
  color: var(--cecho-ink);
  font-size: 1.35rem;
  line-height: 1.25;
}

.tutorial-card .btn {
  margin-top: 4px;
}

.tutorial-grid,
.console-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tutorial-card,
.console-guide-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(236, 120, 186, .14);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 12% 0%, rgba(157, 117, 255, .08), transparent 38%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tutorial-card:hover,
.console-guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(236, 120, 186, .42);
  box-shadow: var(--shadow-card-hover);
}

.tutorial-card span,
.console-guide-step {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 900;
  border: 1px solid rgba(236, 120, 186, .24);
  border-radius: var(--radius-sm);
  background: rgba(236, 120, 186, .1);
}

.tutorial-card h3,
.console-guide-card h4 {
  margin: 0;
  color: var(--cecho-ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.tutorial-card b {
  margin-top: auto;
  color: var(--primary-dark);
  font-size: .875rem;
  font-weight: 800;
}

.console-section-title {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--cecho-ink);
}

.console-faq {
  border: 1px solid var(--cecho-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
}

.console-faq-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
}

.console-faq-item summary {
  font-weight: 750;
  color: var(--cecho-ink);
}

/* ── Character hub ── */
.char-hub-header {
  border: 1px solid var(--cecho-border);
  background:
    radial-gradient(circle at 8% 0%, rgba(236, 120, 186, .1), transparent 36%),
    rgba(255, 255, 255, .94);
}

.char-hub-avatar {
  background:
    radial-gradient(circle at 30% 20%, #f0abfc, #9333ea 68%);
  color: #fff;
  border-color: rgba(236, 120, 186, .24);
}

.char-tabs .char-tab.active {
  color: var(--primary-dark);
  border-color: var(--cecho-pink);
}

/* ── Rewards ── */
.rewards-hero {
  background:
    radial-gradient(circle at 86% 0%, rgba(168, 85, 247, .28), transparent 36%),
    radial-gradient(circle at 12% 0%, rgba(236, 120, 186, .22), transparent 38%),
    linear-gradient(135deg, #f6d0ea, #dcc4ff);
  color: var(--cecho-ink);
}

.rewards-hero-title,
.rewards-hero-desc,
.rewards-hero-eyebrow {
  color: var(--cecho-ink);
}

.rewards-hero-title .highlight {
  color: var(--primary-dark);
}

.rewards-milestone.is-ready {
  border-color: rgba(236, 120, 186, .32);
}

.rewards-progress-fill {
  background: var(--cecho-gradient-soft);
}

.rewards-tag {
  background: rgba(236, 120, 186, .12);
  color: var(--primary-dark);
}

.rewards-share-card,
.rewards-milestone,
.rewards-invite-row {
  border-color: rgba(236, 120, 186, .16);
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed rgba(236, 120, 186, .24);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 0%, rgba(236, 120, 186, .08), transparent 42%),
    rgba(255, 255, 255, .92);
}

.empty-state h3 {
  font-weight: 800;
  color: var(--cecho-ink);
}

.app-content.is-nav-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .console-tab,
  .bot-card,
  .char-card,
  .section-hero,
  .console-section,
  .profile-hero,
  .profile-usage-bar-fill,
  .app-nav-link,
  .btn-primary {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .app-main {
    margin-left: 0;
  }

  .console-tabs {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .section-hero,
  .section-hero.compact {
    grid-template-columns: 1fr !important;
    max-height: none !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .metric-card {
    width: 100%;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .app-content {
    padding: 16px;
  }

  .console-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .console-tab {
    min-height: 46px;
    font-size: .8125rem;
  }

  .console-tab-icon svg {
  width: 16px;
  height: 16px;
}

.console-tab-crown {
  font-size: 0;
}

.console-tab-crown::before {
  content: "";
  width: 18px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(6% 90%, 94% 90%, 88% 35%, 62% 58%, 50% 12%, 38% 58%, 12% 35%);
}

.console-tab.active::after {
    width: 54px;
  }

  .bot-grid,
  .char-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 个人中心 Profile（沿用系统亮色主题） ── */
.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(236, 120, 186, .18);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 120, 186, .12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(253, 246, 252, .92));
  box-shadow: 0 24px 70px rgba(190, 83, 177, .08), inset 0 1px rgba(255, 255, 255, .95);
  color: var(--cecho-ink);
  transition: border-color .18s ease, box-shadow .18s ease;
  animation: consoleSectionIn .22s ease-out both;
}

.profile-hero:hover {
  border-color: rgba(236, 120, 186, .28);
  box-shadow: 0 24px 62px rgba(190, 83, 177, .12);
}

.profile-eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-title {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--cecho-ink);
}

.profile-subtitle {
  margin: 0;
  color: var(--cecho-ink-muted);
  font-size: .95rem;
}

.profile-hero-orb {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cecho-gradient);
  color: #fff;
  box-shadow: 0 12px 28px rgba(236, 120, 186, .28), inset 0 1px rgba(255, 255, 255, .35);
}

.profile-hero-orb-ring {
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(236, 120, 186, .22);
  border-radius: 50%;
  opacity: .85;
}

.profile-hero-orb-value {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
}

.profile-hero-orb-caption {
  position: absolute;
  bottom: 16px;
  font-size: .68rem;
  opacity: .92;
}


.profile-usage-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(236, 120, 186, .18);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 0% 0%, rgba(236, 120, 186, .1), transparent 38%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  color: var(--cecho-ink);
}

.profile-usage-panel--open {
  grid-template-columns: 1fr;
}

.profile-usage-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cecho-ink);
}

.profile-usage-desc {
  margin: 0 0 18px;
  color: var(--cecho-ink-muted);
  font-size: .9rem;
}

.profile-usage-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(236, 120, 186, .12);
  overflow: hidden;
  margin-bottom: 14px;
}

.profile-usage-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cecho-gradient-soft);
  box-shadow: 0 0 12px rgba(236, 120, 186, .28);
  transition: width .35s ease;
}

.profile-usage-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  color: var(--cecho-ink-soft);
  font-size: .82rem;
}

.profile-usage-breakdown {
  color: var(--cecho-ink);
  font-weight: 600;
}

.usage-breakdown-line {
  margin: 10px 0 0;
  font-size: .85rem;
}

.profile-usage-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(236, 120, 186, .16);
}

.profile-usage-side-label {
  color: var(--cecho-ink-soft);
  font-size: .82rem;
  font-weight: 700;
}

.profile-usage-side-value {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--cecho-ink);
}

.profile-usage-side-btn {
  margin-top: 4px;
  align-self: flex-start;
}

.profile-usage-side-note {
  margin: 0;
  font-size: .78rem;
  color: var(--cecho-ink-muted);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.profile-info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(236, 120, 186, .16);
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 120, 186, .08), transparent 42%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  color: var(--cecho-ink);
  min-height: 96px;
}

.profile-info-card--wide {
  grid-column: 1 / -1;
}

.profile-info-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.profile-info-icon svg {
  width: 20px;
  height: 20px;
}

.profile-info-icon--mail {
  background: var(--cecho-gradient);
}

.profile-info-icon--code {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

.profile-info-icon--vip {
  background: linear-gradient(135deg, var(--cecho-pink), var(--cecho-purple));
}

.profile-info-label {
  display: block;
  margin-bottom: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--cecho-ink-soft);
}

.profile-info-value {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  color: var(--cecho-ink);
  word-break: break-all;
}

.profile-info-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-copy-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(236, 120, 186, .2);
  border-radius: 8px;
  background: rgba(236, 120, 186, .08);
  color: var(--primary-dark);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.profile-copy-btn:hover {
  background: rgba(236, 120, 186, .14);
  border-color: rgba(236, 120, 186, .32);
}

.profile-copy-btn svg {
  width: 16px;
  height: 16px;
}

.profile-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 22px 22px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(236, 120, 186, .16);
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 120, 186, .12), transparent 42%),
    rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  color: var(--cecho-ink);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.profile-feature-card:hover {
  border-color: rgba(236, 120, 186, .42);
  box-shadow: var(--shadow-card-hover);
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 120, 186, .16), transparent 42%),
    rgba(255, 255, 255, .98);
}

.profile-feature-card--actions {
  color: var(--cecho-ink);
}

.profile-feature-copy {
  position: relative;
  z-index: 1;
}

.profile-feature-copy h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cecho-ink);
}

.profile-feature-copy p {
  margin: 0 0 14px;
  color: var(--cecho-ink-muted);
  font-size: .88rem;
  line-height: 1.55;
  max-width: 16em;
}

.profile-feature-link {
  display: inline-block;
  margin-top: auto;
  color: var(--primary-dark);
  font-size: .88rem;
  font-weight: 700;
}

.profile-cashback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(236, 120, 186, .08);
  border: 1px solid rgba(236, 120, 186, .12);
  font-size: .82rem;
  color: var(--cecho-ink-muted);
}

.profile-cashback strong {
  color: var(--cecho-ink);
  font-size: 1rem;
}

.profile-quick-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.profile-quick-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(236, 120, 186, .16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .82);
  color: var(--cecho-ink);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.profile-quick-btn:hover {
  background: rgba(236, 120, 186, .08);
  border-color: rgba(236, 120, 186, .28);
  box-shadow: var(--shadow-xs);
}

.profile-feature-art {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 88px;
  height: 88px;
  opacity: .75;
  pointer-events: none;
}

.profile-feature-art--bot {
  background:
    radial-gradient(circle at 50% 35%, rgba(236, 120, 186, .45), transparent 58%),
    radial-gradient(circle at 50% 70%, rgba(168, 85, 247, .28), transparent 62%);
  border-radius: 50%;
}

.profile-feature-art--coin {
  background:
    radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 45%, transparent 46%),
    radial-gradient(circle at 62% 58%, #fbcfe8, #ec4899 42%, transparent 43%);
}

.profile-feature-art--bolt {
  background: linear-gradient(160deg, rgba(168, 85, 247, .55), rgba(236, 120, 186, .35));
  clip-path: polygon(50% 0%, 68% 38%, 100% 42%, 72% 66%, 82% 100%, 50% 78%, 18% 100%, 28% 66%, 0% 42%, 32% 38%);
}

.profile-password-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(26, 21, 45, .35);
  backdrop-filter: blur(6px);
}

.profile-password-modal[hidden] {
  display: none !important;
}

.profile-password-dialog {
  width: min(100%, 420px);
  background: var(--cecho-panel);
  color: var(--cecho-ink);
  border: 1px solid var(--cecho-border);
  box-shadow: var(--shadow-md);
}

@media (max-width: 960px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-usage-panel {
    grid-template-columns: 1fr;
  }

  .profile-info-grid,
  .profile-feature-grid {
    grid-template-columns: 1fr;
  }
}
