/* ============================================
   启慧知行 V3.0 - Global Styles
   Tailwind CSS v4 + Custom Design System
   ============================================ */

/* --- CSS Design Tokens --- */
:root {
  /* ===== Primary: 青蓝渐变 #00BCD4 → #1565C0 ===== */
  --primary-50: #e0f7fa;
  --primary-100: #b2ebf2;
  --primary-200: #80deea;
  --primary-300: #4dd0e1;
  --primary-400: #26c6da;
  --primary-500: #00bcd4;
  --primary-600: #00acc1;
  --primary-700: #0097a7;
  --primary-800: #00838f;
  --primary-900: #006064;

  /* ===== Gold: 金色强调 #FFD54F → #FFB300 ===== */
  --gold-50: #fff8e1;
  --gold-100: #ffecb3;
  --gold-200: #ffe082;
  --gold-300: #ffd54f;
  --gold-400: #ffca28;
  --gold-500: #ffc107;
  --gold-600: #ffb300;
  --gold-700: #ffa000;
  --gold-800: #ff8f00;
  --gold-900: #ff6f00;

  /* ===== Neutral Colors ===== */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #eeeeee;
  --neutral-300: #e0e0e0;
  --neutral-400: #bdbdbd;
  --neutral-500: #9e9e9e;
  --neutral-600: #757575;
  --neutral-700: #616161;
  --neutral-800: #424242;
  --neutral-900: #212121;

  /* ===== Surface Colors ===== */
  --surface-primary: #ffffff;
  --surface-secondary: #f0f7fa;
  --surface-tertiary: #e8f0fe;
  --surface-card: #ffffff;
  --surface-modal: rgba(0, 0, 0, 0.5);

  /* ===== Text Colors ===== */
  --text-primary: #263238;
  --text-secondary: #546e7a;
  --text-tertiary: #90a4ae;
  --text-disabled: #b0bec5;
  --text-inverse: #ffffff;
  --text-on-primary: #ffffff;
  --text-on-gold: #263238;

  /* ===== Semantic Colors ===== */
  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-error: #f44336;
  --color-info: #2196f3;
  --color-success-bg: #e8f5e9;
  --color-warning-bg: #fff3e0;
  --color-error-bg: #ffebee;
  --color-info-bg: #e3f2fd;

  /* ===== Shadow System ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  /* ===== Border Radius System ===== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ===== Spacing System (4px base) ===== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;

  /* ===== Font System ===== */
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* ===== Font Size ===== */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  /* ===== Z-Index System ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* ===== Transition ===== */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ===== Dark Mode Variables ===== */
.dark {
  --surface-primary: #1a1a2e;
  --surface-secondary: #16213e;
  --surface-tertiary: #0f3460;
  --surface-card: #1a1a2e;
  --surface-modal: rgba(0, 0, 0, 0.7);

  --text-primary: #e0e0e0;
  --text-secondary: #b0bec5;
  --text-tertiary: #78909c;
  --text-disabled: #546e7a;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

/* ============================================
   Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--surface-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ============================================
   Glass Morphism Effects
   ============================================ */
.qhzx-glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.qhzx-glass-strong {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .qhzx-glass {
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .qhzx-glass-strong {
  background: rgba(26, 26, 46, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================
   Gradient Utilities
   ============================================ */
.qhzx-gradient-primary {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
}

.qhzx-gradient-hero {
  background: linear-gradient(135deg, #00BCD4 0%, #1565C0 50%, #0d47a1 100%);
}

.qhzx-gradient-gold {
  background: linear-gradient(135deg, #FFD54F, #FFB300);
}

.qhzx-gradient-text {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Gold Glow Effect
   ============================================ */
.qhzx-glow-gold {
  box-shadow: 0 0 20px rgba(255, 213, 79, 0.3),
              0 0 40px rgba(255, 213, 79, 0.15),
              0 0 60px rgba(255, 213, 79, 0.08);
}

.qhzx-glow-gold-text {
  text-shadow: 0 0 20px rgba(255, 213, 79, 0.4),
               0 0 40px rgba(255, 213, 79, 0.2);
}

/* ============================================
   Hide Scrollbar
   ============================================ */
.qhzx-scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.qhzx-scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ============================================
   Button Base Styles
   ============================================ */
.qhzx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.qhzx-btn:active {
  transform: scale(0.97);
}

.qhzx-btn-primary {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.qhzx-btn-primary:hover {
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.qhzx-btn-primary:active {
  box-shadow: var(--shadow-xs);
}

.qhzx-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.qhzx-btn-gold {
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.qhzx-btn-gold:hover {
  box-shadow: 0 0 20px rgba(255, 213, 79, 0.4);
}

.qhzx-btn-gold:active {
  box-shadow: var(--shadow-xs);
}

.qhzx-btn-outline {
  border: 1.5px solid var(--primary-500);
  color: var(--primary-600);
  background: transparent;
}

.qhzx-btn-outline:hover {
  background: var(--primary-50);
}

.qhzx-btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}

.qhzx-btn-ghost:hover {
  background: var(--neutral-100);
}

.qhzx-btn-danger {
  background: var(--color-error);
  color: var(--text-inverse);
}

.qhzx-btn-danger:hover {
  background: #d32f2f;
}

.qhzx-btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.qhzx-btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* ============================================
   Card Styles
   ============================================ */
.qhzx-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  transition: all var(--transition-base);
}

.qhzx-card:hover {
  box-shadow: var(--shadow-md);
}

.qhzx-card-flat {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

/* ============================================
   Input Styles
   ============================================ */
.qhzx-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}

.qhzx-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.qhzx-input::placeholder {
  color: var(--text-disabled);
}

.qhzx-input-error {
  border-color: var(--color-error);
}

.qhzx-input-error:focus {
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15);
}

/* ============================================
   Badge / Tag
   ============================================ */
.qhzx-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.qhzx-badge-primary {
  background: var(--primary-50);
  color: var(--primary-700);
}

.qhzx-badge-gold {
  background: var(--gold-50);
  color: var(--gold-800);
}

.qhzx-badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.qhzx-badge-error {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* ============================================
   Drawer / Modal
   ============================================ */
.qhzx-drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-modal);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.qhzx-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.qhzx-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: calc(var(--z-drawer) + 1);
  transform: translateY(100%);
  transition: transform var(--transition-base);
  max-height: 80vh;
  overflow-y: auto;
}

.qhzx-drawer.active {
  transform: translateY(0);
}

.qhzx-drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--neutral-300);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto;
}

.qhzx-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-modal);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

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

.qhzx-modal {
  background: var(--surface-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 360px;
  width: 100%;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.qhzx-modal-overlay.active .qhzx-modal {
  transform: scale(1);
}

/* ============================================
   Toast / Notification
   ============================================ */
.qhzx-toast-container {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  pointer-events: none;
}

.qhzx-toast {
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  animation: qhzx-toast-in 0.3s ease;
  pointer-events: auto;
  max-width: 320px;
  text-align: center;
}

.qhzx-toast-success {
  border-left: 3px solid var(--color-success);
}

.qhzx-toast-error {
  border-left: 3px solid var(--color-error);
}

.qhzx-toast-info {
  border-left: 3px solid var(--color-info);
}

@keyframes qhzx-toast-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes qhzx-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.qhzx-anim-fade-in {
  animation: fadeIn 0.3s ease;
}

.qhzx-anim-fade-in-up {
  animation: fadeInUp 0.4s ease;
}

.qhzx-anim-slide-in-left {
  animation: slideInLeft 0.3s ease;
}

.qhzx-anim-slide-in-right {
  animation: slideInRight 0.3s ease;
}

/* ============================================
   Page Transition
   ============================================ */
.page {
  display: none;
  animation: fadeInUp 0.35s ease;
}

.page.active {
  display: block;
}

/* ============================================
   Bottom Navigation
   ============================================ */
.qhzx-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-primary);
  border-top: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 43px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: var(--z-sticky);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.qhzx-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-1) var(--space-4);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.qhzx-bottom-nav-item.active {
  color: var(--primary-500);
}

.qhzx-bottom-nav-item .nav-icon {
  width: 19px;
  height: 19px;
  transition: all var(--transition-fast);
}

.qhzx-bottom-nav-item.active .nav-icon {
  transform: scale(1.1);
}

.qhzx-bottom-nav-item .nav-label {
  font-size: 9px;
  font-weight: 500;
}

/* ============================================
   Scrollable Content Area (with bottom nav padding)
   ============================================ */
.qhzx-content {
  padding-bottom: 60px;
  min-height: 100vh;
}

/* ============================================
   Loading Spinner
   ============================================ */
.qhzx-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.qhzx-spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 4px;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.qhzx-skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   Identity Selector
   ============================================ */
.qhzx-identity-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ============================================
   Notification Badge
   ============================================ */
.qhzx-notif-dot {
  position: absolute;
  top: 0;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--color-error);
  border-radius: 50%;
  border: 2px solid var(--surface-primary);
}

.qhzx-notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--color-error);
  border-radius: var(--radius-full);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface-primary);
}

/* ============================================
   Form Layout
   ============================================ */
.qhzx-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.qhzx-form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.qhzx-form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
}

