/* =============================================
   融创集团项管考培系统 - 深色高级轻奢视觉
   深邃午夜蓝 + 香槟金 + 玻璃质感
   ============================================= */

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

/* =============================================
   CSS VARIABLES - 中度暖金高级配色系统 (平衡商务)
   ============================================= */
:root {
  /* 品牌主色 - 沉静海军蓝 */
  --primary-blue: #3B5BC9;
  --primary-blue-light: #5C7CE0;
  --primary-blue-dark: #2A4299;
  --primary-blue-glow: rgba(91, 124, 224, 0.35);
  --primary-blue-soft: rgba(91, 124, 224, 0.14);

  /* 暖金主调 - 主点缀色 */
  --gold: #D4B47A;
  --gold-light: #E8CC92;
  --gold-bright: #F5DEB0;
  --gold-dark: #9E7E45;
  --gold-glow: rgba(212, 180, 122, 0.35);
  --gold-soft: rgba(212, 180, 122, 0.12);

  /* 中度背景体系 - 暖意商务 */
  --bg-base: #2A3958;
  --bg-base-2: #314668;
  --bg-surface: #3A527B;
  --bg-card: #465B7E;
  --bg-card-2: #506589;
  --bg-card-hover: #5A6F93;
  --bg-elevated: #5A6F93;
  --bg-input: #3A527B;
  --bg-modal: rgba(42, 57, 88, 0.94);
  --bg-glass: rgba(70, 91, 126, 0.55);
  --bg-glass-2: rgba(58, 82, 123, 0.7);

  /* 边框系统 - 金线点缀 */
  --border-subtle: rgba(212, 180, 122, 0.12);
  --border-light: rgba(212, 180, 122, 0.22);
  --border-medium: rgba(212, 180, 122, 0.35);
  --border-gold: rgba(212, 180, 122, 0.5);
  --border-gold-strong: rgba(212, 180, 122, 0.7);
  --border-blue: rgba(91, 124, 224, 0.4);
  --border-dark: rgba(255, 255, 255, 0.08);

  /* 文字层级 - 暖白 (降低对比，不刺眼) */
  --text-primary: #FAF4E5;
  --text-primary-strong: #FFFCF0;
  --text-secondary: #D1D9E8;
  --text-tertiary: #9FA9C0;
  --text-muted: #7A8298;
  --text-gold: #D4B47A;
  --text-gold-bright: #E8CC92;

  /* 状态色 - 暗色模式适配 */
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, 0.15);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, 0.15);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --info: #60A5FA;
  --info-soft: rgba(96, 165, 250, 0.15);

  /* 间距系统 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;

  /* 阴影 - 中度商务 (柔和高光，不沉重) */
  --shadow-xs: 0 1px 2px rgba(20, 30, 60, 0.2);
  --shadow-sm: 0 2px 8px rgba(20, 30, 60, 0.22), 0 1px 2px rgba(20, 30, 60, 0.12);
  --shadow-md: 0 4px 16px rgba(20, 30, 60, 0.28), 0 2px 4px rgba(20, 30, 60, 0.15);
  --shadow-lg: 0 12px 36px rgba(20, 30, 60, 0.32), 0 4px 10px rgba(20, 30, 60, 0.18);
  --shadow-xl: 0 20px 50px rgba(20, 30, 60, 0.4);
  --shadow-gold: 0 4px 20px rgba(212, 180, 122, 0.32);
  --shadow-gold-soft: 0 2px 10px rgba(212, 180, 122, 0.18);
  --shadow-blue: 0 4px 20px rgba(91, 124, 224, 0.32);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* 字体 */
  --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: var(--font-main);
  background:
    radial-gradient(ellipse 1200px 600px at 20% 0%, rgba(91, 124, 224, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 1000px 500px at 80% 100%, rgba(212, 180, 122, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #2A3958 0%, #314668 50%, #2A3958 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 180, 122, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 180, 122, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(42, 57, 88, 0.4); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(212, 180, 122, 0.5), rgba(212, 180, 122, 0.3));
  border-radius: 10px;
  border: 1px solid rgba(212, 180, 122, 0.15);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(212, 180, 122, 0.7), rgba(212, 180, 122, 0.45)); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-gold { color: var(--gold); }
.text-primary-blue { color: var(--primary-blue); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* =============================================
   LAYOUT
   ============================================= */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 - 深色高级 */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: linear-gradient(180deg, #2A3958 0%, #314668 100%);
  border-right: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(212, 180, 122, 0.1);
  transition: transform var(--transition-normal);
}

.sidebar::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
}

.sidebar-brand {
  padding: 28px 20px;
  border-bottom: 1px solid var(--border-gold);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(212, 180, 122, 0.06) 0%, transparent 100%);
  position: relative;
}

.sidebar-brand .logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #C9A96E 0%, #8B7142 50%, #C9A96E 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 20px rgba(212, 180, 122, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(212, 180, 122, 0.6);
  position: relative;
}

