/* ── Auth Pages (login, register, forgot/reset password) ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--y-space-xxl) var(--y-space-m);
  direction: rtl;
  background: var(--y-color-bg);
}

.auth-box {
  width: 100%;
  max-width: 28rem;
}

/* ── Auth Header ─────────────────────────── */
.auth-header {
  text-align: center;
  margin-bottom: var(--y-space-xl);
}

.auth-header .auth-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--y-space-s);
  margin-bottom: var(--y-space-l);
  text-decoration: none;
}

.auth-header .auth-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: var(--y-color-primary);
  border-radius: var(--y-radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--y-color-white);
  font-size: var(--y-font-xxl);
}

.auth-header .auth-logo span {
  font-size: var(--y-font-xxl);
  font-weight: var(--y-weight-bold);
  color: var(--y-color-primary);
}

.auth-header h1 {
  font-size: var(--y-font-xxl);
  font-weight: var(--y-weight-bold);
  margin-bottom: var(--y-space-s);
  color: var(--y-color-text);
}

.auth-header p {
  color: var(--y-color-text-muted);
}

/* ── Auth Card ───────────────────────────── */
.auth-card {
  background: var(--y-color-white);
  padding: var(--y-space-xl);
  border-radius: var(--y-radius-l);
  border: 1px solid var(--y-color-border);
  box-shadow: var(--y-shadow-s);
}

/* ── Auth Footer ─────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: var(--y-space-l);
  font-size: var(--y-font-s);
  color: var(--y-color-text-muted);
}

.auth-footer a {
  color: var(--y-color-primary);
  font-weight: var(--y-weight-semibold);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ── Auth Tabs (email / phone toggle) ─────── */
.auth-tabs {
  display: flex;
  background: var(--y-color-bg-subtle);
  border-radius: var(--y-radius-m);
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--y-space-s);
  padding: 0.6rem var(--y-space-m);
  border-radius: var(--y-radius-s);
  border: none;
  background: transparent;
  color: var(--y-color-text-muted);
  font-size: var(--y-font-s);
  font-weight: var(--y-weight-medium);
  cursor: pointer;
  transition: all var(--y-transition-fast);
  font-family: inherit;
}

.auth-tab:hover {
  color: var(--y-color-text);
}

.auth-tab.active {
  background: var(--y-color-white);
  color: var(--y-color-primary);
  box-shadow: var(--y-shadow-s);
  font-weight: var(--y-weight-semibold);
}

/* ── OTP Section ─────────────────────────── */
.otp-header {
  text-align: center;
  margin-bottom: var(--y-space-xl);
}

.otp-icon {
  width: 64px;
  height: 64px;
  background: var(--y-color-primary-subtle);
  border-radius: var(--y-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--y-space-m);
  color: var(--y-color-primary);
}

.otp-header h3 {
  font-size: var(--y-font-xl);
  font-weight: var(--y-weight-bold);
  color: var(--y-color-text);
  margin-bottom: var(--y-space-s);
}

.otp-header p {
  font-size: var(--y-font-s);
  color: var(--y-color-text-muted);
  line-height: 1.6;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--y-space-xl);
  direction: ltr;
}

.otp-digit {
  width: 56px;
  height: 56px;
  text-align: center;
  font-size: var(--y-font-xxl);
  font-weight: var(--y-weight-bold);
  border: 2px solid var(--y-color-border);
  border-radius: var(--y-radius-m);
  background: var(--y-color-bg-subtle);
  color: var(--y-color-text);
  transition: all var(--y-transition-fast);
  font-family: inherit;
  caret-color: var(--y-color-primary);
}

.otp-digit:focus {
  border-color: var(--y-color-primary);
  box-shadow: 0 0 0 3px var(--y-color-primary-subtle);
  background: var(--y-color-white);
  outline: none;
}

.otp-digit.filled {
  border-color: var(--y-color-primary);
  background: var(--y-color-primary-subtle);
}

.otp-digit.error {
  border-color: var(--y-color-danger);
  box-shadow: 0 0 0 3px var(--y-color-danger-subtle);
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ── OTP Resend ──────────────────────────── */
.otp-resend {
  text-align: center;
  margin-top: var(--y-space-l);
  font-size: var(--y-font-s);
  color: var(--y-color-text-muted);
}

.otp-resend span {
  display: block;
  margin-bottom: var(--y-space-s);
}

.otp-resend-btn {
  background: none;
  border: none;
  color: var(--y-color-primary);
  font-weight: var(--y-weight-semibold);
  cursor: pointer;
  font-size: var(--y-font-s);
  font-family: inherit;
  padding: var(--y-space-xs) var(--y-space-s);
  border-radius: var(--y-radius-s);
  transition: all var(--y-transition-fast);
}

.otp-resend-btn:hover:not(:disabled) {
  background: var(--y-color-primary-subtle);
  text-decoration: underline;
}

.otp-resend-btn:disabled {
  color: var(--y-color-text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Form Hint ───────────────────────────── */
.form-hint {
  display: block;
  font-size: var(--y-font-xs);
  color: var(--y-color-text-muted);
  margin-top: var(--y-space-xs);
}

/* ── Back / Text Link Button ────────────── */
.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--y-space-xs);
  background: none;
  border: none;
  color: var(--y-color-text-muted);
  font-size: var(--y-font-s);
  cursor: pointer;
  font-family: inherit;
  margin-top: var(--y-space-m);
  padding: var(--y-space-xs) 0;
  transition: color var(--y-transition-fast);
}

.btn-text-link:hover {
  color: var(--y-color-primary);
}

/* ── Auth Extras (remember me / forgot) ──── */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--y-font-s);
  margin-bottom: 1.25rem;
}

.auth-extras label {
  display: flex;
  align-items: center;
  gap: var(--y-space-s);
  cursor: pointer;
  color: var(--y-color-text-muted);
}

.auth-extras a {
  color: var(--y-color-primary);
}

.auth-extras a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════
   RESPONSIVE STYLES
   ═══════════════════════════════════════ */

/* ── Large Desktop (lg) ─────────────── */
@media (max-width: 1200px) {}

/* ── Tablet (md) ────────────────────── */
@media (max-width: 992px) {}

/* ── Mobile Landscape / Large Phone (sm) */
@media (max-width: 768px) {
  .auth-card {
    padding: var(--y-space-l);
  }
}

/* ── Small Phone (xs) ───────────────── */
@media (max-width: 480px) {
  .auth-page {
    padding: var(--y-space-l) var(--y-space-m);
    align-items: flex-start;
  }
  .auth-card {
    padding: var(--y-space-m);
  }
  .otp-digit {
    width: 48px;
    height: 48px;
    font-size: var(--y-font-xl);
  }
  .otp-inputs {
    gap: 0.5rem;
  }
  .auth-tab {
    font-size: var(--y-font-xs);
    padding: 0.5rem var(--y-space-s);
  }
}
