/* Split-Screen Auth Layout */
.auth-layout {
  display: flex;
  min-height: 100vh;
  background-color: #ffffff;
  font-family: 'Almarai', sans-serif;
}

/* Branding Panel */
.auth-branding {
  flex: 0 0 45%;
  background: linear-gradient(135deg, #1e1b4b 0%, #311b92 50%, #4a148c 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #ffffff;
}

.auth-branding::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
}





.branding-content {
  position: relative;
  z-index: 2;
}

.branding-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 32px;
}

.branding-headline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.branding-features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.branding-features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
}

.branding-features li svg {
  color: #ec4899;
  flex-shrink: 0;
}

.branding-testimonial {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 15px;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
}

.testimonial-author div strong {
  display: block;
  font-size: 1rem;
}

.testimonial-author div span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Form Panel */
.auth-form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow-y: auto;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 440px;
}

.mobile-logo {
  display: none;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 10px;
  font-weight: 800;
}

.auth-header p {
  color: #64748b;
  font-size: 1.05rem;
}

/* Social Login */
.social-login {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.social-btn svg {
  width: 22px;
  height: 22px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  margin-bottom: 25px;
  font-size: 0.95rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.divider::before { margin-inline-end: 15px; }
.divider::after { margin-inline-start: 15px; }

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

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

.input-group label {
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 16px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
}
.input-icon svg { width: 20px; height: 20px; }

.toggle-password {
  position: absolute;
  left: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: flex;
}
.toggle-password:hover { color: #512da8; }

.input-wrapper input {
  width: 100%;
  padding: 15px 16px 15px 45px;
  padding-right: 45px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  font-size: 1rem;
  color: #1e293b;
  transition: all 0.3s ease;
  background: #fff;
}
.input-wrapper input:focus {
  border-color: #512da8;
  box-shadow: 0 0 0 4px rgba(81, 45, 168, 0.1);
  outline: none;
}
.input-wrapper input::placeholder {
  color: #94a3b8;
}

.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 6px;
  display: none;
}

.input-group.has-error input {
  border-color: #f87171;
  background: #fef2f2;
}
.input-group.has-error .error-msg {
  display: block;
}

.terms-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.terms-group input {
  width: 18px; height: 18px;
  accent-color: #512da8;
  cursor: pointer;
}
.terms-group label {
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
}
.terms-group label a {
  color: #512da8;
  font-weight: 700;
  text-decoration: none;
}

.auth-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 14px;
  background: #512da8;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}
.auth-btn:hover {
  background: #41228e;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(81, 45, 168, 0.2);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: #64748b;
  font-size: 1rem;
}
.auth-footer a {
  color: #512da8;
  font-weight: 800;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* Password Strength */
.password-strength {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background-color: #e2e8f0;
  transition: background-color 0.3s;
}
.strength-text {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 5px;
  text-align: left;
  direction: ltr;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .auth-branding {
    flex: 0 0 40%;
    padding: 24px;
  }
  .branding-headline {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .auth-branding {
    display: none;
  }
  .auth-form-container {
    background: #f8fafc;
  }
  .auth-form-wrapper {
    background: #fff;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
  }
  .mobile-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
  }
  .mobile-logo svg {
    color: #512da8;
  }
}
