/* ===================================
   BES Login Page - Royal Blue, White & Gold
   =================================== */

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #7a7373 0%, #1c6fdb 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  position: relative;
  overflow-x: hidden;
}

/* Login Box Container */
.login-box {
  background: white;
  border-radius: 25px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  border: 3px solid #fbbf24;
  animation: slideIn 0.5s ease-out;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  overflow: hidden;
  min-height: 550px;
}

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

/* Blue Section (Left side on desktop, Top on mobile) */
.blue-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* School Logo */
.school-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.3));
  transition: transform 0.3s ease;
  margin-bottom: 30px;
}

.school-logo:hover {
  transform: scale(1.05) rotate(5deg);
}

/* School Info */
.school-info {
  color: white;
}

.school-info h1 {
  font-size: 1.6rem;
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

.school-info p {
  font-size: 0.9rem;
  color: white;
  line-height: 1.6;
  opacity: 0.95;
  font-weight: 500;
}

.bold-blue {
  font-weight: 600;
  color: white !important;
}

/* White Section (Right side on desktop, Bottom on mobile) */
.white-section {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Error Message */
.error {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  animation: shake 0.5s ease;
  text-align: center;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

form input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e8ecf1;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
  color: #2c3e50;
  font-family: inherit;
}

form input:focus {
  outline: none;
  border-color: #fbbf24;
  background: white;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
  transform: translateY(-2px);
}

form input::placeholder {
  color: #95a5a6;
}

/* Submit Button */
form button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fbbf24;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
  margin-top: 10px;
}

form button:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e3a8a;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

form button:active {
  transform: translateY(-1px);
}

/* Forgot password link */
.forgot-password {
  text-align: center;
  margin: 15px 0;
}

.forgot-password a {
  color: #1e3a8a;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.forgot-password a:hover {
  color: #fbbf24;
  border-bottom: 2px solid #fbbf24;
  transform: translateY(-2px);
}

/* Back to Home Link */
.back-home {
  display: block;
  text-align: center;
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px;
  margin: 20px 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 100%;
}

.back-home:hover {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  transform: translateX(-3px);
}

/* Footer Social Links */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 2px solid #e8ecf1;
}

.footer-links a {
  display: inline-block;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  transform: translateY(-5px);
}

.footer-links img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-links a:hover img {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* Book Notice */
.book-notice {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #fbbf24;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #92400e;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
  animation: slideIn 0.5s ease;
}

.book-notice .icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1100px) {
  .login-box {
    grid-template-columns: 1fr;
    max-width: 500px;
    min-height: auto;
  }
  
  /* On mobile, blue-section will be positioned by JavaScript */
  .blue-section {
    display: flex !important; /* Force it to show */
  }
}

@media (max-width: 480px) {
  body {
    padding: 15px;
  }
  
  .login-box {
    border-radius: 15px;
  }
  
  .white-section {
    padding: 25px 20px;
  }
  
  form input, form button {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
  
  .footer-links img {
    width: 35px;
    height: 35px;
  }
}