/* Main CSS File - Material Dashboard Theme and Layout */

/* Import CSS modules first - Order matters for cascading */
@import url('./variables.css');
@import url('./components.css');
@import url('./layout.css');
@import url('./common.css');
@import url('./table.css');
@import url('./forms.css');
@import url('./dashboard.css');
@import url('./modal.css');
@import url('./user-management.css');
@import url('./demo-sessions.css?v=20260904-cleanup');
@import url('./trainer-dashboard.css?v=20260903-demo-mild');
@import url('./trainer-performance.css');
@import url('./student-dashboard.css');
@import url('./video-resources.css');
@import url('./course-progress.css');
@import url('./toast-notifications.css');

/* ==========================================
     MATERIAL DASHBOARD LOGIN STYLES
   ========================================== */

/* Main Login Container - Material Dashboard Style */
#loginContainer {
  background: var(--background-gradient);
  min-height: calc(100vh - 4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  position: fixed;
  top: 2px;
  left: 0;
  right: 0;
  bottom: 2px;
  z-index: 1000;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Material Dashboard Login Wrapper */
.login-wrapper {
  display: flex;
  max-width: 1200px;
  width: 100%;
  min-height: min(98vh, calc(100dvh - 16px));
  margin: auto 0;
  flex-shrink: 0;
  background: linear-gradient(135deg, 
    rgba(247, 8, 128, 0.04) 0%, 
    rgba(254, 173, 139, 0.06) 50%, 
    rgba(147, 51, 234, 0.04) 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Left Panel - Login Form - Material Design */
.login-left {
  flex: 1;
  padding: 2.1rem 2rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #ffffff;
  overflow-x: hidden;
  overflow-y: hidden;
  min-height: 0;
  overscroll-behavior: contain;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1;
}

/* Decorative layer: clips emoji so Home + form stay crisp */
.login-left-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Back to marketing site — glass + primary accent (matches login form / Joy theme) */
.login-marketing-home {
  position: absolute;
  top: 1.2rem;
  left: 0.75rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem 0.45rem 0.55rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(247, 8, 128, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 14px rgba(247, 8, 128, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  pointer-events: auto;
  cursor: pointer;
  line-height: 1;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.login-marketing-home:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(247, 8, 128, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 6px 18px rgba(247, 8, 128, 0.18),
    0 0 0 1px rgba(247, 8, 128, 0.1);
}

.login-marketing-home .material-icons,
.login-marketing-home span {
  pointer-events: none;
  line-height: 1;
}

.login-marketing-home .material-icons {
  font-family: "Material Icons";
  font-size: 22px;
  line-height: 1;
  width: 22px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  color: var(--primary-color);
}

/* Animated Music Background - Login Page Only (applies to right side) */
.login-right.login-page-animated {
  position: relative;
  overflow: hidden;
}

.login-left.login-page-animated {
  position: relative;
  background: #ffffff !important;
}

.login-right.login-page-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(247, 8, 128, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(254, 173, 139, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.08) 0%, transparent 70%);
  z-index: 0;
  animation: backgroundPulse 12s ease-in-out infinite;
}

/* Animated Musical Notes - Login Page Only */
.login-right.login-page-animated::after {
  content: '♪ ♫ ♩ ♬ 🎵 🎶 🎸 🎹 🎺 🎻 🥁 📚 ✨ 🎓';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 26px;
  color: rgba(247, 8, 128, 0.1);
  letter-spacing: 50px;
  line-height: 90px;
  word-wrap: break-word;
  white-space: normal;
  overflow: hidden;
  z-index: 0;
  animation: floatNotes 25s linear infinite;
  text-shadow: 2px 2px 6px rgba(254, 173, 139, 0.15);
  pointer-events: none;
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1) rotate(0deg);
  }
  33% {
    opacity: 0.95;
    transform: scale(1.08) rotate(2deg);
  }
  66% {
    opacity: 0.8;
    transform: scale(1.05) rotate(-2deg);
  }
}

@keyframes floatNotes {
  0% {
    transform: translateY(100%) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.35;
  }
  92% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(-100%) rotate(360deg);
    opacity: 0;
  }
}

/* Brand Section - Material Dashboard Style */
.login-left .login-brand {
  text-align: center;
  margin-bottom: 0.85rem;
  padding: 0;
  background: transparent;
  color: var(--text-primary);
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  position: relative;
  z-index: 10;
}

.login-left .login-brand .brand-icon {
  width: 165px;
  height: 165px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #f70880 0%, #fead8b 50%, #9333ea 100%);
  border-radius: 38px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 32px rgba(247, 8, 128, 0.12),
    0 4px 16px rgba(147, 51, 234, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: visible;
  animation: brandGlow 4s ease-in-out infinite;
}

/* Glassmorphism white background with gradient glow */
.login-left .login-brand .brand-icon::before {
  content: '';
  position: absolute;
  inset: 2.5px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(255, 255, 255, 0.95) 100%);
  border-radius: 35.5px;
  z-index: 0;
  backdrop-filter: blur(10px);
}

/* Gradient glow effect behind icon */
.login-left .login-brand .brand-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, #f70880, #fead8b, #9333ea);
  border-radius: 40px;
  opacity: 0.2;
  filter: blur(20px);
  z-index: -1;
  animation: glowPulse 4s ease-in-out infinite;
}

.login-left .login-brand .brand-icon img {
  width: 148px;
  height: 148px;
  border-radius: 24px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12)) brightness(1.03) saturate(1.1) contrast(1.02);
  transition: all 0.4s ease;
  animation: logoFloat 3s ease-in-out infinite;
}

.login-left .login-brand .brand-icon:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(247, 8, 128, 0.18),
    0 8px 24px rgba(147, 51, 234, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.login-left .login-brand .brand-icon:hover::after {
  opacity: 0.35;
  filter: blur(25px);
}

.login-left .login-brand .brand-icon:hover img {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.15)) brightness(1.05) saturate(1.15) contrast(1.03);
}