/* ============================================
   List / Menu
   ============================================ */
.qhzx-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--surface-primary);
  border-bottom: 1px solid var(--neutral-100);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qhzx-list-item:hover {
  background: var(--neutral-50);
}

.qhzx-list-item:active {
  background: var(--neutral-100);
}

/* ============================================
   Calendar / Date Styles
   ============================================ */
.qhzx-cal-date {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qhzx-cal-date.today {
  background: var(--primary-500);
  color: white;
  font-weight: 600;
}

.qhzx-cal-date.has-course {
  font-weight: 600;
  color: var(--primary-700);
  position: relative;
}

.qhzx-cal-date.has-course::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: var(--primary-500);
  border-radius: 50%;
}

.qhzx-cal-date.today.has-course::after {
  background: white;
}

.qhzx-cal-date.other-month {
  color: var(--text-disabled);
}

/* ============================================
   Responsive Container
   ============================================ */
.qhzx-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ============================================
   Section Title
   ============================================ */
.qhzx-section-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-4) 0;
}

/* ============================================
   AI Assistant Tab - Satellite Animation
   ============================================ */
.qhzx-nav-center {
  position: relative;
}

.qhzx-nav-glow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(0, 188, 212, 0.25) 0%, rgba(0, 188, 212, 0.08) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(8px);
  animation: nav-glow-pulse 2.5s ease-in-out infinite;
}

@keyframes nav-glow-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.qhzx-ai-center {
  position: relative;
  width: 51px;
  height: 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -32px;
}

.qhzx-ai-logo {
  width: 51px;
  height: 51px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 188, 212, 0.4);
  position: relative;
  z-index: 2;
}

.qhzx-ai-satellite {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  box-shadow: 0 0 6px rgba(255, 213, 79, 0.5);
}

.qhzx-ai-satellite-inner {
  width: 7px;
  height: 7px;
  background: var(--primary-400);
  box-shadow: 0 0 4px rgba(0, 188, 212, 0.4);
}

.qhzx-ai-orbit-inner {
  position: absolute;
  width: 82px;
  height: 82px;
  top: -16px;
  left: -16px;
  animation: spin-orbit-inner 6s linear infinite;
}

.qhzx-ai-orbit-outer {
  position: absolute;
  width: 102px;
  height: 102px;
  top: -26px;
  left: -26px;
  animation: spin-orbit-outer 10s linear infinite reverse;
}

@keyframes spin-orbit-inner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-orbit-outer {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   Utility Classes
   ============================================ */
.qhzx-text-gradient {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qhzx-text-gold {
  color: var(--gold-500);
}

/* ============================================
   Glow Motto - 发光艺术字
   ============================================ */
.qhzx-glow-motto {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #00BCD4;
  text-shadow:
    0 0 10px rgba(0, 188, 212, 0.6),
    0 0 20px rgba(0, 188, 212, 0.4),
    0 0 40px rgba(0, 188, 212, 0.2),
    0 0 60px rgba(0, 188, 212, 0.1);
  animation: motto-glow 3s ease-in-out infinite;
}

@keyframes motto-glow {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(0, 188, 212, 0.6),
      0 0 20px rgba(0, 188, 212, 0.4),
      0 0 40px rgba(0, 188, 212, 0.2);
  }
  50% {
    text-shadow:
      0 0 15px rgba(0, 188, 212, 0.8),
      0 0 30px rgba(0, 188, 212, 0.6),
      0 0 50px rgba(0, 188, 212, 0.3),
      0 0 80px rgba(0, 188, 212, 0.15);
  }
}

.qhzx-divider {
  height: 1px;
  background: var(--neutral-200);
  margin: var(--space-4) 0;
}

.qhzx-safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.qhzx-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Page-specific: Welcome Page
   ============================================ */
.qhzx-welcome-bg {
  background: linear-gradient(180deg, #e3f2fd 0%, #f0f7fa 40%, #ffffff 100%);
  min-height: 100vh;
}

/* ============================================
   Page-specific: Today Info Card
   ============================================ */
.qhzx-today-info {
  background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.dark .qhzx-today-info {
  background: linear-gradient(135deg, #1b5e20, #0d47a1);
}

/* ============================================
   Page-specific: Course Card
   ============================================ */
.qhzx-course-item {
  border-left: 3px solid var(--primary-500);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  background: var(--surface-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.qhzx-course-item.gold {
  border-left-color: var(--gold-500);
}

/* ============================================
   Page-specific: Identity Checkbox List
   ============================================ */
.qhzx-identity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--surface-card);
  margin-bottom: 12px;
}

.qhzx-identity-item:hover {
  border-color: var(--primary-200);
}

.qhzx-identity-item.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.qhzx-identity-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.qhzx-identity-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--neutral-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  background: white;
}

.qhzx-identity-item.selected .qhzx-identity-checkbox {
  background: var(--primary-500);
  border-color: var(--primary-500);
}

.qhzx-identity-checkbox svg {
  width: 14px;
  height: 14px;
  color: white;
  display: none;
}

.qhzx-identity-item.selected .qhzx-identity-checkbox svg {
  display: block;
}

.qhzx-identity-item.disabled .qhzx-identity-checkbox {
  background: var(--neutral-100);
  border-color: var(--neutral-300);
}

.qhzx-identity-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.qhzx-identity-item.disabled .qhzx-identity-label {
  color: var(--text-tertiary);
}

.qhzx-identity-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.qhzx-identity-item.disabled .qhzx-identity-desc {
  color: var(--text-disabled);
}

/* ============================================
   Extra: Safe area & responsive
   ============================================ */
@media (max-width: 380px) {
  :root {
    --text-base: 14px;
  }
}

@media (min-width: 768px) {
  .qhzx-container {
    max-width: 480px;
  }
}

/* ============================================
   Image Placeholder for Logo
   ============================================ */
.qhzx-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.qhzx-logo-placeholder-sm {
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: var(--radius-md);
}

.qhzx-logo-placeholder-lg {
  width: 80px;
  height: 80px;
  font-size: 36px;
  border-radius: var(--radius-xl);
}

/* ============================================
   Profile Header
   ============================================ */
.qhzx-profile-header {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  padding: var(--space-8) var(--space-4) var(--space-6);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  color: white;
}

/* ============================================
   Menu Item with Arrow
   ============================================ */
.qhzx-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  background: var(--surface-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qhzx-menu-item:hover {
  background: var(--neutral-50);
}

.qhzx-menu-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.qhzx-menu-item-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.qhzx-menu-item-text {
  font-size: var(--text-base);
  color: var(--text-primary);
}

.qhzx-menu-item-arrow {
  color: var(--text-disabled);
  width: 16px;
  height: 16px;
}

/* ============================================
   Status Bar Placeholder
   ============================================ */
.qhzx-status-bar {
  height: 44px;
  background: transparent;
}

/* ============================================
   Module Drawer System
   ============================================ */
.qhzx-module-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.qhzx-module-overlay.active {
  opacity: 1;
  visibility: visible;
}

.qhzx-module-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  background: var(--surface-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  z-index: calc(var(--z-drawer) + 1);
  transition: transform 0.3s ease-out;
  overflow: hidden;
}

.qhzx-module-drawer.active {
  transform: translateX(-50%) translateY(0);
}

/* -- Header -- */
.qhzx-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--neutral-100);
  flex-shrink: 0;
}

.qhzx-module-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.qhzx-module-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--neutral-100);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  line-height: 1;
}

