/* ============================================
   LAA 充值系统 - 全局样式
   设计灵感：LAA 品牌风格（紫色主色）
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  /* 主色调 - Valorant 风格 */
  --bg-darkest:   #0A1118;
  --bg-dark:      #111C26;
  --bg-card:      #16232F;
  --bg-elevated:  #1E2D3D;
  --bg-hover:     #28394B;

  /* 强调色 */
  --teal:         #00E5C5;
  --teal-bright:  #2AFCD9;
  --teal-dim:     #00B89E;
  --teal-glow:    rgba(0, 229, 197, 0.25);
  --red:          #7C3AED;
  --red-bright:   #A78BFA;
  --red-dim:      #5B21B6;
  --red-glow:     rgba(124, 58, 237, 0.25);
  --gold:         #FFCE5B;
  --gold-glow:    rgba(255, 206, 91, 0.25);
  --green:        #5DE37B;
  --green-glow:   rgba(93, 227, 123, 0.25);
  --purple:       #B084F0;
  --error:        #EF4444;

  /* 文字 */
  --text:         #F0EDE5;
  --text-dim:     #A4B0BC;
  --text-muted:   #5C6B7A;

  /* 边框 */
  --border:       #1F3040;
  --border-light: #2D4054;
  --border-bright:#3D5468;

  /* 阴影 */
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.6);
  --shadow-teal:  0 4px 24px rgba(0, 229, 197, 0.15);
  --shadow-red:   0 4px 24px rgba(124, 58, 237, 0.15);

  /* 渐变 */
  --grad-tr:      linear-gradient(135deg, var(--teal), var(--red));
  --grad-tr-soft: linear-gradient(135deg, rgba(0,229,197,0.1), rgba(124,58,237,0.1));

  /* 切角尺寸 */
  --clip:         8px;
  --clip-lg:      16px;
  --clip-sm:      4px;

  /* 过渡 */
  --t:            0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:       0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* 字体 */
  --font-display: 'Rajdhani', 'Noto Sans SC', sans-serif;
  --font-body:    'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Courier New', 'Consolas', monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-darkest);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--teal); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--teal-bright); }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ---------- 切角工具类 ---------- */
.clip        { clip-path: polygon(0 0, calc(100% - var(--clip)) 0, 100% var(--clip), 100% 100%, var(--clip) 100%, 0 calc(100% - var(--clip))); }
.clip-lg     { clip-path: polygon(0 0, calc(100% - var(--clip-lg)) 0, 100% var(--clip-lg), 100% 100%, var(--clip-lg) 100%, 0 calc(100% - var(--clip-lg))); }
.clip-tl     { clip-path: polygon(var(--clip) 0, 100% 0, 100% 100%, 0 100%, 0 var(--clip)); }
.clip-br     { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--clip)), calc(100% - var(--clip)) 100%, 0 100%); }
.clip-both   { clip-path: polygon(var(--clip) 0, calc(100% - var(--clip)) 0, 100% var(--clip), 100% calc(100% - var(--clip)), calc(100% - var(--clip)) 100%, var(--clip) 100%, 0 calc(100% - var(--clip)), 0 var(--clip)); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-darkest); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-dim); }

/* ---------- 选中文字 ---------- */
::selection { background: var(--teal); color: var(--bg-darkest); }

/* ---------- 背景网格纹理 ---------- */
.bg-grid::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 197, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 197, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   前台 - 兑换提货页面
   ============================================ */
.redeem-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-darkest);
}
.redeem-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 15% 10%, rgba(0,229,197,0.08), transparent 60%),
    radial-gradient(ellipse 500px 400px at 85% 90%, rgba(124,58,237,0.06), transparent 60%);
  pointer-events: none;
}
.redeem-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 197, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 197, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.redeem-header {
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
  background: rgba(10, 17, 24, 0.6);
}
.redeem-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.redeem-logo .logo-mark {
  width: 40px; height: 40px;
  background: var(--grad-tr);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--bg-darkest);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
  box-shadow: 0 0 20px var(--teal-glow);
}
.redeem-logo .logo-text span { color: var(--teal); }

