/* LegacyManager Main Stylesheet - Modern UI Refresh */

:root {
  /* ===== COMPREHENSIVE COLOR SYSTEM (Phase 2A) ===== */

  /* Primary Colors */
  --primary: #4f7df3;
  --primary-hover: #3b63d1;
  --primary-dark: #2952b8;
  --primary-light: #eef4ff;
  --primary-rgb: 79, 125, 243;
  /* For rgba() usage */

  /* Status Colors */
  --success: #10b981;
  --success-hover: #059669;
  --success-dark: #047857;
  --success-light: #ecfdf5;
  --success-rgb: 16, 185, 129;

  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-dark: #b45309;
  --warning-light: #fffbeb;
  --warning-rgb: 245, 158, 11;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-dark: #b91c1c;
  --danger-light: #fef2f2;
  --danger-rgb: 239, 68, 68;

  /* Accent Colors */
  --purple: #8b5cf6;
  --purple-hover: #7c3aed;
  --purple-dark: #6d28d9;
  --purple-light: #f5f3ff;
  --purple-rgb: 139, 92, 246;

  --indigo: #6366f1;
  --indigo-hover: #4f46e5;
  --indigo-dark: #4338ca;
  --indigo-light: #eef2ff;
  --indigo-rgb: 99, 102, 241;

  --teal: #14b8a6;
  --teal-hover: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #f0fdfa;
  --teal-rgb: 20, 184, 166;

  /* Extended Palette */
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-rgb: 59, 130, 246;

  --amber: #eab308;
  --amber-hover: #ca8a04;
  --amber-dark: #a16207;
  --amber-light: #fef9c3;
  --amber-rgb: 234, 179, 8;

  --orange: #f97316;
  --orange-hover: #ea580c;
  --orange-dark: #c2410c;
  --orange-light: #ffedd5;
  --orange-rgb: 249, 115, 22;

  --slate: #64748b;
  --slate-hover: #475569;
  --slate-dark: #334155;
  --slate-light: #f1f5f9;
  --slate-rgb: 100, 116, 139;

  /* Background & Surface */
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-inverse: #1e293b;
  --card: #ffffff;

  /* Border Colors */
  --border: #e5e7eb;
  --border-light: rgba(226, 232, 240, 0.6);
  --border-dark: #cbd5e1;
  --border-focus: var(--primary);

  /* Text Colors */
  --text-h1: #0f172a;
  /* Headings darkest */
  --text-h2: #1e293b;
  /* Headings */
  --text-main: #1e293b;
  /* Body text */
  --text-secondary: #64748b;
  /* Secondary text */
  --text-muted: #94a3b8;
  /* Muted/helper text */
  --text-disabled: #cbd5e1;
  /* Disabled text */
  --text-inverse: #ffffff;
  /* Text on dark backgrounds */

  /* Component-Specific Semantic Colors */
  --input-border: var(--border);
  --input-border-hover: var(--border-dark);
  --input-border-focus: var(--primary);
  --input-bg: #ffffff;
  --input-bg-disabled: var(--bg-secondary);
  --input-text: var(--text-main);
  --input-placeholder: var(--text-muted);

  --button-text: #ffffff;

  --link-color: var(--primary);
  --link-hover: var(--primary-hover);

  --table-header-bg: var(--bg-secondary);
  --table-hover-bg: var(--primary-light);
  --table-border: var(--border-light);

  --modal-backdrop: rgba(15, 23, 42, 0.65);
  --modal-bg: #ffffff;

  /* State Colors */
  --state-hover: var(--bg-secondary);
  --state-active: var(--primary-light);
  --state-disabled: var(--bg-tertiary);
  --state-focus-ring: rgba(var(--primary-rgb), 0.1);

  /* ===== Z-INDEX HIERARCHY (Phase 2B) ===== */
  /* Organized from lowest to highest */
  --z-base: 1;
  /* Base stacking */
  --z-dropdown: 10;
  /* Dropdown menus */
  --z-sticky: 100;
  /* Sticky headers */
  --z-header: 999;
  /* Main header, tabs */
  --z-overlay: 1000;
  /* Overlays, tooltips */
  --z-modal-base: 2000;
  /* Base modals (Students Details, Parents) */
  --z-modal-secondary: 3000;
  /* Secondary modals (opened from base modals) */
  --z-modal-classes: 6000;
  /* Classes modal */
  --z-modal-date-picker: 7000;
  /* Date picker modal */
  --z-modal-evaluation: 100000;
  /* Evaluation view modal (topmost) */
  --z-modal-confirmation: 9999;
  /* Confirmation dialogs */
  --z-toast: 10000;
  /* Toast notifications */

  /* Spacing System */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border Radius - More rounded for modern feel */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Softer Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-dropdown: 0 10px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   🎨 QUICK WINS - UI ENHANCEMENTS
   ======================================== */

/* Quick Win #2: Smooth transitions for all interactive elements */
button,
input,
select,
textarea,
a,
.card,
.dash-card,
.dashboard-card,
.btn,
.tab {
  transition: background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

/* Quick Win #3: Enhanced focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Unified section headers - consistent typography across tabs and modals */
.section-title,
.modal-section-title,
.activity-section-title,
.add-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.section-title i,
.modal-section-title i,
.activity-section-title i,
.add-section-title i {
  color: var(--primary);
}

/* Quick Win #5: Icon hover effects with scale animations */
.btn i,
.card-icon,
.dash-card i,
.dashboard-card i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.btn:hover i,
.dash-card:hover .card-icon,
.dashboard-card:hover .card-icon {
  transform: scale(1.15);
}

/* Special rotation effect for circular icons */
.card-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-card:hover .card-icon,
.dashboard-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

/* ========================================
   QUICK ACTIONS BAR
   ======================================== */
.quick-actions-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  padding: 14px 28px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.quick-actions-bar:hover {
  box-shadow: var(--shadow);
}

/* Menu dropdown wrapper and panel */
.menu-dropdown-wrapper {
  position: relative;
}

#main-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #1e1b4b;
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(30, 27, 75, 0.25);
}

#main-menu-btn:hover {
  background: #312e81;
  box-shadow: 0 4px 14px rgba(30, 27, 75, 0.35);
}

#main-menu-btn i {
  font-size: 14px;
}

#main-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  min-width: 280px;
  z-index: 10000;
  margin-top: var(--spacing-sm);
}

#main-menu-dropdown.is-open {
  display: block;
}

.dropdown-item .icon-success {
  color: var(--success);
}

.dropdown-item .icon-primary {
  color: var(--primary);
}

.dropdown-item .icon-warning {
  color: var(--warning);
}

.dropdown-item .icon-purple {
  color: var(--purple);
}

.dropdown-item .icon-indigo {
  color: var(--indigo);
}

/* Undo/redo and toolbar utilities */
.undo-redo-controls {
  display: flex;
  gap: var(--spacing-sm);
}

.search-clear-btn {
  display: none;
  align-items: center;
  justify-content: center;
}

.search-clear-btn.visible {
  display: inline-flex;
}

#bulk-actions-toolbar {
  display: none;
}

/* Search Container */
.search-container {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

#global-search {
  width: 100%;
  padding: 10px 40px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
  outline: none;
}

#global-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

#global-search::placeholder {
  color: var(--text-secondary);
  font-size: 13px;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.search-clear-btn:hover {
  background: var(--bg);
  color: var(--text-main);
}

/* Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  animation: slideDown 0.2s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--primary-light);
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

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

.search-result-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-meta i {
  margin-right: 4px;
}

.search-result-classes {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}

.search-result-classes i {
  margin-top: 2px;
  flex-shrink: 0;
}

.search-class-link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary-light);
  transition: all 0.2s ease;
  display: inline-block;
  font-weight: 500;
  border: 1px solid transparent;
}

.search-class-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.search-class-link:active {
  transform: translateY(0);
}

.search-no-results {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.search-no-results i {
  font-size: 48px;
  color: var(--border);
  margin-bottom: 12px;
}

.search-hint {
  padding: 8px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-hint kbd {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 10px;
  margin: 0 2px;
}

/* Quick Action Buttons */
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.quick-action-btn i {
  font-size: 14px;
}

.quick-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .quick-actions-bar {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .search-container {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 8px;
  }

  .quick-action-btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 8px 12px;
  }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s ease-in-out infinite;
}

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

.swal2-container {
  z-index: 999999 !important;
}

.swal2-popup {
  z-index: 999999 !important;
}

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

/* Hide scrollbars globally */
html {
  overflow: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overflow: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Global scrollbar hiding for all elements */
* {
  scrollbar-width: none !important;
  /* Firefox */
  -ms-overflow-style: none !important;
  /* IE and Edge */
}

*::-webkit-scrollbar {
  display: none !important;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.header {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  justify-content: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.header img {
  height: 100px;
  border-radius: var(--radius);
}

.header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: #3C223E;
  letter-spacing: -0.02em;
}

.toolbar {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin-bottom: var(--spacing-md);
  background: var(--card);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* Status bar: subtle indicator with smooth transition on update */
.status-bar {
  background: var(--bg-secondary);
  color: var(--text-h2);
  padding: 12px var(--spacing-lg);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-md);
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.status-bar strong {
  font-weight: 700;
}

.status-bar-segment {
  font-weight: 700;
  font-size: 15px;
  color: inherit;
}

/* ========================================
   MODERN TAB NAVIGATION
   ======================================== */
/* ===== UNIFIED TAB SYSTEM (Option 2) ===== */

/* Base Tab Navigation Container */
.tab-nav,
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: none;
  position: relative;
}

/* Main navigation tabs - sticky with clear separator and active state */
.tabs {
  padding: var(--spacing-sm) var(--spacing-md);
  position: sticky;
  top: 60px;
  z-index: 999;
  background: var(--card);
  margin-bottom: 0;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 1px 0 var(--border-light);
}

/* Base Tab Button */
.tab-nav-item,
.tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-nav-item:hover:not(.active),
.tab:hover:not(.active) {
  background: var(--primary-light);
  color: var(--primary);
}

.tab-nav-item.active,
.tab.active {
  background: var(--card);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab .tab-icon {
  margin-right: 4px;
}

/* Tab Content */
.tab-content {
  display: none;
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  margin-top: var(--spacing-sm);
}

.tab-content.active {
  display: block;
}

/* ===== ANALYTICS TAB (moved from inline styles) ===== */
.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  background: var(--card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.analytics-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-h2);
}

.analytics-header p {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.analytics-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.analytics-filters .filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.analytics-filters .filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.analytics-filters .form-control {
  border-radius: var(--radius-sm);
}

.analytics-filters select#analytics-year-selector {
  width: 100px;
}

.analytics-filters select#analytics-month-range {
  width: 140px;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  color: var(--text-inverse);
  transition: var(--transition);
}

.stat-card-label {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0;
}

.stat-card-sublabel {
  font-size: 12px;
  opacity: 0.8;
}

.stat-card-value.stat-card-value-sm {
  font-size: 24px;
}

.stat-card-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.stat-card-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
}

.stat-card-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-hover) 100%);
}