.qhzx-module-close:hover {
  background: var(--neutral-200);
}

/* -- Tabs -- */
.qhzx-module-tabs {
  display: flex;
  position: relative;
  border-bottom: 1px solid var(--neutral-100);
  flex-shrink: 0;
}

.qhzx-module-tab {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
  z-index: 1;
}

.qhzx-module-tab.active {
  color: var(--primary-500);
  font-weight: 600;
}

.qhzx-module-tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--primary-500);
  transition: left 0.2s ease, width 0.2s ease;
  border-radius: 1px;
}

/* -- Body -- */
.qhzx-module-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.qhzx-module-content {
  padding: 16px 20px 8px;
}

/* -- Footer -- */
.qhzx-module-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--neutral-100);
  flex-shrink: 0;
}

/* ============================================
   Form Components (inside module drawer)
   ============================================ */
.qhzx-form-group {
  margin-bottom: 16px;
}

.qhzx-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.qhzx-form-error {
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
}

/* -- Custom Select -- */
.qhzx-form-select {
  position: relative;
  cursor: pointer;
}

.qhzx-form-select-display {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  font-size: 14px;
  color: var(--text-primary);
  padding-right: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color var(--transition-fast);
}

.qhzx-form-select-display.placeholder {
  color: var(--text-disabled);
}

.qhzx-form-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.qhzx-form-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--surface-primary);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.qhzx-form-select-dropdown.open {
  display: block;
}

.qhzx-form-select-list {
  padding: 4px 0;
}

.qhzx-form-select-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qhzx-form-select-item:hover {
  background: var(--primary-50);
}

.qhzx-form-select-item.selected {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 500;
}

/* -- Multi Select -- */
.qhzx-form-multi-select {
  position: relative;
  width: 100%;
}

.qhzx-form-multi-select-display {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-primary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color var(--transition-fast);
}

.qhzx-form-multi-select-display.placeholder {
  color: var(--text-disabled);
}

.qhzx-form-multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--surface-primary);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.qhzx-form-multi-select-dropdown.open {
  display: block;
}

.qhzx-form-multi-select-list {
  padding: 4px 0;
}

.qhzx-form-multi-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qhzx-form-multi-select-item:hover {
  background: var(--primary-50);
}

.qhzx-form-multi-select-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-500);
  cursor: pointer;
}

/* -- Star Rating -- */
.qhzx-star-rating {
  display: flex;
  gap: 4px;
}

.qhzx-star {
  font-size: 28px;
  color: var(--neutral-300);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.qhzx-star:hover {
  transform: scale(1.15);
}

.qhzx-star.active {
  color: #FFB300;
}

/* -- Textarea -- */
.qhzx-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

/* -- Search Select -- */
.qhzx-form-search-select {
  position: relative;
}

.qhzx-form-search-select-input-wrap {
  position: relative;
}

.qhzx-form-search-select-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.qhzx-form-search-select-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.qhzx-form-search-select-input::placeholder {
  color: var(--text-disabled);
}

.qhzx-form-search-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.qhzx-form-search-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--surface-primary);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.qhzx-form-search-select-dropdown.open {
  display: block;
}

.qhzx-form-search-select-list {
  padding: 4px 0;
}

.qhzx-form-search-select-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qhzx-form-search-select-item:hover {
  background: var(--primary-50);
}

.qhzx-form-search-select-item.selected {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 500;
}

.qhzx-form-search-select-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

/* ============================================
   Course Check-in Module
   ============================================ */
/* -- Course Card (课程列表) -- */
.qhzx-checkin-course-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
}

.qhzx-checkin-course-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.qhzx-checkin-course-card:active {
  transform: scale(0.985);
  background: var(--primary-50);
}

.qhzx-checkin-course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.qhzx-checkin-course-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.qhzx-checkin-course-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: var(--primary-50);
  color: var(--primary-600);
  flex-shrink: 0;
  margin-left: 8px;
}

.qhzx-checkin-course-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.qhzx-checkin-course-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qhzx-checkin-course-meta svg {
  width: 14px;
  height: 14px;
}

/* -- Progress Bar -- */
.qhzx-checkin-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qhzx-checkin-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--neutral-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.qhzx-checkin-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00BCD4, #1565C0);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.qhzx-checkin-progress-fill.complete {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.qhzx-checkin-progress-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* -- Check-in Complete Badge -- */
.qhzx-checkin-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--color-success-bg);
  color: var(--color-success);
}

/* -- Back Button -- */
.qhzx-checkin-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--primary-500);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 12px;
  font-weight: 500;
  background: none;
  border: none;
  transition: opacity var(--transition-fast);
}

.qhzx-checkin-back:hover {
  opacity: 0.7;
}

.qhzx-checkin-back svg {
  width: 18px;
  height: 18px;
}

/* -- Course Info Header (detail view) -- */
.qhzx-checkin-course-info {
  background: linear-gradient(135deg, #e3f2fd, #e0f7fa);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.qhzx-checkin-course-info .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.qhzx-checkin-course-info .meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.qhzx-checkin-course-info .meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qhzx-checkin-course-info .meta svg {
  width: 14px;
  height: 14px;
}

/* -- Teacher Check-in Button -- */
.qhzx-checkin-teacher-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 16px;
}

