/**
 * Login Form Styles
 * Redesigned to match screenshot
 */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E8F4F8;
  padding: 0;
}

.login-container {
  width: 100%;
  max-width: 1400px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Left Side - Illustration */
.login-branding {
  background: #1e3a8a;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.branding-illustration {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 600px;
  max-height: 700px;
}

/* Abstract shapes */
.illustration-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(135, 206, 235, 0.3);
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

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

/* Cloud-like elements */
.illustration-shapes::before,
.illustration-shapes::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
}

.illustration-shapes::before {
  width: 300px;
  height: 80px;
  top: 20%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

.illustration-shapes::after {
  width: 250px;
  height: 70px;
  bottom: 30%;
  left: 5%;
  animation: float 10s ease-in-out infinite;
  animation-delay: 1s;
}

/* Large smartphone illustration */
.phone-illustration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  z-index: 3;
  width: 280px;
  height: 500px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 30px;
  padding: 40px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.phone-profile-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  margin-bottom: 10px;
}

.phone-input-line {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
}

.phone-input-line.phone-password {
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.password-dots {
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 2px;
}

/* Person illustrations */
.illustration-person {
  position: absolute;
  z-index: 2;
  width: 200px;
  height: 300px;
}

.person-woman {
  right: 15%;
  top: 25%;
  animation: float 7s ease-in-out infinite;
  animation-delay: 1s;
}

.person-man {
  left: 10%;
  bottom: 20%;
  animation: float 8s ease-in-out infinite;
  animation-delay: 2s;
}

.illustration-person svg {
  width: 100%;
  height: 100%;
}

/* Foliage */
.illustration-foliage {
  position: absolute;
  bottom: 10%;
  left: 5%;
  z-index: 1;
  width: 150px;
  height: 150px;
  opacity: 0.6;
}

.illustration-foliage svg {
  width: 100%;
  height: 100%;
}

/* Right Side - Login Form */
.login-form-wrapper {
  padding: 80px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

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

.login-header {
  margin-bottom: 40px;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0;
  text-align: left;
}

/* Form Fields */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
  display: block;
}

.input-wrapper {
  position: relative;
}

.password-wrapper {
  position: relative;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #1f2937;
  background-color: #f9fafb;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #1e3a8a;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #1e3a8a;
}

.password-toggle i {
  font-size: 18px;
}

/* Form Options - Toggle and Forgot Password */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -8px;
  margin-bottom: 8px;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #1e3a8a;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.forgot-password-link {
  color: #1e3a8a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Form Actions */
.form-actions {
  margin-bottom: 24px;
}

.form-actions button,
.form-actions input[type="submit"] {
  width: 100%;
  padding: 16px;
  background: #4169E1;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-actions button:hover,
.form-actions input[type="submit"]:hover {
  background: #3155d1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.form-actions button:active,
.form-actions input[type="submit"]:active {
  transform: translateY(0);
}

/* Form Footer */
.form-footer {
  text-align: center;
  padding-top: 24px;
}

.register-prompt {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.register-link {
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.register-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Error Messages */
.messages.error {
  background-color: #fee2e2;
  border-left: 4px solid #ef4444;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  color: #991b1b;
  font-size: 14px;
}

.form-item--error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
}

.form-item--error input {
  border-color: #ef4444;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login-branding {
    padding: 40px;
  }
  
  .login-form-wrapper {
    padding: 60px 40px;
  }

  .phone-illustration {
    width: 240px;
    height: 430px;
  }

  .illustration-person {
    width: 150px;
    height: 225px;
  }
}

@media (max-width: 768px) {
  .login-page {
    padding: 0;
  }
  
  .login-container {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .login-branding {
    padding: 40px 24px;
    min-height: 400px;
  }

  .phone-illustration {
    width: 200px;
    height: 360px;
  }

  .illustration-person {
    width: 120px;
    height: 180px;
  }

  .person-woman {
    right: 10%;
    top: 15%;
  }

  .person-man {
    left: 5%;
    bottom: 15%;
  }
  
  .login-form-wrapper {
    padding: 40px 24px;
  }
  
  .login-header h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .login-branding {
    padding: 32px 20px;
    min-height: 300px;
  }

  .phone-illustration {
    width: 160px;
    height: 290px;
  }

  .illustration-person {
    display: none;
  }
  
  .login-form-wrapper {
    padding: 32px 20px;
  }
  
  .login-header h2 {
    font-size: 22px;
  }
  
  .form-group input {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .form-actions button,
  .form-actions input[type="submit"] {
    padding: 14px;
    font-size: 15px;
  }
}

/* Animation */
.login-form-container {
  animation: fadeInUp 0.6s ease;
}

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