.analytics-charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.chart-card {
  background: var(--card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.chart-card h3 {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: var(--text-h2);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.chart-card h3 .icon-primary {
  color: var(--primary);
}

.chart-card h3 .icon-success {
  color: var(--success);
}

.chart-card h3 .icon-warning {
  color: var(--warning);
}

.chart-card-body {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 20px;
}

.analytics-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.analytics-charts-container-mt {
  margin-top: var(--spacing-lg);
}

.chart-card-padding {
  padding: 10px 0;
}

.chart-card h3 .icon-purple {
  color: var(--purple);
}

.analytics-section-block {
  margin-top: var(--spacing-xl);
}

.section-title-underline {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

/* ===== TAB VARIANTS ===== */

/* Variant 1: Filled (Default - used for main navigation) */
.tab-nav-filled .tab-nav-item,
.tabs .tab {
  /* Already styled above */
}

/* Variant 2: Pills (for filters, modals) */
.tab-nav-pills {
  gap: 8px;
  flex-wrap: wrap;
}

.tab-nav-pills .tab-nav-item {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  min-height: 36px;
  opacity: 0.85;
  box-shadow: none;
}

.tab-nav-pills .tab-nav-item:hover:not(.active) {
  opacity: 1;
  background: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tab-nav-pills .tab-nav-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary-hover);
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(79, 125, 243, 0.3);
  transform: scale(1.02);
}

/* Color Variants for Pills */
.tab-nav-pills .tab-nav-item.active[data-color="success"] {
  background: var(--success);
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tab-nav-pills .tab-nav-item.active[data-color="warning"] {
  background: var(--warning);
  border-color: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.tab-nav-pills .tab-nav-item.active[data-color="danger"] {
  background: var(--danger);
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tab-nav-pills .tab-nav-item.active[data-color="purple"] {
  background: var(--purple);
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.tab-nav-pills .tab-nav-item.active[data-color="slate"] {
  background: #64748b;
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.tab-nav-pills .tab-nav-item.active[data-color="amber"] {
  background: #eab308;
  border-color: #ca8a04;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

/* Count badges in pills */
.tab-nav-pills .tab-nav-item.active .count-badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

/* Variant 3: Underline (for edit modals, settings) */
.tab-nav-underline {
  border-bottom: 2px solid var(--border-light);
  gap: 0;
}

.tab-nav-underline .tab-nav-item {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.tab-nav-underline .tab-nav-item:hover:not(.active) {
  background: var(--bg-secondary);
  color: var(--text-main);
  box-shadow: none;
}

.tab-nav-underline .tab-nav-item.active {
  background: white;
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  box-shadow: none;
}

/* DEPRECATED: Use .form-row .form-row-4col instead */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

/* Add responsive behavior to old .entry-grid */
@media (max-width: 1200px) {
  .entry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========================================
   🎨 ENHANCED FORM ELEMENTS
   ======================================== */

/* Base Input Styling */
input,
select,
textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: white;
  color: var(--text-main);
  transition: all 0.2s ease;
  outline: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #cbd5e1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 125, 243, 0.1);
  transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
  color: #b0bec5;
  font-size: 13px;
  font-style: italic;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Form Labels */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-label-required::after {
  content: '*';
  color: var(--danger);
  margin-left: 4px;
}

/* Input with Icons */
.form-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

.form-input-group input {
  padding-left: 44px;
}

.form-input-icon-right {
  left: auto;
  right: 16px;
}

.form-input-group input.has-icon-right {
  padding-right: 44px;
  padding-left: 16px;
}

/* Validation States */
.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid,
input.is-valid,
select.is-valid,
textarea.is-valid {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.03);
}

.form-input.is-valid:focus,
.form-select.is-valid:focus,
.form-textarea.is-valid:focus,
input.is-valid:focus,
select.is-valid:focus,
textarea.is-valid:focus {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.03);
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus,
input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Validation Feedback */
.form-feedback {
  margin-top: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-feedback.valid {
  color: var(--success);
}

.form-feedback.invalid {
  color: var(--danger);
}

/* has-error: shake the input and slide in the error message */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  animation: shakeInput 0.35s ease;
}

.form-group.has-error .form-feedback.invalid {
  animation: feedbackSlideIn 0.2s ease;
}

@keyframes shakeInput {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

@keyframes feedbackSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Checkboxes */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  appearance: none;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--primary);
}

input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 4px rgba(79, 125, 243, 0.1);
}

/* Enhanced Radio Buttons */
input[type="radio"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="radio"]:hover {
  border-color: var(--primary);
}

input[type="radio"]:checked {
  border-color: var(--primary);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

input[type="radio"]:focus {
  box-shadow: 0 0 0 4px rgba(79, 125, 243, 0.1);
}

/* Checkbox/Radio with Label */
.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.form-check-label {
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

/* Toggle Switch */
.form-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.form-switch-input {
  position: relative;
  width: 48px;
  height: 24px;
  background: var(--border);
  border-radius: 999px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.form-switch-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch-input.checked {
  background: var(--primary);
}

.form-switch-input.checked::after {
  left: 26px;
}

.form-switch-label {
  font-size: 14px;
  color: var(--text-main);
  user-select: none;
}

/* Select Dropdown Enhancement */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f7df3' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Textarea Enhancement */
textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Disabled State */
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form Row Layout */
/* ===== UNIFIED FORM GRID SYSTEM (Option 2) ===== */

/* Base Form Row - Responsive by default */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}

/* Explicit Column Layouts */
.form-row-1col {
  grid-template-columns: 1fr;
}

.form-row-2col {
  grid-template-columns: repeat(2, 1fr);
}

.form-row-3col {
  grid-template-columns: repeat(3, 1fr);
}

.form-row-4col {
  grid-template-columns: repeat(4, 1fr);
}

.form-row-5col {
  grid-template-columns: repeat(5, 1fr);
}

/* Two-panel student form layout */
.form-two-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.form-panel-right {
  border-left: 2px solid #e5e7eb;
  padding-left: 28px;
}

.form-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px 0;
}

/* Compact Gap Variant */
.form-row-compact {
  gap: 14px;
  margin-bottom: 16px;
}

/* Large Gap Variant */
.form-row-spacious {
  gap: 28px;
  margin-bottom: 32px;
}

/* Responsive Behavior */
@media (max-width: 1200px) {
  .form-row-5col {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row-4col {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row-3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-two-panel {
    grid-template-columns: 1fr;
  }

  .form-panel-right {
    border-left: none;
    border-top: 2px solid #e5e7eb;
    padding-left: 0;
    padding-top: 16px;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {

  .form-row-2col,
  .form-row-3col,
  .form-row-4col,
  .form-row-5col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .form-row {
    gap: 16px;
    margin-bottom: 20px;
  }
}

/* ========================================
   MODERN BUTTON STYLES
   ======================================== */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  color: white;
  min-height: 40px;
  transition: var(--transition);
  box-shadow: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

.btn:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.btn.active-filter {
  box-shadow: 0 0 0 3px var(--primary-light);
  transform: scale(1.05);
}

.btn.active-filter::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

/* Button Variants - Enhanced with Quick Win #1 shadows */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 4px 12px rgba(79, 125, 243, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79, 125, 243, 0.35);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-main);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.btn-info {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-hover) 100%);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn-info:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-sm {
  min-width: 60px;
  min-height: 30px;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* ========================================
   🎨 ENHANCED TABLE STYLES
   ======================================== */

/* Table Wrapper - Adds container for shadows and rounded corners */
.table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  /* Horizontal scroll for wide tables */
  overflow-y: visible;
  /* FIX: Allow dropdowns to overflow vertically */
  border: 1px solid var(--border-light);
  margin-top: var(--spacing-md);
}

/* Base Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

/* Table Header - Gradient Background */
thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}

thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: transparent;
}

/* Sortable Column Headers */
thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
}

thead th.sortable:hover {
  background: var(--primary-light);
  color: var(--primary-600);
}

thead th.sortable::after {
  content: '⇅';
  margin-left: 8px;
  opacity: 0.3;
  font-size: 11px;
}

thead th.sortable.sorted-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--primary);
}

thead th.sortable.sorted-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--primary);
}

/* Table Body */
tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-light);
  background: white;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--primary-light);
  transform: scale(1.005);
  box-shadow: inset 3px 0 0 var(--primary), 0 2px 8px rgba(79, 125, 243, 0.1);
}

tbody td {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-main);
  vertical-align: middle;
}

/* Zebra Striping (Optional - can be enabled with .table-striped class) */
.table-striped tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.table-striped tbody tr:nth-child(even):hover {
  background: var(--primary-light);
}

/* Row Selection */
tbody tr.selected {
  background: var(--primary-100) !important;
  box-shadow: inset 3px 0 0 var(--primary);
}

/* Bulk Operations */
#bulk-mode-toggle.active {
  background: var(--primary);
  color: white;
}

.student-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Compact Table Variant */
.table-compact thead th {
  padding: 12px 16px;
  font-size: 10px;
}

.table-compact tbody td {
  padding: 12px 16px;
  font-size: 12px;
}

/* Table Actions Column */
.table-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.table-actions .btn {
  min-width: auto;
}

/* Empty Table State */
.table-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.table-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--text-secondary);
}

.table-empty-message {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.table-empty-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Responsive Table */
@media (max-width: 1024px) {
  .table-wrapper {
    overflow-x: auto;
  }

  table {
    min-width: 800px;
  }
}

/* Legacy styles for backward compatibility */
th,
td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: transparent;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ========================================
   MODERN DASHBOARD GRID
   ======================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: var(--spacing-lg);
}

.dash-card {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* QUICK WIN #1: Consistent card heights */
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dash-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: rgba(79, 125, 243, 0.2);
}

/* Card gradient overlay on hover */
.dash-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(79, 125, 243, 0.02) 0%,
      rgba(79, 125, 243, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

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

/* Ensure card inner content respects flex layout */
.dash-card .card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Card main content area for complex layouts */
.dash-card .card-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Compact stats within cards */
.dash-card .compact-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  gap: 16px;
}

.dash-card .compact-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dash-card .compact-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.dash-card .compact-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card accent - subtle left border instead of top bar */
.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  z-index: 1;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.dash-val {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.copyright {
  text-align: center;
  margin-top: var(--spacing-2xl);
  color: var(--text-muted);
  font-size: 12px;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Actions column - base styles */
.col-actions {
  width: 100px !important;
  min-width: 100px !important;
  text-align: center !important;
  padding: 10px !important;
  position: relative !important;
  overflow: visible !important;
}

.btn-action-mini {
  padding: 6px 8px;
  font-size: 11px;
  width: 100%;
  border-radius: var(--radius-sm);
  min-height: 28px;
}

/* ========================================
   🎨 ENHANCED MODAL SYSTEM
   ======================================== */

/* Modal Backdrop with Enhanced Blur */
.modal-backdrop,
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  /* Fix: Prevent outer scroll hijacking */
}

.modal[style*="display: block"],
.modal[style*="display: flex"] {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow: hidden;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Modal Container with Slide-in Animation */
.modal-content {
  position: relative;
  margin: auto;
  background: white;
  padding: 0;
  border-radius: var(--radius-xl);
  width: 800px;
  /* Default medium size */
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* QUICK WIN #2: Standardized Modal Size System */
.modal-sm .modal-content {
  width: 500px;
}

.modal-md .modal-content {
  width: 800px;
}

.modal-lg .modal-content {
  width: 1100px;
}

.modal-xl .modal-content {
  width: 1400px;
}

.modal-fullscreen .modal-content {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  margin: 0;
}

/* Responsive Modal Sizes */
@media (max-width: 1600px) {
  .modal-xl .modal-content {
    width: 90vw;
  }
}

@media (max-width: 1200px) {

  .modal-lg .modal-content,
  .modal-xl .modal-content {
    width: 90vw;
  }
}

@media (max-width: 900px) {

  .modal-md .modal-content,
  .modal-lg .modal-content,
  .modal-xl .modal-content {
    width: 95vw;
  }
}

@media (max-width: 600px) {
  .modal-content {
    width: 95vw !important;
    margin: 10px;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .modal-sm .modal-content {
    width: 95vw;
  }
}

/* Sticky Modal Header */
.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 10;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Enhanced Close Button */
.modal-close,
.close-modal {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close:hover,
.close-modal:hover {
  background: var(--danger-light);
  color: var(--danger);
  transform: rotate(90deg) scale(1.1);
}

.modal-close:active,
.close-modal:active {
  transform: rotate(90deg) scale(0.95);
}

/* Modal Body with Scroll */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for all modals - Chrome, Safari and Opera */
.modal-body::-webkit-scrollbar {
  display: none;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.modal::-webkit-scrollbar {
  display: none;
}

/* Sticky Modal Footer */
.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  z-index: 10;
}

.modal-footer-left {
  margin-right: auto;
}

/* Modal Sections */
.modal-section {
  margin-bottom: 32px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.modal-section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.modal-overlay-new {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-box-new {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 850px;
  max-width: calc(100vw - 48px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}

.modal-box-new-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--spacing-xl);
}

.modal-box-footer {
  flex: 0 0 auto;
  padding: 16px var(--spacing-xl);
  border-top: 1px solid var(--border-light);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 6px;
  margin-top: var(--spacing-lg);
}

.hour-cell {
  padding: 8px;
  text-align: center;
  background: var(--primary-light);
  border: 1px solid rgba(79, 125, 243, 0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.hour-cell:hover {
  background: var(--primary);
  color: white;
}

.hour-cell.booked {
  background: var(--success);
  color: white;
  border-color: var(--success-hover);
}

.hour-cell.disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Modal z-index hierarchy - moved to dedicated section below */

/* ===== QUICK WIN #3: EMPTY STATE PATTERNS ===== */

/* Base Empty State Component */
.empty-state {
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-icon {
  font-size: 64px;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state-icon i {
  display: inline-block;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}

.empty-state-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
  line-height: 1.6;
}

.empty-state-action {
  margin-top: 16px;
}

/* Empty State Variants */
.empty-state-sm {
  padding: 40px 20px;
}

.empty-state-sm .empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-sm .empty-state-title {
  font-size: 16px;
}

.empty-state-sm .empty-state-description {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Table Empty State */
.table-empty-row td {
  border: none !important;
  padding: 0 !important;
}

.table-empty {
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.table-empty-icon {
  font-size: 56px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.table-empty-message {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.table-empty-hint {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 350px;
  line-height: 1.5;
}

/* Error State (Similar to Empty State) */
.error-state {
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-state-icon {
  font-size: 64px;
  color: var(--danger);
  margin-bottom: 20px;
  opacity: 0.8;
}

.error-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 8px;
}

.error-state-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
}

.error-state-action {
  margin-top: 16px;
}

/* Loading State Skeleton (moved from earlier definition) */
.loading-state {
  padding: 40px;
  text-align: center;
  color: var(--primary);
}

.loading-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

.loading-state-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ===== QUICK WIN #4: UTILITY CLASSES (Replace Inline Styles) ===== */

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-around {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Gap Utilities */
.gap-4 {
  gap: 4px;
}

.gap-6 {
  gap: 6px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

.gap-24 {
  gap: 24px;
}

/* Spacing Utilities */
.p-8 {
  padding: 8px;
}

.p-12 {
  padding: 12px;
}

.p-16 {
  padding: 16px;
}

.p-20 {
  padding: 20px;
}

.p-24 {
  padding: 24px;
}

.px-12 {
  padding-left: 12px;
  padding-right: 12px;
}

.px-16 {
  padding-left: 16px;
  padding-right: 16px;
}

.px-20 {
  padding-left: 20px;
  padding-right: 20px;
}

.py-8 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.py-12 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.py-16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.m-0 {
  margin: 0;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.ml-8 {
  margin-left: 8px;
}

.ml-auto {
  margin-left: auto;
}

.mr-8 {
  margin-right: 8px;
}

/* Width Utilities */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.max-w-400 {
  max-width: 400px;
}

.max-w-600 {
  max-width: 600px;
}

/* Height Utilities */
.h-full {
  height: 100%;
}

.min-h-30 {
  min-height: 30px;
}

.min-h-50 {
  min-height: 50px;
}

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.font-12 {
  font-size: 12px;
}

.font-13 {
  font-size: 13px;
}

.font-14 {
  font-size: 14px;
}

.font-16 {
  font-size: 16px;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* Border Utilities */
.border-bottom {
  border-bottom: 1px solid var(--border-light);
}

.border-top {
  border-top: 1px solid var(--border-light);
}

.border-radius-6 {
  border-radius: 6px;
}

.border-radius-20 {
  border-radius: 20px;
}

/* Background Utilities */
.bg-white {
  background: white;
}

.bg-gray-50 {
  background: #f8fafc;
}

.bg-gray-100 {
  background: #f1f5f9;
}

/* Dropdown Item Utility */
.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
  font-size: 14px;
  color: var(--text-main);
}

.dropdown-item:hover {
  background: var(--primary-light);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
}

/* Dropdown Header/Footer */
.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Header Utility */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

/* Section Header Utility */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header-spacing {
  margin-bottom: 20px;
}

/* Divider Utility */
.divider-vertical {
  width: 1px;
  height: 30px;
  background: var(--border-light);
  margin: 0 8px;
}

/* Quick Action Bar */
.quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #2952b8 100%);
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--success-hover) 0%, #047857 100%);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-hover) 0%, #b91c1c 100%);
}

.btn-info:hover {
  background: linear-gradient(135deg, var(--purple-hover) 0%, #6d28d9 100%);
}

/* Table Header Styling */
#summaryTable thead,
#archivedTable thead,
#parentsTable thead {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
}

#summaryTable thead th,
#archivedTable thead th,
#parentsTable thead th {
  color: white;
  font-weight: 600;
}

tbody tr {
  transition: var(--transition-fast);
}

tbody tr:nth-child(even) {
  background: var(--bg);
}

tbody tr:hover {
  background: var(--primary-light);
}

.tab {
  transition: var(--transition);
}

.tab:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Tab highlight animation when navigating from elsewhere */
.tab.tab-highlight {
  animation: tabPulse 1s ease;
}

@keyframes tabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.tab-content.active {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--text-secondary);
}

.modal {
  backdrop-filter: blur(4px);
  animation: modalBackdropFade 0.2s ease;
  will-change: opacity;
}

@keyframes modalBackdropFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate3d(0, -50px, 0) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Ensure content wraps in the parents list modal */
#parents-list-modal table {
  table-layout: fixed;
}

/* Ensure content wraps in parents list AND archived classes modals */
/* Do not use gradient header in Archived Classes List modal */
#archived-classes-list-modal thead {
  background: #e5e7eb !important;
  color: #111827 !important;
  box-shadow: inset 0 -1px 0 #d1d5db;
}

#parents-list-modal table,
#archived-classes-list-modal table {
  table-layout: fixed;
}

#parents-list-modal td,
#archived-classes-list-modal td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

/* FIXED: Archived Classes Modal - No header overlap */
.archived-classes-list-modal table {
  table-layout: fixed !important;
  width: 100% !important;
}

.archived-classes-list-modal thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #e5e7eb !important;
}

.archived-classes-list-modal tbody {
  position: relative;
  z-index: 5 !important;
}

/* Archived classes modal - wider actions column for buttons */
.archived-classes-list-modal .col-actions {
  width: 180px !important;
  min-width: 180px !important;
}

.archived-classes-list-modal td {
  vertical-align: top !important;
  padding: 12px 8px !important;
  overflow: visible !important;
}

.action-buttons-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
  position: relative !important;
  z-index: 6 !important;
}

/* ========================================
   DASHBOARD CARDS - UNIFIED MODERN DESIGN
   ======================================== */
.dashboard-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

/* Subtle left accent bar */
.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--indigo) 0%, var(--primary) 100%);
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

/* SHARED HOVER STATE */
.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(79, 125, 243, 0.15);
}

/* Card color variants - softer hover backgrounds */
.card-parents::before {
  background: linear-gradient(180deg, var(--purple) 0%, #a78bfa 100%);
}

.card-parents:hover {
  background: var(--purple-light);
}

.card-parents .dash-val {
  color: var(--purple);
  font-size: 28px;
  margin-top: 12px;
}

.card-archived-list::before {
  background: linear-gradient(180deg, var(--warning) 0%, #fbbf24 100%);
}

.card-archived-list:hover {
  background: var(--warning-light);
}

.card-archived-list .dash-val {
  color: var(--warning);
  font-size: 28px;
  margin-top: 12px;
}

.dash-card.card-active-classes::before {
  background: linear-gradient(180deg, var(--success) 0%, #34d399 100%);
}

.dash-card.card-active-classes:hover {
  background: var(--success-light);
}

.dash-card.card-active-classes .dash-val {
  color: var(--success);
}

.card-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}

.dashboard-card .card-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  z-index: 2;
}

.dashboard-card .card-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.dashboard-card .card-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-card .card-main-label {
  font-size: 18px;
  font-weight: 600;
  color: #4f46e5;
}

.card-stats.compact {
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.card-stats .stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-stats .stat-label {
  color: #64748b;
  font-weight: 500;
}

.card-stats .stat-value {
  font-weight: 700;
  color: var(--text-main);
}

.stat-label.active,
.stat-value.active {
  color: #16a34a;
}

.stat-label.classes,
.stat-value.classes {
  color: #f59e0b;
}

.stat-label.archived,
.stat-value.archived {
  color: #dc2626;
}

/* Dashboard Grid - 5 Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Cards - Clickable with Colors */
.dash-card {
  transition: var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: var(--transition);
}

.dash-card:active {
  transform: translateY(-2px);
}

/* Add New Student Card */
.dash-card.card-add-student::before {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--purple) 100%);
}

.dash-card.card-add-student:before {
  background: #BF515E;
}

.card-add-student:hover {
  background: #F5D3D8;
}

.dash-card.card-add-student .dash-val {
  color: #BF515E;
  font-size: 48px;
}

/* Total Students Card - Blue */
.card-total::before {
  background: var(--primary);
}

.dash-card.card-total:hover {
  background: var(--primary-light);
}

.dash-card.card-total .dash-val {
  color: var(--primary);
}

/* Active Students Card - Green */
.dash-card.card-active::before {
  background: var(--success);
}

.dash-card.card-active:hover {
  background: #d1fae5;
}

.dash-card.card-active .dash-val {
  color: var(--success);
}

/* Archived Card - Orange */
.dash-card.card-archived::before {
  background: var(--warning);
}

.dash-card.card-archived:hover {
  background: #fef3c7;
}

.dash-card.card-archived .dash-val {
  color: var(--warning);
}

/* Classes Sold Card - Purple */
.dash-card.card-classes::before {
  background: var(--purple);
}

.dash-card.card-classes:hover {
  background: var(--purple-light);
}

.dash-card.card-classes .dash-val {
  color: var(--purple);
}

/* Class Check-In */
.dash-card.card-checkin {
  background: #ffffff;
}

.dash-card.card-checkin::before {
  background: #0ea5e9;
}

.dash-card.card-checkin:hover {
  background: #e0f2fe;
}

/* Archived Classes card (separate from Payment Issues card) */
.dash-card.card-archived-classes::before {
  background: #f59e0b;
}

.dash-card.card-archived-classes:hover {
  background: #fffbeb;
}

.dash-card h3 {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Progress Bar */
.class-progress {
  display: flex;
  gap: 3px;
  margin: 4px 0;
  flex-wrap: wrap;
  max-width: 320px;
}

.progress-square {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}

.progress-square.taken {
  background: var(--success);
  border-color: var(--success);
}

.progress-square.taken.booked {
  /* Blue for booked/scheduled - awaiting check-in */
  background: #3b82f6;
  border-color: #2563eb;
}

.progress-square.taken.completed {
  /* Green for checked in - done */
  background: #22c55e;
  border-color: #16a34a;
}

.progress-square .sq-num {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.progress-square .sq-date {
  font-size: 8px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1;
  margin-top: 1px;
}

.progress-square.remaining {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Next-up session: clear blue ring so staff see exactly what to tap */
.progress-square.next-session {
  background: #fff;
  border: 2px solid #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
  font-weight: 700;
}

.progress-square.next-session:hover {
  background: #eff6ff;
  transform: scale(1.12);
}

.progress-square.missed {
  background: #fb923c;
  border-color: #f97316;
}

.progress-square.skipped {
  background: #9ca3af;
  border-color: #6b7280;
  opacity: 0.7;
}

.progress-square:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-sm);
}

.progress-text {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

.progress-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 0;
}

.progress-square.disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  opacity: 0.5;
  cursor: not-allowed !important;
}

.progress-square.disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Check-in modal: hide redundant progress-text since counter is now in class chip */
.csm-bar-wrap .progress-text {
  display: none;
}

/* ---- Pill toggle (Check-in modal filter) ---- */
.csm-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 20px;
  border: 2px solid #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  vertical-align: middle;
}

.csm-pill-toggle:hover {
  background: #dbeafe;
}

.csm-pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  transition: background 0.2s;
}

/* "All students" state */
.csm-pill-toggle.is-all {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}

.csm-pill-toggle.is-all .csm-pill-dot {
  background: #10b981;
}

.csm-pill-toggle.is-all:hover {
  background: #d1fae5;
}

/* Custom Tooltip for Instant Display */
.progress-square,
.hour-cell {
  position: relative;
}

.progress-square[data-tooltip]::after,
.hour-cell[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 0;
  transform: translateY(-8px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  max-width: 250px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s ease-in;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-square[data-tooltip]::before,
.hour-cell[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 12px;
  transform: translateY(-2px);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s ease-in;
  z-index: 1000;
}

.progress-square[data-tooltip]:hover::after,
.progress-square[data-tooltip]:hover::before,
.hour-cell[data-tooltip]:hover::after,
.hour-cell[data-tooltip]:hover::before {
  opacity: 1;
  transition-delay: 0s;
}

.hour-cell.sequence-disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  opacity: 0.5;
  cursor: not-allowed !important;
}

.hour-cell.sequence-disabled:hover {
  transform: none !important;
}

/* Class Type Breakdown */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 30px;
  margin-bottom: 16px;
  text-align: left;
}

.class-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.class-type-card {
  background: white;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
  cursor: pointer;
}

.class-type-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: var(--primary-light);
}