.qhzx-checkin-teacher-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 188, 212, 0.35);
  position: relative;
}

.qhzx-checkin-teacher-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 188, 212, 0.45);
}

.qhzx-checkin-teacher-btn:active {
  transform: scale(0.96);
}

.qhzx-checkin-teacher-btn.checked {
  background: linear-gradient(135deg, var(--color-success), #2e7d32);
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.4);
}

.qhzx-checkin-teacher-btn-text {
  text-align: center;
  line-height: 1.3;
}

.qhzx-checkin-teacher-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* -- Student Grid (4 per row) -- */
.qhzx-checkin-student-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.qhzx-checkin-student-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-100);
  transition: all var(--transition-fast);
}

.qhzx-checkin-student-card:hover {
  border-color: var(--neutral-200);
}

.qhzx-checkin-student-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* -- Status Toggle Button (cycle: absent→leave→signed) -- */
.qhzx-checkin-toggle-btn {
  width: 100%;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  cursor: pointer;
  border: none;
  color: white;
  transition: all var(--transition-fast);
}

.qhzx-checkin-toggle-btn:active {
  transform: scale(0.95);
}

.qhzx-checkin-toggle-btn.absent {
  background: var(--color-error);
}

.qhzx-checkin-toggle-btn.leave {
  background: var(--color-warning);
}

.qhzx-checkin-toggle-btn.signed {
  background: var(--color-success);
}

/* -- Summary Bar (bottom of detail) -- */
.qhzx-checkin-summary {
  display: flex;
  justify-content: space-around;
  padding: 14px 0;
  margin-top: 16px;
  border-top: 1px solid var(--neutral-100);
}

.qhzx-checkin-summary-item {
  text-align: center;
}

.qhzx-checkin-summary-count {
  font-size: 22px;
  font-weight: 700;
}

.qhzx-checkin-summary-count.signed-color {
  color: var(--color-success);
}

.qhzx-checkin-summary-count.absent-color {
  color: var(--color-error);
}

.qhzx-checkin-summary-count.leave-color {
  color: var(--color-warning);
}

.qhzx-checkin-summary-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* -- Empty State -- */
.qhzx-checkin-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.qhzx-checkin-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.qhzx-checkin-empty p {
  font-size: 14px;
}

/* -- Loading State -- */
.qhzx-checkin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  gap: 10px;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ============================================
   AI Assistant Page (启明星)
   ============================================ */
.qhzx-ai-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--surface-secondary);
  overflow: hidden;
}

.qhzx-ai-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface-primary);
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-ai-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.qhzx-ai-weather {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--gold-50);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.qhzx-ai-history-divider {
  flex-shrink: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 8px 16px;
  background: var(--surface-secondary);
}

.qhzx-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

/* ---- AI Cards (晨报/晚报/预警/建议) ---- */
.qhzx-ai-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
}

.qhzx-ai-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.qhzx-ai-card-icon {
  font-size: 18px;
}

.qhzx-ai-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qhzx-ai-card-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.qhzx-ai-card-section {
  margin-bottom: 12px;
}

.qhzx-ai-card-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: 6px;
}

.qhzx-ai-card-item {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

.qhzx-ai-card-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 10px;
  text-align: right;
}

/* Morning card */
.qhzx-ai-card-morning {
  border-left: 3px solid var(--gold-400);
}

/* Evening card */
.qhzx-ai-card-evening {
  border-left: 3px solid var(--primary-500);
}

.qhzx-ai-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.qhzx-ai-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
}

.qhzx-ai-card-stat .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.qhzx-ai-card-stat .stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Alert card */
.qhzx-ai-card-alert {
  border-left: 3px solid var(--color-error);
  background: var(--color-error-bg);
}

.qhzx-ai-card-alert .qhzx-ai-card-title {
  color: var(--color-error);
}

.qhzx-ai-card-alert-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.qhzx-ai-card-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* Suggestion card */
.qhzx-ai-card-suggestion {
  border-left: 3px solid var(--color-info);
}

.qhzx-ai-card-suggestion.confirmed {
  border-left-color: var(--color-success);
  background: var(--color-success-bg);
}

.qhzx-ai-card-suggestion.ignored {
  opacity: 0.5;
}

.qhzx-ai-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.qhzx-ai-btn-confirm,
.qhzx-ai-btn-ignore {
  flex: 1;
  padding: 8px 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.qhzx-ai-btn-confirm {
  background: var(--color-success);
  color: white;
}

.qhzx-ai-btn-confirm:hover {
  opacity: 0.9;
}

.qhzx-ai-btn-ignore {
  background: var(--neutral-200);
  color: var(--text-secondary);
}

.qhzx-ai-btn-ignore:hover {
  background: var(--neutral-300);
}

.qhzx-ai-card-status {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 10px;
}

.qhzx-ai-card-status.confirmed {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.qhzx-ai-card-status.ignored {
  background: var(--neutral-100);
  color: var(--text-tertiary);
}

/* ---- Q&A Messages ---- */
.qhzx-ai-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.qhzx-ai-msg.user {
  flex-direction: row-reverse;
}

.qhzx-ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.qhzx-ai-msg.user .qhzx-ai-msg-avatar {
  background: var(--primary-100);
}

.qhzx-ai-msg-avatar.ai-avatar {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  overflow: hidden;
}

.qhzx-ai-msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  position: relative;
}

.qhzx-ai-msg.user .qhzx-ai-msg-bubble {
  background: var(--primary-100);
  border-top-right-radius: 4px;
}

.qhzx-ai-msg.ai .qhzx-ai-msg-bubble {
  background: var(--surface-primary);
  border: 1px solid var(--neutral-100);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}

.qhzx-ai-msg-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: 4px;
}

.qhzx-ai-msg-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-word;
}

.qhzx-ai-msg-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-align: right;
}

/* ---- Input Bar ---- */
.qhzx-ai-input-bar {
  flex-shrink: 0;
  padding: 10px 16px;
  background: var(--surface-primary);
  border-top: 1px solid var(--neutral-100);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}

.qhzx-ai-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qhzx-ai-input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-full);
  background: var(--surface-secondary);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.qhzx-ai-input:focus {
  border-color: var(--primary-500);
}

.qhzx-ai-input::placeholder {
  color: var(--text-disabled);
}

.qhzx-ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--neutral-300);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.qhzx-ai-send-btn:disabled {
  cursor: not-allowed;
}

.qhzx-ai-send-btn.active {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.qhzx-ai-send-btn.active:active {
  transform: scale(0.92);
}

.qhzx-ai-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   启明星 AI 对话页 v2 (v22)
   ============================================ */

/* 页面容器 */
.ai-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--surface-secondary);
  overflow: hidden;
}

/* 顶部栏 */
.ai-topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface-primary);
  border-bottom: 1px solid var(--neutral-100);
}

.ai-topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-search-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.ai-search-btn:hover {
  background: var(--neutral-100);
}

/* 夜间模式横幅 */
.ai-night-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--neutral-200);
  font-size: 12px;
  color: var(--text-tertiary);
}

.ai-night-icon {
  font-size: 14px;
}

/* 消息列表 */
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

/* 历史分割线 */
.ai-history-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 8px 0;
  margin-bottom: 4px;
}

/* 加载更多 */
.ai-load-more {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 8px 0;
}