.sidebar-brand .logo-icon svg { width: 26px; height: 26px; fill: #0A1628; filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.2)); }

.sidebar-brand h1 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary-strong);
  line-height: 1.3;
  letter-spacing: 0.5px;
  font-family: var(--font-serif);
}

.sidebar-brand .subtitle {
  font-size: 0.6rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.9;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  background: transparent;
}

.nav-section { margin-bottom: 6px; }

.nav-section-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 20px 4px;
  opacity: 0.7;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  margin: 2px 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(212, 180, 122, 0.08);
  color: var(--text-primary-strong);
  border-color: var(--border-gold);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(212, 180, 122, 0.18) 0%, rgba(212, 180, 122, 0.06) 100%);
  color: var(--gold-bright);
  border-color: var(--border-gold-strong);
  font-weight: 600;
  box-shadow: inset 0 0 12px rgba(212, 180, 122, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dark));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--gold-glow);
}

.nav-item svg, .nav-item .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.7;
  stroke: currentColor;
}

.nav-item.active svg, .nav-item.active .icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(212, 180, 122, 0.4);
}

.nav-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-gold);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(212, 180, 122, 0.06);
  border: 1px solid var(--border-gold);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-user:hover { background: rgba(212, 180, 122, 0.12); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #0A1628;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212, 180, 122, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* 顶部栏 */
.topbar {
  height: 60px;
  background: rgba(58, 82, 123, 0.85);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary-strong);
  letter-spacing: 0.5px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.topbar-breadcrumb span { color: var(--text-secondary); }
.topbar-breadcrumb .current { color: var(--gold-bright); font-weight: 500; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-date {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  background: rgba(212, 180, 122, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
}

/* 页面内容 */
.page-content {
  flex: 1;
  padding: 24px;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* =============================================
   LOGIN PAGE - 深色高端品牌
   ============================================= */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 800px 500px at 15% 20%, rgba(91, 124, 224, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 700px 400px at 85% 80%, rgba(212, 180, 122, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, #314668 0%, #3A527B 40%, #465B7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(59, 91, 201, 0.15), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(212, 180, 122, 0.1), transparent);
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 180, 122, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 180, 122, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

/* 装饰圆 - 金色光晕 */
.login-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 180, 122, 0.12) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  pointer-events: none;
  filter: blur(20px);
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 91, 201, 0.18) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  filter: blur(20px);
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 52px 44px;
  background: linear-gradient(180deg, rgba(70, 91, 126, 0.85) 0%, rgba(58, 82, 123, 0.95) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-2xl);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 180, 122, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.6;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #F0D89A 0%, #C9A96E 50%, #8B7142 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow:
    0 12px 32px rgba(212, 180, 122, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 180, 122, 0.5);
  position: relative;
}

.login-logo-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--gold) 0%, transparent 50%, var(--gold) 100%);
  opacity: 0.3;
  z-index: -1;
  filter: blur(8px);
}

.login-logo-icon svg { width: 38px; height: 38px; fill: #0A1628; filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.2)); }

.login-logo h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary-strong);
  margin-bottom: 8px;
  letter-spacing: 1px;
  font-family: var(--font-serif);
}

.login-logo .slogan {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* =============================================
   CARDS - 深色玻璃质感
   ============================================= */
.card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-gold) 50%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(212, 180, 122, 0.1);
  transform: translateY(-1px);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(212, 180, 122, 0.04) 0%, transparent 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.card-title .icon { color: var(--gold); }

.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* 统计卡片 - 深色玻璃 */
.stat-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue-light) 0%, var(--gold) 100%);
  opacity: 0.6;
  transition: opacity var(--transition-normal);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 180, 122, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 24px rgba(212, 180, 122, 0.1);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.2rem;
  border: 1px solid;
}

.stat-card .stat-icon.blue {
  background: linear-gradient(135deg, rgba(59, 91, 201, 0.2) 0%, rgba(59, 91, 201, 0.08) 100%);
  color: #93B5FF;
  border-color: rgba(59, 91, 201, 0.4);
}

.stat-card .stat-icon.gold {
  background: linear-gradient(135deg, rgba(212, 180, 122, 0.25) 0%, rgba(212, 180, 122, 0.08) 100%);
  color: var(--gold-bright);
  border-color: var(--border-gold);
}

.stat-card .stat-icon.green {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2) 0%, rgba(52, 211, 153, 0.08) 100%);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.4);
}

.stat-card .stat-icon.orange {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.08) 100%);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.4);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-change {
  font-size: 0.68rem;
  margin-top: 5px;
  font-weight: 600;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  outline: none;
  line-height: 1;
  letter-spacing: 0.2px;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* 主按钮 - 香槟金（高端主调） */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1A1A1A;
  border-color: rgba(212, 180, 122, 0.5);
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  box-shadow: 0 8px 28px rgba(212, 180, 122, 0.45);
  transform: translateY(-1px);
  color: #0A1628;
}

/* 金色按钮（保留一致） */
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1A1A1A;
  border-color: rgba(212, 180, 122, 0.5);
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  box-shadow: 0 8px 28px rgba(212, 180, 122, 0.45);
  transform: translateY(-1px);
}