/* Keyframe animations */
@keyframes brandGlow {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(247, 8, 128, 0.12),
      0 4px 16px rgba(147, 51, 234, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }
  50% {
    box-shadow: 
      0 12px 40px rgba(247, 8, 128, 0.16),
      0 6px 20px rgba(147, 51, 234, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.28;
    transform: scale(1.05);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.login-left .login-brand .brand-name {
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f70880 0%, #fead8b 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.03em;
  position: relative;
  text-shadow: 0 4px 12px rgba(247, 8, 128, 0.1);
  animation: brandNameGlow 3s ease-in-out infinite;
}

@keyframes brandNameGlow {
  0%, 100% {
    filter: drop-shadow(0 2px 8px rgba(247, 8, 128, 0.15));
  }
  50% {
    filter: drop-shadow(0 4px 12px rgba(147, 51, 234, 0.2));
  }
}

/* Login Form Container - Full Width Material Design */
.login-left .login-form-container {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 16px rgba(247, 8, 128, 0.08);
  position: relative;
  margin: 0 auto;
  z-index: 10;
}

.login-left .login-form-container::before {
  content: "Welcome to Joy Music School!";
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
}

/* Social Login Buttons - Material Design */
.social-login {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

a.social-btn {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.social-btn.facebook {
  background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
  color: white;
}

.social-btn.google {
  background: linear-gradient(135deg, #ea4335 0%, #ff6b6b 100%);
  color: white;
}

.social-btn.linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
  color: white;
}

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

/* Login Form - Material Design Inputs */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Demo Actions - Material Cards */
.demo-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
  align-items: stretch;
}

.demo-card {
  flex: 1 1 0;
  min-width: 0;
  min-height: 118px;
  background: var(--surface-color);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
}

.demo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.demo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 0, 128, 0.1) 0%, rgba(254, 173, 139, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.demo-icon .material-icons {
  font-size: 20px;
}

.demo-text {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
}

.demo-card--schedule {
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface-color), var(--surface-color)) padding-box,
    var(--primary-gradient) border-box;
}

.demo-free-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 0.15rem 0.38rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 4px;
  background: var(--primary-gradient);
  box-shadow: 0 1px 6px rgba(255, 0, 128, 0.35);
  pointer-events: none;
}

/* Right Panel - Welcome Section - Material Design */
.login-right {
  flex: 1;
  background: transparent;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override background for animated login sections — top-align carousel (avoid vertical center gap above header) */
.login-right.login-page-animated {
  background: transparent !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.35rem 2.5rem 2rem;
}

/* Carousel Theme Backgrounds */
.login-right.carousel-theme-general {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.login-right.carousel-theme-student {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.login-right.carousel-theme-trainer {
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Animated Icon Styles */
.carousel-animated-icon {
  position: absolute;
  font-size: 48px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

/* General Theme - Dark Text on White Background (slide copy only — not carousel title) */
.login-right.carousel-theme-general .slide-content h3,
.login-right.carousel-theme-general .slide-tagline,
.login-right.carousel-theme-general .feature span,
.login-right.carousel-theme-general .slide-stats {
  color: #344767;
}

.login-right.carousel-theme-general .slide-content {
  background: rgba(254, 173, 139, 0.18);
  border-color: rgba(247, 8, 128, 0.35);
  box-shadow: 0 4px 20px rgba(247, 8, 128, 0.15);
}

.login-right.carousel-theme-general .carousel-nav,
.login-right.carousel-theme-general .dot {
  background: rgba(254, 173, 139, 0.2);
  border-color: rgba(254, 173, 139, 0.3);
  color: #344767;
}

.login-right.carousel-theme-general .dot.active {
  background: linear-gradient(135deg, #fead8b 0%, #f70880 100%);
}

.login-right.carousel-theme-general .carousel-nav:hover {
  background: rgba(254, 173, 139, 0.3);
  border-color: rgba(254, 173, 139, 0.5);
}

.login-right.carousel-theme-general .close-btn {
  background: rgba(254, 173, 139, 0.1);
  color: #344767;
}

.login-right.carousel-theme-general .close-btn:hover {
  background: rgba(254, 173, 139, 0.2);
}

/* Student Theme - Dark Text on White Background (slide copy only) */
.login-right.carousel-theme-student .slide-content h3,
.login-right.carousel-theme-student .slide-tagline,
.login-right.carousel-theme-student .feature span,
.login-right.carousel-theme-student .slide-stats {
  color: #344767;
}

.login-right.carousel-theme-student .slide-content {
  background: rgba(254, 173, 139, 0.18);
  border-color: rgba(247, 8, 128, 0.35);
  box-shadow: 0 4px 20px rgba(247, 8, 128, 0.15);
}

.login-right.carousel-theme-student .carousel-nav,
.login-right.carousel-theme-student .dot {
  background: rgba(247, 8, 128, 0.2);
  border-color: rgba(247, 8, 128, 0.3);
  color: #344767;
}

.login-right.carousel-theme-student .dot.active {
  background: linear-gradient(135deg, #fead8b 0%, #f70880 100%);
}

.login-right.carousel-theme-student .carousel-nav:hover {
  background: rgba(247, 8, 128, 0.3);
  border-color: rgba(247, 8, 128, 0.5);
}

.login-right.carousel-theme-student .close-btn {
  background: rgba(247, 8, 128, 0.1);
  color: #344767;
}

.login-right.carousel-theme-student .close-btn:hover {
  background: rgba(247, 8, 128, 0.2);
}

/* Trainer Theme - Dark Text on White Background (slide copy only) */
.login-right.carousel-theme-trainer .slide-content h3,
.login-right.carousel-theme-trainer .slide-tagline,
.login-right.carousel-theme-trainer .feature span,
.login-right.carousel-theme-trainer .slide-stats {
  color: #344767;
}

.login-right.carousel-theme-trainer .slide-content {
  background: rgba(245, 87, 108, 0.18);
  border-color: rgba(240, 147, 251, 0.35);
  box-shadow: 0 4px 20px rgba(240, 147, 251, 0.15);
}

.login-right.carousel-theme-trainer .carousel-nav,
.login-right.carousel-theme-trainer .dot {
  background: rgba(240, 147, 251, 0.2);
  border-color: rgba(240, 147, 251, 0.3);
  color: #344767;
}

.login-right.carousel-theme-trainer .dot.active {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.login-right.carousel-theme-trainer .carousel-nav:hover {
  background: rgba(240, 147, 251, 0.3);
  border-color: rgba(240, 147, 251, 0.5);
}

.login-right.carousel-theme-trainer .close-btn {
  background: rgba(240, 147, 251, 0.1);
  color: #344767;
}

.login-right.carousel-theme-trainer .close-btn:hover {
  background: rgba(240, 147, 251, 0.2);
}

.welcome-content {
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.welcome-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-text p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.9;
  font-style: italic;
}

.welcome-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  backdrop-filter: blur(10px) !important;
  transition: all 0.3s ease !important;
}

.welcome-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Welcome Carousel Styles */
.welcome-carousel-container {
  width: 100%;
  max-width: 500px;
  padding: 0 2rem 1.75rem;
  color: white;
  position: relative;
  z-index: 10;
}

.carousel-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease;
}

/* Title → slides spacing (demo CTAs now sit below carousel controls) */
.welcome-carousel-container > .carousel-header {
  margin-top: 0;
  margin-bottom: 1.15rem;
  padding-top: 0;
  position: relative;
  animation: fadeInDown 2.6s ease;
}

/* Soft glow line above title */
.welcome-carousel-container > .carousel-header::before {
  content: '';
  display: block;
  width: min(52%, 9rem);
  height: 3px;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 18%,
    rgba(254, 173, 139, 0.95) 50%,
    rgba(255, 255, 255, 0.35) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 18px rgba(247, 8, 128, 0.4),
    0 0 28px rgba(255, 255, 255, 0.15);
  opacity: 0.92;
}

/* Carousel title — highlighted brand pill, readable on every theme */
.welcome-carousel-container > .carousel-header h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(1.7rem, 4.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0 0.65rem;
  line-height: 1.15;
  text-transform: none;
  padding: 0.48rem 1.55rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(135deg, #f70880 0%, #ff8552 52%, #fead8b 100%);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  box-shadow:
    0 4px 0 rgba(247, 8, 128, 0.22),
    0 10px 28px rgba(247, 8, 128, 0.45),
    0 0 36px rgba(254, 173, 139, 0.35);
  filter: none;
  text-shadow: 0 1px 2px rgba(80, 0, 40, 0.25);
  animation: carouselHeaderTitlePulse 3.6s ease-in-out infinite;
}

.welcome-carousel-container > .carousel-header h2::before,
.welcome-carousel-container > .carousel-header h2::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--primary-gradient);
  box-shadow: 0 0 12px rgba(247, 8, 128, 0.55);
  pointer-events: none;
  z-index: 1;
}

.welcome-carousel-container > .carousel-header h2::before {
  left: calc(-0.35rem - 10px);
}

.welcome-carousel-container > .carousel-header h2::after {
  right: calc(-0.35rem - 10px);
}

@keyframes carouselHeaderTitlePulse {
  0%,
  100% {
    box-shadow:
      0 4px 0 rgba(247, 8, 128, 0.22),
      0 10px 28px rgba(247, 8, 128, 0.45),
      0 0 36px rgba(254, 173, 139, 0.35);
    transform: translateY(0);
  }
  50% {
    box-shadow:
      0 6px 0 rgba(247, 8, 128, 0.18),
      0 14px 34px rgba(247, 8, 128, 0.55),
      0 0 48px rgba(254, 173, 139, 0.5);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-carousel-container > .carousel-header h2 {
    animation: none;
    transform: none;
  }
}

.welcome-carousel-container > .carousel-header::after {
  content: '';
  display: block;
  width: min(5.5rem, 42vw);
  height: 4px;
  margin: 0.6rem auto 0;
  border-radius: 999px;
  background: var(--primary-gradient);
  box-shadow:
    0 2px 14px rgba(247, 8, 128, 0.5),
    0 0 20px rgba(254, 173, 139, 0.35);
}

.welcome-carousel-container .login-right-demo-actions.demo-actions {
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 100%;
}

/* Carousel demo CTAs — same language as .sign-in-btn (primary gradient, soft shadows, white label) */
.welcome-carousel-container .login-right-demo-actions .demo-card {
  min-height: 52px;
  padding: 0.6rem 0.55rem;
  background: var(--primary-gradient) !important;
  color: #ffffff;
  border: none !important;
  border-radius: var(--button-border-radius);
  box-shadow: var(--shadow-soft-sm);
  font-weight: var(--button-font-weight);
  letter-spacing: 0.025em;
  text-transform: none;
  gap: 0.35rem;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.welcome-carousel-container .login-right-demo-actions .demo-card--schedule {
  border: none !important;
  background: var(--primary-gradient) !important;
}

.welcome-carousel-container .login-right-demo-actions .demo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft-lg);
  border-color: transparent;
}

.welcome-carousel-container .login-right-demo-actions .demo-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft-xs);
}

.welcome-carousel-container .login-right-demo-actions .demo-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.welcome-carousel-container .login-right-demo-actions .demo-icon .material-icons {
  color: #ffffff;
}

.welcome-carousel-container .login-right-demo-actions .demo-text {
  color: rgba(255, 255, 255, 0.98);
  font-weight: var(--button-font-weight);
  letter-spacing: 0.025em;
}

.welcome-carousel-container .login-right-demo-actions .demo-free-badge {
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  position: absolute;
  top: 5px;
  right: 8px;
  left: auto;
  transform: none;
  font-size: 0.6rem;
  padding: 1px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Themed demo action buttons ── */
@keyframes ja-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.45); }
  50%       { box-shadow: 0 0 0 10px rgba(233, 30, 99, 0); }
}
@keyframes ja-ripple-out {
  0%   { transform: scale(0); opacity: 0.35; }
  100% { transform: scale(2.4); opacity: 0; }
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-schedule,
.welcome-carousel-container .login-right-demo-actions .ja-btn-track {
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 14px !important;
  min-height: 58px;
  text-align: left;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-schedule {
  background: linear-gradient(135deg, #f70880 0%, #fead8b 100%) !important;
  animation: ja-pulse 2.4s ease-in-out infinite;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-track {
  background: linear-gradient(135deg, #f70880 0%, #fead8b 100%) !important;
  border: none !important;
  color: #ffffff !important;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-track .demo-text,
.welcome-carousel-container .login-right-demo-actions .ja-btn-track .ja-btn-sub {
  color: #ffffff !important;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-track .material-icons {
  color: #ffffff !important;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-track .demo-icon {
  background: rgba(233, 30, 99, 0.18);
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-ripple {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  pointer-events: none;
}

.welcome-carousel-container .login-right-demo-actions .demo-card:active .ja-btn-ripple {
  animation: ja-ripple-out 0.5s ease-out forwards;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  flex: 1;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-content .demo-text {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-sub {
  font-size: 0.68rem;
  opacity: 0.78;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.welcome-carousel-container .login-right-demo-actions .ja-btn-schedule:hover,
.welcome-carousel-container .login-right-demo-actions .ja-btn-track:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.35) !important;
}

.carousel-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
}

.carousel-wrapper {
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  position: relative;
}

.carousel-slides {
  position: relative;
  width: 100%;
  min-height: 450px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.carousel-slide.slide-out-left {
  transform: translateX(-100%);
}

.carousel-slide.slide-in-right {
  transform: translateX(100%);
}

.slide-content {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.slide-content:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.slide-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 
    0 2px 12px rgba(247, 8, 128, 0.15),
    0 0 20px rgba(254, 173, 139, 0.1);
  transition: all 0.3s ease;
}

.slide-icon:hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 4px 20px rgba(247, 8, 128, 0.25),
    0 0 30px rgba(254, 173, 139, 0.2);
}

.slide-icon i {
  font-size: 36px;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Dark gradient backgrounds for slide icons matching button themes */
.login-right.carousel-theme-general .slide-icon *,
.login-right.carousel-theme-student .slide-icon * {
  background: linear-gradient(135deg, #fead8b 0%, #f70880 100%);
  padding: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(247, 8, 128, 0.4),
    0 0 30px rgba(254, 173, 139, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-right.carousel-theme-trainer .slide-icon * {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
  padding: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(240, 147, 251, 0.4),
    0 0 30px rgba(245, 87, 108, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.student-icon {
  background: linear-gradient(135deg, rgba(254, 173, 139, 0.35) 0%, rgba(247, 8, 128, 0.35) 100%);
  box-shadow: 
    0 2px 15px rgba(247, 8, 128, 0.2),
    0 0 25px rgba(254, 173, 139, 0.15);
}

.trainer-icon {
  background: linear-gradient(135deg, rgba(245, 87, 108, 0.35) 0%, rgba(240, 147, 251, 0.35) 100%);
  box-shadow: 
    0 2px 15px rgba(240, 147, 251, 0.2),
    0 0 25px rgba(245, 87, 108, 0.15);
}

.slide-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slide-tagline {
  font-size: 1.125rem;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.slide-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.feature:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.feature i {
  font-size: 22px;
  color: #4caf50;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(76, 175, 80, 0.4));
  transition: all 0.3s ease;
}

.feature:hover i {
  transform: scale(1.2);
  filter: drop-shadow(0 3px 8px rgba(76, 175, 80, 0.6));
}

.slide-cta {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: var(--primary-color);
  border: 2px solid rgba(247, 8, 128, 0.3);
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  box-shadow: 
    0 4px 15px rgba(247, 8, 128, 0.25),
    0 0 20px rgba(254, 173, 139, 0.15);
  position: relative;
  overflow: hidden;
}

.slide-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.slide-cta:hover::before {
  width: 300px;
  height: 300px;
}

.slide-cta:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 8px 30px rgba(247, 8, 128, 0.4),
    0 0 40px rgba(254, 173, 139, 0.3);
  border-color: rgba(247, 8, 128, 0.6);
}

.general-cta {
  background: linear-gradient(135deg, #fead8b 0%, #f70880 100%);
  color: white;
  border: none;
  box-shadow: 
    0 6px 25px rgba(247, 8, 128, 0.5),
    0 0 40px rgba(254, 173, 139, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.student-slide-cta {
  background: linear-gradient(135deg, #fead8b 0%, #f70880 100%);
  color: white;
  border: none;
  box-shadow: 
    0 6px 25px rgba(247, 8, 128, 0.5),
    0 0 40px rgba(254, 173, 139, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.trainer-slide-cta {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
  color: white;
  border: none;
  box-shadow: 
    0 6px 25px rgba(240, 147, 251, 0.5),
    0 0 40px rgba(245, 87, 108, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.slide-stats {
  font-size: 0.875rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.carousel-nav {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.carousel-nav:active {
  transform: scale(0.95);
}

.carousel-nav i {
  font-size: 24px;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(247, 8, 128, 0.2);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.3);
  box-shadow: 0 3px 12px rgba(247, 8, 128, 0.4);
}

.dot.active {
  background: white;
  width: 30px;
  box-shadow:
    0 3px 12px rgba(247, 8, 128, 0.5),
    0 0 20px rgba(254, 173, 139, 0.3);
}

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

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

/* Floating Icons Animation for Carousel Backgrounds */
@keyframes floatAcross1 {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.12;
  }
  25% {
    transform: translate(30vw, -20vh) rotate(90deg);
    opacity: 0.22;
  }
  50% {
    transform: translate(60vw, 10vh) rotate(180deg);
    opacity: 0.18;
  }
  75% {
    transform: translate(30vw, 30vh) rotate(270deg);
    opacity: 0.15;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.12;
  }
}

@keyframes floatAcross2 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  33% {
    transform: translate(-20vw, 25vh) rotate(-45deg) scale(1.1);
    opacity: 0.2;
  }
  66% {
    transform: translate(40vw, -15vh) rotate(120deg) scale(0.9);
    opacity: 0.17;
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
    opacity: 0.15;
  }
}

@keyframes floatAcross3 {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.17;
  }
  20% {
    transform: translate(45vw, 5vh) rotate(72deg);
    opacity: 0.22;
  }
  40% {
    transform: translate(20vw, 35vh) rotate(144deg);
    opacity: 0.12;
  }
  60% {
    transform: translate(-25vw, 20vh) rotate(216deg);
    opacity: 0.18;
  }
  80% {
    transform: translate(10vw, -10vh) rotate(288deg);
    opacity: 0.2;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.17;
  }
}

@keyframes floatDiagonal1 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.18;
  }
  50% {
    transform: translate(50vw, 40vh) rotate(180deg);
    opacity: 0.22;
  }
}

@keyframes floatDiagonal2 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-40vw, -30vh) rotate(-180deg) scale(1.2);
    opacity: 0.2;
  }
}

/* Responsive Design for Login - Material Dashboard */
@media (max-width: 1024px) {
  .login-wrapper {
    flex-direction: column;
    max-width: 500px;
    min-height: auto;
  }
  
  .login-left,
  .login-right {
    flex: none;
  }
  
  .login-right {
    order: -1;
    padding: 1.5rem;
  }

  .login-right.login-page-animated {
    padding: 0.3rem 1.5rem 1.25rem;
  }
  
  .login-left {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  #loginContainer {
    padding: 0.25rem;
    top: 2px;
    bottom: 2px;
    min-height: calc(100vh - 4px);
  }
  
  .login-wrapper {
    border-radius: 12px;
  }
  
  .login-left {
    padding: 2rem 1rem 1rem;
  }
  
  .login-left .login-brand .brand-icon {
    width: 125px;
    height: 125px;
    border-radius: 24px;
  }
  
  .login-left .login-brand .brand-icon img {
    width: 105px;
    height: 105px;
  }
  
  .login-left .login-brand .brand-name {
    font-size: 1.5rem;
  }
  
  .login-left .login-form-container {
    padding: 1.5rem 1rem;
    max-width: 320px;
  }
  
  .demo-actions {
    flex-direction: column;
  }
  
  /* Carousel Mobile Responsive Styles */
  .carousel-slides {
    min-height: 380px;
  }
  
  .slide-content {
    padding: 1.5rem;
  }
  
  .slide-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .slide-icon i {
    font-size: 30px;
  }
  
  .slide-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .slide-tagline {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .slide-features {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .feature {
    font-size: 0.8125rem;
  }
  
  .slide-cta {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .carousel-nav {
    width: 36px;
    height: 36px;
  }
  
  .carousel-nav i {
    font-size: 20px;
  }
  
  .carousel-dots {
    gap: 0.375rem;
  }
  
  .dot {
    width: 8px;
    height: 8px;
  }
  
  .dot.active {
    width: 24px;
  }
  
  .welcome-carousel-container {
    padding: 0 1rem 1.35rem;
  }

  .welcome-carousel-container > .carousel-header {
    margin-top: 0;
    padding-top: 0;
  }

  .carousel-header {
    margin-bottom: 1rem;
  }
}

/* Material Dashboard Global Styling */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.app {
  min-height: 100vh;
  position: relative;
}

/* Material Dashboard Button Styles */
.btn-material {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-material:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-lg);
}

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

/* Material Dashboard Card Styles */
.material-card {
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.material-card-header {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.material-card-body {
  padding: 1.5rem;
}

/* Material Dashboard Table Styles */
.material-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.material-table thead {
  background: var(--primary-gradient) !important;
}

.material-table thead th {
  color: white !important;
  padding: 1rem 0.75rem !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: none !important;
}

.material-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.material-table tbody tr:hover {
  background: rgba(255, 0, 128, 0.02);
}

.material-table tbody td {
  padding: 1rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Material Dashboard Form Styles */
.material-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: var(--surface-color);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.material-input:focus {
  outline: none !important;
  border-color: var(--primary-color);
  box-shadow: none !important;
}

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

/* Page transition styles */
.page {
  transition: all 0.3s ease;
  opacity: 1;
}

.page[style*="display: none"] {
  opacity: 0;
}

/* Loading overlay - Material Design */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 245, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-primary);
  font-weight: 500;
}

/* Calendar loading overlay */
.calendar-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 16px;
  background: #fff;
  border-radius: 8px;
}

.calendar-loading-overlay .spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(25, 118, 210, 0.15);
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.calendar-loading-overlay .spinner-label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.2px;
}

.calendar-loading-overlay .spinner-sublabel {
  font-size: 12px;
  color: #999;
  margin-top: -10px;
}

/* Skeleton rows shown while calendar data loads */
.calendar-skeleton {
  padding: 12px 0;
  width: 100%;
}

.calendar-skeleton-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 8px;
}

.calendar-skeleton-cell {
  flex: 1;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.calendar-skeleton-cell.time-col {
  flex: 0 0 60px;
  background: linear-gradient(90deg, #e8e8e8 25%, #ddd 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

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

/* ==========================================
   PAGE DISPLAY CONTROL - CRITICAL SECTION
   ========================================== */

/* Default page state - all pages hidden */
.page {
  display: none;
}

/* Active page state */
.page.active {
  display: block;
}

/* Login Container - HIGHEST PRIORITY OVERRIDES - Must come after .page.active */
#loginContainer.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Register Container - Same styling as Login */
#registerContainer.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hide login container when not active */
#loginContainer:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Hide register container when not active */
#registerContainer:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Ensure other page containers are properly hidden when not active */
#dashboardContainer:not(.active),
#lessonsContainer:not(.active),
#paymentsContainer:not(.active),
#reportsContainer:not(.active),
#demoContainer:not(.active) {
  display: none !important;
}

/* When the shell is shown after login, force layout on — avoids races where .active is set
   but Playwright still sees display:none from the :not(.active) rule during style recalc. */
#dashboardContainer.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Login form elements visibility enforcement */
#loginContainer .login-wrapper,
#loginContainer .login-left,
#loginContainer .login-right,
#loginContainer .login-brand,
#loginContainer .login-form-container,
#loginContainer .login-form {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Registration Container - Exact same styling as Login */
#registerContainer {
  background: var(--background-gradient);
  min-height: calc(100vh - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  position: fixed;
  top: 2px;
  left: 0;
  right: 0;
  bottom: 2px;
  z-index: 1000;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Registration form elements visibility enforcement */
#registerContainer .login-wrapper,
#registerContainer .login-left,
#registerContainer .login-brand,
#registerContainer,
#registerContainer *,
#registerContainer .login-wrapper,
#registerContainer .login-left,
#registerContainer .login-form-container,
#registerContainer .login-form,
#registerContainer #registrationContent,
#registerContainer .registration-page-content {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force registerContainer to be visible when active */
#registerContainer.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100;
}

#registerContainer:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Register-specific: Make login-left take full width and height with ROW layout */
#registerContainer .login-wrapper {
  min-height: 98vh !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 1vh auto;
  padding: 0;
  max-width: 1400px;
  overflow: visible !important;
}

#registerContainer .login-left {
  flex: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex !important;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  visibility: visible !important;
  opacity: 1 !important;
  gap: 0;
  overflow: visible !important;
}

/* Register-specific: Brand section exactly 20% width on LEFT */
#registerContainer .registration-brand-section {
  flex: 0 0 25%;
  width: 25%;
  min-width: 25%;
  max-width: 25%;
  height: 100%;
  margin: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(226, 72, 108, 0.05), rgba(255, 101, 137, 0.05));
  border-right: none;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1;
}

#registerContainer .login-brand {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  border-right: none;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Register-specific: Form container exactly 75% width on RIGHT with scroll */
#registerContainer .login-form-container {
  flex: 1 1 75%;
  width: 75%;
  min-width: 75%;
  max-width: 75%;
  height: 100%;
  max-height: 98vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 2rem;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2;
}

/* Custom scrollbar for form container */
#registerContainer .login-form-container::-webkit-scrollbar {
  width: 8px;
}

#registerContainer .login-form-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

#registerContainer .login-form-container::-webkit-scrollbar-thumb {
  background: rgba(226, 72, 108, 0.3);
  border-radius: 4px;
}

#registerContainer .login-form-container::-webkit-scrollbar-thumb:hover {
  background: rgba(226, 72, 108, 0.5);
}

#registerContainer #registrationContent,
#registerContainer .registration-page-content {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100%;
  display: flex !important;
  flex-direction: column;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 3;
  padding: 0;
  margin: 0 auto;
}

/* Register-specific: Brand icon sizing for 20% left column */
#registerContainer .brand-icon {
  width: 180px;
  height: 180px;
  margin-bottom: 1rem;
  display: flex !important;
  justify-content: center;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
}

#registerContainer .brand-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#registerContainer .brand-name {
  font-size: 2.75rem;
  margin: 0;
  font-weight: 700;
  text-align: center;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #333 !important;
}

#registerContainer .login-brand {
  margin-bottom: 15px;
}

/* Learning Quotes Section */
#registerContainer .learning-quotes {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  text-align: center;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(247, 8, 128, 0.05) 0%, rgba(254, 173, 139, 0.05) 100%);
  border-radius: 8px;
  border-left: 4px solid var(--primary-gradient);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#registerContainer .learning-quotes p {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

#registerContainer .learning-quotes .material-icons {
  visibility: visible !important;
  opacity: 1 !important;
}

#registerContainer .quotes-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #f70880;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#registerContainer .quotes-heading .material-icons {
  font-size: 18px;
}

#registerContainer .quotes-main {
  font-size: 0.85rem;
  color: #344767;
  margin: 0.25rem 0;
  line-height: 1.5;
  font-style: italic;
}

#registerContainer .quotes-subtext {
  font-size: 0.8rem;
  color: #7b809a;
  margin: 0.25rem 0;
  font-weight: 500;
}

#registerContainer .quotes-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

#registerContainer .stat-item {
  text-align: center;
}

#registerContainer .stat-number {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

#registerContainer .stat-label {
  font-size: 0.7rem;
  color: #7b809a;
}