/* ---- 推送卡片 ---- */
.ai-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.ai-card-icon {
  font-size: 18px;
}

.ai-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.ai-card-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.ai-card-section {
  margin-bottom: 12px;
}

.ai-card-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: 6px;
}

.ai-card-item {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

.ai-card-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 10px;
  text-align: right;
}

/* 已读状态 */
.ai-read-status {
  font-size: 12px;
  margin-left: auto;
}

.ai-read-undone {
  color: var(--neutral-400);
}

.ai-read-done {
  color: var(--primary-500);
}

/* 晨报/晚报/预警/建议卡片 */
.ai-card-morning {
  border-left: 3px solid var(--gold-400);
}

.ai-card-evening {
  border-left: 3px solid var(--primary-500);
}

.ai-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ai-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
}

.ai-card-stat .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.ai-card-stat .stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-card-alert {
  border-left: 3px solid var(--color-error);
  background: var(--color-error-bg);
}

.ai-card-alert .ai-card-title {
  color: var(--color-error);
}

.ai-card-alert-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ai-card-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.ai-card-suggestion {
  border-left: 3px solid var(--color-info);
}

.ai-card-suggestion.confirmed {
  border-left-color: var(--color-success);
  background: var(--color-success-bg);
}

.ai-card-suggestion.ignored {
  opacity: 0.5;
}

.ai-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.ai-btn-confirm,
.ai-btn-ignore {
  flex: 1;
  padding: 8px 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.ai-btn-confirm {
  background: var(--color-success);
  color: white;
}

.ai-btn-confirm:hover {
  opacity: 0.9;
}

.ai-btn-ignore {
  background: var(--neutral-200);
  color: var(--text-secondary);
}

.ai-btn-ignore:hover {
  background: var(--neutral-300);
}

.ai-card-status {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 10px;
}

.ai-card-status.confirmed {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.ai-card-status.ignored {
  background: var(--neutral-100);
  color: var(--text-tertiary);
}

/* 系统通知 */
.ai-card-system {
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  box-shadow: none;
}

.ai-card-system .ai-card-title {
  color: var(--text-tertiary);
}

.ai-card-system-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- AI回复卡片 ---- */
.ai-reply-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
}

.ai-reply-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

.ai-reply-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
}

.ai-reply-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ai-reply-student-name,
.ai-reply-course-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: 12px;
}

.ai-reply-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ai-reply-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.ai-reply-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
}

.ai-reply-info-item .info-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.ai-reply-info-item .info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 课程指标 */
.ai-reply-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.ai-reply-metric {
  text-align: center;
  padding: 8px 4px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
}

.ai-reply-metric .metric-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-600);
}

.ai-reply-metric .metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* 排课列表 */
.ai-reply-schedule-list {
  margin-bottom: 4px;
}

.ai-reply-schedule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
}

.ai-reply-schedule-item .schedule-time {
  font-weight: 600;
  color: var(--primary-600);
  white-space: nowrap;
}

.ai-reply-schedule-item .schedule-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.ai-reply-schedule-item .schedule-room {
  color: var(--text-secondary);
  white-space: nowrap;
}

.ai-reply-schedule-item .schedule-teacher {
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* 财务网格 */
.ai-reply-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.ai-finance-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-finance-item.revenue {
  background: #e8f5e9;
}

.ai-finance-item.expense {
  background: #fff3e0;
}

.ai-finance-item.profit {
  background: #e3f2fd;
}

.ai-finance-item.refund {
  background: #fce4ec;
}

.ai-finance-item .finance-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.ai-finance-item .finance-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-reply-yoy {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

/* 关注列表 */
.ai-reply-attention-list {
  margin-bottom: 8px;
}

.ai-reply-attention-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: var(--color-error-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-error);
  margin-bottom: 6px;
}

.ai-reply-attention-item .attention-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.ai-reply-attention-item .attention-summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-reply-attention-item .attention-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ai-reply-total {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: right;
}

/* 帮助卡 */
.ai-reply-card-help {
  background: linear-gradient(135deg, var(--primary-50, #e0f7fa), var(--surface-primary));
}

.ai-reply-help-intro {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.ai-reply-help-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-reply-help-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--neutral-100);
}

.ai-reply-help-item:hover {
  background: var(--primary-50, #e0f7fa);
  border-color: var(--primary-300);
}

.ai-reply-help-item .help-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-reply-help-item .help-example {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 卡片操作按钮 */
.ai-reply-action {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--primary-500);
  background: transparent;
  color: var(--primary-600);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.ai-reply-action:hover {
  background: var(--primary-50, #e0f7fa);
}

.ai-reply-action:active {
  transform: scale(0.98);
}

/* ---- 问答气泡 ---- */
.ai-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.ai-msg.user {
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.ai-msg.user .ai-msg-avatar {
  background: var(--primary-100);
}

.ai-msg-avatar.ai-avatar {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  overflow: hidden;
}

.ai-msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  position: relative;
}

.ai-msg.user .ai-msg-bubble {
  background: var(--primary-100);
  border-top-right-radius: 4px;
}

.ai-msg.ai .ai-msg-bubble {
  background: var(--surface-primary);
  border: 1px solid var(--neutral-100);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}

.ai-msg-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-600);
  margin-bottom: 4px;
}

.ai-msg-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-word;
}

.ai-msg-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-align: right;
}

/* 打字动画 */
.ai-typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.ai-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-400);
  animation: ai-typing-bounce 0.5s infinite alternate;
}

.ai-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-typing-bounce {
  from {
    opacity: 0.4;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(-6px);
  }
}

/* ---- 新消息按钮 ---- */
.ai-new-msg-btn {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-600);
  color: white;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 188, 212, 0.4);
  z-index: 10;
  animation: ai-btn-fade-in 0.3s ease;
  border: none;
}

@keyframes ai-btn-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---- 快捷提问栏 ---- */
.ai-quick-bar {
  flex-shrink: 0;
  padding: 8px 0;
  background: var(--surface-primary);
  border-top: 1px solid var(--neutral-100);
  overflow: hidden;
}

.ai-quick-scroll {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ai-quick-scroll::-webkit-scrollbar {
  display: none;
}

.ai-quick-tag {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--primary-50, #e0f7fa);
  color: var(--primary-600);
  font-size: 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--primary-100);
  transition: all var(--transition-fast);
}

.ai-quick-tag:hover {
  background: var(--primary-100);
}

.ai-quick-tag:active {
  transform: scale(0.95);
}

/* ---- 底部输入区 ---- */
.ai-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-primary);
  border-top: 1px solid var(--neutral-100);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}

.ai-voice-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--neutral-100);
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.ai-voice-btn:hover {
  background: var(--neutral-200);
}

.ai-voice-btn:active {
  transform: scale(0.92);
}

.ai-input {
  flex: 1;
  min-height: 40px;
  max-height: 96px;
  padding: 10px 14px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-full);
  background: var(--surface-secondary);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  overflow-y: auto;
}

.ai-input:focus {
  border-color: var(--primary-500);
}

.ai-input::placeholder {
  color: var(--text-disabled);
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--neutral-300);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.ai-send-btn:disabled {
  cursor: not-allowed;
}

