/* ==========================================================================
   Auth Page Styles — DriveBro Theme
   ========================================================================== */

/* Auth Page Background
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, var(--primary) 0%, #1a3d4a 50%, #0f2a33 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  pointer-events: none;
}

.auth-page::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 95, 111, 0.15) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  pointer-events: none;
}

/* Auth Card
   ========================================================================== */

.auth-card {
  width: 100%;
  max-width: 28rem; /* ~md */
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 1;
  animation: authSlideUp 0.4s ease-out both;
}

@keyframes authSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.auth-card__logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card__logo img {
  height: 48px;
  width: auto;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--foreground);
  text-align: center;
  margin: 0 0 0.25rem;
}

.auth-card__subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  margin: 0 0 2rem;
}

/* Tabs (Email / Phone)
   ========================================================================== */

.auth-tabs {
  display: flex;
  background: var(--background);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-tabs__tab {
  flex: 1;
  padding: 0.625rem;
  text-align: center;
  font-family: "Tajawal", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tabs__tab.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-tabs__tab:hover:not(.is-active) {
  color: var(--foreground);
}

/* Form Fields */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
}

.auth-form__input {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: "Tajawal", sans-serif;
  font-size: 0.9375rem;
  background: var(--background);
  color: var(--foreground);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-form__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-form__phone-wrapper {
  display: flex;
  gap: 0.5rem;
}

.auth-form__country-code {
  width: 90px;
  padding: 0.75rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: "Tajawal", sans-serif;
  font-size: 0.9375rem;
  background: var(--background);
  color: var(--foreground);
  text-align: center;
  direction: ltr;
  flex-shrink: 0;
}

.auth-form__submit {
  width: 100%;
  padding: 0.875rem;
  margin-top: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-family: "Tajawal", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.auth-form__submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.auth-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* OTP Input Boxes (4 Digits)
   ========================================================================== */

.otp-section {
  text-align: center;
}

.otp-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 0.25rem;
}

.otp-section__desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0 0 1.5rem;
}

.otp-section__desc strong {
  color: var(--primary);
  direction: ltr;
  display: inline-block;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  direction: ltr;
  margin-bottom: 1.5rem;
}

.otp-inputs__box {
  width: 56px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-family: "Tajawal", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  background: var(--background);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.otp-inputs__box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.otp-inputs__box.has-value {
  border-color: var(--primary);
  background: var(--primary-light);
}

.otp-resend {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.otp-resend__btn {
  background: none;
  border: none;
  color: var(--primary);
  font-family: "Tajawal", sans-serif;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.otp-resend__btn:disabled {
  color: var(--muted-foreground);
  cursor: not-allowed;
  text-decoration: none;
}

/* Step Indicator
   ========================================================================== */

.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-steps__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}

.auth-steps__dot.is-active {
  width: 24px;
  border-radius: 50px;
  background: var(--primary);
}

.auth-steps__dot.is-completed {
  background: var(--primary);
}

/* Footer Links */

.auth-card__footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.auth-card__footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
}

.auth-card__footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Responsive
   ========================================================================== */

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.25rem;
  }

  .otp-inputs__box {
    width: 48px;
    height: 52px;
    font-size: 1.25rem;
  }
}