.class-type-card:active {
  transform: translateY(0);
}

.class-type-card:nth-child(4n+1) {
  border-left-color: #3b82f6;
}

.class-type-card:nth-child(4n+2) {
  border-left-color: #8b5cf6;
}

.class-type-card:nth-child(4n+3) {
  border-left-color: #10b981;
}

.class-type-card:nth-child(4n) {
  border-left-color: #f59e0b;
}

.class-type-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.class-type-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.class-type-students {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .class-breakdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .class-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

/* Archived Student Row Styling */
.archived-row {
  background: #fef9e7 !important;
  opacity: 0.85;
}

.archived-row:hover {
  background: #fef3c7 !important;
  opacity: 1;
}

/* Sticky Headers for the Main Table */
#summaryTable th {
  position: sticky;
  top: 0;
  background-color: var(--card);
  z-index: 20;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.modal-body table th {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 5;
}

/* Ensure dropdown menus appear above sticky headers and modal content */
.modal-body .student-actions-dropdown.active {
  z-index: 10002;
}

.modal-body .dropdown-menu.show {
  z-index: 10003;
  /* Higher than modal content and sticky headers */
}

/* Compact modal filter buttons */
.modal-filter-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
  max-width: 700px;
  padding-top: 10px;
  overflow: visible;
}

.modal-filter-buttons .btn {
  width: 100% !important;
  min-width: 130px !important;
  width: 180px !important;
  max-width: 180px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  min-height: 30px !important;
  white-space: nowrap;
  overflow: visible !important;
  text-overflow: ellipsis;
  position: relative;
}

.modal-filter-buttons .btn.active-filter {
  box-shadow: 0 0 0 2px var(--primary-light) !important;
  transform: scale(1) !important;
}

.modal-filter-buttons .btn.active-filter::after {
  content: attr(data-count);
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 2px solid white;
  z-index: 20;
}

.btn.active-filter::after {
  content: '';
}

.modal-container .btn.btn-sm {
  background-color: #63748A;
  border-color: #4b5563;
  color: #f9fafb;
}

.modal-container .btn.btn-sm.activefilter,
.modal-container .btn.btn-sm.active-filter {
  background-color: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #f9fafb !important;
}

.modal-container .btn.btn-outline.btn-sm {
  background-color: #D9DADC;
  border-color: #63748A;
  color: #63748A;
}

.modal-container .btn.btn-outline.btn-sm:hover {
  background-color: #111827;
  border-color: #9ca3af;
  color: #f9fafb;
}

/* Consolidated modal z-index hierarchy in section below */

#student-details-modal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2000 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: rgba(15, 23, 42, 0.7) !important;
}

#student-details-modal .modal-content {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow-y: auto !important;
}

#student-details-modal {
  display: none;
  position: fixed !important;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2000 !important;
  padding: 10px !important;
  margin: 0 !important;
}

#student-details-modal .modal-content {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#student-details-modal .modal-container {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 10px !important;
}

#student-details-modal .modal-header {
  flex-shrink: 0 !important;
  padding: 12px 20px !important;
}

#student-details-modal .modal-body {
  flex: 1 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px !important;
}

#student-details-modal .table-wrapper {
  flex: 1 !important;
  overflow: auto !important;
  min-height: 0 !important;
}

.studentdetails-modal-container .table-wrapper {
  flex: 1;
  min-height: 300px;
  max-height: calc(90vh - 120px);
  overflow: auto;
}

/* Enhanced Modal Overlay (Alternative Style) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
  animation: backdropFadeIn 0.25s ease;
}

.modal-container {
  background: white;
  border-radius: var(--radius-xl);
  padding: 0;
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 90vh;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.modal-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.activefilter,
.active-filter {
  background-color: #2563eb !important;
  color: #e5e7eb !important;
}

/* Force black table headers only in main tables */
#summaryTable th,
#summaryTable thead td,
#archivedTable th,
#archivedTable thead td,
#parentsTable th,
#parentsTable thead td {
  color: #000000;
  background-color: #cbd5e1;
  font-weight: 600;
}

/* ===== UNIFIED ICON SYSTEM (Option 2) ===== */

/* Base Card Icon */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.card-icon i {
  font-size: 24px;
  position: relative;
  z-index: 2;
}

/* Icon Size Variants */
.card-icon-sm {
  width: 40px;
  height: 40px;
}

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

.card-icon-lg {
  width: 72px;
  height: 72px;
}

.card-icon-lg i {
  font-size: 32px;
}

/* Icon Color Variants - Using CSS Variables */
.card-icon-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 4px 12px rgba(79, 125, 243, 0.3);
}

.card-icon-success {
  background: linear-gradient(135deg, var(--success), #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.card-icon-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.card-icon-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.card-icon-purple {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.card-icon-indigo {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.card-icon-teal {
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.card-icon-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.card-icon-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.class-search-blurred {
  filter: blur(3px);
  pointer-events: none;
}

#class-search-modal {
  z-index: 2000;
}

/* Class Search Modal Action Buttons */
.btn-action-icon {
  background: #8b5cf6;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  font-size: 16px;
}

.btn-action-icon:hover {
  background: #7c3aed;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-action-icon:active {
  transform: scale(0.98);
}

#modal-classes {
  z-index: 2100;
}

/* ===== STUDENTS DETAILS MODAL ENHANCEMENTS ===== */

/* 1. Sortable Column Headers - Visual Indicators */
#student-details-modal thead th {
  position: relative;
  cursor: default;
  user-select: none;
  transition: all 0.2s ease;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

/* Make sortable columns interactive (currently sorted via dropdown, but we can add visual affordance) */
#student-details-modal thead th:not(.col-actions) {
  cursor: pointer;
}

#student-details-modal thead th:not(.col-actions):hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: var(--primary);
}

/* Add subtle arrow indicator on sortable columns */
#student-details-modal thead th:not(.col-actions)::after {
  content: '⇅';
  margin-left: 6px;
  opacity: 0;
  font-size: 10px;
  color: var(--text-secondary);
  transition: opacity 0.2s ease;
}

#student-details-modal thead th:not(.col-actions):hover::after {
  opacity: 0.6;
}

/* 2. Enhanced Filter Controls at Top of Modal */
#student-details-modal .modal-header select,
#student-details-modal .modal-header input[type="text"] {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  transition: all 0.2s ease;
  background: white;
}

#student-details-modal .modal-header select:hover,
#student-details-modal .modal-header input[type="text"]:hover {
  border-color: var(--primary-hover);
  background: var(--primary-light);
}

#student-details-modal .modal-header select:focus,
#student-details-modal .modal-header input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 125, 243, 0.1);
  outline: none;
}

/* Style the sort dropdown with better visual hierarchy */
#details-summary-sort {
  font-weight: 600;
  color: var(--primary);
  border-color: var(--primary);
  min-width: 140px;
}

#details-summary-sort:focus {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Search input with icon spacing */
#details-summary-search {
  min-width: 280px;
}

#details-summary-search::placeholder {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 12px;
}

/* 3. Better Badge Display in NAME Column */
#student-details-modal .student-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin-left: 8px;
  vertical-align: middle;
}