.redeem-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.redeem-card {
  width: 100%;
  max-width: 560px;
  background: rgba(22, 35, 47, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  padding: 44px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.redeem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-tr);
  box-shadow: 0 0 20px var(--teal-glow);
}
.redeem-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 28px; height: 28px;
  background: var(--grad-tr);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.6;
}

.redeem-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.redeem-card .subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* 兑换模式切换 */
.mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  position: relative;
}
.mode-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  transition: all var(--t);
  border-right: 1px solid var(--border);
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}
.mode-tab:last-child { border-right: none; }
.mode-tab.active {
  background: var(--teal);
  color: var(--bg-darkest);
  font-weight: 700;
  box-shadow: 0 0 24px var(--teal-glow);
}
.mode-tab:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text);
}

/* 表单 */
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-display);
}
.form-label .required { color: var(--red); }
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--t);
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow), inset 0 0 20px rgba(0,229,197,0.03);
  background: rgba(0,229,197,0.02);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-dark); }

/* 产品信息展示 */
.product-info-box {
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  padding: 16px 20px;
  margin-bottom: 16px;
  transition: all var(--t);
}
.product-info-box:hover {
  border-left-color: var(--teal-bright);
  box-shadow: -4px 0 20px var(--teal-glow);
}
.product-info-box .pi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
  font-weight: 600;
}
.product-info-box .pi-value { font-size: 1.15rem; font-weight: 700; color: var(--teal); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all var(--t);
  white-space: nowrap;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  text-transform: uppercase;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: var(--teal);
  color: var(--bg-darkest);
}
.btn-primary:hover {
  background: var(--teal-bright);
  box-shadow: 0 0 28px var(--teal-glow), 0 4px 16px rgba(0,229,197,0.3);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover {
  background: #F87171;
  box-shadow: 0 0 28px rgba(239,68,68,0.25), 0 4px 16px rgba(239,68,68,0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0,229,197,0.05);
}

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled::after { display: none; }

/* 结果展示 */
.result-box {
  text-align: center;
  padding: 24px 0;
}
.result-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.result-icon.success { background: rgba(93,227,123,0.12); color: var(--green); box-shadow: 0 0 32px var(--green-glow); }
.result-icon.error   { background: rgba(239,68,68,0.12); color: var(--error); box-shadow: 0 0 32px rgba(239,68,68,0.25); }
.result-icon.pending { background: rgba(255,206,91,0.12); color: var(--gold); box-shadow: 0 0 32px var(--gold-glow); }
.result-box h2 { font-size: 1.5rem; margin-bottom: 10px; font-family: var(--font-display); }
.result-box p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.8; }

/* 公告 */
.announcement {
  background: linear-gradient(135deg, rgba(255,206,91,0.08), rgba(255,206,91,0.03));
  border: 1px solid rgba(255,206,91,0.2);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--gold);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-left: 3px solid var(--gold);
}
.announcement span:first-child { font-size: 1rem; flex-shrink: 0; }

.redeem-footer {
  padding: 20px 48px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

/* ============================================
   管理后台
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-darkest);
  position: relative;
}
.admin-layout::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 197, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 197, 0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* 侧边栏 */
.sidebar {
  width: 250px;
  background: rgba(17, 28, 38, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--t);
}
.sidebar-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-header img {
  height: 36px;
  width: auto;
  display: block;
}
.sidebar-header .logo-mark {
  width: 36px; height: 36px;
  background: var(--grad-tr);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bg-darkest);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
  box-shadow: 0 0 16px var(--teal-glow);
}
.sidebar-header .logo-text {
  font-family: 'Rajdhani', 'Orbitron', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar-header .logo-text span { color: var(--teal); font-weight: 700; }

/* API 状态指示器 */
.sidebar-api-status {
  margin: 0 20px;
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
  background: var(--bg-darkest);
  text-align: center;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.nav-group-label {
  padding: 18px 24px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--font-display);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover {
  background: rgba(0, 229, 197, 0.04);
  color: var(--text);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0,229,197,0.08), transparent);
  color: var(--teal);
  border-left-color: var(--teal);
  font-weight: 600;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal);
}
.nav-item .nav-icon {
  width: 22px;
  text-align: center;
  font-size: 1.05rem;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 8px;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
}
.sidebar-user .avatar {
  width: 38px; height: 38px;
  background: var(--grad-tr);
  color: var(--bg-darkest);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 600; }
