html,
body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  background: #023e8a;
  color: #1b263b;
}

html[dir="rtl"] body.auth-body,
body.auth-body--rtl {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body.auth-body,
body.auth-body--ltr {
  direction: ltr;
  text-align: left;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 55%, #90e0ef 100%);
}

.auth-page-toolbar {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 5;
}

.language-switcher--auth {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(15, 53, 87, 0.16);
  backdrop-filter: blur(8px);
}

.language-switcher--auth .language-switcher__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #35506e;
  white-space: nowrap;
}

.language-switcher--auth .language-switcher__select,
.language-switcher__select {
  min-width: 120px;
  max-width: 160px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid #cfe3f5;
  background: #fff;
  color: #1b263b;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  outline: none;
  cursor: pointer;
  box-shadow: none;
}

.language-switcher--auth .language-switcher__select:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.16);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  border: 5px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page::before {
  width: 260px;
  height: 260px;
  top: -70px;
  right: -70px;
}

.auth-page::after {
  width: 300px;
  height: 300px;
  bottom: -90px;
  left: -90px;
}

.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.35);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 77, 120, 0.22);
  padding: 28px 22px;
  backdrop-filter: blur(8px);
}

.auth-brand {
  margin-bottom: 22px;
  text-align: center;
}

.auth-brand-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: #fff;
  color: #002B5B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 24px rgba(0, 43, 91, 0.16);
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(0, 43, 91, 0.08);
}

.auth-brand-badge .bi {
  line-height: 1;
}

.auth-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  color: #1b263b;
}

.auth-brand p {
  margin: 0;
  color: #61718b;
  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: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-inline-end: 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: 700;
  color: #50627f;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  border: 2px solid #e0f2fe;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s ease;
  background: #f8fbff;
  font-family: inherit;
  box-sizing: border-box;
}

html[dir="rtl"] .auth-input {
  text-align: right;
  direction: rtl;
}

html[dir="ltr"] .auth-input {
  text-align: left;
  direction: ltr;
}

.auth-input:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.12);
  background: #fff;
}

.auth-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  transition: 0.2s ease;
  font-family: inherit;
  cursor: pointer;
}

.auth-button-primary {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.24);
}

.auth-button-primary:hover {
  opacity: 0.95;
}

.auth-button-secondary {
  background: #e0f2fe;
  color: #0077b6;
}

.auth-button-secondary:hover {
  background: #bae6fd;
}

.auth-button:disabled,
.auth-button.is-loading {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
}

.auth-button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-button-spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-button-spin 0.7s linear infinite;
  flex: 0 0 auto;
}

.auth-button-secondary.is-loading .auth-button-spinner,
.auth-button-secondary:disabled .auth-button-spinner {
  border-color: rgba(0, 119, 182, 0.25);
  border-top-color: #0077b6;
}

.auth-link.is-disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: wait;
}

@keyframes auth-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.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: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.9;
}

.auth-divider {
  height: 1px;
  background: #dbeafe;
  margin: 18px 0;
}

.auth-link {
  display: inline-block;
  margin-top: 10px;
  color: #0077b6;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-link:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .auth-card {
    padding: 36px 30px;
  }

  .auth-brand h1 {
    font-size: 1.8rem;
  }
}
