/* =================================
   AUTH PAGES STYLES
   Login, Register, Reset Password
   Split-screen design
   ================================= */

/* Auth Body */
.auth-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
}

/* Auth Container - Full Screen Split */
.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: var(--surface);
  overflow: hidden;
  animation: authFadeIn 0.5s ease;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Left Side - Brand Panel */
.auth-brand {
  flex: 0 0 45%;
  background: linear-gradient(160deg, #0a1628 0%, #0d2847 30%, #1155a3 70%, #1976d2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../Assets/hero-bg.jpg') center/cover no-repeat;
  background-image: image-set(url('../Assets/hero-bg.webp') type('image/webp'), url('../Assets/hero-bg.jpg') type('image/jpeg'));
  background-image: -webkit-image-set(url('../Assets/hero-bg.webp') type('image/webp'), url('../Assets/hero-bg.jpg') type('image/jpeg'));
  opacity: 0.25;
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-brand-icon {
  font-size: 4em;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.auth-brand-content h1 {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}

.auth-brand-content p {
  font-size: 1em;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Brand Features */
.auth-brand-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 320px;
  margin: 0 auto;
}

.auth-brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95em;
  opacity: 0.9;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.auth-brand-feature:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.auth-brand-feature span {
  font-size: 1.3em;
}

/* Right Side - Form Panel */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 60px;
  overflow-y: auto;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
}

/* Form Header */
.auth-form-header {
  margin-bottom: 30px;
}

.auth-form-header h2 {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.auth-form-header p {
  font-size: 0.95em;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Auth Alert Messages */
.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9em;
  font-weight: 500;
  animation: authAlertSlide 0.3s ease;
}

@keyframes authAlertSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.auth-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.auth-alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input Row (side by side) */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Input Group */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-input-group label {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-color);
}

/* Input Wrapper with Icon */
.auth-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #dde2e8;
  border-radius: 10px;
  background: #f9fafb;
  transition: all 0.3s ease;
  overflow: hidden;
}

.auth-input-wrap:focus-within {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
}

.auth-input-icon {
  padding: 0 12px;
  font-size: 1.1em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 12px 12px 0;
  font-size: 0.95em;
  font-family: var(--font-family);
  color: var(--text-color);
  min-width: 0;
}

.auth-input-wrap input::placeholder {
  color: #b0b8c4;
}

/* Password show/hide toggle button (2026-05-11 UX improvement) */
.auth-pwd-toggle {
  background: transparent;
  border: 0;
  padding: 0 12px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
  transition: color 0.2s;
}
.auth-pwd-toggle:hover { color: var(--primary); }
.auth-pwd-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.auth-pwd-toggle svg { width: 18px; height: 18px; }
.auth-pwd-toggle .eye-off { display: none; }
.auth-pwd-toggle.shown .eye-on { display: none; }
.auth-pwd-toggle.shown .eye-off { display: block; }

/* Phone Number Prefix */
.auth-phone-prefix {
  padding: 0 0 0 2px;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1.5px solid #dde2e8;
  padding-right: 10px;
  margin-right: 2px;
  line-height: 1;
  user-select: none;
}

/* Phone Hint */
.auth-phone-hint {
  font-size: 0.78em;
  min-height: 16px;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.auth-phone-hint-warn {
  color: #e67e22;
}

.auth-phone-hint-ok {
  color: #27ae60;
  font-weight: 500;
}

.auth-phone-hint-error {
  color: #e74c3c;
  font-weight: 500;
}

/* OTP Input - wider */
.auth-otp-input-wrap input {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  letter-spacing: 6px;
  padding: 14px 12px 14px 0;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 1em;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(74, 144, 226, 0.3);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(74, 144, 226, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Actions Row (forgot password etc.) */
.auth-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-forgot-link {
  font-size: 0.85em;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e9ecef;
}

.auth-footer p {
  font-size: 0.9em;
  color: var(--text-light);
  margin: 0;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* OTP Section */
.auth-otp-info {
  text-align: center;
  font-size: 0.9em;
  color: var(--text-light);
  margin-bottom: 8px;
  padding: 10px;
  background: #f0f7ff;
  border-radius: 8px;
  border: 1px solid rgba(74, 144, 226, 0.15);
}

/* Timer */
.auth-timer {
  text-align: center;
  margin-top: 8px;
  padding: 10px;
  background: #fdf2f2;
  border-radius: 8px;
}

.auth-timer p {
  margin: 0;
  font-size: 0.88em;
  color: #555;
}

.auth-timer-value {
  font-weight: 700;
  color: #e74c3c;
  font-size: 1.1em;
}

/* Resend Button */
.auth-resend-btn {
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.9em;
  font-family: var(--font-family);
  margin-top: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.auth-resend-btn:hover {
  background: rgba(74, 144, 226, 0.1);
  color: var(--primary-dark);
}

/* Step Sections (reset password) */
.auth-step {
  display: none;
  animation: authStepFadeIn 0.4s ease;
}

.auth-step.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes authStepFadeIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Step Indicator */
.auth-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.auth-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9ecef;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: 700;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.auth-step-dot.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.35);
}

.auth-step-dot.done {
  background: #28a745;
  color: white;
}

.auth-step-line {
  width: 40px;
  height: 3px;
  background: #e9ecef;
  transition: background 0.3s ease;
}

.auth-step-line.done {
  background: #28a745;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
    min-height: 100vh;
  }

  .auth-brand {
    flex: none;
    padding: 30px 20px;
  }

  .auth-brand-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
  }

  .auth-brand-content h1 {
    font-size: 1.5em;
    margin-bottom: 6px;
  }

  .auth-brand-content p {
    font-size: 0.88em;
    margin-bottom: 15px;
  }

  .auth-brand-features {
    gap: 8px;
  }

  .auth-brand-feature {
    font-size: 0.85em;
    padding: 8px 12px;
  }

  .auth-form-side {
    flex: 1;
    padding: 30px 20px;
    align-items: flex-start;
  }

  .auth-form-header h2 {
    font-size: 1.4em;
  }

  .auth-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .auth-submit-btn {
    padding: 13px;
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .auth-brand-features {
    display: none;
  }

  .auth-brand {
    padding: 25px 15px;
  }

  .auth-brand-content p {
    display: none;
  }

  .auth-form-side {
    padding: 25px 15px;
  }

  .auth-form-wrapper { max-width: 100%; width: 100%; }
  .auth-brand-content h1 { font-size: 1.3em; }
  .auth-form-header h2 { font-size: 1.25em; }
  .auth-input-wrap input,
  .auth-input-wrap select,
  .auth-input-wrap textarea { font-size: 16px; padding: 12px 14px; }
  .auth-submit-btn { min-height: 44px; padding: 12px; font-size: 0.95em; }
  .auth-phone-prefix { font-size: 14px; }
}

@media (max-width: 360px) {
  .auth-brand { padding: 20px 12px; }
  .auth-brand-icon { font-size: 2.1em; }
  .auth-brand-content h1 { font-size: 1.15em; }
  .auth-form-side { padding: 20px 12px; }
  .auth-form-header h2 { font-size: 1.15em; }
  .auth-form-header p { font-size: 0.85em; }
  .auth-input-wrap input,
  .auth-input-wrap select,
  .auth-input-wrap textarea { padding: 11px 12px; }
  .auth-footer-link { font-size: 0.85em; }
}