.sidebar-user .user-role { font-size: 0.72rem; color: var(--text-muted); }
.btn-logout {
  width: 100%;
  padding: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all var(--t);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-logout:hover { border-color: var(--error); color: var(--error); background: rgba(239,68,68,0.05); }

/* 主内容区 */
.admin-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.admin-topbar {
  height: 64px;
  background: rgba(17, 28, 38, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.topbar-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 16px;
  border: 1px solid var(--border);
  transition: all var(--t);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.topbar-link:hover { border-color: var(--teal); color: var(--teal); background: rgba(0,229,197,0.05); }

.admin-content {
  flex: 1;
  padding: 28px 32px;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--t);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.stat-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--teal);
  box-shadow: 0 0 16px var(--teal);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--teal-glow), transparent 70%);
  opacity: 0.15;
}
.stat-card.red::before { background: var(--red); box-shadow: 0 0 16px var(--red); }
.stat-card.red::after { background: radial-gradient(circle, var(--red-glow), transparent 70%); }
.stat-card.gold::before { background: var(--gold); box-shadow: 0 0 16px var(--gold); }
.stat-card.gold::after { background: radial-gradient(circle, var(--gold-glow), transparent 70%); }
.stat-card.green::before { background: var(--green); box-shadow: 0 0 16px var(--green); }
.stat-card.green::after { background: radial-gradient(circle, var(--green-glow), transparent 70%); }

.stat-card .stat-icon {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 2.2rem;
  opacity: 0.12;
  z-index: 1;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-display);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-display);
  position: relative;
  z-index: 1;
}
.stat-card .stat-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

/* 面板 */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: border-color var(--t);
}
.panel:hover { border-color: var(--border-light); }
.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.panel-body { padding: 24px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  text-align: left;
  padding: 14px 16px;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-display);
  background: var(--bg-darkest);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  transition: background var(--t);
}
.data-table tbody tr { transition: all var(--t); }
.data-table tbody tr:hover td { background: rgba(0, 229, 197, 0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 状态标签 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: var(--font-display);
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-success { background: rgba(93,227,123,0.1); color: var(--green); border-color: rgba(93,227,123,0.2); }
.badge-success::before { background: var(--green); box-shadow: 0 0 6px var(--green); }
.badge-danger  { background: rgba(239,68,68,0.1); color: var(--error); border-color: rgba(239,68,68,0.2); }
.badge-danger::before { background: var(--error); box-shadow: 0 0 6px var(--error); }
.badge-warning { background: rgba(255,206,91,0.1); color: var(--gold); border-color: rgba(255,206,91,0.2); }
.badge-warning::before { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.badge-info    { background: rgba(0,229,197,0.1); color: var(--teal); border-color: rgba(0,229,197,0.2); }
.badge-info::before { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.badge-muted   { background: var(--bg-elevated); color: var(--text-muted); border-color: var(--border); }
.badge-muted::before { background: var(--text-muted); }

/* 操作按钮组 */
.row-actions { display: flex; gap: 6px; }
.row-actions .btn { padding: 5px 11px; font-size: 0.72rem; }

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}
.search-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }
.search-bar .form-label { margin-bottom: 6px; font-size: 0.7rem; }
.search-bar .form-input, .search-bar .form-select { padding: 10px 14px; font-size: 0.85rem; }

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  animation: modalIn 0.3s cubic-bezier(0.34, 1.36, 0.64, 1);
}
@keyframes modalIn { from { transform: scale(0.9) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-tr);
  box-shadow: 0 0 16px var(--teal-glow);
}
.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.modal-close {
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
  transition: all var(--t);
}
.modal-close:hover { color: var(--red); transform: rotate(90deg); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
}
.checkbox-item input { accent-color: var(--teal); width: 16px; height: 16px; cursor: pointer; }
.checkbox-item:has(input:checked) {
  border-color: var(--teal);
  background: rgba(0,229,197,0.06);
  color: var(--teal);
  box-shadow: 0 0 12px var(--teal-glow);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 32px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--teal);
  font-size: 0.88rem;
  min-width: 280px;
  animation: slideIn 0.3s cubic-bezier(0.34, 1.36, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--gold); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.2; }