/* 次要按钮 - 深色玻璃 */
.btn-secondary {
  background: rgba(70, 91, 126, 0.6);
  color: var(--text-secondary);
  border-color: rgba(212, 180, 122, 0.15);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(90, 111, 147, 0.8);
  color: var(--text-primary-strong);
  border-color: rgba(212, 180, 122, 0.35);
}

/* 边框按钮 */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(212, 180, 122, 0.25);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(212, 180, 122, 0.08);
  color: var(--gold-bright);
  border-color: rgba(212, 180, 122, 0.5);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
}

.btn-outline-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.55);
}

/* 幽灵按钮 */
.btn-ghost {
  background: transparent;
  color: var(--text-tertiary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(212, 180, 122, 0.06);
  color: var(--gold-bright);
}

/* 尺寸 */
.btn-sm { padding: 6px 12px; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 26px; font-size: 0.9rem; border-radius: var(--radius-md); }
.btn-xl { padding: 14px 34px; font-size: 0.95rem; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

/* 图标按钮 */
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-md); }
.btn-icon.sm { width: 30px; height: 30px; }

/* 加载状态 */
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .required { color: var(--gold-bright); margin-left: 2px; }

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-family: var(--font-main);
  font-size: 0.875rem;
  color: var(--text-primary-strong);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 180, 122, 0.18);
  background: var(--bg-card-2);
}

.form-input.error { border-color: var(--danger); }
.form-input.success { border-color: var(--success); }

.form-textarea { resize: vertical; min-height: 90px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(201,169,110,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option { background: var(--bg-card); color: var(--text-primary-strong); }
.form-hint { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.68rem; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* 搜索框 */
.search-box { position: relative; }
.search-box .form-input { padding-left: 36px; }
.search-box .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* 复选框 & 单选框 */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-check input[type="checkbox"], .form-check input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(212, 180, 122, 0.35);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  position: relative;
}

.form-check input[type="radio"] { border-radius: 50%; }
.form-check input[type="checkbox"]:checked, .form-check input[type="radio"]:checked {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-color: var(--gold);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #0A1628;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.form-check input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  background: #0A1628;
  border-radius: 50%;
}

/* 开关 */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 180, 122, 0.2);
  border-radius: 11px;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #fff, #d8d8d8);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-color: var(--gold);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: linear-gradient(135deg, #0A1628, #1A2C57);
}

/* =============================================
   TABLES
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 180, 122, 0.15);
  background: rgba(58, 82, 123, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

table { width: 100%; border-collapse: collapse; font-size: 0.825rem; }

thead {
  background: linear-gradient(180deg, rgba(90, 111, 147, 0.85) 0%, rgba(70, 91, 126, 0.85) 100%);
  position: relative;
}

thead::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 180, 122, 0.4) 50%, transparent 100%);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(212, 180, 122, 0.2);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(212, 180, 122, 0.06);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover {
  background: rgba(212, 180, 122, 0.04);
}
tbody tr.selected {
  background: rgba(212, 180, 122, 0.08);
}

.table-checkbox { width: 15px; height: 15px; cursor: pointer; }
.table-actions { display: flex; align-items: center; gap: 3px; }

/* 状态标签 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge-blue {
  background: rgba(96, 165, 250, 0.12);
  color: #93C5FD;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.badge-gold {
  background: rgba(212, 180, 122, 0.15);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 180, 122, 0.35);
}

.badge-green {
  background: rgba(52, 211, 153, 0.12);
  color: #6EE7B7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-gray {
  background: rgba(126, 139, 166, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(126, 139, 166, 0.25);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.12);
  color: #FCD34D;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.12);
  color: #FCA5A5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-dot::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 22, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal {
  background: linear-gradient(180deg, rgba(26, 44, 87, 0.96) 0%, rgba(58, 82, 123, 0.96) 100%);
  border: 1px solid rgba(212, 180, 122, 0.25);
  border-radius: var(--radius-xl);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(212, 180, 122, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
  backdrop-filter: blur(20px);
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.7;
}

.modal-overlay.show .modal { transform: scale(1) translateY(0); }

.modal-sm { max-width: 420px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 940px; }
.modal-2xl { max-width: 1100px; }

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(212, 180, 122, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(90, 111, 147, 0.4) 0%, transparent 100%);
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.modal-title .icon { color: var(--gold); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.modal-close:hover {
  background: rgba(212, 180, 122, 0.1);
  color: var(--gold-bright);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(212, 180, 122, 0.15);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(58, 82, 123, 0.5) 100%);
}

/* =============================================
   TABS
   ============================================= */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(58, 82, 123, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 180, 122, 0.15);
  backdrop-filter: blur(8px);
}

.tab-item {
  flex: 1;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tab-item:hover {
  color: var(--text-secondary);
  background: rgba(212, 180, 122, 0.06);
}
.tab-item.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  box-shadow: 0 2px 12px rgba(212, 180, 122, 0.35);
  font-weight: 700;
}

/* 顶部大标签页 */
.tabs-lg {
  gap: 0;
  background: transparent;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(212, 180, 122, 0.18);
  border-radius: 0;
}

