/**
 * Split Screen Login Page Styles
 * Modern split layout with image left and form right
 */

/* Reset and Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  overflow: hidden;
}

/* Main Wrapper - Split Screen Layout */
.split-login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ========================================
   LEFT SIDE - Image & Quote Section
   ======================================== */
.split-login-left {
  position: relative;
  flex: 0 0 65%;
  max-width: 65%;
  height: 100vh;
  overflow: hidden;
}

/* Background Image */
.split-login-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Right side rounded corners effect */
.split-login-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: #ffffff;
  border-radius: 50px 0 0 50px;
  z-index: 5;
}

/* Bottom Gradient Overlay */
.split-login-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 80px; /* Account for the white rounded edge */
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.6) 30%,
    rgba(0, 0, 0, 0.3) 60%,
    transparent 100%
  );
  z-index: 3;
  pointer-events: none;
}

/* Quote Text Container */
.split-login-quote {
  position: absolute;
  bottom: 60px;
  left: 60px;
  right: 140px; /* Account for overlay and rounded edge */
  z-index: 4;
  color: #ffffff;
}

.split-login-quote-text {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.split-login-quote-subtext {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  max-width: 500px;
}

/* ========================================
   RIGHT SIDE - Form Section
   ======================================== */
.split-login-right {
  flex: 0 0 35%;
  max-width: 35%;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  overflow-y: auto;
}

/* Form Container */
.split-login-form-container {
  width: 100%;
  max-width: 400px;
  padding: 20px 0;
}

/* Logo */
.split-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.split-login-logo img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

/* Header Text */
.split-login-header {
  text-align: center;
  margin-bottom: 36px;
}

.split-login-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.split-login-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  color: #6c757d;
  margin: 0;
}

/* Form Styles */
.split-login-form {
  width: 100%;
}

.split-login-form-group {
  margin-bottom: 24px;
}

.split-login-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.split-login-label .required {
  color: #dc3545;
}

.split-login-input {
  width: 100%;
  height: 50px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
  outline: none;
}

.split-login-input::placeholder {
  color: #adb5bd;
}

.split-login-input:focus {
  background-color: #ffffff;
  border-color: #08a355;
  box-shadow: 0 0 0 4px rgba(8, 163, 85, 0.1);
}

.split-login-input.is-invalid {
  border-color: #dc3545;
}

.split-login-input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Password Field with Toggle */
.split-login-password-wrapper {
  position: relative;
}

.split-login-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.split-login-password-toggle:hover {
  color: #08a355;
}

/* Forgot Password Link */
.split-login-forgot {
  text-align: right;
  margin-bottom: 24px;
}

.split-login-forgot a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #08a355;
  text-decoration: none;
  transition: color 0.3s ease;
}

.split-login-forgot a:hover {
  color: #067a3d;
  text-decoration: underline;
}

/* Submit Button */
.split-login-submit {
  width: 100%;
  height: 52px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #08a355 0%, #067a3d 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.split-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 163, 85, 0.35);
}

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

/* Register Link */
.split-login-register {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.split-login-register span {
  font-size: 0.9rem;
  color: #6c757d;
}

.split-login-register a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #08a355;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.3s ease;
}

.split-login-register a:hover {
  color: #067a3d;
  text-decoration: underline;
}

/* Footer */
.split-login-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
}

.split-login-footer small {
  font-size: 0.8rem;
  color: #adb5bd;
}

/* Error Messages */
.invalid-feedback {
  display: block;
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 6px;
  font-weight: 500;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Large Desktop */
@media (min-width: 1400px) {
  .split-login-quote-text {
    font-size: 2.5rem;
  }

  .split-login-quote-subtext {
    font-size: 1.1rem;
    max-width: 600px;
  }
}

/* Medium Desktop / Laptop */
@media (max-width: 1200px) {
  .split-login-left {
    flex: 0 0 65%;
    max-width: 65%;
  }

  .split-login-right {
    flex: 0 0 35%;
    max-width: 35%;
  }

  .split-login-quote {
    left: 40px;
    right: 120px;
    bottom: 40px;
  }

  .split-login-quote-text {
    font-size: 1.75rem;
  }
}

/* Tablet Landscape */
@media (max-width: 992px) {
  .split-login-left {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .split-login-right {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 30px;
  }

  .split-login-left::after {
    width: 50px;
    border-radius: 30px 0 0 30px;
  }

  .split-login-quote {
    left: 30px;
    right: 90px;
    bottom: 30px;
  }

  .split-login-quote-text {
    font-size: 1.5rem;
  }

  .split-login-quote-subtext {
    font-size: 0.9rem;
  }
}

/* Tablet Portrait & Mobile */
@media (max-width: 768px) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .split-login-wrapper {
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  /* Hide left image section on mobile, show form first */
  .split-login-left {
    display: none;
  }

  .split-login-right {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    padding: 40px 24px;
    justify-content: flex-start;
    padding-top: 60px;
  }

  .split-login-form-container {
    max-width: 360px;
  }

  .split-login-title {
    font-size: 1.25rem;
  }

  .split-login-subtitle {
    font-size: 0.9rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .split-login-right {
    padding: 30px 20px;
    padding-top: 40px;
  }

  .split-login-form-container {
    max-width: 100%;
    padding: 0;
  }

  .split-login-logo img {
    max-height: 60px;
  }

  .split-login-title {
    font-size: 1.1rem;
  }

  .split-login-input {
    height: 48px;
    font-size: 0.9rem;
  }

  .split-login-submit {
    height: 48px;
    font-size: 0.95rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.split-login-form-container {
  animation: fadeInUp 0.6s ease-out;
}

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

.split-login-quote {
  animation: fadeInLeft 0.8s ease-out 0.3s both;
}
