
/* ── Focused auth pages (Kavenegar-style minimal) ─────────────────────── */

body.page-auth {
  min-height: 100vh;
  margin: 0;
  background: var(--semantic-bg-secondary, #f7f7f7);
  color: var(--semantic-text-secondary, #4b5563);
}

body.page-auth .auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

body.page-auth .auth-panel {
  width: 100%;
  max-width: 420px;
  background: var(--semantic-surface-base, #ffffff);
  border-radius: 8px;
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--semantic-border-default, #e5e7eb);
  box-shadow: var(--shadow-base);
}

body.page-auth .auth-panel--wide {
  max-width: 520px;
}

body.page-auth .auth-panel__brand {
  display: block;
  text-align: center;
  margin: 0 auto 1.75rem;
  text-decoration: none;
}

body.page-auth .auth-panel__brand:hover {
  opacity: 0.85;
}

body.page-auth .auth-panel__brand img {
  max-height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

body.page-auth .auth-panel__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--semantic-text-primary, #111827);
  margin: 0 0 0.35rem;
  line-height: 1.45;
}

body.page-auth .auth-panel__subtitle {
  font-size: 0.875rem;
  color: var(--semantic-text-tertiary, #9ca3af);
  margin: 0 0 1.5rem;
  line-height: 1.65;
}

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

body.page-auth .auth-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

body.page-auth .auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

body.page-auth .auth-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

body.page-auth .auth-field-error {
  margin: -0.35rem 0 0;
  font-size: 0.8125rem;
  color: hsl(var(--danger, 0 84% 60%));
  line-height: 1.5;
}

body.page-auth .auth-field .form--control,
body.page-auth .auth-field .form-control {
  height: 44px;
  padding: 0 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #fff;
  font-size: 0.9375rem;
  color: #111827;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-auth .auth-field .form--control:focus,
body.page-auth .auth-field .form-control:focus {
  border-color: hsl(var(--base, var(--primary, 220 13% 9%)));
  box-shadow: 0 0 0 3px hsl(var(--base, var(--primary, 220 13% 9%)) / 0.12);
  outline: none;
  background-color: #fff;
  color: #111827;
}

body.page-auth .auth-field .form--control:-webkit-autofill,
body.page-auth .auth-field .form--control:-webkit-autofill:hover,
body.page-auth .auth-field .form--control:-webkit-autofill:focus,
body.page-auth .auth-field .form-control:-webkit-autofill,
body.page-auth .auth-field .form-control:-webkit-autofill:hover,
body.page-auth .auth-field .form-control:-webkit-autofill:focus,
body.page-auth .auth-field__control .form--control:-webkit-autofill,
body.page-auth .auth-field__control .form--control:-webkit-autofill:hover,
body.page-auth .auth-field__control .form--control:-webkit-autofill:focus,
body.page-auth .auth-field__control .form-control:-webkit-autofill,
body.page-auth .auth-field__control .form-control:-webkit-autofill:hover,
body.page-auth .auth-field__control .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827 !important;
  color: #111827 !important;
  caret-color: #111827 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

body.page-auth .auth-field .form--control::placeholder,
body.page-auth .auth-field .form-control::placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* RTL: placeholders and typed text start from the right */
html[dir="rtl"] body.page-auth .auth-field .form--control:not([dir="ltr"]),
html[dir="rtl"] body.page-auth .auth-field .form-control:not([dir="ltr"]) {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body.page-auth .auth-field .form--control:not([dir="ltr"])::placeholder,
html[dir="rtl"] body.page-auth .auth-field .form-control:not([dir="ltr"])::placeholder {
  text-align: right;
}

html[dir="rtl"] body.page-auth .auth-field .form--control[dir="ltr"],
html[dir="rtl"] body.page-auth .auth-field .form-control[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

body.page-auth .auth-field--password {
  gap: 0.4rem;
}

body.page-auth .auth-field__control {
  position: relative;
}

body.page-auth .auth-field__control .form--control,
body.page-auth .auth-field__control .form-control {
  width: 100%;
  padding-inline-end: 2.75rem;
}

body.page-auth .auth-field__control .auth-password-toggle {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1.125rem;
  line-height: 1;
  z-index: 2;
  transition: color 0.15s ease, background 0.15s ease;
}

body.page-auth .auth-field__control .auth-password-toggle:hover {
  color: hsl(var(--base));
  background: hsl(var(--base) / 0.06);
}

body.page-auth .auth-field__control .auth-password-toggle i {
  pointer-events: none;
  line-height: 1;
}

/* RTL global override uses left:20px on .password-show-hide — not used here */
html[dir="rtl"] body.page-auth .auth-field__control .auth-password-toggle,
body.page-auth .auth-field__control .auth-password-toggle {
  right: auto;
  left: auto;
  inset-inline-end: 0.5rem;
}

body.page-auth .auth-field__control .password-show-hide {
  display: none;
}

body.page-auth .auth-form__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: -0.25rem;
}

body.page-auth .auth-form__extras .form--check {
  margin: 0;
}

body.page-auth .auth-form__extras .form-check-label {
  font-size: 0.8125rem;
  color: #4b5563;
}

body.page-auth .auth-form__extras .form-check-input {
  border-color: #d1d5db;
}

body.page-auth .auth-form__extras .form-check-input:checked {
  background-color: hsl(var(--base));
  border-color: hsl(var(--base));
}

body.page-auth .auth-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--base-d-500, var(--base)));
  text-decoration: none;
}

body.page-auth .auth-link:hover {
  color: hsl(var(--base-d-600, var(--base)));
  text-decoration: underline;
}

body.page-auth .auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  margin-top: 0.25rem;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 4px;
  background-color: hsl(var(--base-d-500, var(--primary, 220 13% 9%)));
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

body.page-auth .auth-btn:hover {
  background-color: hsl(var(--base-d-600, var(--primary-dark, var(--primary, 220 13% 9%))));
  color: #fff;
}

body.page-auth .auth-btn:active {
  transform: scale(0.99);
}

body.page-auth .auth-btn:disabled,
body.page-auth .auth-btn.disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

body.page-auth .auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
}

body.page-auth .auth-footer .auth-link {
  font-size: 0.8125rem;
}

body.page-auth .auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0;
  color: #9ca3af;
  font-size: 0.75rem;
}

body.page-auth .auth-divider::before,
body.page-auth .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

body.page-auth .auth-social {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

body.page-auth .auth-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  font-size: 1.05rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.page-auth .auth-social__btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: hsl(var(--base));
}

body.page-auth .auth-error,
body.page-auth .mobile-exists-error,
body.page-auth .exists-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

body.page-auth .auth-form .captcha {
  margin: 0;
}

body.page-auth .auth-form .captcha img {
  border-radius: 4px;
}

/* OTP on auth pages */
body.page-auth .otp-input__cell {
  border-color: #d1d5db;
  border-radius: 4px;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  background: #fff;
}

body.page-auth .otp-input__cell.filled {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  background: #fff;
}

body.page-auth .otp-input__cell:focus {
  border-color: hsl(var(--base));
  box-shadow: 0 0 0 3px hsl(var(--base) / 0.12);
}

body.page-auth .auth-footer--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.page-auth .auth-footer__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
}