.tabs-lg .tab-item {
  padding: 11px 22px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 0.85rem;
}

.tabs-lg .tab-item:hover {
  background: transparent;
  color: var(--gold-bright);
}

.tabs-lg .tab-item.active {
  background: transparent;
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
  box-shadow: none;
}

/* =============================================
   题库管理 - 双题库左右布局卡片
   ============================================= */
.qb-dual-card-row {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: stretch;
}
.qb-dual-card {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.85) 0%, rgba(58, 82, 123, 0.85) 100%);
  border: 1.5px solid rgba(212, 180, 122, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.qb-dual-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: all 0.25s ease;
}
.qb-dual-card.regular::before { background: linear-gradient(180deg, #60A5FA, #3B82F6); }
.qb-dual-card.training::before { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); }
.qb-dual-card:hover {
  border-color: rgba(212, 180, 122, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 180, 122, 0.1);
  transform: translateY(-1px);
}
.qb-dual-card.active.regular {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(135deg, rgba(90, 111, 147, 0.9) 0%, rgba(58, 82, 123, 0.95) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(96, 165, 250, 0.2);
}
.qb-dual-card.active.training {
  border-color: rgba(212, 180, 122, 0.55);
  background: linear-gradient(135deg, rgba(40, 52, 90, 0.9) 0%, rgba(26, 30, 56, 0.95) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 180, 122, 0.25);
}
.qb-dual-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qb-dual-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.qb-dual-card.regular .qb-dual-card-icon {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(59, 130, 246, 0.15));
  color: #93C5FD;
  border: 1px solid rgba(96, 165, 250, 0.25);
}
.qb-dual-card.training .qb-dual-card-icon {
  background: linear-gradient(135deg, rgba(212, 180, 122, 0.25), rgba(139, 113, 66, 0.15));
  color: var(--gold-bright);
  border: 1px solid rgba(212, 180, 122, 0.3);
}
.qb-dual-card-title {
  flex: 1;
  min-width: 0;
}
.qb-dual-card-title-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary-strong);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.qb-dual-card-title-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qb-dual-card-status {
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.qb-dual-card.regular.active .qb-dual-card-status {
  background: linear-gradient(135deg, #60A5FA, #3B82F6);
  color: #fff;
}
.qb-dual-card.training.active .qb-dual-card-status {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
}
.qb-dual-card:not(.active) .qb-dual-card-status {
  background: rgba(212, 180, 122, 0.08);
  color: var(--text-tertiary);
  border: 1px solid rgba(212, 180, 122, 0.15);
}
.qb-dual-card-stats {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(212, 180, 122, 0.15);
}
.qb-dual-card-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.qb-dual-card.regular .qb-dual-card-stat-num { color: #93C5FD; }
.qb-dual-card.training .qb-dual-card-stat-num { color: var(--gold-bright); }
.qb-dual-card-stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
.qb-dual-card-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.qb-dual-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qb-dual-card-action-hint {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.qb-dual-card.active .qb-dual-card-action-hint {
  color: var(--gold-bright);
  font-weight: 500;
}
.qb-dual-card-hint-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.qb-dual-card.active .qb-dual-card-hint-arrow {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .qb-dual-card-row {
    flex-direction: column;
  }
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; align-items: center; gap: 3px; }

.pagination-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  background: rgba(58, 82, 123, 0.6);
  border: 1px solid rgba(212, 180, 122, 0.18);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(212, 180, 122, 0.1);
  color: var(--gold-bright);
  border-color: rgba(212, 180, 122, 0.4);
}

.pagination-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(212, 180, 122, 0.3);
  font-weight: 700;
}

.pagination-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination-info { font-size: 0.72rem; color: var(--text-tertiary); padding: 0 10px; }

/* =============================================
   PROGRESS & UPLOAD
   ============================================= */
.progress-bar {
  height: 5px;
  background: rgba(58, 82, 123, 0.6);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(212, 180, 122, 0.12);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-bright));
  border-radius: 3px;
  transition: width var(--transition-normal);
  box-shadow: 0 0 10px rgba(212, 180, 122, 0.4);
}

.progress-fill.success { background: linear-gradient(90deg, var(--success), #059669); }

/* =============================================
   AI 多阶段出题流水线
   ============================================= */
.ai-pipeline {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.7) 0%, rgba(58, 82, 123, 0.85) 100%);
  border: 1px solid rgba(212, 180, 122, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 12px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.ai-pipeline::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.5;
}
.ai-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(212, 180, 122, 0.2);
}
.ai-pipeline-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-pipeline-title .ai-badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.ai-pipeline-meta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-pipeline-meta .elapsed-timer {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-weight: 700;
  color: var(--gold-bright);
}