/* Register-specific: Form alignment */
#registerContainer .login-form {
  width: 100%;
  max-width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}

/* Register-specific: Enhanced input visibility - matching Phone field exactly */
#registerContainer input,
#registerContainer select,
#registerContainer textarea {
  padding: 10.5px 10px !important;
  font-size: 13px !important;
  border: 1px solid #bbb !important;
  background: white !important;
  color: #333 !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 5;
  transition: all 0.3s !important;
  font-family: inherit !important;
  height: auto !important;
  min-height: 38px !important;
}

#registerContainer input:hover,
#registerContainer select:hover,
#registerContainer textarea:hover {
  border-color: #999 !important;
}

#registerContainer input:focus,
#registerContainer select:focus,
#registerContainer textarea:focus {
  border-color: var(--primary-color, #ff0080) !important;
  box-shadow: none !important;
  outline: none !important;
}

#registerContainer label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #222 !important;
  margin-bottom: 3px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 5;
}

#registerContainer button[type="submit"],
#registerContainer .mdc-button {
  padding: 0.75rem 1.5rem !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 0.75rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
  pointer-events: auto !important;
  position: relative;
  min-height: 48px !important;
  height: 48px !important;
  min-width: 160px !important;
  width: 160px !important;
  max-width: 160px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  text-transform: none !important;
  letter-spacing: 0.025em !important;
  outline: none !important;
}

