:root {
  /* New vibrant color scheme */
  --primary-cyan: #60cbff;
  --primary-blue: #3664f4;
  --primary-cyan-light: #80d5ff;
  --primary-blue-light: #4a7aff;
  
  /* Background colors */
  --bg-dark: #1a1a1a;
  --bg-card: #2a2a2a;
  --bg-input: #333333;
  
  /* Text colors */
  --text-white: #ffffff;
  --text-light: #f0f0f0;
  --text-muted: #cccccc;
  --text-dark: #666666;
  
  /* Border colors */
  --border-color: #444444;
  --border-light: #555555;
  --border-focus: #60cbff;
  
  /* State colors */
  --success-color: #4ade80;
  --warning-color: #f59e0b;
  --error-color: #E85353;
  --info-color: #60cbff;
  
  /* Shadows */
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(96, 203, 255, 0.3);
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Animated background elements */
.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(96, 203, 255, 0.1) 0%, transparent 70%);
  animation: float 20s infinite linear;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.login-card {
  background: linear-gradient(145deg, #2a2a2a 0%, #333333 100%);
  border: 1px solid var(--border-light);
  border-radius: 1.5rem;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-medium);
  animation: fadeIn 0.6s ease-out;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-blue));
  border-radius: 1.5rem 1.5rem 0 0;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: var(--primary-cyan);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Role Selection Styles */
.role-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.role-option {
  background: linear-gradient(145deg, #333333, #2a2a2a);
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.role-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-blue));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.role-option.active::before {
  transform: scaleX(1);
}

.role-option.active {
  border-color: var(--primary-cyan);
  background: linear-gradient(145deg, rgba(96, 203, 255, 0.15), rgba(54, 100, 244, 0.1));
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(96, 203, 255, 0.3);
}

.role-option:hover:not(.active) {
  border-color: var(--primary-cyan-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(96, 203, 255, 0.2);
}

.role-icon {
  font-size: 2.5rem;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.role-option.active .role-icon {
  color: var(--primary-blue-light);
  transform: scale(1.1);
}

.role-info h3 {
  color: var(--text-white);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.role-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  color: var(--primary-cyan);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label::before {
  content: '•';
  color: var(--primary-blue);
  font-size: 1.2rem;
}

.form-group input {
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  color: var(--text-white);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  background: rgba(96, 203, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(96, 203, 255, 0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder {
  color: var(--text-dark);
  font-weight: 400;
}

/* Password Input Container */
.password-input-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.password-toggle:hover {
  color: var(--primary-cyan);
  background: rgba(96, 203, 255, 0.1);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.remember-me:hover {
  color: var(--text-light);
}

.remember-me input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: var(--bg-input);
}

.remember-me:hover .checkmark {
  border-color: var(--primary-cyan);
}

.remember-me input:checked + .checkmark {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.remember-me input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-password-link {
  color: var(--primary-cyan);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.forgot-password-link:hover {
  color: var(--primary-blue-light);
  text-decoration: none;
  background: rgba(96, 203, 255, 0.1);
}

/* Login Button */
.login-btn {
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
  color: var(--text-white);
  padding: 1.25rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  height: 60px;
  box-shadow: 0 4px 15px rgba(54, 100, 244, 0.4);
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(54, 100, 244, 0.6);
}

.login-btn:hover:not(:disabled)::before {
  left: 100%;
}

.login-btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-text {
  display: block;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.login-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.support-link {
  color: var(--primary-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.375rem;
}

.support-link:hover {
  color: var(--primary-blue-light);
  text-decoration: none;
  background: rgba(96, 203, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
  }

  .login-header h1 {
    font-size: 1.75rem;
  }

  .login-header p {
    font-size: 0.9rem;
  }

  .role-selection {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .role-option {
    padding: 1.25rem 1rem;
  }

  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .login-btn {
    padding: 1rem;
    height: 55px;
  }
}

/* Role-specific styles */
.role-staff .login-btn {
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
  box-shadow: 0 4px 15px rgba(96, 203, 255, 0.4);
}

.role-staff .login-btn:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(96, 203, 255, 0.6);
}

.role-admin .login-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  box-shadow: 0 4px 15px rgba(232, 83, 83, 0.4);
}

.role-admin .login-btn:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(232, 83, 83, 0.6);
}

.role-admin .role-option.active {
  border-color: #ff6b6b;
  background: linear-gradient(145deg, rgba(255, 107, 107, 0.15), rgba(238, 90, 82, 0.1));
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.role-admin .role-option.active::before {
  background: linear-gradient(90deg, #ff6b6b, #ee5a52);
}

.role-admin .role-option.active .role-icon {
  color: #ff6b6b;
}

.role-admin .role-option:hover:not(.active) {
  border-color: #ff6b6b;
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

/* Enhanced focus states for accessibility */
.form-group input:focus-visible {
  outline: 2px solid var(--primary-cyan);
  outline-offset: 2px;
}

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

.login-btn:focus-visible {
  outline: 3px solid rgba(96, 203, 255, 0.5);
  outline-offset: 2px;
}

/* Loading state enhancements */
.login-btn:disabled .spinner {
  border-top-color: var(--primary-cyan);
}

/* Success state for form validation */
.form-group.success input {
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.form-group.error input {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(232, 83, 83, 0.1);
}

/* Password strength indicator */
.password-strength {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.password-strength.weak {
  border-color: var(--error-color);
  background: rgba(232, 83, 83, 0.05);
}

.password-strength.medium {
  border-color: var(--warning-color);
  background: rgba(245, 158, 11, 0.05);
}

.password-strength.strong {
  border-color: var(--success-color);
  background: rgba(74, 222, 128, 0.05);
}

/* Pulse animation for active elements */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(96, 203, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(96, 203, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(96, 203, 255, 0); }
}

.role-option.active {
  animation: pulse 2s infinite;
}

/* Glass morphism effect for modern look */
.login-card {
  background: linear-gradient(145deg, 
    rgba(42, 42, 42, 0.9) 0%, 
    rgba(51, 51, 51, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text effects */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced hover effects */
.role-option, .login-btn, .forgot-password-link, .support-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .login-container {
    padding: 0.5rem;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
  }
  
  .role-selection {
    gap: 0.5rem;
  }
  
  .form-group input {
    padding: 0.875rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .login-card {
    border: 2px solid var(--primary-cyan);
  }
  
  .form-group input {
    border-width: 2px;
  }
  
  .role-option {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .login-card,
  .role-option,
  .login-btn,
  .form-group input {
    animation: none;
    transition: none;
  }
  
  .login-container::before {
    animation: none;
  }
}