.ai-stage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-stage {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(58, 82, 123, 0.4);
  transition: all 0.3s ease;
  border: 1px solid rgba(212, 180, 122, 0.08);
}
.ai-stage.active {
  background: linear-gradient(90deg, rgba(212, 180, 122, 0.12), rgba(212, 180, 122, 0.04));
  border-color: rgba(212, 180, 122, 0.5);
  box-shadow: 0 2px 12px rgba(212, 180, 122, 0.18);
}
.ai-stage.done {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.02));
  border-color: rgba(52, 211, 153, 0.3);
}
.ai-stage-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(212, 180, 122, 0.1);
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.ai-stage.active .ai-stage-icon {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  animation: aiPulse 1.4s ease-in-out infinite;
}
.ai-stage.done .ai-stage-icon {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
}
@keyframes aiPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 180, 122, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(212, 180, 122, 0); }
}
.ai-stage-content {
  flex: 1;
  min-width: 0;
}
.ai-stage-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.ai-stage.done .ai-stage-name { color: #6EE7B7; }
.ai-stage.active .ai-stage-name { color: var(--gold-bright); }
.ai-stage-desc {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}
.ai-stage.active .ai-stage-desc {
  color: var(--text-secondary);
  font-weight: 500;
}
.ai-stage-tag {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(212, 180, 122, 0.08);
  color: var(--text-tertiary);
  font-weight: 500;
  margin-left: 4px;
}
.ai-stage.active .ai-stage-tag {
  background: rgba(212, 180, 122, 0.2);
  color: var(--gold-bright);
}

.ai-pipeline-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 180, 122, 0.2);
}
.ai-pipeline-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  min-height: 18px;
}
.ai-pipeline-status .pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: dotPulse 1s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(212, 180, 122, 0.5);
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 文件上传区 */
.upload-zone {
  border: 2px dashed rgba(212, 180, 122, 0.3);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: rgba(58, 82, 123, 0.5);
  position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(212, 180, 122, 0.08);
  box-shadow: 0 0 0 4px rgba(212, 180, 122, 0.08);
}

.upload-zone .upload-icon { font-size: 2.2rem; margin-bottom: 10px; color: var(--gold); }
.upload-zone .upload-title { font-size: 0.88rem; font-weight: 600; color: var(--text-primary-strong); margin-bottom: 4px; }
.upload-zone .upload-desc { font-size: 0.72rem; color: var(--text-tertiary); }
.upload-zone .upload-formats { font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; }

/* =============================================
   ENTRY CARDS (首页双入口)
   ============================================= */
.entry-card {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.85) 0%, rgba(58, 82, 123, 0.85) 100%);
  border: 1px solid rgba(212, 180, 122, 0.18);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.entry-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 180, 122, 0.25);
  border-color: rgba(212, 180, 122, 0.4);
}

.entry-card:hover::after { opacity: 1; }

.entry-card.card-1:hover::before {
  background: radial-gradient(ellipse at top, rgba(96, 165, 250, 0.1), transparent 70%);
  opacity: 1;
}

.entry-card.card-2:hover::before {
  background: radial-gradient(ellipse at top, rgba(212, 180, 122, 0.12), transparent 70%);
  opacity: 1;
}

.entry-card .entry-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
  position: relative;
}

.entry-card.card-1 .entry-icon {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(59, 130, 246, 0.08));
  color: #93C5FD;
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.15);
}

.entry-card.card-2 .entry-icon {
  background: linear-gradient(135deg, rgba(212, 180, 122, 0.25), rgba(139, 113, 66, 0.1));
  color: var(--gold-bright);
  border: 1px solid rgba(212, 180, 122, 0.35);
  box-shadow: 0 0 24px rgba(212, 180, 122, 0.18);
}

.entry-card h3 { font-size: 1.1rem; margin-bottom: 7px; color: var(--text-primary-strong); font-weight: 700; }
.entry-card p { font-size: 0.78rem; color: var(--text-tertiary); line-height: 1.5; }

/* =============================================
   EXAM PAGE
   ============================================= */
.exam-timer {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.85) 0%, rgba(58, 82, 123, 0.85) 100%);
  border: 1px solid rgba(212, 180, 122, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.timer-display {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(212, 180, 122, 0.3);
}

.timer-display.warning { color: var(--warning); text-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
.timer-display.danger { color: var(--danger); animation: pulse 1s ease infinite; text-shadow: 0 0 12px rgba(248, 113, 113, 0.4); }

.question-card {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.7) 0%, rgba(58, 82, 123, 0.8) 100%);
  border: 1px solid rgba(212, 180, 122, 0.15);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  position: relative;
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.5;
  border-radius: 3px 0 0 3px;
}

.question-number {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary-strong);
  line-height: 1.7;
  margin-bottom: 18px;
}

.option-list { display: flex; flex-direction: column; gap: 9px; }

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(212, 180, 122, 0.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(58, 82, 123, 0.5);
}

.option-item:hover {
  border-color: rgba(212, 180, 122, 0.4);
  background: rgba(212, 180, 122, 0.06);
}

.option-item.selected {
  border-color: var(--gold);
  background: rgba(212, 180, 122, 0.1);
  box-shadow: 0 0 0 3px rgba(212, 180, 122, 0.1);
}

.option-item.correct { border-color: var(--success); background: rgba(52, 211, 153, 0.08); }
.option-item.wrong { border-color: var(--danger); background: rgba(248, 113, 113, 0.06); }