#registerContainer button[type="submit"]:hover,
#registerContainer .mdc-button:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-1px);
}

#registerContainer .form-field {
  margin-bottom: 12px !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 5;
}

#registerContainer .common-fields,
#registerContainer .role-specific-fields {
  margin-bottom: 1rem !important;
}

#registerContainer h2 {
  color: #222 !important;
  font-weight: 600 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
  position: relative;
  margin-bottom: 0.75rem !important;
  margin-top: 0 !important;
}

#registerContainer h3 {
  color: #222 !important;
  font-weight: 600 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
  position: relative;
  margin-top: 1rem !important;
  margin-bottom: 0.75rem !important;
}

#registerContainer .registration-tabs {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 5;
  position: relative;
  margin-bottom: 1rem !important;
  margin-top: 0 !important;
}

#registerContainer .registration-tabs .tab-btn {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 5;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#registerContainer .modal-actions {
  margin-top: 0.2rem !important;
  padding-top: 0.2rem !important;
  border-top: 1px solid #e9ecef !important;
}

/* Ensure proper spacing for grid layouts */
#registerContainer .common-fields {
  gap: 1rem !important;
  width: 100%;
  align-items: start;
}

#registerContainer .role-specific-fields {
  width: 100%;
}

#registerContainer .role-specific-fields > div[style*="grid"] {
  gap: 1rem !important;
  width: 100%;
  align-items: start;
}

