html,
body.auth-body {
  direction: rtl;
  text-align: right;
  margin: 0;
  min-height: 100vh;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  background: #0f172a;
  color: #0f172a;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.35), transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.2), transparent 38%),
    linear-gradient(160deg, #0f172a 0%, #1e1b4b 48%, #312e81 100%);
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 28px 22px;
  backdrop-filter: blur(8px);
}

.auth-brand {
  margin-bottom: 22px;
  text-align: center;
}

.auth-brand-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.auth-brand-badge .bi {
  line-height: 1;
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
}

.auth-brand p {
  margin: 0;
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.9;
}

.auth-step {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.auth-step-badge {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-left: 8px;
  flex-shrink: 0;
}

.auth-step-title {
  font-weight: 700;
  font-size: 1rem;
}

.auth-form-group {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s ease;
  background: #fff;
  text-align: right;
  direction: rtl;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.auth-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  transition: 0.2s ease;
  font-family: inherit;
  cursor: pointer;
}

.auth-button-primary {
  background: #4f46e5;
  color: #fff;
}

.auth-button-primary:hover {
  background: #4338ca;
}

.auth-button-secondary {
  background: #eef2ff;
  color: #312e81;
}

.auth-button-secondary:hover {
  background: #e0e7ff;
}

.auth-message,
.auth-error {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.94rem;
  line-height: 1.9;
}

.auth-message {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-mobile-preview {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #374151;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.9;
}

.auth-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 18px 0;
}

.auth-link {
  display: inline-block;
  margin-top: 10px;
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .auth-card {
    padding: 36px 30px;
  }

  .auth-brand h1 {
    font-size: 1.8rem;
  }
}