.option-label {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(58, 82, 123, 0.7);
  border: 1px solid rgba(212, 180, 122, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-item.selected .option-label {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-color: var(--gold);
  color: #0A1628;
}

.option-item.correct .option-label {
  background: linear-gradient(135deg, var(--success), #059669);
  border-color: var(--success);
  color: white;
}
.option-item.wrong .option-label {
  background: linear-gradient(135deg, var(--danger), #DC2626);
  border-color: var(--danger);
  color: white;
}

.option-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 2px;
  line-height: 1.5;
}

.option-item.selected .option-text { color: var(--text-primary-strong); }

/* =============================================
   FILTER BAR
   ============================================= */
.filter-bar {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.6) 0%, rgba(58, 82, 123, 0.7) 100%);
  border: 1px solid rgba(212, 180, 122, 0.15);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.filter-group { display: flex; flex-direction: column; gap: 3px; min-width: 130px; }
.filter-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-bar .form-input, .filter-bar .form-select { padding: 7px 11px; font-size: 0.78rem; }

/* =============================================
   TOAST & NOTIFICATIONS
   ============================================= */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(135deg, rgba(26, 44, 87, 0.96) 0%, rgba(58, 82, 123, 0.96) 100%);
  border: 1px solid rgba(212, 180, 122, 0.25);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  pointer-events: all;
  animation: slideInRight 0.3s ease;
  backdrop-filter: blur(20px);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: #6EE7B7; }
.toast.error .toast-icon { color: #FCA5A5; }
.toast.warning .toast-icon { color: #FCD34D; }
.toast.info .toast-icon { color: #93C5FD; }

.toast-message { flex: 1; font-size: 0.82rem; color: var(--text-primary-strong); font-weight: 500; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  transition: color var(--transition-fast);
  font-size: 0.9rem;
}
.toast-close:hover { color: var(--gold-bright); }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state { text-align: center; padding: 50px 24px; }
.empty-icon { font-size: 2.8rem; margin-bottom: 14px; opacity: 0.35; color: var(--gold); }
.empty-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.empty-desc { font-size: 0.78rem; color: var(--text-tertiary); }

/* =============================================
   CONFIRM DIALOG
   ============================================= */
.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.4rem;
}

.confirm-icon.danger { background: rgba(248, 113, 113, 0.15); color: #FCA5A5; border: 1px solid rgba(248, 113, 113, 0.3); }
.confirm-icon.warning { background: rgba(251, 191, 36, 0.15); color: #FCD34D; border: 1px solid rgba(251, 191, 36, 0.3); }
.confirm-icon.info { background: rgba(96, 165, 250, 0.15); color: #93C5FD; border: 1px solid rgba(96, 165, 250, 0.3); }

.confirm-text { text-align: center; margin-bottom: 8px; }
.confirm-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary-strong); margin-bottom: 7px; }
.confirm-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* =============================================
   AUDIT LOG
   ============================================= */
.audit-entry {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(212, 180, 122, 0.08);
}

.audit-entry:last-child { border-bottom: none; }
.audit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 6px rgba(212, 180, 122, 0.4);
}
.audit-content { flex: 1; }
.audit-text { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 2px; }
.audit-meta { font-size: 0.68rem; color: var(--text-tertiary); }

/* =============================================
   STEPS
   ============================================= */
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; flex: 1; }
.step:last-child { flex: 0; }

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(58, 82, 123, 0.7);
  border: 1px solid rgba(212, 180, 122, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.step.active .step-number {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-color: var(--gold);
  color: #0A1628;
  box-shadow: 0 0 0 4px rgba(212, 180, 122, 0.15);
}

.step.completed .step-number {
  background: linear-gradient(135deg, var(--success), #059669);
  border-color: var(--success);
  color: white;
}
.step-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-left: 8px;
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.step.active .step-label { color: var(--gold-bright); font-weight: 600; }
.step.completed .step-label { color: #6EE7B7; }
.step-line { flex: 1; height: 1px; background: rgba(212, 180, 122, 0.15); margin: 0 10px; }
.step.completed + .step .step-line, .step.completed .step-line {
  background: linear-gradient(90deg, var(--success), var(--gold));
}

/* =============================================
   TAGS
   ============================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(212, 180, 122, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(212, 180, 122, 0.2);
}

.tag-remove { cursor: pointer; opacity: 0.5; transition: opacity var(--transition-fast); }
.tag-remove:hover { opacity: 1; color: var(--gold-bright); }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease; }

/* =============================================
   UTILITIES
   ============================================= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.text-lg { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.visible { display: flex !important; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.opacity-50 { opacity: 0.5; }
.opacity-30 { opacity: 0.3; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 180, 122, 0.25), transparent);
  margin: 14px 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; }
  .filter-group { width: 100%; }
}

@media (max-width: 640px) {
  html { font-size: 13px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-content { padding: 14px; }
  .card-body { padding: 14px; }
  .modal { margin: 10px; }
  .login-card { margin: 14px; padding: 28px 22px; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  body { background: white; color: black; }
  .sidebar, .topbar, .btn, .filter-bar { display: none; }
  .main-content { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* =============================================
   ★ AI 出题内核 v2 · 5 阶段流水线样式
   ============================================= */

/* 紧凑流水线(题库上传区) */
.ai-pipeline {
  background: linear-gradient(135deg, rgba(70, 91, 126, 0.7) 0%, rgba(58, 82, 123, 0.85) 100%);
  border: 1px solid rgba(212, 180, 122, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
}
.ai-pipeline-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ai-pipeline-icon { font-size: 1.05rem; color: var(--gold); }
.ai-pipeline-tag {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 8px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  border-radius: 4px;
  font-weight: 700;
}
.ai-pipeline-stages {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 6px;
}
.ai-stage {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(58, 82, 123, 0.6);
  border: 1px solid rgba(212, 180, 122, 0.15);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ai-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(212, 180, 122, 0.15), rgba(245, 215, 154, 0.1));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ai-stage.active {
  border-color: rgba(212, 180, 122, 0.6);
  color: var(--gold-bright);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(212, 180, 122, 0.18);
  background: rgba(212, 180, 122, 0.08);
}
.ai-stage.active::before { opacity: 1; }
.ai-stage.done {
  border-color: rgba(52, 211, 153, 0.5);
  color: #6EE7B7;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08) 0%, rgba(52, 211, 153, 0.02) 100%);
}
.ai-stage.error {
  border-color: rgba(248, 113, 113, 0.5);
  color: #FCA5A5;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(248, 113, 113, 0.02) 100%);
}
.ai-stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(212, 180, 122, 0.12);
  color: var(--text-tertiary);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}
.ai-stage.active .ai-stage-num {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1628;
  animation: aiPulse 1.2s ease-in-out infinite;
}
.ai-stage.done .ai-stage-num {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
}
.ai-stage.error .ai-stage-num {
  background: linear-gradient(135deg, var(--danger), #DC2626);
  color: #fff;
}
.ai-stage-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}
.ai-stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 180, 122, 0.3);
  z-index: 1;
}
.ai-stage.active .ai-stage-dot {
  background: var(--gold);
  animation: aiDotPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(212, 180, 122, 0.6);
}
.ai-stage.done .ai-stage-dot { background: var(--success); }
.ai-stage.error .ai-stage-dot { background: var(--danger); }

@keyframes aiPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 180, 122, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 4px rgba(212, 180, 122, 0); }
}
@keyframes aiDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* 统计区 */
.ai-pipeline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  padding: 8px 0 2px;
  border-top: 1px dashed rgba(212, 180, 122, 0.2);
  margin-top: 6px;
}
.ai-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
.ai-stat-row strong {
  color: var(--text-primary-strong);
  font-weight: 700;
  font-family: 'SF Mono', Consolas, monospace;
}
.ai-stat-row:has(strong#qbAIPassRate) strong,
.ai-stat-row:has(strong#tfAIPassRate) strong {
  color: var(--gold-bright);
  font-size: 0.85rem;
}

/* 模态框内错误状态(在原有 ai-stage 基础上) */
.ai-stage.error {
  border-color: rgba(248, 113, 113, 0.6) !important;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1) 0%, rgba(248, 113, 113, 0.03) 100%) !important;
}
.ai-stage.error .ai-stage-icon {
  background: linear-gradient(135deg, var(--danger), #DC2626) !important;
  color: #fff !important;
}

.progress-fill.error {
  background: linear-gradient(90deg, var(--danger), #F87171) !important;
}



/* ============================================
   缺考人员穿透 + 补考窗口 + 工作台提醒
   ============================================ */

/* 可点击的统计卡片 */
.stat-card-clickable {
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.stat-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.18);
}
.stat-card-clickable:active {
  transform: translateY(0);
}
.stat-card-clickable::after {
  content: '点击查看 →';
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.65rem;
  color: var(--primary-red);
  font-weight: 700;
  opacity: 0.55;
  letter-spacing: 0.5px;
}
.stat-card-clickable:hover::after {
  opacity: 1;
}

/* 进行中任务横幅 */
.ongoing-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(251, 191, 36, 0.12) 100%);
  border: 1.5px solid rgba(220, 38, 38, 0.3);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  animation: ongoingPulse 2.4s ease-in-out infinite;
}
.ongoing-banner::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-red), var(--gold));
}
.ongoing-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  animation: ringBell 1.5s ease-in-out infinite;
  transform-origin: top center;
}
.ongoing-banner-body {
  flex: 1;
  min-width: 0;
}
.ongoing-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-red);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ongoing-banner-title .badge {
  font-size: 0.65rem;
}
.ongoing-banner-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.ongoing-banner-desc strong {
  color: var(--primary-red);
  font-weight: 700;
}
.ongoing-banner-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.ongoing-banner-close:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text-primary);
}