#registerContainer .form-field {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#registerContainer input,
#registerContainer select,
#registerContainer textarea {
  width: 100% !important;
  box-sizing: border-box;
}

/* Registration Tabs - Exact User Management Style */
.registration-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0;
  list-style: none;
}

.registration-tabs .tab-btn {
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #4b4b4b;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  flex: 1;
}

.registration-tabs .tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  background: #fafafa;
}

.registration-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--primary-color, #ff0080), var(--accent-color, #ff8552));
  color: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}

.registration-tabs .tab-btn:not(.active) {
  background: #fff;
  color: #4b4b4b;
  border: 1px solid rgba(0,0,0,0.08);
}

.registration-tabs .tab-btn .material-icons {
  font-size: 16px;
  vertical-align: middle;
}

/* Trainers Card Grid Styles */
.trainers-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.trainer-card {
  background: linear-gradient(180deg, var(--surface-color) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

/* Floating Musical Instruments Animation - Login Page */
.login-page-animated .music-particle {
  position: absolute;
  font-size: 48px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  animation: floatInstrument 18s ease-in-out infinite;
  filter: brightness(1.3) contrast(1.2) saturate(1.4) drop-shadow(0 0 15px rgba(247, 8, 128, 0.8)) drop-shadow(0 0 25px rgba(254, 173, 139, 0.6));
}

/* Top-to-bottom animation pattern for login-left particles (inside .login-left-particles) */
.login-left.login-page-animated .login-left-particles .music-particle {
  animation: floatTopToBottom 18s ease-in-out infinite;
  font-size: 52px;
  z-index: 0;
  opacity: 0.6;
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.3),
    -1px -1px 2px rgba(255, 255, 255, 0.5);
}

/* Four visible particles; rest hidden (indices are stable inside the wrapper) */
.login-left-particles > .music-particle:nth-child(1) { left: 8%; animation-delay: 2.5s; font-size: 42px; animation-duration: 18s; }
.login-left-particles > .music-particle:nth-child(2) { left: 18%; animation-delay: 3s; font-size: 46px; animation-duration: 19s; }
.login-left-particles > .music-particle:nth-child(3) { left: 82%; animation-delay: 3.5s; font-size: 40px; animation-duration: 18.5s; }
.login-left-particles > .music-particle:nth-child(4) { left: 90%; animation-delay: 4s; font-size: 44px; animation-duration: 19.5s; }

.login-left-particles > .music-particle:nth-child(n+5) {
  display: none;
}

/* Particle wrapper — sits behind carousel content */
.login-right-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Bottom-to-top animation pattern for login-right particles */
.login-right-particles .music-particle {
  animation: floatInstrument 18s ease-in-out infinite;
  font-size: 50px;
  z-index: 0;
  opacity: 0.65;
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.3),
    -1px -1px 2px rgba(255, 255, 255, 0.5);
}