/* Prevent badge overflow in narrow column */
#student-details-modal td:nth-child(2) {
  overflow: visible;
  position: relative;
}

#student-details-modal td:nth-child(2) .student-badges {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
}

/* If there are many badges, show count indicator */
#student-details-modal .badge-overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  font-size: 9px;
  color: var(--text-secondary);
  background: var(--border-light);
  border-radius: 5px;
  margin-left: 3px;
  font-weight: 700;
  cursor: help;
}

#student-details-modal .badge-overflow:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 4. Modern Loading Skeleton Screen */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.skeleton-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-cell {
  height: 16px;
  background: linear-gradient(90deg,
      #f1f5f9 0%,
      #e2e8f0 50%,
      #f1f5f9 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 2s ease-in-out infinite;
}

.skeleton-cell:nth-child(1) {
  width: 8%;
}

.skeleton-cell:nth-child(2) {
  width: 35%;
}

.skeleton-cell:nth-child(3) {
  width: 16%;
}

.skeleton-cell:nth-child(4) {
  width: 12%;
}

.skeleton-cell:nth-child(5) {
  width: 17%;
}

.skeleton-cell:nth-child(6) {
  width: 12%;
}

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

  100% {
    background-position: -200% 0;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Replace the loading text with skeleton */
#student-details-modal tbody tr[data-loading] td {
  padding: 0 !important;
  border: none !important;
}

/* 5. Compact Action Buttons for Narrow Column */
#student-details-modal .col-actions {
  text-align: right;
  padding-right: 12px !important;
}

/* Make action dropdown button more compact */
#student-details-modal .dropdown-toggle {
  padding: 6px 12px;
  font-size: 13px;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

#student-details-modal .dropdown-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 125, 243, 0.2);
}

#student-details-modal .dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

#student-details-modal .dropdown-toggle:hover i {
  transform: rotate(180deg);
}

/* 6. Row Expansion Visual Indicator */
#student-details-modal tbody tr {
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Add subtle left border on hover to indicate clickability */
#student-details-modal tbody tr:hover td:first-child {
  border-left: 4px solid var(--primary);
  padding-left: 12px !important;
}

/* Enhanced expanded row styling */
#student-details-modal tbody tr.expanded-row {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

#student-details-modal tbody tr.expanded-row td:first-child {
  border-left: 5px solid var(--primary) !important;
  padding-left: 11px !important;
}

/* Detail row (expanded content) styling */
#student-details-modal tbody tr[id*="-details"] {
  background: white;
  cursor: default;
}

#student-details-modal tbody tr[id*="-details"]:hover {
  background: white;
  transform: none;
}

#student-details-modal tbody tr[id*="-details"]:hover td:first-child {
  border-left: none;
  padding-left: 8px !important;
}

/* 7. Better Student Count Badge */
#student-count-display {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(79, 125, 243, 0.25);
  transition: all 0.2s ease;
}

#student-count-display:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(79, 125, 243, 0.35);
}

/* 8. Info Button Enhancement */
#student-details-modal .btn-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  transition: all 0.2s ease;
}

#student-details-modal .btn-info:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  transform: translateY(-2px) scale(1.05);
}

/* 9. Improved Filter Status Buttons */
#student-details-modal .filter-btn-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#student-details-modal .filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

#student-details-modal .filter-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

#student-details-modal .filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 125, 243, 0.25);
}

#student-details-modal .filter-btn.active:hover {
  box-shadow: 0 4px 12px rgba(79, 125, 243, 0.35);
}

/* ===== UNIFIED BADGE SYSTEM (Option 2) ===== */

/* Badge Container - for grouping multiple badges */
.badge-group,
.student-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 8px;
}

/* Base Badge Component */
.badge {
  position: relative;
  /* Enable tooltip positioning */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  color: white;
  text-align: center;
  cursor: default;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.badge:hover {
  transform: translateY(-1px);
}

/* ===== BADGE SIZE VARIANTS ===== */

/* Extra Small - for compact indicators (like AC badges) */
.badge-xs {
  width: 20px;
  height: 18px;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  margin-left: 5px;
  cursor: help;
}

.badge-xs:hover {
  transform: translateY(-1px) scale(1.05);
}

/* Small - for inline tags */
.badge-sm {
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 5px;
}

/* Medium (default) - for status indicators */
.badge-md {
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 6px;
}

/* Large - for prominent badges */
.badge-lg {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 700;
}

/* ===== BADGE SHAPE VARIANTS ===== */

/* Pill shape (fully rounded) */
.badge-pill {
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Square (minimal rounding) */
.badge-square {
  border-radius: 4px;
}

/* Auto-width badges (for text content) */
.badge-auto {
  width: auto;
  min-width: 3em;
  padding: 0 8px;
}

/* ===== BADGE COLOR VARIANTS ===== */

.badge-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 2px 4px rgba(79, 125, 243, 0.25);
}

.badge-primary:hover {
  box-shadow: 0 4px 8px rgba(79, 125, 243, 0.35);
}

.badge-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.badge-success:hover {
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.35);
}

.badge-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: #422006;
  /* Darker brown for WCAG AA compliance (4.5:1 ratio) */
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.badge-warning:hover {
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.35);
}

.badge-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.badge-danger:hover {
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.35);
}

.badge-purple {
  background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.25);
}

.badge-purple:hover {
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.35);
}

.badge-slate {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
}

.badge-slate:hover {
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.35);
}

.badge-amber {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #422006;
  /* Darker brown for WCAG AA compliance (4.5:1 ratio) */
  box-shadow: 0 2px 4px rgba(234, 179, 8, 0.25);
}

.badge-amber:hover {
  box-shadow: 0 4px 8px rgba(234, 179, 8, 0.35);
}

.badge-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #422006;
  /* Darker brown for WCAG AA compliance (4.5:1 ratio) */
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.25);
}

.badge-orange:hover {
  box-shadow: 0 4px 8px rgba(249, 115, 22, 0.35);
}

.badge-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.badge-blue:hover {
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.35);
}

.badge-secondary {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  color: #1f2937;
  /* Dark gray text for excellent contrast */
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.25);
}

.badge-secondary:hover {
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.35);
}

.badge-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  box-shadow: 0 2px 4px rgba(6, 182, 212, 0.25);
}

.badge-info:hover {
  box-shadow: 0 4px 8px rgba(6, 182, 212, 0.35);
}

/* ===== BACKWARD COMPATIBILITY ===== */

/* Old .ac-badge system - now uses unified badge system */
.ac-badge {
  /* Use .badge .badge-xs .badge-warning instead */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 18px;
  font-size: 10px;
  color: #78350f;
  /* Dark brown for better contrast on orange background */
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  border-radius: 5px;
  margin-left: 5px;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1;
  text-align: center;
  cursor: help;
  position: relative;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
}

.ac-badge:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.35);
}

/* Old .ac-badge variants - Use unified .badge system instead */
.ac-badge-no-media {
  /* Use .badge .badge-xs .badge-auto .badge-danger instead */
  width: auto;
  min-width: 5.5em;
  height: 18px;
  font-size: 10px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25);
}

.ac-badge-no-media:hover {
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.35);
}

.ac-badge-text {
  /* Use .badge .badge-xs .badge-auto instead */
  width: auto;
  min-width: 3em;
  height: 18px;
  font-size: 10px;
  padding: 0 8px;
}

/* DEPRECATED: Old .status-badge system - Use .badge .badge-pill instead */
.status-badge {
  /* Use .badge .badge-md .badge-pill .badge-{color} instead */
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
  cursor: default;
}

/* Status badge variants - simplified to use unified colors */
.status-badge-active {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.status-badge-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.35);
}

.status-badge-trial {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.status-badge-trial:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.35);
}

.status-badge-waitlist {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.status-badge-waitlist:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.35);
}

.status-badge-done {
  background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.25);
}

.status-badge-done:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.35);
}

.status-badge-archived {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
}

.status-badge-archived:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.35);
}

.status-badge-payment-issue {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.status-badge-payment-issue:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.35);
}

/* Instant tooltip on badge hover - Unified badge system */
.badge[title]:hover::after,
.ac-badge[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1e293b;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: none;
  transition: none;
}

.badge[title]:hover::before,
.ac-badge[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  z-index: 10000;
  pointer-events: none;
}

/* Expanded row highlighting - when student detail row is open */
/* Expanded row - base styling */
/* Note: border-collapse prevents tr backgrounds from showing, so we style the cells */
tbody tr.expanded-row td {
  background-color: #f0f9ff !important;
  /* Very light blue - softer look */
  transition: all 0.2s ease !important;
}

/* First cell gets prominent left border - theme accent */
tbody tr.expanded-row td:first-child {
  border-left: 5px solid #3b82f6 !important;
  /* Thicker blue left border */
  padding-left: 10px !important;
  /* Adjust padding for border */
}

/* Override hover background for expanded rows - slightly darker on hover */
tbody tr.expanded-row:hover td,
tbody tr.expanded-row.hover-bg:hover td {
  background-color: #e0f2fe !important;
  /* Slightly darker blue on hover */
}

/* Keep the cursor pointer for expanded rows */
tbody tr.expanded-row.cursor-pointer {
  cursor: pointer;
}

/* Smooth animation for detail row expansion */
tbody tr[id^="detail-row-"] {
  transition: all 0.2s ease;
}

/* Detail row content fade-in */
tbody tr[id^="detail-row-"] td {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* z-index moved to consolidated hierarchy section above */
#studentAllClassesModal {
  background-color: rgba(0, 0, 0, 0.7);
}

#studentAllClassesModal .modal-content {
  position: relative;
  padding-top: 50px;
}

#studentAllClassesModal .close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background-color: #6c757d;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: normal;
  font-family: inherit;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  box-shadow: none;
  z-index: 10001;
}

#studentAllClassesModal .close-btn:hover {
  background-color: #5a6268;
  transform: none;
}

.btn-view {
  background-color: #17a2b8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-left: 5px;
}

.btn-view:hover {
  background-color: #138496;
}

.modal-footer button {
  vertical-align: middle;
}

/* SBC Filter Buttons */
#students-by-class-modal .btn-sm {
  background: #6b7280 !important;
  border-color: #4b5563 !important;
  color: white !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: all 0.2s !important;
}

#students-by-class-modal .btn-sm:hover {
  background: #4b5563 !important;
  transform: translateY(-1px) !important;
}

#students-by-class-modal .btn-sm.active-filter {
  background: #3b82f6 !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
  transform: scale(1.02) !important;
}

#students-by-class-modal .btn-sm.active-filter::after {
  content: '●';
  position: absolute;
  top: -4px;
  right: -4px;
  background: white !important;
  color: #3b82f6 !important;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 2px solid #3b82f6;
}

/* Instant Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  width: 250px;
  text-align: center;
  white-space: normal;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.05s ease;
  pointer-events: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.05s ease;
  z-index: 99999;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Evaluation Rating System */
.eval-skill-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 16px;
  align-items: center;
  margin-bottom: 12px;
}

.rating-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rating-buttons label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.rating-buttons label:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.rating-buttons input[type="radio"] {
  margin: 0;
  accent-color: var(--primary);
}

.rating-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.rating-circle.learning {
  background: #9ca3af;
}

.rating-circle.developing {
  background: #f59e0b;
}

.rating-circle.mastered {
  background: #10b981;
}

/* Fix evaluation view modal skill rows - prevent collapsing */
#view-eval-floor-skills>div,
#view-eval-vault-skills>div,
#view-eval-bars-skills>div,
#view-eval-beam-skills>div {
  display: flex !important;
  align-items: center !important;
  min-height: 54px !important;
  padding: 14px 12px !important;
  line-height: 1.4 !important;
  font-size: 13px !important;
  background: white !important;
  border-radius: 8px !important;
}

/* Ensure skill containers have proper spacing - 3 column layout */
#view-eval-floor-skills,
#view-eval-vault-skills,
#view-eval-bars-skills,
#view-eval-beam-skills {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  margin-bottom: 24px !important;
  min-height: 50px !important;
}

/* Ensure section headers don't overlap */
#view-evaluation-modal h3 {
  display: block !important;
  margin: 28px 0 16px 0 !important;
  padding: 0 0 8px 0 !important;
  clear: both !important;
  line-height: 1.3 !important;
  min-height: 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

