/* 现代化设计风格 */

/* 主色调变量 */
:root {
  --primary-color: #4361ee;
  --primary-light: #4895ef;
  --primary-dark: #3a56d4;
  --secondary-color: #f8f9fa;
  --accent-color: #06d6a0;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --divider-color: #dee2e6;
  --success-color: #06d6a0;
  --error-color: #ef476f;
  --warning-color: #ffd166;
  --info-color: #118ab2;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: var(--text-primary);
  /* 不设置固定高度，让内容自然撑开 */
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 为Bootstrap Flex布局优化的样式 */
header {
  flex: 0 0 auto;
}

.main-content {
  flex: 1 0 auto;
  padding: 0;
  margin: 0;
}

footer {
  flex: 0 0 auto;
}

/* ============ 首页 - 简洁大气·科技感 ============ */

/* -- 公共 -- */
.x-grad {
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.x-chip {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6366f1;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.1));
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.x-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.5;
}

.x-orb-a {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%);
  top: -120px; right: -80px;
}

.x-orb-b {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
  bottom: -100px; left: -60px;
}

.x-orb-c {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(168,85,247,0.12), transparent 70%);
  top: 40%; left: 60%;
}

.x-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* 色彩辅助 */
.x-c-indigo { background: rgba(99,102,241,0.1); color: #6366f1; }
.x-c-emerald { background: rgba(16,185,129,0.1); color: #10b981; }
.x-c-cyan { background: rgba(6,182,212,0.1); color: #06b6d4; }
.x-c-amber { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* ============ 已登录仪表板 ============ */
.x-dash {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f8faff 0%, #ffffff 40%, #f0f9ff 100%);
  min-height: calc(100vh - 160px);
  padding: 2.5rem 0;
}

.x-dash-head {
  margin-bottom: 1.75rem;
}

.x-dash-head h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.15rem 0 0.2rem;
}

.x-dash-head p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0;
}

/* -- 快捷入口卡片 -- */
.x-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.x-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.x-tile:hover {
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 8px 24px rgba(99,102,241,0.1);
  transform: translateY(-2px);
}

.x-tile:hover .x-tile-arr {
  opacity: 1;
  transform: translateX(0);
  color: #6366f1;
}

.x-tile-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.x-tile-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.x-tile-info strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.x-tile-info small {
  font-size: 0.73rem;
  color: #94a3b8;
}

.x-tile-arr {
  font-size: 0.72rem;
  color: #cbd5e1;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.25s ease;
}

/* -- 面板 -- */
.x-panel {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 14px;
  padding: 1.25rem;
}

.x-panel-head {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

/* -- 统计 -- */
.x-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.x-stat { text-align: center; flex: 1; }

.x-stat-n {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.x-stat-l {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.x-stat-sep {
  width: 1px;
  height: 36px;
  background: #e2e8f0;
}

/* -- 操作链接 -- */
.x-act {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.x-act:hover {
  background: rgba(99,102,241,0.06);
  color: #6366f1;
}

.x-act-red:hover {
  background: rgba(239,68,68,0.06);
  color: #ef4444;
}

.x-act-arr {
  margin-left: auto;
  font-size: 0.6rem;
  color: #cbd5e1;
}

/* ============ 未登录着陆页 ============ */
.x-land {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f8faff 0%, #ffffff 35%, #f0f9ff 70%, #faf5ff 100%);
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

/* Hero */
.x-hero {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 3.5rem;
}

.x-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 24px;
  margin-bottom: 1.5rem;
}

.x-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16,185,129,0.5);
  animation: x-pulse 2s ease-in-out infinite;
}

@keyframes x-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.x-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.x-hero p {
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.x-hero-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.x-btn-fill {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 2rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.x-btn-fill:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,0.4);
  transform: translateY(-2px);
  color: #fff;
}

.x-btn-fill:disabled,
.x-btn-fill.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.x-btn-fill-green {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}

.x-btn-fill-green:hover {
  box-shadow: 0 8px 28px rgba(16,185,129,0.4);
  color: #fff;
}

.x-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 2rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.x-btn-ghost:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: rgba(99,102,241,0.04);
  transform: translateY(-2px);
}

/* 功能卡片 */
.x-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

.x-feat {
  position: relative;
  text-align: center;
  padding: 1.75rem 1.25rem 1.5rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.x-feat:hover {
  border-color: rgba(99,102,241,0.25);
  box-shadow: 0 12px 32px rgba(99,102,241,0.08);
  transform: translateY(-3px);
}

.x-feat-bar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

.x-feat-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 0.85rem;
}

.x-feat h6 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.x-feat p {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

/* 响应式 */
@media (max-width: 992px) {
  .x-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .x-tiles { grid-template-columns: 1fr; }
  .x-feats { grid-template-columns: 1fr; max-width: 320px; }
  .x-hero h1 { font-size: 2rem; }
  .x-stat-n { font-size: 1.3rem; }
}

/* ============ 内页通用布局 (UserCenter/Wallet/Referral) ============ */
.x-page {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f8faff 0%, #ffffff 40%, #f0f9ff 100%);
  min-height: calc(100vh - 160px);
  padding: 2.5rem 0 3rem;
}

.x-page-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.x-page-head-ico {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.x-page-head h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.x-page-head p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0.15rem 0 0;
}

/* App 布局：侧边栏 + 内容 */
.x-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.x-sidenav {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  padding: 0.6rem;
  position: sticky;
  top: 1.5rem;
}

.x-sidenav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.18s ease;
  margin-bottom: 0.15rem;
}

.x-sidenav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
  transition: color 0.18s ease;
}

.x-sidenav-item:hover {
  background: rgba(99,102,241,0.06);
  color: #6366f1;
}

.x-sidenav-item:hover i { color: #6366f1; }

.x-sidenav-item.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}

.x-sidenav-item.active i { color: #fff; }

.x-sidenav-badge {
  margin-left: auto;
  background: rgba(99,102,241,0.1);
  color: #6366f1;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
}

.x-sidenav-item.active .x-sidenav-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* 内容卡片 */
.x-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.x-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.x-card-head i { color: #6366f1; }

.x-card-head .x-badge-count {
  margin-left: auto;
  background: rgba(99,102,241,0.1);
  color: #6366f1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

/* 表单 */
.x-field { margin-bottom: 1.25rem; }

.x-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.x-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.x-control::placeholder { color: #cbd5e1; }

.x-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

textarea.x-control { resize: vertical; min-height: 90px; }

.x-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.x-error-text {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

/* 提示条 */
.x-note {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.x-note > i { margin-top: 0.15rem; }

.x-note-info {
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.15);
  color: #0e7490;
}

.x-note-success {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.15);
  color: #047857;
}

.x-note-danger {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  color: #b91c1c;
}

/* 余额展示 */
.x-balance-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(6,182,212,0.06));
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.x-balance-label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.x-balance-amount {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.x-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.x-mini {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.x-mini:hover {
  border-color: rgba(99,102,241,0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.08);
}

.x-mini-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.x-mini-label {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.x-mini-value {
  font-size: 1.35rem;
  font-weight: 800;
}

/* 表格 */
.x-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.x-table thead th {
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #f1f5f9;
}

.x-table tbody td {
  padding: 0.85rem 0.9rem;
  color: #475569;
  border-bottom: 1px solid #f8fafc;
}

.x-table tbody tr:last-child td { border-bottom: none; }
.x-table tbody tr:hover { background: rgba(99,102,241,0.02); }

.x-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
}

.x-pill-green { background: rgba(16,185,129,0.1); color: #059669; }
.x-pill-amber { background: rgba(245,158,11,0.1); color: #d97706; }
.x-pill-red { background: rgba(239,68,68,0.1); color: #dc2626; }
.x-pill-cyan { background: rgba(6,182,212,0.1); color: #0891b2; }

/* 头像 */
.x-avatar-wrap {
  text-align: center;
  position: relative;
  display: inline-block;
}

.x-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(99,102,241,0.15);
}

.x-avatar-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: 3px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  transition: transform 0.2s ease;
}

.x-avatar-btn:hover { transform: scale(1.08); }

/* 授权应用项 */
.x-app-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.x-app-item:hover {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 4px 16px rgba(99,102,241,0.06);
}

.x-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
  margin: 0 0.3rem 0.3rem 0;
}

.x-btn-soft-red {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.x-btn-soft-red:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.3);
}

/* 推荐码展示 */
.x-code-box {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(6,182,212,0.05));
  border: 1px dashed rgba(99,102,241,0.3);
  border-radius: 14px;
}

.x-code-value {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 3px;
}

.x-copy-row { display: flex; gap: 0.6rem; }

.x-copy-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.82rem;
  color: #64748b;
  outline: none;
}

.x-btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.x-btn-soft:hover {
  background: rgba(99,102,241,0.14);
  border-color: rgba(99,102,241,0.3);
  color: #6366f1;
}

.x-btn-soft-green {
  color: #10b981;
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.15);
}

.x-btn-soft-green:hover {
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.3);
  color: #10b981;
}

.x-qr-box {
  display: inline-flex;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(99,102,241,0.08);
}

/* 空状态 */
.x-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.x-empty i {
  font-size: 2.5rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
  display: block;
}

.x-empty h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.x-empty p { font-size: 0.82rem; margin: 0; }

/* 趋势图占位 */
.x-chart-ph {
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(6,182,212,0.04));
  border: 1px dashed rgba(99,102,241,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* 4列迷你网格 */
.x-mini-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 分页 */
.x-pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.x-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  background: rgba(255,255,255,0.8);
  transition: all 0.18s ease;
}

.x-page-link:hover {
  border-color: #c7d2fe;
  color: #6366f1;
  background: rgba(99,102,241,0.04);
}

.x-page-link.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.x-page-link.disabled { opacity: 0.45; pointer-events: none; }

/* 充值金额选择 */
.x-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.x-amount-btn {
  padding: 1rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  color: #334155;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.x-amount-btn:hover { border-color: #c7d2fe; color: #6366f1; }

.x-amount-btn.active {
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99,102,241,0.06);
  box-shadow: 0 4px 14px rgba(99,102,241,0.12);
}

/* 关系图节点 */
.x-node { text-align: center; }

.x-node-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: #f1f5f9;
  color: #6366f1;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.x-node-current .x-node-avatar {
  width: 88px;
  height: 88px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

.x-node-child .x-node-avatar { background: rgba(16,185,129,0.1); color: #10b981; }

.x-node-name { font-size: 0.85rem; font-weight: 600; color: #0f172a; margin: 0; }
.x-node-role { font-size: 0.72rem; color: #94a3b8; margin: 0; }
.x-node-arrow { color: #cbd5e1; font-size: 1.2rem; margin: 0.5rem 0; }

/* 表格内头像 */
.x-cell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  color: #6366f1;
  font-size: 0.9rem;
}

/* 消息页（AccessDenied/Logout/Error） */
.x-msg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f8faff 0%, #ffffff 40%, #f0f9ff 100%);
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.x-msg-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(99,102,241,0.06);
}

.x-msg-ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.x-msg-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.x-msg-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.x-msg-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.x-c-red { background: rgba(239,68,68,0.1); color: #ef4444; }

@media (max-width: 992px) {
  .x-app { grid-template-columns: 1fr; }
  .x-sidenav {
    position: static;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.5rem;
  }
  .x-sidenav-item { white-space: nowrap; margin-bottom: 0; }
  .x-mini-grid { grid-template-columns: 1fr; }
  .x-app-item { flex-direction: column; }
}

@media (max-width: 768px) {
  .x-mini-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .x-amount-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Auth Page Styles - unified with homepage */
.x-auth {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #f8faff 0%, #ffffff 35%, #f0f9ff 70%, #faf5ff 100%);
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.x-auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(99,102,241,0.06);
}

.x-auth-head {
  text-align: center;
  margin-bottom: 2rem;
}

.x-auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}

.x-auth-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.x-auth-head p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.x-auth-form .x-auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: #dc2626;
}

.x-auth-field {
  margin-bottom: 1.25rem;
}

.x-auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.x-auth-input-wrap {
  position: relative;
}

.x-auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.x-auth-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.x-auth-input::placeholder {
  color: #cbd5e1;
}

.x-auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.x-auth-input:focus ~ .x-auth-input-icon,
.x-auth-input-wrap:focus-within .x-auth-input-icon {
  color: #6366f1;
}

.x-auth-error {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

.x-auth-input[readonly] {
  background: #f8fafc;
  color: #94a3b8;
}

/* Modern button styles */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.2px;
  border: none;
}

.btn-md {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-success:hover {
  background-color: #05c18d;
  border-color: #05c18d;
}

.btn-danger {
  background-color: var(--error-color);
  border-color: var(--error-color);
}

.btn-danger:hover {
  background-color: #d93b64;
  border-color: #d93b64;
}

.btn-outline-light {
  border-color: rgba(255,255,255,0.3);
  color: white;
}

.btn-outline-light:hover {
  background-color: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: white;
}

/* Card styles */
.card {
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

.card-body {
  padding: 1.5rem;
}

/* Navigation styles */
.navbar {
  background: rgba(255,255,255,0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  box-shadow: none;
  margin-bottom: 0;
  padding: 0.6rem 0;
  position: relative;
  z-index: 1030;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: #0f172a !important;
}

.navbar-brand i {
  color: #6366f1;
}

.nav-link {
  color: #475569 !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 0.9rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #6366f1 !important;
  background: rgba(99,102,241,0.06);
}

.navbar-toggler {
  border: 1px solid #e2e8f0 !important;
  padding: 0.3rem 0.5rem;
}

.navbar-toggler-icon {
  filter: invert(20%);
}

.dropdown-menu {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: #475569;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(99,102,241,0.06);
  color: #6366f1;
}

/* Form styles */
.form-control {
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
}

/* Footer styles */
.footer {
  background: #fff;
  border-top: 1px solid #f1f5f9;
  padding: 2rem 0 0;
  color: #64748b;
  width: 100%;
  z-index: 1000;
  position: relative;
}

.footer a {
  color: #64748b;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #6366f1 !important;
  text-decoration: none;
}

.footer h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.footer .small {
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer hr {
  border-color: #f1f5f9;
  margin: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer .row > div {
    margin-bottom: 1.5rem;
  }
  
  .footer .row > div:last-child {
    margin-bottom: 0;
  }
  
  .hero-section .container {
    padding: 3rem 1rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .btn:not(:last-child) {
    margin-right: 0;
  }
}

/* Animation effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

/* Icon rotation effect */
.icon-rotate {
  transition: transform 0.3s ease;
}

.icon-rotate:hover {
  transform: rotate(15deg);
}

/* User Center styles */
.user-center-card {
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  border: none;
}

.user-center-card .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  padding: 1.5rem;
}

.user-center-card .card-body {
  padding: 2rem;
}

.avatar-preview {
  transition: all 0.3s ease;
}

.avatar-preview:hover {
  transform: scale(1.05);
}

.form-control-lg {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
}

.btn-user-center {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.btn-user-center:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ========================================
   管理后台 — 简洁大气风格
   ======================================== */

.admin-dashboard {
  background: #f7f8fa;
  min-height: calc(100vh - 70px);
}

/* --- 侧边栏：白底简洁风 --- */
.admin-sidebar {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8eaed;
}

.admin-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f0f1f3;
}

.admin-sidebar-header h5 {
  color: #1a1a1a;
  font-weight: 700;
  margin: 0;
  font-size: 1rem;
}

.admin-sidebar-header small {
  color: #9ca3af;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-nav-list {
  padding: 0.5rem 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
}

.admin-nav-item:hover {
  color: #1a1a1a;
  background: #f7f8fa;
}

.admin-nav-item.active {
  color: #4361ee;
  background: #f0f4ff;
  border-left-color: #4361ee;
  font-weight: 600;
}

.admin-nav-item i {
  width: 20px;
  font-size: 0.9rem;
  margin-right: 0.75rem;
  text-align: center;
  opacity: 0.7;
}

.admin-nav-item.active i {
  opacity: 1;
}

/* --- 页面标题 --- */
.admin-page-header {
  margin-bottom: 1.5rem;
}

.admin-page-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.admin-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  padding: 0;
  margin: 0.25rem 0 0 0;
  font-size: 0.75rem;
  list-style: none;
}

.admin-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-breadcrumb li + li::before {
  content: "/";
  color: #d1d5db;
  font-weight: 400;
}

.admin-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s ease;
}

.admin-breadcrumb a:hover {
  color: #4361ee;
}

.admin-breadcrumb .active {
  color: #9ca3af;
}

/* --- 功能入口卡片：极简风 --- */
.admin-feature-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
}

.admin-feature-card:hover {
  border-color: #4361ee;
  box-shadow: 0 4px 16px rgba(67, 97, 238, 0.08);
}

.admin-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.admin-feature-card h5 {
  font-weight: 650;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.admin-feature-card p {
  color: #9ca3af;
  font-size: 0.825rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.admin-feature-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.825rem;
  font-weight: 600;
  color: #4361ee;
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-feature-btn:hover {
  color: #3a56d4;
}

.admin-feature-btn i {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.admin-feature-btn:hover i {
  transform: translateX(3px);
}

/* --- 表格卡片 --- */
.admin-table-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  overflow: hidden;
}

.admin-table-card .table {
  margin-bottom: 0;
}

.admin-table-card .table thead th {
  background: transparent;
  border-bottom: 1px solid #e8eaed;
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
}

.admin-table-card .table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: #f5f5f5;
  font-size: 0.875rem;
  color: #374151;
}

.admin-table-card .table tbody tr:hover {
  background: #fafbfc;
}

/* --- 筛选区域 --- */
.admin-filter-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* --- 分页 --- */
.admin-pagination .page-link {
  border: none;
  color: #6b7280;
  font-weight: 500;
  font-size: 0.825rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px !important;
  margin: 0 1px;
  transition: all 0.15s ease;
}

.admin-pagination .page-link:hover {
  background: #f0f1f3;
  color: #1a1a1a;
}

.admin-pagination .page-item.active .page-link {
  background: #4361ee;
  color: #fff;
}

/* --- 状态徽章 --- */
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.admin-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.admin-badge-success {
  background: #d1fae5;
  color: #065f46;
}

.admin-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.admin-badge-info {
  background: #eff6ff;
  color: #3b82f6;
}

/* --- 响应式 --- */
@media (max-width: 991.98px) {
  .admin-sidebar {
    margin-bottom: 1.25rem;
  }
  
  .admin-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem;
  }
  
  .admin-nav-item {
    border-radius: 6px;
    border-left: none;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }
  
  .admin-nav-item.active {
    background: #4361ee;
    color: #fff;
  }
}