/* Login-right particles - 4 particles, staggered positions */
.login-right-particles .music-particle:nth-child(1) { left: 10%; animation-delay: 2.5s; font-size: 44px; animation-duration: 18s; }
.login-right-particles .music-particle:nth-child(2) { left: 20%; animation-delay: 3s; font-size: 48px; animation-duration: 19s; }
.login-right-particles .music-particle:nth-child(3) { left: 80%; animation-delay: 3.5s; font-size: 42px; animation-duration: 18.5s; }
.login-right-particles .music-particle:nth-child(4) { left: 88%; animation-delay: 4s; font-size: 46px; animation-duration: 19.5s; }

@keyframes floatInstrument {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  3% {
    opacity: 0.85;
  }
  25% {
    opacity: 0.95;
    transform: translateY(75vh) rotate(90deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(50vh) rotate(180deg) scale(1.15);
  }
  75% {
    opacity: 0.95;
    transform: translateY(25vh) rotate(270deg) scale(1);
  }
  97% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(0.7);
    opacity: 0;
  }
}

/* Bottom-to-top motion for login-left */
@keyframes floatTopToBottom {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    opacity: 0.95;
    transform: translateY(75vh) rotate(90deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(50vh) rotate(180deg) scale(1.15);
  }
  75% {
    opacity: 0.95;
    transform: translateY(25vh) rotate(270deg) scale(1);
  }
  97% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(0.7);
    opacity: 0;
  }
}