body.page-auth .auth-verify-target {
  display: inline;
  unicode-bidi: isolate;
  font-weight: 700;
  color: hsl(var(--base));
}

body.page-auth .auth-otp-extras {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
}

body.page-auth .auth-otp-extras__target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: #4b5563;
}

body.page-auth .auth-otp-extras__target-label {
  font-weight: 600;
  color: #374151;
}

body.page-auth .auth-otp-extras__edit {
  margin-inline-start: auto;
  font-size: 0.8125rem;
}

body.page-auth .auth-otp-extras__resend {
  padding-top: 0.65rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

body.page-auth .auth-otp-extras__resend [hidden] {
  display: none !important;
}

body.page-auth .auth-otp-countdown-wrap,
body.page-auth .auth-otp-resend-wrap {
  width: 100%;
}

body.page-auth .auth-otp-countdown {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

body.page-auth .auth-otp-countdown strong {
  color: hsl(var(--base));
  font-weight: 700;
}

body.page-auth .auth-link--button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

body.page-auth .auth-otp-resend-action {
  display: inline-block;
  white-space: nowrap;
}

body.page-auth .auth-terms {
  margin-top: -0.15rem;
}

body.page-auth .auth-terms .form-check-label {
  font-size: 0.8125rem;
  color: #4b5563;
  line-height: 1.65;
}

body.page-auth .auth-terms .form-check-input {
  border-color: #d1d5db;
}

body.page-auth .auth-terms .form-check-input:checked {
  background-color: hsl(var(--base));
  border-color: hsl(var(--base));
}

body.page-auth .auth-ban {
  text-align: center;
}

body.page-auth .auth-ban__icon img {
  max-width: 72px;
  margin-bottom: 1rem;
}

body.page-auth .auth-ban__desc {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 1rem;
}

body.page-auth .auth-ban__reason {
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

body.page-auth .auth-ban__reason-label {
  font-weight: 700;
  color: #dc2626;
  margin-inline-end: 0.35rem;
}

body.page-auth .auth-ban__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body.page-auth .auth-btn--outline {
  background: #fff;
  color: hsl(var(--base));
  border: 1px solid hsl(var(--base));
}

body.page-auth .auth-btn--outline:hover {
  background: hsl(var(--base) / 0.06);
  color: hsl(var(--base));
}

body.page-auth .auth-btn--danger {
  background: #dc2626;
}

body.page-auth .auth-btn--danger:hover {
  background: #b91c1c;
  color: #fff;
}

@media (max-width: 575px) {
  body.page-auth .auth-page {
    padding: 1.25rem 1rem;
    align-items: flex-start;
  }

  body.page-auth .auth-panel {
    padding: 1.75rem 1.25rem 1.5rem;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  body.page-auth .auth-form__row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  body.page-auth .auth-page {
    padding: 3rem 2rem;
  }
}