/* CDK卡片展示 */
.cdk-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  transition: all var(--t);
}
.cdk-item:hover { border-color: var(--teal); background: rgba(0,229,197,0.03); }
.cdk-item .copy-btn {
  font-size: 0.75rem;
  color: var(--teal);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border);
  transition: all var(--t);
}
.cdk-item .copy-btn:hover { border-color: var(--teal); background: rgba(0,229,197,0.08); }

/* 分页 */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding-top: 20px;
}
.pagination .page-btn {
  padding: 7px 13px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all var(--t);
  font-family: var(--font-display);
  font-weight: 600;
}
.pagination .page-btn:hover, .pagination .page-btn.active {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0,229,197,0.08);
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-glow), transparent 65%);
  top: -200px; left: -100px;
  animation: floatBlob 8s ease-in-out infinite;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-glow), transparent 65%);
  bottom: -150px; right: -100px;
  animation: floatBlob 10s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(22, 35, 47, 0.9);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  padding: 48px 40px;
  position: relative;
  z-index: 1;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  box-shadow: var(--shadow-lg);
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-tr);
  box-shadow: 0 0 24px var(--teal-glow);
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo img {
  height: 64px;
  width: auto;
  margin: 0 auto 18px;
  display: block;
}
.login-logo .logo-mark {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: var(--grad-tr);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bg-darkest);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
  box-shadow: 0 0 28px var(--teal-glow);
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 28px var(--teal-glow); }
  50% { box-shadow: 0 0 44px var(--teal-glow); }
}
.login-logo h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.login-logo h1 span { color: var(--teal); }
.login-logo p { font-size: 0.85rem; color: var(--text-dim); margin-top: 8px; }

.login-hint {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 14px;
  background: var(--bg-darkest);
  border: 1px dashed var(--border);
  line-height: 1.8;
}
.login-hint code { color: var(--teal); font-family: var(--font-mono); font-weight: 600; }

/* 落地页 */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-darkest);
  position: relative;
  overflow: hidden;
}
.landing-page::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,197,0.08), transparent 60%);
  top: -300px; left: -200px;
  animation: floatBlob 12s ease-in-out infinite;
}
.landing-page::after {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.06), transparent 60%);
  bottom: -250px; right: -150px;
  animation: floatBlob 14s ease-in-out infinite reverse;
}
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}
.landing-hero .hero-mark {
  width: 88px; height: 88px;
  margin-bottom: 28px;
  background: var(--grad-tr);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--bg-darkest);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
  box-shadow: 0 0 40px var(--teal-glow);
  animation: logoPulse 4s ease-in-out infinite;
}
.landing-hero h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 14px;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.landing-hero h1 span {
  color: var(--teal);
  text-shadow: 0 0 30px var(--teal-glow);
}
.landing-hero .tagline {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 44px;
  font-weight: 500;
}
.landing-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.landing-actions .btn { min-width: 210px; padding: 18px 36px; }

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
  transition: all var(--t);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.feature-card:hover {
  border-color: var(--teal);
  transform: translateY(-4px);
  box-shadow: var(--shadow-teal);
}
.feature-card .feat-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: inline-block;
  transition: transform var(--t);
}
.feature-card:hover .feat-icon { transform: scale(1.15); }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.feature-card p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.7; }

/* 进度条 */
.progress-bar {
  height: 8px;
  background: var(--bg-darkest);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  position: relative;
}
.progress-bar .progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .redeem-card, .login-card { padding: 32px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 2rem; }
  .mobile-menu-btn { display: block !important; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 1.6rem; }
}

.mobile-menu-btn { display: none; font-size: 1.5rem; color: var(--text); }

/* 加载动画 */
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-right-color: var(--teal-dim);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
  box-shadow: 0 0 20px var(--teal-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 渐入动画 */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 渐入序列动画 */
.stagger-in > * { animation: fadeInUp 0.4s ease backwards; }
.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