/* From Top-Left Corner */
@keyframes floatFromTopLeft {
  0% {
    transform: translate(-100vw, -100vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    transform: translate(-20vw, 20vh) rotate(90deg) scale(1.1);
    opacity: 0.95;
  }
  50% {
    transform: translate(20vw, 50vh) rotate(180deg) scale(1.3);
    opacity: 1;
  }
  75% {
    transform: translate(40vw, 80vh) rotate(270deg) scale(1.1);
    opacity: 0.95;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translate(100vw, 110vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* From Top-Right Corner */
@keyframes floatFromTopRight {
  0% {
    transform: translate(100vw, -100vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    transform: translate(60vw, 20vh) rotate(90deg) scale(1.1);
    opacity: 0.95;
  }
  50% {
    transform: translate(20vw, 50vh) rotate(180deg) scale(1.3);
    opacity: 1;
  }
  75% {
    transform: translate(-20vw, 80vh) rotate(270deg) scale(1.1);
    opacity: 0.95;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translate(-100vw, 110vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* From Bottom-Left Corner */
@keyframes floatFromBottomLeft {
  0% {
    transform: translate(-100vw, 110vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    transform: translate(-20vw, 80vh) rotate(90deg) scale(1.1);
    opacity: 0.95;
  }
  50% {
    transform: translate(20vw, 50vh) rotate(180deg) scale(1.3);
    opacity: 1;
  }
  75% {
    transform: translate(60vw, 20vh) rotate(270deg) scale(1.1);
    opacity: 0.95;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translate(100vw, -100vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* From Bottom-Right Corner */
@keyframes floatFromBottomRight {
  0% {
    transform: translate(100vw, 110vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25% {
    transform: translate(60vw, 80vh) rotate(90deg) scale(1.1);
    opacity: 0.95;
  }
  50% {
    transform: translate(20vw, 50vh) rotate(180deg) scale(1.3);
    opacity: 1;
  }
  75% {
    transform: translate(-20vw, 20vh) rotate(270deg) scale(1.1);
    opacity: 0.95;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translate(-100vw, -100vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* trainer-card trainer-avatar styles moved to common.css for consolidation */

.trainer-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.trainer-card .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-badge.active,
.status-badge.status-active { 
  background: #e8f5e9;
  color: #2e7d32;
}
.status-badge.inactive,
.status-badge.status-inactive { 
  background: #ffebee;
  color: #c62828;
}
.status-badge.pending,
.status-badge.status-pending { 
  background: #fff3e0;
  color: #f57c00;
}

.trainer-card .action-buttons button {
  background: transparent;
  border: none;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.trainer-card .action-buttons button:hover { background: rgba(0,0,0,0.04); }

@media (max-width: 640px) {
  .trainers-cards-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* Ensure trainers card grid sits inside table area and doesn't get overlapped */
.table-responsive #trainersCardsContainer {
  display: block !important;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  padding: 8px 0 24px 0;
}

.trainers-cards-grid {
  margin: 0 !important;
}

.trainer-card { min-width: 0; }

/* ── Class Materials & Testimonials ─────────────────────────────────────── */

/* Shared stat card */
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #212121; line-height: 1.1; }
.stat-card .stat-label { font-size: 11px; color: #888; font-weight: 600; letter-spacing: .5px; margin-top: 4px; }

/* Shared tab button */
.mat-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.mat-tab-btn.active { color: var(--primary-color, #f70880); border-bottom-color: var(--primary-color, #f70880); }
.mat-tab-btn:hover:not(.active) { color: #444; }

/* Cool pill tabs (Class Materials trainer view: My Materials / My Uploaded
   Materials / Materials I've Assigned) */
.mat-cool-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.mat-cool-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid #eee;
  background: #fafafa;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.mat-cool-tab .material-icons { font-size: 17px; }
.mat-cool-tab:hover:not(.active) { background: #f0f0f0; color: #333; }
.mat-cool-tab.active {
  background: linear-gradient(135deg, var(--primary-color, #f70880), var(--accent-color, #ff8552));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(247, 8, 128, .25);
}
.mat-cool-panel { animation: matCoolPanelFade .15s ease; }
@keyframes matCoolPanelFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Action buttons in tables */
.mat-action-btn {
  width: 30px; height: 30px;
  border: none; background: #f5f5f5;
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #555; transition: background .15s, color .15s;
}
.mat-action-btn:hover { background: #e8e8e8; }
.mat-action-btn--danger { color: #dc3545; }
.mat-action-btn--danger:hover { background: rgba(220,53,69,.12); }
.mat-action-btn--success { color: #28a745; }
.mat-action-btn--success:hover { background: rgba(40,167,69,.12); }
.mat-action-btn--primary { color: #0d6efd; }
.mat-action-btn--primary:hover { background: rgba(13,110,253,.1); }
.mat-action-btn--warn { color: #e6a817; }
.mat-action-btn--warn:hover { background: rgba(230,168,23,.12); }
.mat-action-btn .material-icons { font-size: 16px; }

/* Form field label */
.mat-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
}

/* Material card for student file view */
.mat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s;
}
.mat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: var(--primary-color, #f70880); }
.mat-card__icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mat-card__body { flex: 1; min-width: 0; }
.mat-card__title { font-size: 14px; font-weight: 700; color: #212121; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-card__desc { font-size: 12px; color: #888; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-card__meta { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: #888; align-items: center; }
.mat-card__meta i { vertical-align: middle; }
.mat-card__action { color: #aaa; transition: color .2s; }
.mat-card:hover .mat-card__action { color: var(--primary-color, #f70880); }

/* Testimonial card */
.testimonial-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: box-shadow .2s;
}
.testimonial-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.testimonial-card--featured { border-color: var(--primary-color, #f70880); box-shadow: 0 0 0 2px rgba(247,8,128,.12); }
.testimonial-featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: var(--primary-color, #f70880);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
}
.testimonial-video-frame {
  position: relative;
  margin: 0 0 12px;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 10px;
  background: #e9ecef;
  overflow: hidden;
  cursor: pointer;
}
.testimonial-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.testimonial-video-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}
.testimonial-video-play .material-icons {
  font-size: 48px;
  color: #fff;
  opacity: 0.9;
}
/* Keep Featured badge above the play overlay on video reviews */
.testimonial-card--video .testimonial-featured-badge,
.testimonial-video-frame .testimonial-featured-badge {
  top: 8px;
  right: 8px;
  z-index: 4;
}
.video-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
.testimonial-card--video {
  padding: 12px;
  min-width: 0;
}
@media (max-width: 1100px) {
  .video-testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .video-testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Table row hover */
#materialsTableBody tr:hover,
#materialAssignmentsBody tr:hover,
#testimonialsTableBody tr:hover,
#performancesTableBody tr:hover { background: #fafafa; }
#materialsTableBody td,
#materialAssignmentsBody td,
#testimonialsTableBody td,
#performancesTableBody td { padding: 12px 16px; border-bottom: 1px solid #f8f8f8; vertical-align: middle; }

/* Modal primary button — global since modals append to body */
.modal-btn-primary {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary-color, #f70880) 0%, var(--accent-color, #7928ca) 100%) !important;
  transition: opacity .2s;
}
.modal-btn-primary:hover { opacity: .88; }
.modal-btn-secondary {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: #f5f5f5;
  color: #333;
  transition: background .15s;
}
.modal-btn-secondary:hover { background: #ececec; }

/* Class Materials, Testimonials, Student Performances & Music Sheets — shared layout */
#class-materialsContainer .dashboard-stats-grid,
#testimonialsContainer .dashboard-stats-grid,
#student-performancesContainer .dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

#class-materialsContainer .stat-card,
#testimonialsContainer .stat-card,
#student-performancesContainer .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

#class-materialsContainer .stat-card:hover,
#testimonialsContainer .stat-card:hover,
#student-performancesContainer .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#class-materialsContainer .material-card,
#testimonialsContainer .material-card,
#student-performancesContainer .material-card,
#music-sheetsContainer .material-card,
#student-demosContainer .material-card,
#chatContainer .material-card {
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#class-materialsContainer .dashboard-header,
#testimonialsContainer .dashboard-header,
#student-performancesContainer .dashboard-header,
#music-sheetsContainer .dashboard-header,
#student-demosContainer .dashboard-header,
#chatContainer .dashboard-header {
    margin-bottom: 5px;
    margin-top: 15px !important;
    margin-right: 20px;
    margin-left: 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
}

#adminMaterialsInterface,
#adminTestimonialsInterface,
#adminPerformancesInterface,
#userMaterialsInterface,
#studentTestimonialsInterface,
#studentPerformancesInterface,
#musicSheetsInterface,
#studentDemosInterface,
#chatInterface {
    margin-bottom: 5px;
    margin-top: 15px !important;
    margin-right: 20px;
    margin-left: 20px;
}

/* Full-width content cards for admin pages */
#adminMaterialsInterface .material-card,
#adminTestimonialsInterface .material-card,
#adminPerformancesInterface .material-card,
#musicSheetsInterface .material-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#class-materialsContainer .material-card-body,
#testimonialsContainer .material-card-body,
#student-performancesContainer .material-card-body,
#course-progressContainer .material-card-body,
#music-sheetsContainer .material-card-body,
#student-demosContainer .material-card-body,
#chatContainer .material-card-body {
    padding: 16px 20px !important;
    margin: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: auto !important;
}


/* Course Progress container — same base layout as video-resourcesContainer */
#course-progressContainer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
    padding: 0 20px;
    margin-top: 8px;
}

/* Trainer My Students & Availability — same layout as course-progressContainer */
#trainer-my-studentsContainer,
#trainer-availabilityContainer,
#trainer-performanceContainer,
#helpContainer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
    padding: 0 20px;
    margin-top: 8px;
}

#trainer-my-studentsContainer .material-card-body,
#trainer-availabilityContainer .material-card-body,
#trainer-performanceContainer .material-card-body {
    padding: 16px 20px !important;
    margin: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: auto !important;
}

/* Hide inner card header rendered by renderStudentsTable — page header is enough */
#trainer-my-studentsContainer .material-card-header {
    display: none !important;
}

/* Content card — same top-border accent as Trainer Dashboard mdc-tab-content */
#trainer-my-studentsContainer .material-card,
#trainer-availabilityContainer .material-card,
#class-materialsContainer .material-card,
#testimonialsContainer .material-card,
#studentTestimonialsInterface > .material-card,
#video-resourcesContainer .material-card,
#course-progressContainer .material-card,
#student-performancesContainer .material-card,
#music-sheetsContainer .material-card,
#student-demosContainer .material-card,
#chatContainer .material-card {
    border-top: 3px solid var(--primary-color, #6c47ff) !important;
    border-left: 1.5px solid rgba(108,71,255,0.18) !important;
    border-right: 1.5px solid rgba(108,71,255,0.18) !important;
    border-bottom: 1.5px solid rgba(108,71,255,0.18) !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 2px 10px rgba(108,71,255,0.06) !important;
    overflow: visible !important;
}

/* Chat UI sits inside material-card-body — do not double the outer accent. */
#chatContainer .chat-container {
    border: none;
    border-radius: 8px;
    box-shadow: none;
}

/* Dashboard header — same cool border as Trainer Dashboard */
#trainer-my-studentsContainer .dashboard-header,
#trainer-availabilityContainer .dashboard-header,
#trainer-performanceContainer .dashboard-header,
#course-progressContainer .dashboard-header,
#helpContainer .dashboard-header {
    margin: 0 0 20px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    color: var(--primary-color);
    background: #ffffff;
    border: 2px solid var(--primary-color, #e2486c);
    border-radius: var(--border-radius-lg, 12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

#trainer-my-studentsContainer .dashboard-header .header-content,
#trainer-availabilityContainer .dashboard-header .header-content,
#trainer-performanceContainer .dashboard-header .header-content,
#course-progressContainer .dashboard-header .header-content,
#helpContainer .dashboard-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

#trainer-my-studentsContainer .dashboard-header .header-text,
#trainer-availabilityContainer .dashboard-header .header-text,
#trainer-performanceContainer .dashboard-header .header-text,
#course-progressContainer .dashboard-header .header-text,
#helpContainer .dashboard-header .header-text {
    text-align: left;
    margin: 0;
    flex: 1;
    min-width: 0;
}
