/* ============================================
   TenSine 云账户系统 - 现代化精致样式
   ============================================ */

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

:root {
  /* 主色调 - 蓝紫渐变 */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-dark: #4338ca;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --accent: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);

  /* 背景 */
  --bg: #f1f5f9;
  --bg-gradient: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 50%, #fdf4ff 100%);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --bg-input: #f8fafc;
  --bg-hover: #f1f5f9;

  /* 边框 */
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-light: rgba(226, 232, 240, 0.6);

  /* 状态色 */
  --success: #10b981;
  --success-light: #d1fae5;
  --success-dark: #059669;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-dark: #dc2626;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-dark: #d97706;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* 文字 */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   通用按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); box-shadow: var(--shadow-sm); }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(239,68,68,0.4); }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-success:hover { box-shadow: 0 4px 12px rgba(16,185,129,0.4); }

.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }

.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }

/* ============================================
   表单
   ============================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-textarea { resize: vertical; min-height: 80px; }

/* ============================================
   消息提示
   ============================================ */
.message {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
  animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  border: 1px solid transparent;
}
.message.show { display: block; }
.message.success { background: var(--success-light); color: #065f46; border-color: #6ee7b7; }
.message.error { background: var(--danger-light); color: #991b1b; border-color: #fca5a5; }
.message.info { background: var(--info-light); color: #1e40af; border-color: #93c5fd; }
.message.warning { background: var(--warning-light); color: #92400e; border-color: #fcd34d; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   标签
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.3px;
}
.tag.primary { background: var(--primary-light); color: var(--primary-dark); }
.tag.success { background: var(--success-light); color: var(--success-dark); }
.tag.danger { background: var(--danger-light); color: var(--danger-dark); }
.tag.warning { background: var(--warning-light); color: var(--warning-dark); }
.tag.muted { background: #f1f5f9; color: var(--text-muted); }
.tag.info { background: #cffafe; color: #0e7490; }
.tag.purple { background: #ede9fe; color: #6d28d9; }
.tag.pink { background: #fce7f3; color: #be185d; }

/* 账户类型标签 */
.type-normal { color: #64748b; font-weight: 600; }
.type-vip { color: #f59e0b; font-weight: 700; }
.type-svip { color: #8b5cf6; font-weight: 700; }
.type-ssvip { color: #ec4899; font-weight: 700; }
.type-admin { color: #3b82f6; font-weight: 700; }

/* ============================================
   开关
   ============================================ */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 26px; transition: 0.3s;
}
.switch-slider:before {
  position: absolute; content: ""; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--primary-gradient); }
.switch input:checked + .switch-slider:before { transform: translateX(22px); }

/* ============================================
   登录/注册页 - 玻璃拟态
   ============================================ */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}
/* 背景装饰圆球 */
.auth-container::before,
.auth-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 8s ease-in-out infinite;
}
.auth-container::before {
  width: 400px; height: 400px;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  top: -100px; left: -100px;
}
.auth-container::after {
  width: 350px; height: 350px;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
  animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--primary-gradient);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
  50% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5); }
}
.auth-logo .logo-icon svg { width: 32px; height: 32px; color: white; display: block; flex-shrink: 0; }
.logo-svg { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.btn-icon { width: 16px; height: 16px; flex-shrink: 0; display: block; }
.auth-title {
  font-size: 30px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1.5px;
  margin: 0 0 6px 0;
}
.auth-subtitle { color: var(--text-muted); font-size: 13px; margin: 0; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.update-notice { margin-bottom: 20px; }
.footer-text { margin: 0; font-size: 12px; color: var(--text-muted); }
.footer-version { margin: 6px 0 0 0; font-size: 11px; color: var(--text-muted); opacity: 0.7; }

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 5px;
  margin-bottom: 28px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 11px;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  border: none;
  background: transparent;
}
.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================
   用户中心
   ============================================ */
.dashboard {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.dashboard-header h1 {
  font-size: 26px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dashboard-header .user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--primary-gradient);
  opacity: 0.05;
  border-radius: 50%;
  transform: translate(20px, -20px);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.stat-card:hover::after { opacity: 0.1; transform: translate(10px, -10px) scale(1.2); }
.stat-card .stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.stat-card .stat-icon svg { width: 22px; height: 22px; }
.stat-card .stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-card .stat-value.accent { color: var(--primary); }
.stat-card .stat-value.success { color: var(--success); }
.stat-card .stat-value.danger { color: var(--danger); }
.stat-card .stat-value.warning { color: var(--warning); }
.stat-card .stat-trend {
  font-size: 11.5px;
  margin-top: 6px;
  color: var(--text-muted);
}

/* 面板 */
.panel {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.panel:hover { box-shadow: var(--shadow-sm); }
.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.panel-title svg { width: 19px; height: 19px; color: var(--primary); }

.recharge-form { display: flex; gap: 12px; flex-wrap: wrap; }
.recharge-form .form-input {
  flex: 1;
  min-width: 200px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* ============================================
   管理后台布局
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}
.admin-sidebar {
  width: 240px;
  background: var(--bg-card-solid);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.admin-sidebar .logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.admin-sidebar .logo h2 {
  font-size: 19px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}
.admin-sidebar .logo p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.admin-nav { list-style: none; flex: 1; padding: 0 12px; }
.admin-nav li { margin-bottom: 3px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}
.admin-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.admin-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.admin-nav a.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary-gradient);
  border-radius: 0 3px 3px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.admin-sidebar .sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 30px;
  min-width: 0;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-header h1 {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-primary);
}
.admin-header p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ============================================
   数据表格
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card-solid);
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.table-container::-webkit-scrollbar { height: 8px; }
.table-container::-webkit-scrollbar-track { background: var(--bg); }
.table-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 13px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .username { font-weight: 600; color: var(--text-primary); }
.data-table .mono {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.user-cell { display: flex; flex-direction: column; gap: 2px; }
.user-cell .username { font-weight: 600; color: var(--text-primary); font-size: 13px; }

.action-btns { display: flex; gap: 5px; }
.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  padding: 0;
}
.icon-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.icon-btn.danger:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.icon-btn.success:hover { background: var(--success-light); border-color: var(--success); color: var(--success-dark); }

/* ============================================
   工具栏
   ============================================ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar .search-box {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 480px;
  flex-wrap: wrap;
}
.toolbar .search-box input { flex: 1; min-width: 160px; }
.toolbar .search-box select { width: auto; min-width: 120px; }
.toolbar .toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================
   分页
   ============================================ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
}
.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.pagination button.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card-solid);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  width: 34px; height: 34px;
  border: none;
  background: var(--bg-hover);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.modal-close:hover { background: var(--danger); color: white; transform: rotate(90deg); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================
   卡密输出
   ============================================ */
.cards-output {
  margin-top: 18px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.card-code {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 14px;
  margin-bottom: 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--primary-dark);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: all;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-code:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(4px);
}
.card-code .card-info { font-size: 11px; color: var(--text-muted); font-family: inherit; }

/* ============================================
   付费模式横幅
   ============================================ */
.paid-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.paid-banner .paid-info { display: flex; align-items: center; gap: 16px; }
.paid-banner .paid-info .icon {
  width: 48px; height: 48px;
  background: rgba(217, 119, 6, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paid-banner .paid-info .icon svg { width: 26px; height: 26px; color: #b45309; }
.paid-banner .paid-info .text h4 { font-size: 15px; font-weight: 700; color: #92400e; margin-bottom: 3px; }
.paid-banner .paid-info .text p { font-size: 12.5px; color: #b45309; }

/* ============================================
   API项目卡片
   ============================================ */
.api-project-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.api-project-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.api-project-card .project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.api-project-card .project-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
}
.api-project-card .project-version { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.api-project-card .project-creds {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0;
}
.api-project-card .project-creds .cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.api-project-card .project-creds .cred-row:last-child { border-bottom: none; }
.api-project-card .project-creds .cred-label { font-size: 12px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.api-project-card .project-creds .cred-value {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary-dark);
  user-select: all;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.api-project-card .project-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ============================================
   空状态
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* ============================================
   加载动画
   ============================================ */
.loading {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   分类标签
   ============================================ */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}
.category-tag .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 分类卡片 */
.category-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-card .cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-card .cat-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-card .cat-color {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.category-card .cat-count {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}
.category-card .cat-count-label { font-size: 12px; color: var(--text-muted); }
.category-card .cat-actions { display: flex; gap: 6px; margin-top: auto; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* ============================================
   版本更新卡片
   ============================================ */
.version-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.version-card.latest {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.version-card.latest::before {
  content: '最新版本';
  position: absolute;
  top: 16px; right: -32px;
  background: var(--primary-gradient);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(45deg);
  letter-spacing: 1px;
}
.version-card .ver-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.version-card .ver-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}
.version-card .ver-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.version-card .ver-changelog {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.version-card .ver-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================
   倒计时进度条
   ============================================ */
.progress-bar-container {
  height: 10px;
  background: var(--bg-input);
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 5px;
  transition: width 1s linear;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .admin-sidebar { width: 68px; padding: 16px 0; }
  .admin-sidebar .logo { padding: 0 14px 16px; }
  .admin-sidebar .logo h2, .admin-sidebar .logo p, .admin-nav a span { display: none; }
  .admin-nav { padding: 0 10px; }
  .admin-nav a { justify-content: center; padding: 12px; }
  .admin-nav a.active::before { left: -10px; }
  .admin-main { margin-left: 68px; padding: 20px; }
  .sidebar-footer { padding: 12px; }
  .sidebar-footer .btn span { display: none; }
}

@media (max-width: 640px) {
  .auth-card { padding: 32px 24px; }
  .dashboard { padding: 20px 14px 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 20px; }
  .panel { padding: 18px; }
  .recharge-form { flex-direction: column; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .search-box { max-width: 100%; }
  .paid-banner { flex-direction: column; align-items: flex-start; }
  .admin-header h1 { font-size: 19px; }
  .categories-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 12px; }
  .data-table thead th, .data-table tbody td { padding: 10px 12px; }
}

/* ============================================
   滚动条全局美化
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* 选中文本 */
::selection { background: rgba(99, 102, 241, 0.2); color: var(--text-primary); }

/* ============================================
   登录令牌 & 自动登录 组件样式
   ============================================ */

/* 令牌显示框 */
.token-box {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f1f5f9;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  user-select: all;
  position: relative;
  overflow: hidden;
}
.token-box::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 待确认申请卡片 */
.pending-request-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  animation: pulse-warning 2s ease-in-out infinite;
}
@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* 设备卡片 */
.device-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: var(--transition);
}
.device-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.device-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.device-card-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .token-box {
    font-size: 18px;
    padding: 12px 20px;
    letter-spacing: 2px;
  }
}

/* ============================================
   页面切换 & 入场动画系统
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmerBg {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 页面内容入场 */
.page {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.page > * {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.page > *:nth-child(1) { animation-delay: 0.05s; }
.page > *:nth-child(2) { animation-delay: 0.1s; }
.page > *:nth-child(3) { animation-delay: 0.15s; }
.page > *:nth-child(4) { animation-delay: 0.2s; }
.page > *:nth-child(5) { animation-delay: 0.25s; }
.page > *:nth-child(6) { animation-delay: 0.3s; }

/* 统计卡片逐个入场 */
.stats-grid .stat-card {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.3s; }
.stats-grid .stat-card:nth-child(7) { animation-delay: 0.35s; }

/* 面板入场 */
.panel {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* 表格行入场 */
.data-table tbody tr {
  animation: fadeIn 0.3s ease both;
}

/* 登录表单切换动画 */
.auth-form-enter {
  animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏导航项 */
.admin-nav li {
  animation: slideInLeft 0.3s ease both;
}
.admin-nav li:nth-child(1) { animation-delay: 0.05s; }
.admin-nav li:nth-child(2) { animation-delay: 0.08s; }
.admin-nav li:nth-child(3) { animation-delay: 0.11s; }
.admin-nav li:nth-child(4) { animation-delay: 0.14s; }
.admin-nav li:nth-child(5) { animation-delay: 0.17s; }
.admin-nav li:nth-child(6) { animation-delay: 0.2s; }
.admin-nav li:nth-child(7) { animation-delay: 0.23s; }
.admin-nav li:nth-child(8) { animation-delay: 0.26s; }
.admin-nav li:nth-child(9) { animation-delay: 0.29s; }

/* ============================================
   导出 & 工具按钮
   ============================================ */
.btn-export {
  background: linear-gradient(135deg, #10b981, #059669);
}
.btn-export:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.btn-copy {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* ============================================
   手机端响应式布局（核心）
   ============================================ */
@media (max-width: 768px) {
  /* ===== 后台管理布局 ===== */
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 64px;
    padding: 0;
    z-index: 200;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  .admin-sidebar.open {
    max-height: 100vh;
    overflow-y: auto;
  }
  .admin-sidebar .logo {
    padding: 12px 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .admin-sidebar .logo h2 {
    font-size: 16px;
  }
  .admin-sidebar .logo p {
    display: none;
  }
  /* 手机端菜单按钮 */
  .mobile-menu-btn {
    display: flex !important;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
  }
  .admin-nav {
    padding: 8px 12px;
  }
  .admin-nav a {
    padding: 12px 14px;
    font-size: 14px;
  }
  .admin-nav a.active::before {
    display: none;
  }
  .admin-sidebar .sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
  }
  .admin-main {
    margin-left: 0;
    margin-top: 64px;
    padding: 16px 14px 40px;
  }

  /* ===== 表格卡片化 ===== */
  .table-container {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .data-table thead {
    display: none !important;
  }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block !important;
    width: 100% !important;
  }
  .data-table tr {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius) !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    box-shadow: var(--shadow-xs) !important;
  }
  .data-table tbody tr:hover {
    background: var(--bg-card-solid) !important;
    border-color: var(--primary) !important;
  }
  .data-table tbody td {
    padding: 6px 0 !important;
    border-bottom: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13px !important;
  }
  .data-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }
  .data-table .action-btns {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
  }
  .data-table .mono {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* ===== 头部 ===== */
  .admin-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .admin-header h1 {
    font-size: 20px;
  }
  .admin-header > div {
    width: 100%;
  }

  /* ===== 工具栏 ===== */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .toolbar .search-box {
    max-width: 100% !important;
    flex-direction: column !important;
  }
  .toolbar .search-box input,
  .toolbar .search-box select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .toolbar .toolbar-actions {
    width: 100% !important;
    display: flex !important;
    gap: 8px;
  }
  .toolbar .toolbar-actions .btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  /* ===== 付费横幅 & 各种 flex 头部 ===== */
  .paid-banner,
  .project-header,
  .ver-header,
  .cat-header,
  .modal-header,
  .user-cell,
  .card-code-cell {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .paid-banner {
    padding: 16px 18px !important;
  }
  .paid-banner-info {
    flex-direction: row !important;
    align-items: center !important;
  }

  /* ===== 统计卡片 ===== */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .stat-card {
    padding: 16px 14px !important;
  }
  .stat-card .stat-value {
    font-size: 20px !important;
  }
  .stat-card-icon,
  .stat-card .stat-icon {
    width: 38px !important;
    height: 38px !important;
    margin-bottom: 10px !important;
  }
  .stat-card-icon svg,
  .stat-card .stat-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* ===== 面板 ===== */
  .panel {
    padding: 18px 16px !important;
    border-radius: var(--radius) !important;
  }
  .panel-title {
    font-size: 15px !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }

  /* ===== 模态框 ===== */
  .modal {
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: var(--radius-lg) !important;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-footer {
    padding: 14px 18px;
  }

  /* ===== 分页 ===== */
  .pagination {
    gap: 4px;
  }
  .pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  /* ===== 付费横幅 ===== */
  .paid-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  /* ===== 分类网格 ===== */
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ===== 版本卡片 ===== */
  .version-card {
    padding: 18px 16px;
  }
  .version-card .ver-number {
    font-size: 17px;
  }
}

/* ============================================
   小屏手机（<480px）
   ============================================ */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .auth-logo h1 {
    font-size: 26px;
  }
  .auth-logo .logo-icon {
    width: 54px;
    height: 54px;
  }
  .dashboard {
    padding: 16px 12px 40px;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .dashboard-header h1 {
    font-size: 22px;
  }
  .dashboard-header .user-info {
    width: 100%;
    justify-content: space-between;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat-card {
    padding: 14px 12px;
  }
  .stat-card .stat-value {
    font-size: 18px;
  }
  .stat-card .stat-label {
    font-size: 11px;
  }
  .recharge-form {
    flex-direction: column;
  }
  .recharge-form .btn {
    width: 100%;
  }
  .btn-lg {
    padding: 12px 24px;
    font-size: 15px;
  }
  .form-group {
    margin-bottom: 16px;
  }
  .form-input, .form-select, .form-textarea {
    padding: 10px 14px;
    font-size: 14px;
  }
  .token-box {
    font-size: 16px;
    padding: 10px 16px;
    letter-spacing: 1.5px;
    width: 100%;
    text-align: center;
  }
  .version-card.latest::before {
    top: 12px;
    right: -36px;
    padding: 3px 40px;
    font-size: 10px;
  }
  .api-project-card .project-creds .cred-value {
    max-width: 55%;
    font-size: 11px;
  }
}

/* ============================================
   横屏手机优化
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .auth-container {
    padding: 10px;
  }
  .auth-card {
    padding: 20px 24px;
    max-width: 480px;
  }
  .auth-logo {
    margin-bottom: 16px;
  }
  .auth-logo .logo-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
  }
  .auth-logo h1 {
    font-size: 22px;
  }
  .form-group {
    margin-bottom: 12px;
  }
}

/* ============================================
   减少动画（无障碍）
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   通用工具类（替代内联样式）
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-white { color: #fff; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.overflow-hidden { overflow: hidden; }
.text-ellipsis { text-overflow: ellipsis; }
.whitespace-nowrap { white-space: nowrap; }
.leading-relaxed { line-height: 1.8; }
.opacity-70 { opacity: 0.7; }

/* dashboard 专用 */
.dashboard-header-title {
  font-size: 26px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.dashboard-header-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}
.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dashboard-username {
  font-weight: 700;
  font-size: 15px;
}
.panel-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.8;
}
.recharge-input {
  flex: 1;
  min-width: 200px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}
.token-display-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.token-progress-wrap {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}
.token-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 3px;
  transition: width 1s linear;
  width: 100%;
}
.countdown-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.countdown-progress-col {
  flex: 1;
  min-width: 220px;
}
.countdown-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}
.countdown-big-wrap {
  text-align: center;
}
.countdown-big {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
}
.countdown-small {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.guide-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-arrow {
  margin-left: auto;
  transition: transform 0.3s;
  width: 16px;
  height: 16px;
}
.guide-content {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 2.2;
  display: none;
}
.guide-content p {
  margin: 0 0 4px 0;
}
.panel-title-with-tag {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pending-list-item, .device-list-item {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* admin 专用 */
.admin-header-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.admin-header-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 3px 0 0 0;
}
.admin-time-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 7px 14px;
  border-radius: 20px;
  font-weight: 500;
}
.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.sidebar-logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
  display: block;
}
.sidebar-logo-text h2 {
  margin: 0;
  font-size: 17px;
}
.sidebar-logo-text p {
  margin: 2px 0 0;
  font-size: 10px;
}
.stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.stat-card-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.paid-banner-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.paid-banner-icon {
  width: 48px;
  height: 48px;
  background: rgba(217, 119, 6, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.paid-banner-icon svg {
  width: 26px;
  height: 26px;
  color: #b45309;
  display: block;
}
.paid-banner-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 3px 0;
}
.paid-banner-text p {
  font-size: 12.5px;
  color: #b45309;
  margin: 0;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-row h4 {
  font-size: 14px;
  margin: 0 0 3px 0;
}
.setting-row p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.setting-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.color-picker-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}
.color-dot.active {
  border: 3px solid currentColor;
  box-shadow: 0 0 0 2px white;
}
.modal-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-action-form {
  margin-top: 14px;
}
.user-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-cell-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}
.user-cell-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-code-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-code-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.online-hwid-cell {
  font-size: 11px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-ip-cell, .log-hwid-cell, .log-reason-cell {
  font-size: 11px;
}
.log-hwid-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-table-cell {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.version-card-download {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.version-card-download a {
  color: var(--primary);
  word-break: break-all;
}
.project-card-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.project-card-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.project-creds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.project-creds-row:last-child {
  border-bottom: none;
}
.project-creds-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.project-creds-value {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary-dark);
  user-select: all;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-card-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-card-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.category-card-count {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}
.category-card-count-label {
  font-size: 12px;
  color: var(--text-muted);
}
.category-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.signature-info {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 2.2;
}
.signature-info p {
  margin: 0;
}
.signature-info strong {
  color: var(--text-primary);
}
.online-refresh-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.online-refresh-hint .loading {
  width: 12px;
  height: 12px;
}