@media print {
  /* ========================================
     PROFESSIONAL PRINT STYLES FOR EVALUATION REPORT
     ======================================== */

  /* Reset base styles */
  html,
  body {
    height: auto !important;
    overflow: visible !important;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide everything except the evaluation report modal */
  body>* {
    display: none !important;
  }

  /* CRITICAL: Explicitly hide ALL other modals to prevent them from printing */
  #evaluation-list-modal,
  #evaluation-edit-modal,
  #student-details-modal,
  #modal-students,
  #class-search-modal,
  #add-student-modal,
  .modal:not(#view-evaluation-modal),
  .modal-overlay,
  .modal-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Hide modal background overlays */
  #view-evaluation-modal::before,
  #view-evaluation-modal::after {
    display: none !important;
  }

  /* Show ONLY the evaluation report modal for printing */
  #view-evaluation-modal {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    inset: auto !important;
    z-index: 9999 !important;
  }

  /* Modal content - minimal margins, let @page handle it */
  #view-evaluation-modal .modal-content.evaluation-report-content {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 20px !important;
    font-size: 11px !important;
  }

  /* Make all elements visible */
  #view-evaluation-modal * {
    visibility: visible !important;
  }

  /* Hide interactive elements */
  #view-evaluation-modal button,
  #view-evaluation-modal .close-btn,
  #view-evaluation-modal .action-buttons,
  #view-evaluation-modal .fa-times {
    display: none !important;
  }

  /* Enable color printing for backgrounds and borders */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* ========================================
     HEADER SECTION
     ======================================== */

  #view-evaluation-modal .eval-header {
    margin-bottom: 32px !important;
    padding-bottom: 20px !important;
    border-bottom: 2px solid #3b82f6 !important;
    page-break-after: avoid !important;
  }

  #view-evaluation-modal .eval-header h2 {
    font-size: 20px !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
    font-weight: 700 !important;
  }

  #view-evaluation-modal .eval-header div {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #475569 !important;
  }

  #view-evaluation-modal .eval-header strong {
    color: #1e293b !important;
    font-weight: 600 !important;
  }

  /* ========================================
     SECTION HEADINGS
     ======================================== */

  #view-evaluation-modal h3 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 16px 0 8px 0 !important;
    padding: 0 !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  #view-evaluation-modal h3 i {
    font-size: 12px !important;
  }

  /* ========================================
     CONTENT SECTIONS
     ======================================== */

  /* Performance and Physical sections */
  #view-evaluation-modal .modal-content>div[style*="background:linear-gradient"] {
    background: #f8fafc !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }

  /* Grid items inside sections */
  #view-evaluation-modal .modal-content div[style*="grid-template-columns"]>div {
    background: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    page-break-inside: avoid !important;
  }

  #view-evaluation-modal .modal-content div[style*="grid-template-columns"]>div strong {
    font-size: 10px !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
  }

  #view-evaluation-modal .modal-content div[style*="grid-template-columns"]>div span {
    font-size: 13px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
  }

  /* ========================================
     SKILLS SECTIONS
     ======================================== */

  .skills-container {
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
  }

  /* Skill containers - maintain grid layout */
  #view-eval-floor-skills,
  #view-eval-vault-skills,
  #view-eval-bars-skills,
  #view-eval-beam-skills {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    background: #f8fafc !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid !important;
  }

  /* Individual skill items */
  #view-eval-floor-skills>div,
  #view-eval-vault-skills>div,
  #view-eval-bars-skills>div,
  #view-eval-beam-skills>div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    background: white !important;
    border: none !important;
    outline: none !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    page-break-inside: avoid !important;
    min-height: 32px !important;
    box-shadow: none !important;
  }

  #view-eval-floor-skills>div>div:first-child,
  #view-eval-vault-skills>div>div:first-child,
  #view-eval-bars-skills>div>div:first-child,
  #view-eval-beam-skills>div>div:first-child {
    font-weight: 600 !important;
    color: #334155 !important;
  }

  /* Rating circles in skills */
  .rating-circle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 9px !important;
    border: none !important;
  }

  .rating-circle.learning {
    background: #94a3b8 !important;
  }

  .rating-circle.developing {
    background: #f59e0b !important;
  }

  .rating-circle.mastered {
    background: #10b981 !important;
  }

  /* ========================================
     FEEDBACK SECTIONS (Strengths, Improvements, Comments)
     ======================================== */

  /* Strengths and Improvements (yellow background) */
  #view-evaluation-modal .modal-content>div[style*="fef3c7"] {
    background: #fef3c7 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }

  #view-evaluation-modal .modal-content>div[style*="fef3c7"] h3 {
    color: #78350f !important;
    margin: 0 0 12px 0 !important;
  }

  /* Comments section (blue background) */
  #view-evaluation-modal .modal-content>div[style*="dbeafe"] {
    background: #dbeafe !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }

  #view-evaluation-modal .modal-content>div[style*="dbeafe"] h3 {
    color: #1e3a8a !important;
    margin: 0 0 12px 0 !important;
  }

  /* Text content in feedback sections */
  #view-eval-strengths,
  #view-eval-improvements,
  #view-eval-comments {
    background: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #1e293b !important;
  }

  /* ========================================
     PAGE BREAKS
     ======================================== */

  /* Avoid breaking these elements */
  .skills-container,
  #view-evaluation-modal .modal-content>div[style*="background"],
  .eval-header {
    page-break-inside: avoid !important;
  }

  /* Ensure proper spacing between sections */
  .skills-container+.skills-container {
    margin-top: 20px !important;
  }

  /* ========================================
     TYPOGRAPHY IMPROVEMENTS
     ======================================== */

  #view-evaluation-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  }

  /* Better text rendering */
  #view-evaluation-modal * {
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }

  /* ========================================
     FOOTER/BRANDING (Optional)
     ======================================== */

  @page {
    margin: 0.4in;
    size: letter portrait;
  }
}

/* ============================================================================
   MODAL Z-INDEX HIERARCHY (Consolidated)
   Higher number = appears on top
   ============================================================================ */

/* Base modals */
#student-details-modal {
  z-index: 2000 !important;
}

#class-search-modal {
  z-index: 2000;
}

/* Secondary modals (above base) */
#modal-classes {
  z-index: 6000 !important;
}

#modal-add-class-type {
  z-index: 6000 !important;
}

/* Tertiary modals (date/time selection) - above edit and class modals */
#date-modal {
  z-index: 7000 !important;
}

/* Edit modal and Add Student modal (needs to be above student details) */
#student-profile-modal,
#edit-modal {
  z-index: 5000 !important;
}

/* Confirmation modals (highest priority) */
#change-confirm-modal,
#archive-modal {
  z-index: 9999 !important;
}

/* Evaluation modals (separate hierarchy from student modals) */
#evaluation-list-modal {
  z-index: 2100 !important;
}

#evaluation-edit-modal {
  z-index: 2000 !important;
}

#view-evaluation-modal {
  z-index: 100000 !important;
}

/* Student all classes modal */
#studentAllClassesModal {
  z-index: 10000 !important;
}

/* Inherited z-index for nested overlays */
.modal-overlay {
  z-index: inherit;
}

.eval-skill-grid-container {
  display: block;
}

.view-eval-skill-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 12px;
  margin-bottom: 16px;
  align-items: center;
}

.view-eval-rating-chosen {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.view-rating-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.view-rating-circle.learning {
  background: #9ca3af;
}

.view-rating-circle.developing {
  background: #f59e0b;
}

.view-rating-circle.mastered {
  background: #10b981;
}

.eval-skill-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 12px;
  margin-bottom: 16px;
  align-items: center;
}

.eval-rating-group label {
  margin-right: 8px;
  font-size: 12px;
}

.rating-learning {
  background: #e5e7eb;
  color: #374151;
}

.rating-developing {
  background: #fef3c7;
  color: #92400e;
}

.rating-mastered {
  background: #d1fae5;
  color: #065f46;
}

/* Hybrid Burger Menu + Evaluation Button */
.student-actions-hybrid {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.student-actions-dropdown {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.burger-btn {
  background: #64748b;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  font-size: 18px;
  font-weight: bold;
  position: relative;
  z-index: 10;
}

.burger-btn:hover {
  background: #475569;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.burger-btn:active {
  transform: scale(0.98);
}

.dropdown-menu {
  position: absolute;
  left: auto;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  min-width: 180px;
  z-index: 10000;
  display: none;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
  animation: dropdownSlideIn 0.2s ease-out forwards;
  transform-origin: right center;
  z-index: 10001;
}

/* FIX: Dropdown positioning for top rows - align to top instead of center */
.dropdown-menu.align-top {
  top: 0;
  transform: translateY(0);
  transform-origin: right top;
}

/* FIX: Dropdown positioning for bottom rows - align to bottom */
.dropdown-menu.align-bottom {
  top: auto;
  bottom: 0;
  transform: translateY(0);
  transform-origin: right bottom;
}

/* Removed duplicate - using base .col-actions definition */

.student-actions-dropdown {
  position: relative;
  z-index: 100;
  /* Ensure dropdown container is above table rows */
}

.student-actions-dropdown.active {
  z-index: 10002;
  /* Even higher when menu is open */
}

@keyframes dropdownSlideIn {
  0% {
    opacity: 0;
    scale: 0.95;
  }

  100% {
    opacity: 1;
    scale: 1;
  }
}

.dropdown-item {
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  background: white;
  position: relative;
  z-index: 10000;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: #f8fafc;
  padding-left: 20px;
}

.dropdown-item:active {
  background: #f1f5f9;
}

.dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.dropdown-item.info i {
  color: #8b5cf6;
}

.dropdown-item.success i {
  color: #10b981;
}

.dropdown-item.primary i {
  color: #3b82f6;
}

.dropdown-item.warning i {
  color: #f59e0b;
}

.dropdown-item.danger i {
  color: #ef4444;
}

.dropdown-item.secondary i {
  color: #64748b;
}

.btn-evaluation {
  background: #64748b;
  color: white;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.btn-evaluation:hover {
  background: #f59e0b;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-evaluation:active {
  transform: scale(0.98);
}

/* Removed duplicate - using base .col-actions definition */

tbody tr {
  position: relative;
  z-index: 1;
}

/* When dropdown is open, elevate the entire row above sticky headers */
tbody tr:has(.dropdown-menu.show) {
  z-index: 100;
}

tbody tr:hover {
  z-index: 2;
}

td {
  overflow: visible !important;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: visible !important;
}

.modal-body {
  overflow: visible !important;
}

/* Force badges visible */
.ac-badge {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.student-name-link .ac-badge,
td .ac-badge {
  display: inline-flex !important;
}

/* ===== Student Context Menu ===== */
.context-menu#student-context-menu {
  position: fixed;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  min-width: 200px;
  max-height: calc(100vh - 16px);
  z-index: 10000;
  overflow: visible;
  opacity: 0;
}

.context-menu#student-context-menu.context-menu-visible {
  animation: contextMenuFadeIn 0.2s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes contextMenuFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-header {
  padding: 12px 16px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-h2);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: 7px 7px 0 0;
  user-select: none;
}

.context-menu-header i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
}

.context-menu-item {
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  background: white;
  user-select: none;
}

.context-menu-item:hover {
  background: var(--bg);
  padding-left: 20px;
}

.context-menu-item:active {
  background: var(--bg-secondary);
}

.context-menu-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.context-menu-item i.fa-whatsapp {
  color: #25d366;
}

.context-menu-item i.fa-envelope {
  color: var(--primary);
}

.context-menu-item i.fa-copy {
  color: var(--slate);
}

.context-menu-item i.fa-clock-rotate-left {
  color: var(--purple);
}

.context-menu-item i.fa-calendar-check {
  color: var(--success);
}

.context-menu-item i.fa-chart-line {
  color: var(--purple);
}

.context-menu-item i.fa-pen-to-square {
  color: var(--primary);
}

.context-menu-item i.fa-book {
  color: var(--slate);
}

.context-menu-item i.fa-phone {
  color: var(--success);
}

.context-menu-item i.fa-at {
  color: var(--primary);
}

.context-menu-item i.fa-address-card {
  color: var(--slate);
}

.context-menu-item i.fa-copy {
  color: var(--purple);
}

.context-menu-item i.fa-download {
  color: var(--success);
}

.context-menu-item i.fa-print {
  color: var(--slate);
}

.context-menu-item i.fa-users {
  color: var(--primary);
}

.context-menu-item i.fa-box-archive {
  color: var(--warning);
}

.context-menu-item i.fa-ellipsis {
  color: var(--text-secondary);
}

.context-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* Submenu styles */
.context-menu-item.has-submenu {
  position: relative;
}

.context-menu-item.has-submenu::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.context-menu-item.has-submenu:hover::after {
  transform: translateX(2px);
}

.context-submenu {
  position: absolute;
  left: 100%;
  top: -8px;
  margin-left: -2px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  min-width: 180px;
  z-index: 10001;
  overflow: hidden;
  display: none;
  animation: submenuFadeIn 0.15s ease-out;
  pointer-events: none;
}

.context-submenu.visible {
  display: block !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}

@keyframes submenuFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.context-submenu.open-left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: -2px;
  transform-origin: top right;
  animation: submenuFadeInLeft 0.15s ease-out;
}

@keyframes submenuFadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(8px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Submenu opens upward when it would be clipped at the bottom */
.context-submenu.open-up {
  top: auto;
  bottom: -8px;
}

/* Dangerous action styling */
.context-menu-item.danger {
  color: #ef4444;
}

.context-menu-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.context-menu-item.danger i {
  color: #ef4444 !important;
}

/* Student Details Modal Filters */
#student-details-modal .modal-filter-container {
  padding: 12px 20px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

#student-details-modal .filter-group-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
  margin-bottom: 6px !important;
}

/* DEPRECATED: Old filter-tab system - Use .tab-nav-pills instead */
/* Keeping for backward compatibility - Remove after HTML migration */
#student-details-modal .filter-tab {
  /* Use .tab-nav-pills .tab-nav-item with data-color attribute instead */
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  opacity: 0.85;
  box-shadow: none;
}

#student-details-modal .filter-tab:hover {
  opacity: 1;
  background: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Simplified active states - use data-color attribute */
#student-details-modal .filter-tab.active-filter {
  font-weight: 700;
  opacity: 1;
  color: white;
  transform: scale(1.02);
}

/* Map old data-filter values to colors */
#student-details-modal .filter-tab[data-filter="all"].active-filter,
#student-details-modal .filter-tab[data-filter="active"].active-filter,
#student-details-modal .filter-tab[data-filter="active-classes"].active-filter,
#student-details-modal .filter-tab[data-filter="trial"].active-filter {
  background: var(--success);
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#student-details-modal .filter-tab[data-filter="inactive"].active-filter {
  background: #64748b;
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

#student-details-modal .filter-tab[data-filter="archived"].active-filter {
  background: var(--warning);
  border-color: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#student-details-modal .filter-tab[data-filter="active-no-classes"].active-filter {
  background: #eab308;
  border-color: #ca8a04;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

#student-details-modal .filter-tab[data-filter="active-archived-classes"].active-filter,
#student-details-modal .filter-tab[data-filter="waitlist"].active-filter {
  background: var(--purple);
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

#student-details-modal .filter-tab[data-filter="payment-issue"].active-filter {
  background: var(--danger);
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

#student-details-modal .filter-tab.active-filter span,
#student-details-modal .filter-tab.active-filter .count-badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

#student-details-modal .modal-body {
  flex: 1 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 0 !important;
}

#student-details-modal .table-wrapper {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  min-height: 0 !important;
  background: white !important;
  padding: 16px !important;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
#student-details-modal .table-wrapper::-webkit-scrollbar {
  display: none;
}

/* Hover Card */
#student-hover-card {
  position: fixed;
  display: none;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.2);
  padding: 0;
  z-index: 99999;
  min-width: 320px;
  max-width: 360px;
  pointer-events: none;
  overflow: hidden;
  font-family: sans-serif;
}