.ai-send-btn.active {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.ai-send-btn.active:active {
  transform: scale(0.92);
}

/* ---- 空状态 ---- */
.ai-empty-state {
  text-align: center;
  padding: 40px 0 24px;
}

.ai-empty-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.2);
}

.ai-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ai-empty-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- Tab红点 ---- */
.ai-nav-badge {
  position: absolute;
  top: 0;
  right: 8px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--color-error);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  z-index: 10;
}

/* ============================================
   Step Indicator (考试模块)
   ============================================ */
.qhzx-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.qhzx-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral-200);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  z-index: 1;
  transition: all var(--transition-fast);
}

.qhzx-step.current .qhzx-step-dot {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.15);
}

.qhzx-step.done .qhzx-step-dot {
  background: var(--color-success);
  color: white;
}

.qhzx-step-label {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.qhzx-step.current .qhzx-step-label {
  color: var(--primary-500);
  font-weight: 500;
}

.qhzx-step.done .qhzx-step-label {
  color: var(--color-success);
}

.qhzx-step-line {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--neutral-200);
  z-index: 0;
  transition: background var(--transition-fast);
}

.qhzx-step-line.done {
  background: var(--color-success);
}

/* ============================================
   File Upload Zone
   ============================================ */
.qhzx-upload-zone {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--neutral-50);
  position: relative;
}

.qhzx-upload-zone:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.qhzx-upload-zone.has-file {
  border-style: solid;
  border-color: var(--color-success);
  background: var(--color-success-bg);
  padding: 14px 20px;
}

.qhzx-upload-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--primary-400);
  display: block;
}

.qhzx-upload-zone.has-file .qhzx-upload-zone-icon {
  display: none;
}

.qhzx-upload-zone-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.qhzx-upload-zone.has-file .qhzx-upload-zone-text {
  margin-bottom: 0;
}

.qhzx-upload-zone-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.qhzx-upload-zone.has-file .qhzx-upload-zone-hint {
  display: none;
}

.qhzx-upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.qhzx-upload-preview-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--color-success);
}

.qhzx-upload-preview-info {
  flex: 1;
  min-width: 0;
}

.qhzx-upload-preview-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qhzx-upload-preview-size {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.qhzx-upload-preview-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--neutral-200);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  font-size: 14px;
  line-height: 1;
}

.qhzx-upload-preview-remove:hover {
  background: var(--color-error);
  color: white;
}

/* ============================================
   Clock-in Module (打卡)
   ============================================ */
.qhzx-clockin-time-display {
  text-align: center;
  padding: 24px 0 16px;
}

.qhzx-clockin-current-time {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  line-height: 1.1;
}

.qhzx-clockin-current-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.qhzx-clockin-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.qhzx-clockin-status-tag.working {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.qhzx-clockin-status-tag.off {
  background: var(--neutral-100);
  color: var(--text-tertiary);
}

.qhzx-clockin-status-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.qhzx-clockin-btn-row {
  display: flex;
  gap: 16px;
  padding: 0 20px 4px;
}

.qhzx-clockin-btn {
  flex: 1;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--neutral-200);
  background: var(--surface-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qhzx-clockin-btn:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
}

.qhzx-clockin-btn:active {
  transform: scale(0.96);
}

.qhzx-clockin-btn.clock-in {
  border-color: var(--color-success);
}

.qhzx-clockin-btn.clock-in:hover {
  background: var(--color-success-bg);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

.qhzx-clockin-btn.clock-out {
  border-color: var(--color-warning);
}

.qhzx-clockin-btn.clock-out:hover {
  background: var(--color-warning-bg);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
}

.qhzx-clockin-btn.done {
  opacity: 0.5;
  pointer-events: none;
  border-style: dashed;
}

.qhzx-clockin-btn-icon {
  width: 36px;
  height: 36px;
}

.qhzx-clockin-btn-icon.clock-in-icon {
  color: var(--color-success);
}

.qhzx-clockin-btn-icon.clock-out-icon {
  color: var(--color-warning);
}

.qhzx-clockin-btn-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.qhzx-clockin-btn-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

.qhzx-clockin-divider {
  margin: 16px 20px;
  border: none;
  border-top: 1px solid var(--neutral-100);
}

.qhzx-clockin-record-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 20px;
  margin-bottom: 12px;
}

.qhzx-clockin-record-list {
  padding: 0 20px 8px;
}

.qhzx-clockin-record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-50);
}

.qhzx-clockin-record-item:last-child {
  border-bottom: none;
}

.qhzx-clockin-record-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qhzx-clockin-record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.qhzx-clockin-record-dot.in {
  background: var(--color-success);
}

.qhzx-clockin-record-dot.out {
  background: var(--color-warning);
}

.qhzx-clockin-record-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   Welcome Page Clock-in Buttons (v18)
   ============================================ */
.qhzx-welcome-clockin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 10px;
  color: #fff;
  letter-spacing: 1px;
}

.qhzx-welcome-clockin-in {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.35);
}

.qhzx-welcome-clockin-in:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.qhzx-welcome-clockin-in.done {
  background: linear-gradient(135deg, #81c784, #66bb6a);
  box-shadow: 0 4px 14px rgba(102, 187, 106, 0.35);
}

.qhzx-welcome-clockin-out {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.35);
}