@keyframes ongoingPulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(220, 38, 38, 0.12); }
  50% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.28); }
}
@keyframes ringBell {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
}

/* 倒计时 */
.countdown-box {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
}
.countdown-box.urgent {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
  animation: urgentBlink 1.2s ease-in-out infinite;
}
.countdown-box.expired {
  background: rgba(120, 120, 120, 0.1);
  color: var(--text-muted);
}
.countdown-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 38px;
  padding: 2px 4px;
}
.countdown-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-red);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown-box.expired .countdown-num {
  color: var(--text-muted);
}
.countdown-label {
  font-size: 0.58rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  letter-spacing: 0.5px;
}
.countdown-sep {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-red);
  align-self: center;
  margin-top: -8px;
  font-variant-numeric: tabular-nums;
}
.countdown-box.expired .countdown-sep {
  color: var(--text-muted);
}
.countdown-prefix {
  font-size: 0.7rem;
  color: var(--text-secondary);
  align-self: center;
  margin-right: 4px;
  font-weight: 600;
}
.countdown-suffix {
  font-size: 0.7rem;
  color: var(--text-secondary);
  align-self: center;
  margin-left: 4px;
  font-weight: 600;
}
@keyframes urgentBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 缺考人员列表 */
.absent-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.absent-stat {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 8px;
  text-align: center;
}
.absent-stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-red);
  line-height: 1;
}
.absent-stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-weight: 600;
}