.hc-header {
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

.hc-body {
  padding: 12px 14px;
}

.hc-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.hc-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.hc-val {
  color: var(--text-main);
  font-weight: 500;
}

/* ============================================================================
   UTILITY CLASSES - Replacing inline styles
   ============================================================================ */

/* Display utilities */
.d-none {
  display: none !important;
}

.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

/* Flex utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.align-start {
  align-items: flex-start;
}

.align-end {
  align-items: flex-end;
}

/* Gap utilities */
.gap-4 {
  gap: 4px;
}

.gap-6 {
  gap: 6px;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

.gap-24 {
  gap: 24px;
}

/* Margin utilities */
.m-0 {
  margin: 0;
}

.mt-8 {
  margin-top: 8px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-15 {
  margin-top: 15px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-25 {
  margin-top: 25px;
}

.mb-6 {
  margin-bottom: 6px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mr-8 {
  margin-right: 8px;
}

.mr-15 {
  margin-right: 15px;
}

.mr-30 {
  margin-right: 30px;
}

.ml-8 {
  margin-left: 8px;
}

/* Padding utilities */
.p-0 {
  padding: 0;
}

.p-10 {
  padding: 10px;
}

.p-12 {
  padding: 12px;
}

.p-16 {
  padding: 16px;
}

.p-20 {
  padding: 20px;
}

.pt-20 {
  padding-top: 20px;
}

.pb-15 {
  padding-bottom: 15px;
}

.px-8 {
  padding-left: 8px;
  padding-right: 8px;
}

.px-12 {
  padding-left: 12px;
  padding-right: 12px;
}

.py-12 {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Width utilities */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.min-w-100 {
  min-width: 100px;
}

.min-w-120 {
  min-width: 120px;
}

.min-w-150 {
  min-width: 150px;
}

.min-w-180 {
  min-width: 180px;
}

.max-w-95 {
  max-width: 95%;
}

/* Height utilities */
.h-full {
  height: 100%;
}

.min-h-50 {
  min-height: 50px;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-12 {
  font-size: 12px;
}

.text-13 {
  font-size: 13px;
}

.text-14 {
  font-size: 14px;
}

.text-16 {
  font-size: 16px;
}

.text-18 {
  font-size: 18px;
}

.text-24 {
  font-size: 24px;
}

.text-28 {
  font-size: 28px;
}

.font-500 {
  font-weight: 500;
}

.font-600 {
  font-weight: 600;
}

.font-700 {
  font-weight: 700;
}

.font-bold {
  font-weight: bold;
}

.line-height-1 {
  line-height: 1;
}

.line-height-18 {
  line-height: 1.8;
}

/* Color utilities */
.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: #94a3b8;
}

.text-slate {
  color: var(--text-secondary);
}

.text-dark {
  color: var(--text-main);
}

.text-white {
  color: white;
}

.bg-muted {
  background-color: #f1f5f9;
}

.bg-white {
  background: white;
}

.bg-light {
  background: #f8fafc;
}

/* Border utilities */
.border-bottom {
  border-bottom: 1px solid var(--border);
}

.border-top {
  border-top: 1px solid var(--border);
}

.border-light {
  border: 1px solid #e2e8f0;
}

.rounded-8 {
  border-radius: 8px;
}

.rounded-12 {
  border-radius: 12px;
}

/* Overflow utilities */
.overflow-auto {
  overflow: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-hidden {
  overflow: hidden;
}

/* Cursor utilities */
.cursor-pointer {
  cursor: pointer;
}

/* Form utilities */
.input-disabled {
  background-color: #f1f5f9;
}

.input-disabled-centered {
  background-color: #f1f5f9;
  text-align: center;
}

/* Modal utilities */
.modal-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  padding: 10px;
  margin: 0;
}

/* Table/content wrapper utilities */
.table-wrapper-bordered {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.scrollable-y {
  overflow-y: auto;
  overflow-x: hidden;
}

.scrollable-content {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.modal-fullscreen-content {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.modal-90vh {
  width: 95vw;
  height: 90vh;
  max-width: 95vw;
  max-height: 90vh;
  margin: 0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close-btn {
  min-width: 100px;
  min-height: 50px;
  font-size: 16px;
}

.modal-close-x {
  cursor: pointer;
  font-size: 28px;
  font-weight: bold;
}

/* Table utilities */
.sticky-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.sticky-header-gray {
  position: sticky;
  top: 0;
  background: #e5e7eb;
  z-index: 10;
}

.sticky-header-light {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 10;
}

.table-fixed {
  table-layout: fixed;
}

.th-cell {
  padding: 12px 8px;
  font-weight: 600;
}

.th-cell-nowrap {
  white-space: nowrap;
  padding: 8px;
}

/* Grid utilities */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.grid-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.grid-span-full {
  grid-column: 1 / -1;
}

.grid-2-1-1 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

/* Status checkbox row */
.status-checkbox-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 10px;
}

.status-checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: help;
}

/* Instant tooltip for status checkboxes */
.status-checkbox-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1e293b;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: none;
  transition: none;
}

.status-checkbox-item[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  z-index: 10000;
  pointer-events: none;
}

.status-checkbox {
  margin: 0;
  width: 14px;
  height: 14px;
}

.status-checkbox-label {
  margin: 0;
  font-size: 12px;
  line-height: 1;
}

/* Filter/control row */
.filter-row {
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  margin-right: 8px;
}

/* Copyright footer */
.copyright-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e2e8f0;
}

.copyright-text {
  color: #94a3b8;
  font-size: 12px;
  margin: 0;
}

/* Section headers for evaluations */
.eval-section-header {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.eval-skill-label {
  font-weight: 500;
  padding: 12px 0;
}

/* Info box styles */
.info-box-yellow {
  background: #fef3c7;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.info-box-blue {
  background: #dbeafe;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.info-box-green {
  background: #d1fae5;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.info-box-light {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

/* Stat display in class modal */
.class-stat-bar {
  display: flex;
  gap: 20px;
  background: #f1f5f9;
  padding: 10px;
  border-radius: 8px;
}

.stat-bold {
  font-weight: bold;
}

.stat-remaining {
  font-weight: bold;
  color: #10b981;
}

.hc-notes {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.hc-notes-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 4px;
}

.hc-notes-text {
  font-size: 12px;
  color: #475569;
  font-style: italic;
  line-height: 1.4;
}

/* Expanded Row */
.expanded-row-content {
  background: #e2e8f0;
  padding: 16px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
  border-top: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  border-left: 4px solid #3b82f6;
}

.expanded-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-block h5 {
  margin: 0 0 8px 0;
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.cursor-pointer {
  cursor: pointer;
}

/* Hover background for interactive rows */
.hover-bg:hover {
  background-color: #f8fafc !important;
}

/* Table row hover */
tbody tr:hover:not(.expanded-row) {
  background-color: #f8fafc;
}

/* BUT expanded rows should keep blue even on hover */
tr.expanded-row.hover-bg,
tr.expanded-row.hover-bg:hover {
  background-color: #dbeafe !important;
}

tr.expanded-row.hover-bg td,
tr.expanded-row.hover-bg:hover td {
  background-color: #dbeafe !important;
}

/* Removed duplicate - using hover card definition above */

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow-dropdown);
  min-width: 300px;
  max-width: 450px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-hide {
  opacity: 0;
  transform: translateX(110%);
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: white;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #64748b;
}

/* Toast types */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
  background: #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  background: #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  background: #f59e0b;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  background: #3b82f6;
}

/* ============================================================================
   RECENT ACTIVITY SIDEBAR
   ============================================================================ */

.activity-sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 46vh;
  background: white;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.13);
  z-index: 999998;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--primary);
  border-left: none;
}

.activity-sidebar.open {
  transform: translateY(0);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  border-radius: 0;
}

.activity-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.activity-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.activity-toggle-btn i {
  transition: transform 0.2s;
}

.activity-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
}

.activity-section {
  margin-bottom: 0;
}

.activity-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.activity-section-title i {
  color: var(--primary);
  font-size: 16px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Grid layout for card-style activities — 2 cols inside each half of the bottom panel */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.activity-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 90px;
  position: relative;
  overflow: hidden;
}

/* Accent bar on top of card */
.activity-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transition: height 0.2s ease;
}

.activity-item.clickable {
  cursor: pointer;
}

.activity-item.clickable:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.activity-item.clickable:hover::before {
  height: 4px;
}

.activity-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}

.activity-item-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 13px;
  flex: 1;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.activity-item-time {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.activity-item-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 8px;
  line-height: 1.5;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.activity-item-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: auto;
  align-self: flex-start;
}

.activity-item-badge.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.activity-item-badge.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.activity-item-badge.info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.activity-item-badge.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.activity-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 24px;
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
}

/* Floating toggle button — always visible, draggable vertically */
.activity-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: white;
  border: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transition: box-shadow 0.2s;
  z-index: 1000000;
}

.activity-fab:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.activity-fab:active {
  cursor: grabbing;
}

/* Badge count on FAB */
.activity-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid white;
}

/* Responsive — stack sections vertically on small screens */
@media (max-width: 768px) {
  .activity-sidebar {
    height: 60vh;
  }

  .activity-content {
    grid-template-columns: 1fr;
  }

  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Today's Check-ins Tab Styles */
.checkin-cards-grid {
  display: grid;
  /* Dynamic width: min 280px, max auto-fill based on container */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.checkin-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  /* Ensure content fits */
  min-width: 0;
}

.checkin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.checkin-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.checkin-card-icon {
  width: 32px;
  height: 32px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.checkin-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  flex: 1;
  /* Allow wrapping for longer names instead of truncating */
  word-break: break-word;
}

.checkin-card-class {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.checkin-card-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.checkin-card-stat {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 6px;
  min-width: 70px;
}

.checkin-card-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.checkin-card-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.checkin-card-stat-value.remaining {
  color: #3b82f6;
}

.checkin-group {
  margin-bottom: 32px;
}

.checkin-group-header {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkin-group-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Today's Check-ins Count Badge */
.checkin-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-size: 22px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Today's Classes Enhanced Styles */
.today-summary-bar {
  display: flex;
  gap: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}

/* ==================== TODAY'S CLASSES - SINGLE ROW HEADER ==================== */

.today-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.today-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.today-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.today-date {
  color: #64748b;
  font-size: 13px;
}

.today-stats-inline {
  color: #94a3b8;
  font-size: 12px;
  padding-left: 10px;
  border-left: 1px solid #e2e8f0;
}

.today-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Check-in Primary Button */
.btn-checkin-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-checkin-primary:hover {
  background: #2563eb;
}

.btn-checkin-primary i {
  font-size: 14px;
}

/* Clean Search Box */
.today-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.today-search-box i.fa-search {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.today-search-box input {
  padding: 8px 30px 8px 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 180px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  background: #f8fafc;
}

.today-search-box input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.today-search-box input::placeholder {
  color: #94a3b8;
}

#today-search-clear {
  display: none;
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  font-size: 12px;
}

#today-search-clear:hover {
  color: #64748b;
}

/* Filter Pills */
.today-filter-pills {
  display: flex;
  gap: 4px;
}

.today-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: none;
  background: #e5e7eb !important;
  color: #6b7280 !important;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
}

.today-pill:hover:not(.active) {
  background: #d1d5db !important;
  color: #374151 !important;
}

.today-pill:focus {
  outline: none;
  box-shadow: none;
}

.today-pill.active {
  background: #3b82f6 !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.today-pill:not(.active) {
  background: #e5e7eb !important;
  color: #6b7280 !important;
}

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

.today-pill.active .pill-dot {
  background: #fff !important;
}

/* ==================== CLEAN CARD DESIGN (Phase 1) ==================== */

.checkin-card-clean {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.15s;
  position: relative;
}

.checkin-card-clean:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

/* Card main row - name and status */
.card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 8px;
}

.card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-check {
  width: 20px;
  height: 20px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.card-check.missed {
  background: #ef4444;
}

.card-expected-dot {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tags */
.card-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}

.card-tag.makeup {
  background: #dbeafe;
  color: #1d4ed8;
}

.card-tag.missed {
  background: #fecaca;
  color: #dc2626;
}

.card-tag.expected {
  background: #fef3c7;
  color: #d97706;
}

/* Progress row */
.card-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.card-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  min-width: 36px;
}

.card-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.card-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

/* Action row */
.card-action-row {
  display: flex;
  justify-content: flex-end;
}

.card-done {
  font-size: 12px;
  color: #22c55e;
  font-weight: 500;
}

.card-done i {
  margin-right: 4px;
}

/* Action button group - primary button + more dropdown */
.card-action-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-primary-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.card-primary-btn:hover {
  background: #2563eb;
}

.card-primary-btn.expected {
  background: #f59e0b;
}

.card-primary-btn.expected:hover {
  background: #d97706;
}

.card-primary-btn.reinstate {
  background: #22c55e;
}

.card-primary-btn.reinstate:hover {
  background: #16a34a;
}

/* More button (three dots) */
.card-more-dropdown {
  position: relative;
}

.card-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.card-more-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

/* Dropdown menu */
.card-action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}

.card-more-dropdown .card-action-menu {
  right: 0;
}