.qhzx-welcome-clockin-out:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.qhzx-welcome-clockin-out.done {
  background: linear-gradient(135deg, #b0bec5, #90a4ae);
  box-shadow: 0 4px 14px rgba(144, 164, 174, 0.35);
}

.qhzx-welcome-clockin-out.disabled {
  background: linear-gradient(135deg, #cfd8dc, #b0bec5);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   Course Check-in Save Button & Saved Card (v18)
   ============================================ */
.qhzx-checkin-save-area {
  margin-top: 16px;
  padding: 0 4px;
}

.qhzx-checkin-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  background: linear-gradient(135deg, #66bb6a, #43a047);
  color: #fff;
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35);
  letter-spacing: 2px;
}

.qhzx-checkin-save-btn:active {
  transform: scale(0.97);
}

.qhzx-checkin-save-btn.saved {
  background: linear-gradient(135deg, #cfd8dc, #b0bec5);
  box-shadow: none;
  cursor: default;
  opacity: 0.7;
}

.qhzx-checkin-save-btn:disabled {
  cursor: default;
}

/* Saved course card green background */
.qhzx-checkin-course-card.saved {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: #81c784;
}

.qhzx-checkin-saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #2e7d32;
  background: #c8e6c9;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ============================================
   Dual Box Selector (知识点双框) (v18)
   ============================================ */
.qhzx-dual-box {
  width: 100%;
}

.qhzx-dual-box-container {
  display: flex;
  gap: 10px;
}

.qhzx-dual-box-panel {
  flex: 1;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-primary);
}

.qhzx-dual-box-panel.left {
  background: var(--neutral-50);
}

.qhzx-dual-box-panel.right {
  background: #e3f2fd;
  border-color: #90caf9;
}

.qhzx-dual-box-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 10px;
  background: var(--surface-primary);
  border-bottom: 1px solid var(--neutral-100);
  text-align: center;
}

.qhzx-dual-box-list {
  height: 160px;
  overflow-y: auto;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.qhzx-dual-box-placeholder {
  text-align: center;
  padding: 20px 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.qhzx-dual-box-item {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  user-select: none;
}

.qhzx-dual-box-item:hover {
  background: var(--primary-100);
}

.qhzx-dual-box-item:active {
  background: var(--primary-200);
}

.qhzx-dual-box-item.selected {
  background: #bbdefb;
  color: #1565c0;
  font-weight: 500;
}

.qhzx-dual-box-item.selected:hover {
  background: #90caf9;
}

/* Auto-text field */
.qhzx-auto-text-field {
  position: relative;
}

.qhzx-auto-text-input {
  cursor: default;
}

.qhzx-auto-text-input::placeholder {
  font-size: 13px;
}

.qhzx-clockin-record-time {
  font-size: 14px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Dashboard Page (第三期展示类页面)
   ============================================ */
.qhzx-dashboard-page {
  min-height: 100vh;
  background: var(--surface-secondary);
}

.qhzx-dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-primary);
  box-shadow: var(--shadow-sm);
}

.qhzx-dash-back {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  padding: 4px;
}

.qhzx-dash-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.qhzx-dash-content {
  padding: 16px;
}

/* Selector */
.qhzx-dash-selector {
  margin-bottom: 16px;
}

.qhzx-dash-selector-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.qhzx-dash-selector-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-primary);
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.qhzx-dash-selector-box:hover {
  border-color: var(--primary-400);
}

.qhzx-dash-selector-placeholder {
  font-size: 14px;
  color: var(--text-tertiary);
}

.qhzx-dash-selector-arrow {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Selector Panel */
.qhzx-dash-selector-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  top: auto;
  margin-top: 4px;
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.qhzx-dash-selector-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.qhzx-dash-selector-search {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-dash-selector-item:hover {
  background: var(--primary-50);
}

/* Empty State */
.qhzx-dash-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.qhzx-dash-empty p {
  font-size: 14px;
}

/* Stat Cards */
.qhzx-dash-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.qhzx-dash-stat-card {
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.qhzx-dash-stat-value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.qhzx-dash-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Section */
.qhzx-dash-section {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.qhzx-dash-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary-500);
}

/* Info Grid */
.qhzx-dash-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.qhzx-dash-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qhzx-dash-info-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.qhzx-dash-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Timeline */
.qhzx-dash-timeline {
  position: relative;
  padding-left: 20px;
}

.qhzx-dash-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--neutral-200);
}

.qhzx-dash-timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.qhzx-dash-timeline-item:last-child {
  padding-bottom: 0;
}

.qhzx-dash-timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 2px solid var(--surface-primary);
  z-index: 1;
}

.qhzx-dash-timeline-dot.attendance { background: var(--color-success); }
.qhzx-dash-timeline-dot.exam { background: var(--primary-500); }
.qhzx-dash-timeline-dot.eval { background: var(--color-warning); }
.qhzx-dash-timeline-dot.payment { background: var(--color-info); }
.qhzx-dash-timeline-dot.expense { background: var(--color-error); }

.qhzx-dash-timeline-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.qhzx-dash-timeline-text {
  font-size: 14px;
  color: var(--text-primary);
}

/* Query Buttons */
.qhzx-dash-query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qhzx-dash-query-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.qhzx-dash-query-btn:hover {
  background: var(--primary-100);
  border-color: var(--primary-300);
}

.qhzx-dash-query-btn:active {
  transform: scale(0.96);
}

/* Table */
.qhzx-dash-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.qhzx-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.qhzx-dash-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--neutral-50);
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.qhzx-dash-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--neutral-100);
  color: var(--text-primary);
}

.qhzx-dash-table tbody tr:hover {
  background: var(--neutral-50);
}

/* Tabs */
.qhzx-dash-tabs {
  display: flex;
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.qhzx-dash-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.qhzx-dash-tab.active {
  background: linear-gradient(135deg, #00BCD4, #1565C0);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Spin Animation */
@keyframes qhzx-spin {
  to { transform: rotate(360deg); }
}

/* Schedule List (今日待办) */
.qhzx-dash-schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-dash-schedule-item:last-child {
  border-bottom: none;
}

.qhzx-dash-schedule-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.qhzx-dash-schedule-info {
  flex: 1;
  min-width: 0;
}

.qhzx-dash-schedule-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.qhzx-dash-schedule-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.qhzx-dash-schedule-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.qhzx-dash-schedule-status.done {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.qhzx-dash-schedule-status.pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

/* Reminder (今日待办) */
.qhzx-dash-reminder {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-dash-reminder:last-child {
  border-bottom: none;
}

.qhzx-dash-reminder-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.qhzx-dash-reminder-icon.warning { background: var(--color-warning); }
.qhzx-dash-reminder-icon.error { background: var(--color-error); }

.qhzx-dash-reminder-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Eval Item */
.qhzx-dash-eval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-dash-eval-item:last-child {
  border-bottom: none;
}

.qhzx-dash-eval-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.qhzx-dash-eval-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ===== Tab 内容区 ===== */
.qhzx-dash-tab-content {
  padding: 0;
}

/* ===== 数据容器 ===== */
.qhzx-dash-data {
  padding: 0;
}

/* ============================================
   Exam Module - Score Evaluation (v19)
   ============================================ */
.qhzx-exam-eval-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.qhzx-exam-eval-card {
  background: var(--surface-primary);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease;
}

.qhzx-exam-eval-card:hover {
  border-color: var(--primary-300);
}

.qhzx-exam-eval-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--neutral-100);
}

.qhzx-exam-eval-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.qhzx-exam-eval-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.qhzx-exam-eval-score {
  width: 100px;
  flex-shrink: 0;
}

.qhzx-exam-eval-stars {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.qhzx-exam-eval-star-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qhzx-exam-eval-star-item .qhzx-star-rating {
  display: inline-flex;
}

.qhzx-exam-eval-star-item .qhzx-star {
  font-size: 18px;
}

/* 三性评估：心性/习性/学性 三栏子项 */
.qhzx-trisect-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.qhzx-trisect-block {
  border: 1px solid var(--neutral-100, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  padding: 10px;
}
.qhzx-trisect-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--neutral-100, #e5e7eb);
}
.qhzx-trisect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
}
.qhzx-trisect-row .qhzx-exam-eval-label {
  flex-shrink: 0;
  font-size: 12px;
}
.qhzx-trisect-row .qhzx-star-rating {
  display: inline-flex;
}
.qhzx-trisect-row .qhzx-star {
  font-size: 16px;
}

/* 成绩评估：考试选择固化锁定 */
.qhzx-form-select.locked .qhzx-form-select-display {
  background: var(--neutral-50, #f3f4f6);
  cursor: default;
  color: var(--text-primary, #111827);
  font-weight: 500;
}
.qhzx-form-select.locked .qhzx-form-select-dropdown {
  display: none;
}

/* ============================================
   Paper Compose - Paired Fields Layout (v19)
   ============================================ */
.qhzx-form-pair {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.qhzx-form-pair-item {
  flex: 1;
  min-width: 0;
}

.qhzx-form-pair-item .qhzx-input {
  width: 100%;
}

/* ============================================
   Business Plan - 经营计划 (v20)
   ============================================ */

/* 月历容器 */
.bp-calendar-wrap {
  padding: 16px;
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

/* 月份导航 */
.bp-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bp-cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
  background: var(--surface-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bp-cal-nav-btn:active {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.bp-cal-month-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 星期标题 */
.bp-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.bp-cal-wd {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 4px 0;
}

/* 日期网格 */
.bp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.bp-cal-day-empty {
  min-height: 44px;
}

.bp-cal-day {
  position: relative;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.bp-cal-day:active {
  background: var(--primary-50);
}

.bp-cal-day-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

/* 有课日期 - 绿色圆点 */
.bp-cal-active .bp-cal-day-num {
  font-weight: 600;
  color: var(--primary-700);
}

.bp-cal-dot {
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #66bb6a;
}

/* 今日 - 品牌色圆圈 */
.bp-cal-today {
  background: var(--primary-50);
}

.bp-cal-today .bp-cal-day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-600);
  color: #fff;
  font-weight: 700;
}

/* 选中日期 */
.bp-cal-selected {
  background: var(--primary-100);
  box-shadow: 0 0 0 2px var(--primary-400);
}

/* 图例 */
.bp-cal-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--neutral-100);
}

.bp-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.bp-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bp-legend-green {
  background: #66bb6a;
}

.bp-legend-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-600);
}

.bp-cal-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* ============================================
   周表
   ============================================ */
.bp-week-wrap {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.bp-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-bottom: 1px solid var(--neutral-100);
}

.bp-week-range {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-700);
}

.bp-week-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}

/* 表格滚动容器 */
.bp-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 周表 */
.bp-week-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 13px;
}

.bp-week-table th {
  background: var(--neutral-50);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 6px;
  text-align: center;
  border-bottom: 2px solid var(--neutral-200);
  white-space: nowrap;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.bp-th-weekday { min-width: 44px; }
.bp-th-date { min-width: 60px; }
.bp-th-time { min-width: 90px; }
.bp-th-room { min-width: 56px; }

.bp-week-table td {
  padding: 4px;
  text-align: center;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.bp-td-weekday {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--neutral-50);
  font-size: 12px;
}

.bp-td-date {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.bp-td-time {
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.bp-td-empty {
  color: var(--text-tertiary);
  font-size: 11px;
}

.bp-td-empty-cell {
  color: var(--text-tertiary);
  font-size: 11px;
}

.bp-row-no-class td {
  background: var(--neutral-50);
}

/* 活动卡片 */
.bp-td-room {
  padding: 3px;
}

.bp-card {
  border-radius: 6px;
  border: 1.5px solid;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bp-card:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.bp-card-text {
  font-size: 12px;
  font-weight: 700;
  display: block;
  line-height: 1.3;
}

/* 冲突行 */
.bp-td-conflict {
  background: #ffebee !important;
  text-align: center;
  padding: 12px 6px;
}

.bp-conflict-icon {
  font-size: 18px;
  color: #e53935;
  margin-right: 4px;
}

.bp-conflict-text {
  font-size: 12px;
  font-weight: 600;
  color: #c62828;
}

/* 卡片图例 */
.bp-card-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--neutral-100);
  flex-wrap: wrap;
}

.bp-cl-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.bp-cl-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid;
  display: inline-block;
}

.bp-cl-text {
  font-size: 13px;
  font-weight: 700;
}

.bp-cl-divider {
  width: 1px;
  height: 14px;
  background: var(--neutral-200);
}

/* ============================================
   浮层编辑
   ============================================ */
.bp-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: bp-fade-in 0.2s ease;
}

@keyframes bp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bp-popup {
  background: var(--surface-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: bp-slide-up 0.3s ease;
}

@keyframes bp-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bp-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-100);
}