.absent-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.absent-filter {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.absent-filter:hover {
  border-color: var(--primary-red);
}
.absent-filter.active {
  background: var(--primary-red);
  color: white;
}

.absent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light, #eee);
  transition: background 0.2s;
}
.absent-row:hover {
  background: var(--bg-elevated);
}
.absent-row:last-child {
  border-bottom: none;
}
.absent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--gold) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.absent-info {
  flex: 1;
  min-width: 0;
}
.absent-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.absent-meta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.absent-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.absent-actions .btn {
  padding: 4px 10px;
  font-size: 0.72rem;
}

.makeup-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success, #16a34a);
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
}
.makeup-badge.closed {
  background: rgba(120, 120, 120, 0.15);
  color: var(--text-muted);
}

.empty-mini {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}


/* ============================================
   培训测评关闭时间配置(集团管理员专用)
   ============================================ */

/* 入口卡片右上角设置按钮 */
.entry-card {
  position: relative;
}
.entry-card-setting {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(212, 180, 122, 0.3);
  color: var(--gold, #d4b47a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 5;
  padding: 0;
}
.entry-card-setting:hover {
  background: rgba(212, 180, 122, 0.25);
  border-color: var(--gold, #d4b47a);
  transform: rotate(90deg);
}
.entry-card-setting:active {
  transform: rotate(90deg) scale(0.95);
}

/* 配置项 Modal */
.deadline-config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
}
.deadline-config-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: all 0.2s;
}
.deadline-config-item:hover {
  border-color: var(--primary-red);
  background: rgba(220, 38, 38, 0.04);
}
.deadline-config-item.has-custom {
  border-color: var(--gold, #d4b47a);
  background: rgba(212, 180, 122, 0.08);
}
.deadline-info {
  flex: 1;
  min-width: 0;
}
.deadline-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.deadline-name .badge {
  font-size: 0.6rem;
  padding: 1px 6px;
}
.deadline-meta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.5;
}
.deadline-custom-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  background: linear-gradient(135deg, var(--gold, #d4b47a) 0%, #b8941f 100%);
  color: #1a1a1a;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.deadline-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.deadline-input-group input[type="date"],
.deadline-input-group input[type="time"] {
  padding: 5px 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  font-family: inherit;
}
.deadline-input-group input[type="date"] {
  min-width: 132px;
}
.deadline-input-group input[type="time"] {
  min-width: 90px;
}
.deadline-input-group .btn {
  padding: 5px 10px;
  font-size: 0.7rem;
  white-space: nowrap;
}
.deadline-tip {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding: 8px 10px;
  background: rgba(212, 180, 122, 0.08);
  border-left: 3px solid var(--gold, #d4b47a);
  border-radius: 4px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.deadline-tip strong {
  color: var(--primary-red);
}


/* ============================================
   入口卡片 - 作答操作按钮(第三轮升级)
   ============================================ */
.entry-action {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 180, 122, 0.18);
  position: relative;
  z-index: 2;
}
.entry-action .btn {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 9px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.entry-action .btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.entry-action .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-tertiary) !important;
  box-shadow: none !important;
}
.entry-card.card-1 .entry-action .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid rgba(96, 165, 250, 0.45);
}
.entry-card.card-1 .entry-action .btn-gold {
  background: linear-gradient(135deg, #d4b47a 0%, #b08a4a 100%);
  color: #1a1a1a;
  border: 1px solid rgba(212, 180, 122, 0.5);
}
.entry-card.card-1 .entry-action .btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary-strong);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.entry-card.card-2 .entry-action .btn-gold {
  background: linear-gradient(135deg, #d4b47a 0%, #b08a4a 100%);
  color: #1a1a1a;
  border: 1px solid rgba(212, 180, 122, 0.5);
}
.entry-card.card-2 .entry-action .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid rgba(96, 165, 250, 0.45);
}