.card-action-menu.show {
  display: block;
  animation: menuFadeIn 0.15s ease-out;
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-action-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.card-action-menu button:hover {
  background: #f1f5f9;
}

.card-action-menu button i {
  width: 16px;
  color: #64748b;
}

/* Skipped card - minimal */
.skipped-card {
  opacity: 0.6;
  border-left: 3px solid #9ca3af;
}

.skipped-card .card-main {
  margin-bottom: 0;
}

.skipped-card .card-name {
  text-decoration: line-through;
  color: #6b7280;
}

.card-status.skipped {
  font-size: 11px;
  color: #6b7280;
}

/* Expected card */
.expected-card {
  border-left: 3px dashed #f59e0b;
  background: linear-gradient(to right, #fffbeb, white);
}

/* Status-specific card styling */
.checkin-card-clean.status-completed {
  border-left: 3px solid #22c55e;
}

.checkin-card-clean.status-missed {
  border-left: 3px solid #ef4444;
  background: linear-gradient(to right, #fef2f2, white);
}

/* ==================== EDIT STUDENT MODAL - TABBED FORM ==================== */

#student-profile-modal .modal-content,
#edit-modal .modal-content {
  width: 95vw;
  max-width: 1400px;
  height: 95vh;
  max-height: 95vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Parent container should not scroll */
  position: relative;
}

.edit-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px;
  /* using 32px instead of 24px to match old add student modal */
  background: white;
}

/* Tab Content - Ensure it fills the scroll container for macOS trackpad */
.edit-tab-content {
  display: none;
  padding: 24px;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.edit-tab-content.active {
  display: block;
}



.edit-modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.edit-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.student-id-badge {
  background: #e2e8f0;
  color: #475569;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: monospace;
}

/* Tab Navigation */
.edit-form-tabs {
  display: flex;
  gap: 0;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

/* DEPRECATED: Old edit-tab system - Use .tab-nav-underline instead */
/* Keeping for backward compatibility - Remove after HTML migration */
.edit-tab {
  /* Use .tab-nav-underline .tab-nav-item instead */
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-tab:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.edit-tab.active {
  background: white;
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.edit-tab i {
  font-size: 14px;
}

/* Tab Content */
.edit-tab-content {
  display: none;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}

.edit-tab-content.active {
  display: block;
  /* content flows naturally */
}

/* Form Grid - 2 columns */
.edit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Form Grid - 4 columns (matches Add New Student) */
.edit-form-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.form-field label .required {
  color: #ef4444;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Section Headers */
.edit-section {
  margin-bottom: 24px;
}

.edit-section:last-child {
  margin-bottom: 0;
}

.edit-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

/* Status Flags Grid */
.status-flags-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.status-flag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}

.status-flag-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.status-flag-item:has(input:checked) {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

.status-flag-item input {
  margin: 0;
}

/* Status Flags Inline (for Notes tab) */
.status-flags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-flag-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
}

.status-flag-chip:hover {
  background: #e2e8f0;
}

.status-flag-chip:has(input:checked) {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.status-flag-chip input {
  display: none;
}

/* Classes Tab */
.edit-classes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.edit-classes-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.btn-add-class {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-add-class:hover {
  background: #2563eb;
}

.edit-classes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.15s;
}

.edit-class-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.edit-class-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edit-class-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.edit-class-details {
  font-size: 12px;
  color: #64748b;
}

.edit-class-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edit-class-progress-text {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.edit-class-actions {
  display: flex;
  gap: 6px;
}

.edit-class-btn {
  padding: 6px 10px;
  background: #e2e8f0;
  color: #475569;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.edit-class-btn:hover {
  background: #cbd5e1;
}

.edit-class-btn.delete {
  color: #dc2626;
}

.edit-class-btn.delete:hover {
  background: #fee2e2;
}

.edit-class-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #94a3b8;
  text-align: center;
}

.edit-class-empty i {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.edit-class-empty p {
  margin: 0;
  font-size: 14px;
}

/* No Health Toggle */
.no-health-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: normal;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

.no-health-toggle input {
  margin: 0;
  flex-shrink: 0;
}

.no-health-toggle span {
  white-space: nowrap;
}

/* Footer */
.edit-modal-footer {
  flex-shrink: 0;
  /* Prevent footer from shrinking */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.footer-left,
.footer-right {
  display: flex;
  gap: 8px;
}

.btn-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-footer.btn-save {
  background: #22c55e;
  color: white;
}

.btn-footer.btn-save:hover {
  background: #16a34a;
}

.btn-footer.btn-cancel {
  background: #e2e8f0;
  color: #475569;
}

.btn-footer.btn-cancel:hover {
  background: #cbd5e1;
}

.btn-footer.btn-delete {
  background: #fee2e2;
  color: #dc2626;
}

.btn-footer.btn-delete:hover {
  background: #fecaca;
}

.btn-footer.btn-archive {
  background: #fef3c7;
  color: #d97706;
}

.btn-footer.btn-archive:hover {
  background: #fde68a;
}

.btn-footer.btn-classes {
  background: #dbeafe;
  color: #2563eb;
}

.btn-footer.btn-classes:hover {
  background: #bfdbfe;
}

.btn-footer.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.btn-footer.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* ==================== ADD STUDENT MODAL - CLEAN DESIGN ==================== */
/* NOTE: Consider migrating to .modal-md (800px) or .modal-lg (1100px) for consistency */

.add-modal-content {
  background: white;
  border-radius: 12px;
  width: 900px;
  max-width: 95%;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Enable scrolling if content overflows */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Responsive behavior for add modal */
@media (max-width: 1000px) {
  .add-modal-content {
    width: 90vw;
  }
}

@media (max-width: 600px) {
  .add-modal-content {
    width: 95vw;
    margin: 10px;
    border-radius: var(--radius-lg);
  }
}

.add-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.add-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.add-modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

.add-modal-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.add-modal-close:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.add-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.add-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.add-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.add-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-section-title i {
  color: #3b82f6;
  font-size: 14px;
}

/* DEPRECATED: Use .form-row .form-row-4col .form-row-compact instead */
.add-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Add responsive behavior */
@media (max-width: 1200px) {
  .add-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .add-form-grid {
    grid-template-columns: 1fr;
  }
}

/* DEPRECATED: Use .form-row .form-row-2col .form-row-compact instead */
.add-form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .add-form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.auto-badge {
  font-size: 10px;
  color: #94a3b8;
  display: block;
  margin-top: 4px;
}

.add-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Missed Alert Button */
.btn-missed-alert {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-missed-alert:hover {
  background: #fde68a;
}

.btn-missed-alert i {
  color: #f59e0b;
}

.today-summary-bar .summary-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
}

.today-summary-bar .summary-stat i {
  font-size: 18px;
  color: #3b82f6;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 11px;
  margin-left: 6px;
}

/* Enhanced class group header with time */
.checkin-group-header {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.checkin-group-header .class-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkin-group-header .class-time {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkin-group-header .class-time i {
  color: #3b82f6;
}

.checkin-group-count {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 12px;
}

.checkin-group-count.at-capacity {
  background: #fef2f2;
  color: #dc2626;
}

.checkin-group-count.near-capacity {
  background: #fffbeb;
  color: #d97706;
}

/* Quick check-in button on cards */
.checkin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.btn-quick-checkin {
  flex: 1;
  padding: 8px 12px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-quick-checkin:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-quick-checkin.checked-in {
  background: #e2e8f0;
  color: #22c55e;
  cursor: default;
}

.btn-quick-checkin.checked-in:hover {
  transform: none;
}

/* Status indicator on card */
.checkin-card.status-completed {
  border-left: 4px solid #22c55e;
}

.checkin-card.status-missed {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.checkin-card.status-booked {
  border-left: 4px solid #3b82f6;
}

.checkin-card .status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.checkin-card .status-badge.completed {
  background: #dcfce7;
  color: #16a34a;
}

.checkin-card .status-badge.missed {
  background: #fee2e2;
  color: #dc2626;
}

/* Makeup badge */
.makeup-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px;
  background: #fef3c7;
  color: #d97706;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 8px;
}

/* ========================================
   CALENDAR TAB STYLES
   ======================================== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.calendar-day {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-height: 160px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.calendar-day.today {
  border: 2px solid #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.calendar-day.past {
  opacity: 0.6;
  background: #f8fafc;
}

.calendar-day-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.2s;
}

.calendar-day-header:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.calendar-day.today .calendar-day-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.calendar-day-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}

.calendar-day.today .calendar-day-name {
  color: white;
}

.calendar-day-date {
  font-size: 11px;
  color: #64748b;
}

.calendar-day.today .calendar-day-date {
  color: rgba(255, 255, 255, 0.8);
}

.calendar-day-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-class-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid #3b82f6;
}

.calendar-class-row:hover {
  background: #e2e8f0;
}

.calendar-class-row.at-capacity {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.calendar-class-row.near-capacity {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.calendar-class-row.expected-only {
  border-left-color: #f59e0b;
  border-left-style: dashed;
  background: #fffbeb;
}

.calendar-class-row.has-expected {
  border-left-width: 5px;
}

.calendar-class-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.calendar-class-time {
  font-size: 10px;
  color: #64748b;
}

.calendar-class-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.calendar-class-count {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.calendar-class-count.at-capacity {
  color: #ef4444;
}

.calendar-class-count.near-capacity {
  color: #d97706;
}

.calendar-no-classes {
  text-align: center;
  padding: 20px 10px;
  color: #94a3b8;
  font-size: 12px;
}

/* Calendar Class Modal */
.calendar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.calendar-student-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #22c55e;
}

.calendar-student-row.expected {
  border-left-color: #f59e0b;
  border-left-style: dashed;
}

.calendar-student-row.checked-in {
  background: #dcfce7;
  border-left-color: #16a34a;
}

.calendar-student-row .student-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-student-row .student-info {
  font-size: 12px;
  color: #64748b;
}

.calendar-student-row .student-actions {
  display: flex;
  gap: 8px;
}

.calendar-student-row .badge-checked-in {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #22c55e;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Calendar Week Header (day names) */
.calendar-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-week-header-day {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  padding: 8px;
}

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

@media (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   MANAGEMENT TAB STYLES
   ======================================== */
.management-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.management-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
  position: relative;
}

.management-list-item:last-child {
  border-bottom: none;
}

.management-list-item:hover {
  background-color: #f8fafc;
}

.management-list-item .item-info {
  flex: 1;
}

.management-list-item .item-name {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  font-size: 14px;
}

.management-list-item .item-details {
  font-size: 12px;
  color: #64748b;
}

.management-list-item .item-details i {
  margin-right: 4px;
  color: #94a3b8;
}

/* Hover-reveal actions */
.management-list-item .item-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.15s ease;
}

.management-list-item:hover .item-actions {
  opacity: 1;
  transform: translateX(0);
}

.management-list-item .btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
}

.management-list-item .btn-icon.btn-edit {
  background-color: #e0f2fe;
  color: #0284c7;
}

.management-list-item .btn-icon.btn-edit:hover {
  background-color: #0284c7;
  color: white;
}

.management-list-item .btn-icon.btn-delete {
  background-color: #fee2e2;
  color: #dc2626;
}

.management-list-item .btn-icon.btn-delete:hover {
  background-color: #dc2626;
  color: white;
}

.management-list .empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.management-list .empty-state i {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.management-list-item.inactive {
  opacity: 0.5;
}

.management-list-item.inactive .item-name {
  color: #94a3b8;
}

.management-list-item .status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
}

.management-list-item .status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.management-list-item .status-badge.inactive {
  background-color: #f1f5f9;
  color: #64748b;
}

.class-schedule-group {
  border-bottom: 1px solid var(--border);
}

.class-schedule-group:last-child {
  border-bottom: none;
}

.class-schedule-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--bg);
  cursor: pointer;
}

.class-schedule-group-header:hover {
  background-color: #e2e8f0;
}

.class-schedule-group-header .class-name {
  font-weight: 600;
  color: var(--text-main);
}

.class-schedule-group-header .schedule-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.class-schedule-items {
  padding-left: 20px;
}

.day-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  background-color: var(--primary-light);
  color: var(--primary);
  margin-right: 8px;
}

/* Schedule day checkbox labels in modals */
.schedule-day-checkbox {
  transition: all 0.15s ease;
  user-select: none;
}

.schedule-day-checkbox:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

.schedule-day-checkbox input:checked+span {
  color: #1d4ed8;
}

.schedule-day-checkbox:has(input:checked) {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
}

/* Days checkboxes wrapper - critical styling */
.day-checkboxes-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: flex-start !important;
}

/* Day checkbox labels - override ALL global styles */
.day-checkboxes-wrapper>label,
#entry-days-checkboxes>label,
#act-days-checkboxes>label,
#cl-schedule-days-list>label {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
}

.day-checkboxes-wrapper>label:hover,
#entry-days-checkboxes>label:hover,
#act-days-checkboxes>label:hover,
#cl-schedule-days-list>label:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

.day-checkboxes-wrapper>label:has(input:checked),
#entry-days-checkboxes>label:has(input:checked),
#act-days-checkboxes>label:has(input:checked),
#cl-schedule-days-list>label:has(input:checked) {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
}

.day-checkboxes-wrapper>label input[type="checkbox"],
#entry-days-checkboxes>label input[type="checkbox"],
#act-days-checkboxes>label input[type="checkbox"],
#cl-schedule-days-list>label input[type="checkbox"] {
  all: revert !important;
  margin: 0 !important;
  width: auto !important;
  cursor: pointer !important;
}

.day-checkboxes-wrapper>label span,
#entry-days-checkboxes>label span,
#act-days-checkboxes>label span,
#cl-schedule-days-list>label span {
  white-space: nowrap !important;
}

/* ==================== STARTUP TOAST NOTIFICATIONS ==================== */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.startup-toast {
  animation: slideIn 0.3s ease;
}

.startup-toast button:hover {
  filter: brightness(1.1);
}

/* ========================================
   UTILITY CLASSES - Reduce Inline Styles
   ======================================== */

/* Display */
.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-block {
  display: block !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-grid {
  display: grid !important;
}

.d-none {
  display: none !important;
}

/* Flex utilities */
.flex-col {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-1 {
  flex: 1 !important;
}

.items-center {
  align-items: center !important;
}

.items-start {
  align-items: flex-start !important;
}

.items-end {
  align-items: flex-end !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-end {
  justify-content: flex-end !important;
}

.justify-start {
  justify-content: flex-start !important;
}

/* Gap utilities */
.gap-xs {
  gap: var(--spacing-xs) !important;
}

.gap-sm {
  gap: var(--spacing-sm) !important;
}

.gap-md {
  gap: var(--spacing-md) !important;
}

.gap-lg {
  gap: var(--spacing-lg) !important;
}

.gap-xl {
  gap: var(--spacing-xl) !important;
}

/* Margin utilities */
.m-0 {
  margin: 0 !important;
}

.mt-sm {
  margin-top: var(--spacing-sm) !important;
}

.mt-md {
  margin-top: var(--spacing-md) !important;
}

.mt-lg {
  margin-top: var(--spacing-lg) !important;
}

.mb-sm {
  margin-bottom: var(--spacing-sm) !important;
}

.mb-md {
  margin-bottom: var(--spacing-md) !important;
}

.mb-lg {
  margin-bottom: var(--spacing-lg) !important;
}

.mb-xl {
  margin-bottom: var(--spacing-xl) !important;
}

.ml-auto {
  margin-left: auto !important;
}

.mr-auto {
  margin-right: auto !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Padding utilities */
.p-0 {
  padding: 0 !important;
}

.p-sm {
  padding: var(--spacing-sm) !important;
}

.p-md {
  padding: var(--spacing-md) !important;
}

.p-lg {
  padding: var(--spacing-lg) !important;
}

.p-xl {
  padding: var(--spacing-xl) !important;
}

.px-sm {
  padding-left: var(--spacing-sm) !important;
  padding-right: var(--spacing-sm) !important;
}

.px-md {
  padding-left: var(--spacing-md) !important;
  padding-right: var(--spacing-md) !important;
}

.px-lg {
  padding-left: var(--spacing-lg) !important;
  padding-right: var(--spacing-lg) !important;
}

.py-sm {
  padding-top: var(--spacing-sm) !important;
  padding-bottom: var(--spacing-sm) !important;
}

.py-md {
  padding-top: var(--spacing-md) !important;
  padding-bottom: var(--spacing-md) !important;
}

.py-lg {
  padding-top: var(--spacing-lg) !important;
  padding-bottom: var(--spacing-lg) !important;
}

/* Text utilities */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-sm {
  font-size: 12px !important;
}

.text-md {
  font-size: 14px !important;
}

.text-lg {
  font-size: 16px !important;
}

.text-xl {
  font-size: 20px !important;
}

.font-medium {
  font-weight: 500 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.font-bold {
  font-weight: 700 !important;
}

/* Background utilities */
.bg-white {
  background: white !important;
}

.bg-light {
  background: var(--bg) !important;
}

.bg-primary-light {
  background: var(--primary-light) !important;
}

.bg-success-light {
  background: var(--success-light) !important;
}

.bg-warning-light {
  background: var(--warning-light) !important;
}

.bg-danger-light {
  background: var(--danger-light) !important;
}

/* Border utilities */
.border {
  border: 1px solid var(--border) !important;
}

.border-light {
  border: 1px solid var(--border-light) !important;
}

.border-none {
  border: none !important;
}

.rounded {
  border-radius: var(--radius) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-xl {
  border-radius: var(--radius-xl) !important;
}

.rounded-full {
  border-radius: var(--radius-full) !important;
}

/* Width utilities */
.w-full {
  width: 100% !important;
}

.w-auto {
  width: auto !important;
}

.max-w-sm {
  max-width: 320px !important;
}

.max-w-md {
  max-width: 480px !important;
}

.max-w-lg {
  max-width: 640px !important;
}

.max-w-xl {
  max-width: 800px !important;
}

/* Shadow utilities */
.shadow-none {
  box-shadow: none !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* Misc utilities */
.cursor-pointer {
  cursor: pointer !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.overflow-auto {
  overflow: auto !important;
}

.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Section title styling */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.section-title i {
  color: var(--primary);
}

/* Card icon styling */
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  margin: 0 auto var(--spacing-md);
  background: var(--primary);
}

.card-icon-purple {
  background: var(--purple);
}

.card-icon-teal {
  background: var(--teal);
}

.card-icon-amber {
  background: var(--warning);
}

.card-icon-success {
  background: var(--success);
}

.card-icon-danger {
  background: var(--danger);
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  margin-top: var(--spacing-sm);
}

/* ========================================================================
   PAYMENT STATUS BUTTON GROUP
   ======================================================================== */

.payment-status-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.payment-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  color: #64748b;
  user-select: none;
}

.payment-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* Active states with specific colors */
.payment-btn.active.paid {
  background: #22c55e;
  color: white;
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.payment-btn.active.partially-paid {
  background: #f59e0b;
  color: white;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.payment-btn.active.unpaid {
  background: #ef4444;
  color: white;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.payment-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.payment-btn i {
  font-size: 14px;
}

/* ========================================================================
   DATE INPUT FIX - Remove any overlays or pseudo-elements
   ======================================================================== */

input[type="date"] {
  position: relative;
  z-index: 1;
}

/* Remove any pseudo-elements that might create white dashes */
input[type="date"]::before,
input[type="date"]::after {
  display: none !important;
  content: none !important;
}

/* Ensure calendar button doesn't create visual artifacts */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  z-index: 2;
  position: relative;
}

/* Remove any border overlays */
input[type="date"]::-webkit-inner-spin-button {
  display: none;
}

/* Fix for Class Sessions modal date inputs specifically */
.class-stat-bar input[type="date"] {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px !important;
  font-size: 14px;
  position: relative;
  min-width: 140px;
}

/* Ensure no separators or dashes appear over the input */
.class-stat-bar input[type="date"]::before,
.class-stat-bar input[type="date"]::after {
  display: none !important;
  content: none !important;
}

/* Fix calendar icon position and ensure it doesn't create artifacts */
.class-stat-bar input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 4px;
  cursor: pointer;
  opacity: 0.6;
}

.class-stat-bar input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ========================================
   CLASS SESSIONS MODAL REDESIGN
   ======================================== */

.session-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.session-student-info {
  display: flex;
  flex-direction: column;
}

.session-student-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.session-student-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Stats Row */
.session-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.session-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.session-stat-info {
  display: flex;
  flex-direction: column;
}

.session-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
}

.session-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

/* Configuration Panel */
.modal-config-panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.config-grid>.config-item:first-child {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

/* Session Grid */
.session-grid-container {
  margin-bottom: 24px;
}

.session-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
}

.session-token {
  aspect-ratio: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  padding: 4px;
}

.session-token:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.session-token.disabled {
  background: var(--bg-tertiary);
  opacity: 0.5;
  cursor: not-allowed;
  border-color: transparent;
}

.session-token.disabled:hover {
  transform: none;
  box-shadow: none;
}

.token-code {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.token-date {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.1;
}

/* Token States */
.session-token.booked {
  background: var(--primary-light);
  border-color: var(--primary);
}

.session-token.booked .token-code {
  color: var(--primary-dark);
}

.session-token.booked .token-date {
  color: var(--primary);
}

.session-token.completed {
  background: var(--success-light);
  border-color: var(--success);
}

.session-token.completed .token-code {
  color: var(--success-dark);
}

.session-token.completed .token-date {
  color: var(--success);
}

.session-token.missed {
  background: #ffedd5;
  /* Orange light */
  border-color: var(--orange);
}

.session-token.missed .token-code {
  color: var(--orange-dark);
}

.session-token.missed .token-date {
  color: var(--orange);
}

.session-token.skipped {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
}

.session-token.skipped .token-code {
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* Legend Modern */
.modern-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

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

/* Enforce 3 columns for Enrolled Days in Class Sessions modal */
#cl-schedule-days-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

#cl-schedule-days-list>label {
  width: 100% !important;
  justify-content: flex-start !important;
}

/* History Modal Improvements */
#studentAllClassesModal .modal-content {
  width: 90% !important;
  max-width: 1000px !important;
  padding: 32px !important;
}

#studentAllClassesModal .student-history-header {
  margin-bottom: 24px !important;
}

#studentAllClassesModal h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

#historyTable th,
#historyTable td {
  padding: 12px 16px !important;
  font-size: 14px !important;
}

/* Bulk Operations Dropdown Styles */
#modal-bulk-actions-dropdown button:hover {
  background: #e0e7ff !important;
  border-color: #c7d2fe !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

#modal-bulk-actions-dropdown button:active {
  transform: scale(0.98);
}

/* Archive button hover */
#modal-bulk-actions-dropdown button[onclick*="bulkArchive"]:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

/* ========================================
   LOADING STATES & SKELETON SCREENS
   ======================================== */

/* Skeleton loading animation */
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      #f0f0f0 25%,
      #e0e0e0 50%,
      #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
  user-select: none;
}

/* Skeleton variants */
.skeleton-card {
  height: 120px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.skeleton-row {
  height: 48px;
  border-radius: var(--radius-sm);
  margin: 4px 0;
}

.skeleton-text {
  height: 16px;
  border-radius: 4px;
  margin: 8px 0;
}

.skeleton-text-lg {
  height: 24px;
  border-radius: 4px;
  margin: 12px 0;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-button {
  height: 36px;
  width: 120px;
  border-radius: var(--radius);
}

/* Loading overlay for entire sections */
.loading-overlay {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

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

/* Loading state for tables */
.table-loading {
  position: relative;
  min-height: 200px;
}

.table-loading tbody {
  opacity: 0.3;
}

/* Centered loading spinner */
.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  flex-direction: column;
  gap: 16px;
}

.loading-center .spinner {
  margin: 0;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  min-height: 300px;
  background: var(--card);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.empty-state-icon {
  font-size: 64px;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px 0;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px 0;
  max-width: 400px;
}

.empty-state .btn {
  margin-top: 8px;
}

/* Empty state variants */
.empty-state-compact {
  min-height: 200px;
  padding: 32px 24px;
}

.empty-state-compact .empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-compact h3 {
  font-size: 16px;
}

.empty-state-compact p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Empty state for modals */
.modal .empty-state {
  border: none;
  min-height: 250px;
  background: transparent;
}

/* Empty search results */
.empty-search-results {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-search-results i {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

.empty-search-results p {
  margin: 8px 0;
  font-size: 14px;
}

.empty-search-results .clear-search {
  margin-top: 16px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.empty-search-results .clear-search:hover {
  color: var(--primary-hover);
}

/* ========================================
   PROGRESS INDICATORS
   ======================================== */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-bar-fill.success {
  background: var(--success);
}

.progress-bar-fill.warning {
  background: var(--warning);
}

.progress-bar-fill.danger {
  background: var(--danger);
}

/* Linear progress (indeterminate) */
.progress-linear {
  width: 100%;
  height: 4px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.progress-linear::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: var(--primary);
  animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-slide {
  0% {
    left: -30%;
  }

  100% {
    left: 130%;
  }
}

/* Circular progress */
.progress-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle-bg {
  fill: none;
  stroke: var(--bg-secondary);
}

.progress-circle-fill {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-circle-text {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* ========================================
   REMINDERS TAB STYLES
   ======================================== */

.reminders-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
}

.reminder-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.reminder-section-header {
  padding: 16px 20px;
  background: var(--bg-secondary);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.reminder-section-header:hover {
  background: #e2e8f0;
}

.reminder-section-header .badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 8px;
}

.reminder-section-content {
  display: none;
  padding: 16px;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.reminder-section.expanded .reminder-section-content {
  display: grid;
}

/* Reminder Card */
.reminder-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.reminder-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.reminder-card.priority-high {
  border-left: 4px solid var(--warning);
}

.reminder-card.priority-urgent {
  border-left: 4px solid var(--danger);
  background: #fff5f5;
}

.reminder-card.priority-normal {
  border-left: 4px solid var(--success);
}

.reminder-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.reminder-details {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.reminder-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

/* Context Menu */
.context-menu {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 4px 0;
  animation: fadeIn 0.1s ease;
}

.context-header {
  padding: 8px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  font-size: 13px;
}

.context-item {
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.1s;
  color: var(--text-main);
  font-size: 14px;
}

.context-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.context-sep {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   IMMEDIATE TOOLTIPS (Undo/Redo)
   ======================================== */






/* ========================================
   GLOBAL JS TOOLTIP STYLES
   ======================================== */
.global-js-tooltip {
  position: fixed;
  z-index: 1000000;
  /* Ensure it stays on top of everything */
  background: var(--bg-inverse, #1e293b);
  color: var(--text-inverse, #ffffff);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.1s ease;
}

/* Tooltip Arrow */
.global-js-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--bg-inverse, #1e293b) transparent;
}

/* Startup Loading Overlay */
#startup-loading-overlay {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  transition: opacity 0.35s ease;
}
#startup-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
#startup-loading-content {
  text-align: center;
}
.startup-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: startup-spin 0.75s linear infinite;
  margin: 0 auto;
}
@keyframes startup-spin {
  to { transform: rotate(360deg); }
}

/* Role Selection & Auth Styles - Modern Premium Refresh */
#role-selection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 0% 0%, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#role-selection-overlay::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 45%, rgba(var(--primary-rgb), 0.03) 50%, transparent 55%);
  animation: shine-slow 15s infinite linear;
  pointer-events: none;
}

@keyframes shine-slow {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#role-selection-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide FAB while login overlay is visible */
body:not(.mode-admin):not(.mode-user) .activity-fab {
  display: none !important;
}

.role-selection-content {
  width: 100%;
  max-width: 900px;
  padding: 40px;
  animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.role-selection-header {
  text-align: center;
  margin-bottom: 60px;
}

.logo-wrapper {
  margin-bottom: 24px;
}

.logo-wrapper img {
  height: 120px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.role-selection-header h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #1e293b;
}

.role-selection-header p {
  color: #64748b;
  font-size: 18px;
  font-weight: 400;
}

.role-card-container {
  display: flex;
  gap: 32px;
  justify-content: center;
  max-width: 600px;
}

.role-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 200px;
  /* Approx 2 inches depending on DPI */
  height: 250px;
  /* Approx 2.5 inches depending on DPI */
  padding: 24px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.role-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.role-card:hover {
  border-color: #3b82f6;
}

.role-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  color: #3b82f6;
  transition: all 0.3s;
}

.role-card:hover .role-icon {
  background: #3b82f6;
  color: white;
}

.role-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.role-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* Role-based Visibility */
body.mode-user .admin-only {
  display: none !important;
}

body.mode-user .user-disabled {
  pointer-events: none !important;
  opacity: 0.5 !important;
  filter: grayscale(1);
}

.login-form-container {
  display: none;
  width: 100%;
  max-width: 400px;
  margin-top: 32px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   SKELETON LOADER UTILITY
   Usage: add .skeleton to any element to show animated shimmer while loading.
   Shapes: .skeleton-text (line), .skeleton-input (field), .skeleton-btn (button)
   ============================================================================ */

.skeleton {
  background: linear-gradient(90deg,
      var(--bg-secondary) 25%,
      #e2e8f0 50%,
      var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

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

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-input {
  height: 40px;
  margin-bottom: 16px;
  border-radius: var(--radius);
}

.skeleton-btn {
  height: 40px;
  width: 100px;
  border-radius: var(--radius);
  display: inline-block;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =====================================================================
   SEARCH STUDENT QUICK ACTION MODAL (searchStudentModalPopup)
   ===================================================================== */

.ssm-modal-box {
  max-width: 520px;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

/* Header */
.ssm-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 24px;
  color: white;
  position: relative;
}

.ssm-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  color: white;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ssm-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.ssm-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ssm-avatar {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

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

.ssm-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ssm-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.ssm-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ssm-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.88;
  margin-bottom: 8px;
}

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

.ssm-classes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ssm-class-badge {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ssm-class-remaining {
  opacity: 0.78;
  font-weight: 400;
}

.ssm-no-class {
  font-size: 12px;
  opacity: 0.7;
}

/* Action grid */
.ssm-actions {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ssm-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  line-height: 1;
}

.ssm-action-btn i {
  font-size: 26px;
}

.ssm-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.ssm-action-btn:active {
  transform: translateY(0);
}

.ssm-full-row {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 12px;
  padding: 16px;
}

.ssm-full-row i {
  font-size: 20px;
}

/* Individual button themes */
.ssm-btn-checkin {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.ssm-btn-checkin:hover {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

.ssm-btn-class {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.ssm-btn-class:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.ssm-btn-edit {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.ssm-btn-edit:hover {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
}

.ssm-btn-view {
  background: #f3e8ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.ssm-btn-view:hover {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.ssm-btn-history {
  background: #f0fdfa;
  color: #0d9488;
  border-color: #99f6e4;
}

.ssm-btn-history:hover {
  background: #0d9488;
  color: white;
  border-color: #0d9488;
}

.ssm-btn-addclass {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.ssm-btn-addclass:hover {
  background: #4338ca;
  color: white;
  border-color: #4338ca;
}

.ssm-btn-addevaluation {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde68a;
}

.ssm-btn-addevaluation:hover {
  background: #ca8a04;
  color: white;
  border-color: #ca8a04;
}

.ssm-btn-viewevaluations {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f0abfc;
}

.ssm-btn-viewevaluations:hover {
  background: #a21caf;
  color: white;
  border-color: #a21caf;
}

/* ============================================================================
   Book Session Modal — action buttons (2-column grid, solid color style)
   ============================================================================ */
.bsm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.bsm-action-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: white;
  transition: all 0.15s ease;
  line-height: 1;
}

.bsm-action-btn i {
  font-size: 20px;
  flex-shrink: 0;
}

.bsm-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.bsm-action-btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.bsm-full-row {
  grid-column: 1 / -1;
}

.bsm-btn-book {
  background: #667eea;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.bsm-btn-checkin {
  background: #10b981;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

.bsm-btn-missed {
  background: #f59e0b;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.bsm-btn-cancel {
  background: #ef4444;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

.bsm-btn-reschedule {
  background: #8b5cf6;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35);
}

.bsm-btn-attended {
  background: #059669;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}

.bsm-btn-close {
  background: #e2e8f0;
  color: #475569;
  box-shadow: none;
}

.bsm-btn-close:hover {
  background: #cbd5e1;
  filter: none;
}

/* Primary action (Check-in) — taller to stand out as the main CTA */
.bsm-primary {
  padding: 18px 12px;
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
}