.bp-popup-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.bp-popup-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}

.bp-popup-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* 浮层字段 */
.bp-field-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.bp-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bp-field-full {
  flex: none;
  width: 100%;
}

.bp-field-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.bp-field-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

.bp-status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

/* 浮层输入框 */
.bp-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.bp-input:focus {
  border-color: var(--primary-400);
}

.bp-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-primary);
  outline: none;
  cursor: pointer;
}

.bp-select:focus {
  border-color: var(--primary-400);
}

/* 浮层底部按钮 */
.bp-popup-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--neutral-100);
}

.bp-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.bp-btn:active {
  opacity: 0.8;
}

.bp-btn-primary {
  background: var(--primary-600);
  color: #fff;
}

.bp-btn-outline {
  background: var(--surface-primary);
  color: var(--text-secondary);
  border: 1.5px solid var(--neutral-200);
}

/* 空状态 */
.bp-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}
/* ===== 参加学生与试卷成对行（考试创建，2026-08-04）===== */
.qhzx-paper-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qhzx-paper-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
}
.qhzx-paper-row .qhzx-paper-field {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
}
.qhzx-paper-field-tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  background: #eef0f3;
  border-radius: 6px;
  padding: 4px 8px;
}
.qhzx-paper-field select {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #1f2937;
  padding: 0 8px;
  appearance: auto;
}
.qhzx-paper-row-del {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qhzx-paper-row-del:hover {
  background: #fecaca;
}
.qhzx-paper-row-add {
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  width: 100%;
  transition: all .15s;
}
.qhzx-paper-row-add:hover {
  border-color: var(--primary-500, #4f46e5);
  color: var(--primary-600, #4338ca);
  background: #f1f5f9;
}

/* ===== 组卷 - 知识点行（两行布局，文字完整显示 2026-08-04）===== */
.qhzx-kp-group { margin-bottom: 4px; }
.qhzx-kp-row {
  border: 1px solid #eceef1;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
  background: #fafbfc;
}
.qhzx-kp-row-line1,
.qhzx-kp-row-line2 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.qhzx-kp-row-line2 { margin-bottom: 0; }
.qhzx-kp-fld { flex: 1; min-width: 0; display: flex; }
.qhzx-kp-fld.kp-point-wrap { flex: 2.2; }
.qhzx-kp-fld select {
  width: 100%;
  height: 36px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 0 6px;
  appearance: auto;
}
.qhzx-kp-row-del {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 16px;
  cursor: pointer;
}
.qhzx-kp-row-del:hover { background: #fecaca; }
.qhzx-kp-add {
  width: 100%;
  margin: 2px 0 14px;
  padding: 8px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
}
.qhzx-kp-add:hover { border-color: var(--primary-500); color: var(--primary-600); }

/* ===== 组卷测试主题下拉（确保文字完整显示 2026-08-04）===== */
.qhzx-theme-sel {
  width: 100% !important;
  height: 40px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 0 10px;
  appearance: auto;
  -webkit-appearance: menulist;
  min-width: 100%;
  white-space: normal;
}
.qhzx-theme-sel option {
  font-size: 15px;
  padding: 4px;
}

/* ===== 组卷 分组标题行（题型+数量+题量，文字完整 2026-08-04）===== */
.qhzx-kp-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.qhzx-kp-type {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 14px;
  width: 64px;
}
.qhzx-kp-cnt-label {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.qhzx-kp-group-head .qhzx-kp-count {
  flex: 1;
  min-width: 60px;
  height: 38px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: #1f2937;
  text-align: center;
}

/* ===== 组卷 学生Tab下拉（完整显示 2026-08-04）===== */
.qhzx-select-full {
  width: 100% !important;
  height: 42px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 0 10px;
  appearance: auto;
  -webkit-appearance: menulist;
  min-width: 100%;
}
.qhzx-select-full option {
  font-size: 15px;
  padding: 6px;
}
