/* ========================================
   LOGIN PAGE - V2
   ======================================== */

/* ========== MAIN CONTENT ========== */
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: #f8f9fc;
}

.login-modal {
  display: flex;
  width: 100%;
  max-width: 1100px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: loginSlideIn 0.5s ease-out;
}

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

/* ========== LEFT PANEL - FORM ========== */
.login-form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 3rem;
  background: white;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

/* ========== RETURN NAV ========== */
.login-return-nav {
  margin-bottom: 2.5rem;
}

.login-return-nav .return-to-page {
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.login-return-nav .return-to-page:hover {
  color: var(--primary-blue);
}

/* ========== FORM HEADING ========== */
.login-form-container h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}

.login-form-container > p {
  color: #888;
  font-size: 0.92rem;
}

/* ========== FORM INPUTS ========== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
  font-size: 0.88rem;
}

.login-form-container .form-control {
  padding: 0.85rem 1rem;
  border: 1.5px solid #e5e8ed;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #333;
  background: #fafbfc;
  transition: all 0.25s ease;
  width: 100%;
}

.login-form-container .form-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(63, 107, 169, 0.08);
}

.login-form-container .form-control::placeholder {
  color: #bbb;
}

/* ========== PASSWORD TOGGLE ========== */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-control {
  flex: 1;
  padding-right: 3rem !important;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.4rem;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.password-toggle:hover {
  color: var(--primary-blue);
}

.password-toggle:focus {
  outline: none;
}

/* ========== FORM OPTIONS ========== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-options .form-check-label {
  font-size: 0.85rem;
  color: #666;
}

.forgot-password {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: var(--dark-blue);
  text-decoration: underline;
}

/* ========== LOGIN BUTTON ========== */
.btn-login {
  width: 100%;
  padding: 1rem;
  background: var(--primary-red);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(238, 28, 37, 0.25);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(238, 28, 37, 0.35);
}

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

.btn-login i {
  transition: transform 0.3s ease;
}

.btn-login:hover i {
  transform: translateX(3px);
}

/* ========== SIGNUP SECTION ========== */
.signup-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eef1f6;
  text-align: center;
}

.signup-section p {
  font-size: 0.88rem;
}

.signup-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.signup-link:hover {
  color: var(--dark-blue);
  text-decoration: underline;
}

/* ========== RIGHT PANEL - BRANDING ========== */
.login-branding-section {
  flex: 0 0 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #1e3a6e 100%);
  position: relative;
  overflow: hidden;
}

.branding-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.branding-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.branding-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}

.branding-glow--1 {
  width: 300px;
  height: 300px;
  background: white;
  top: -20%;
  right: -10%;
}

.branding-glow--2 {
  width: 200px;
  height: 200px;
  background: var(--primary-red);
  bottom: -10%;
  left: -5%;
  opacity: 0.08;
}

/* ========== BRANDING CONTENT ========== */
.login-branding-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.branding-logo-container {
  margin-bottom: 1.5rem;
}

.logo-img {
  max-width: 200px;
  height: auto;
}

.branding-tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.02em;
}

.branding-tagline--blue {
  color: #7db8e8;
  font-weight: 600;
}

.branding-tagline--red {
  color: var(--primary-red);
  font-weight: 600;
}

/* ========== ERROR MESSAGE ========== */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  animation: loginShake 0.5s;
}

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

.error-message.hidden {
  display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .login-modal {
    flex-direction: column;
    max-width: 550px;
  }

  .login-branding-section {
    flex: none;
    width: 100%;
    padding: 2.5rem 2rem;
    order: -1;
  }

  .login-form-section {
    flex: none;
    width: 100%;
    padding: 2.5rem 2rem;
  }

  .branding-tagline {
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  .login-main {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .login-modal {
    border-radius: 18px;
  }

  .login-branding-section {
    padding: 2rem 1.5rem;
  }

  .login-form-section {
    padding: 2rem 1.5rem;
  }

  .logo-img {
    max-width: 150px;
  }

  .form-group {
    margin-bottom: 1.2rem;
  }

  .btn-login {
    padding: 0.9rem;
    font-size: 0.95rem;
  }
}
