/* ============================================================================
   auth.css — Tavroo
   صفحة تسجيل الدخول (auth.html). مستقلة عن الـ app shell.
   ============================================================================ */

body.auth-page {
  overflow: auto;
  min-height: 100vh;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(14, 165, 233, 0.08), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(249, 115, 22, 0.06), transparent 60%),
    var(--surface-app);
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────────────────────
   Layout
   ──────────────────────────────────────────────────────────────────────────── */

.auth-root {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8) var(--space-6);
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.04),
    0 8px 24px rgb(15 23 42 / 0.08);
  animation: authCardIn 350ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

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

/* ────────────────────────────────────────────────────────────────────────────
   Brand
   ──────────────────────────────────────────────────────────────────────────── */

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.auth-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 12px rgb(14 165 233 / 0.35);
}

.auth-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ────────────────────────────────────────────────────────────────────────────
   Content
   ──────────────────────────────────────────────────────────────────────────── */

.auth-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-content-sent {
  text-align: center;
  align-items: center;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.auth-help {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: -8px;
}

/* ────────────────────────────────────────────────────────────────────────────
   Divider (or)
   ──────────────────────────────────────────────────────────────────────────── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-2) 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ────────────────────────────────────────────────────────────────────────────
   Form
   ──────────────────────────────────────────────────────────────────────────── */

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

.auth-form .input-group {
  margin-bottom: var(--space-3);
}

.auth-form .btn-block {
  height: 44px;
}

/* ────────────────────────────────────────────────────────────────────────────
   Sent State
   ──────────────────────────────────────────────────────────────────────────── */

.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  box-shadow: 0 8px 24px rgb(16 185 129 / 0.3);
  animation: successPop 400ms cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes successPop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-3);
  width: 100%;
  align-items: stretch;
}

.auth-actions .btn {
  font-size: 13px;
  height: 36px;
}

/* ────────────────────────────────────────────────────────────────────────────
   Privacy note (footer)
   ──────────────────────────────────────────────────────────────────────────── */

.auth-privacy {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ────────────────────────────────────────────────────────────────────────────
   Lang toggle (top corner)
   ──────────────────────────────────────────────────────────────────────────── */

.auth-lang-toggle {
  position: fixed;
  top: var(--space-4);
  inset-inline-end: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.auth-lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ────────────────────────────────────────────────────────────────────────────
   Mobile
   ──────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-lg);
  }

  .auth-title {
    font-size: 20px;
  }

  .auth-lang-toggle {
    font-size: 11px;
    padding: 5px 10px;
  }
}
