:root {
  --school-primary: #2c5aa0;
  --school-secondary: #1e3d72;
  --school-accent: #ffa726;
  --school-success: #4caf50;
  --school-light: #f8f9fa;
  --school-dark: #2c3e50;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="books" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="none"/><path d="M2 2h3v16h-3zM6 2h3v16h-3zM10 2h3v16h-3zM14 2h3v16h-3z" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23books)"/></svg>');
  opacity: 0.1;
  z-index: 0;
}

/* Split Screen Base Styles */
.split-screen-login {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: 'Poppins', 'Source Sans Pro', sans-serif;
}

.split-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Left Side - Branding */
.split-left {
  flex: 1;
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.split-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.floating-icon:nth-child(2) {
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

.floating-icon:nth-child(3) {
  bottom: 30%;
  left: 25%;
  animation-delay: 4s;
}

.floating-icon:nth-child(4) {
  top: 40%;
  right: 10%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Brand Content */
.brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 500px;
}

.school-logo {
  color: white;
}

.school-logo-icon {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.school-logo-icon i {
  font-size: 3.5rem;
  color: #ffa726;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.school-logo-image {
  max-width: 90px;
  max-height: 90px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.school-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
}

.school-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 2rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.feature-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.feature-badge:hover {
  background: rgba(255, 167, 38, 0.2);
  border-color: rgba(255, 167, 38, 0.4);
  transform: translateY(-2px);
}

.feature-badge i {
  margin-right: 0.5rem;
  color: #ffa726;
}

/* Right Side - Login Form */
.split-right {
  flex: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.split-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(44, 90, 160, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 167, 38, 0.1) 0%, transparent 50%);
}

.login-form-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 450px;
}

.login-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: white;
}

.login-card .card-header {
  background: linear-gradient(135deg, #2c5aa0, #1e3d72);
  color: white;
  border: none;
  padding: 2rem 1.5rem;
}

.login-card .card-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-card .card-body {
  padding: 2rem 1.5rem;
}

.login-box-msg {
  text-align: center;
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Form Styling */
.input-group {
  margin-bottom: 1.5rem;
}

.form-control {
  border: 2px solid #e9ecef;
  border-radius: 12px 0 0 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-control:focus {
  border-color: #2c5aa0;
  box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.15);
  background: white;
}

.input-group-text {
  background: #e9ecef;
  border: 2px solid #e9ecef;
  border-left: none;
  border-radius: 0 12px 12px 0;
  transition: all 0.3s ease;
}

.input-group-focus .input-group-text {
  background: #2c5aa0;
  border-color: #2c5aa0;
  color: white;
}

/* Button Styling */
.btn-primary {
  background: linear-gradient(135deg, #2c5aa0, #1e3d72);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e3d72, #2c5aa0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Remember Me Checkbox */
.icheck-primary label {
  font-weight: 500;
  color: #6c757d;
}

.icheck-primary label:hover {
  color: #2c5aa0;
}

/* Footer Links */
.login-footer-links {
  margin-top: 2rem;
  text-align: center;
}

.login-footer-links a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-footer-links a:hover {
  color: #1e3d72;
  text-decoration: none;
}

.footer-copyright {
  color: #6c757d;
  font-size: 0.85rem;
}

/* Alert Styling */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.alert-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

/* Responsive Design */
@media (max-width: 992px) {
  .split-container {
    flex-direction: column;
  }
  
  .split-left {
    flex: 0 0 40%;
    min-height: 40vh;
  }
  
  .split-right {
    flex: 1;
    min-height: 60vh;
  }
  
  .school-title {
    font-size: 2.5rem;
  }
  
  .school-logo-icon {
    width: 100px;
    height: 100px;
  }
  
  .school-logo-icon i {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .split-left {
    flex: 0 0 35%;
    min-height: 35vh;
  }
  
  .split-right {
    padding: 1rem;
  }
  
  .school-title {
    font-size: 2rem;
  }
  
  .school-subtitle {
    font-size: 1rem;
  }
  
  .feature-badges {
    gap: 0.5rem;
  }
  
  .feature-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .login-card .card-header {
    padding: 1.5rem 1rem;
  }
  
  .login-card .card-body {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .split-container {
    flex-direction: column;
  }
  
  .split-left {
    flex: 0 0 30%;
    min-height: 30vh;
  }
  
  .brand-content {
    padding: 1rem;
  }
  
  .school-title {
    font-size: 1.8rem;
  }
  
  .school-logo-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }
  
  .school-logo-icon i {
    font-size: 2.5rem;
  }
  
  .floating-icon {
    display: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .split-left {
    background: #000;
  }
  
  .split-right {
    background: #fff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .floating-icon,
  .school-logo-icon,
  .btn-primary,
  .feature-badge {
    animation: none !important;
    transition: none !important;
  }
}