:root {
  --auth-green: #1f7a53;
  --auth-green-dark: #155c3e;
  --auth-green-mid: #22855a;
  --auth-green-glow: rgba(31, 122, 83, 0.18);
  --auth-text: #111827;
  --auth-muted: #6b7280;
  --auth-line: #e5e7eb;
  --auth-line-focus: #1f7a53;
  --auth-white: #ffffff;
  --auth-danger: #dc2626;
  --auth-danger-bg: #fef2f2;
  --auth-success: #047857;
  --auth-success-bg: #ecfdf5;
  --auth-warn: #b45309;
  --auth-warn-bg: #fffbeb;
  --auth-radius: 20px;
  --auth-radius-sm: 12px;
  --auth-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --auth-font: 'Vazirmatn', system-ui, Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--auth-font);
  color: var(--auth-text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  background: #f9fafb;
}

/* ——— پس‌زمینه صفحهٔ مستقل ——— */
.auth-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #f3f4f6;
}

.auth-orb,
.auth-grain { display: none; }

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

/* ——— کارت ——— */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--auth-white);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  animation: authCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

.auth-card__inner {
  padding: 24px 28px 4px;
}

.auth-card__toolbar + .auth-card__inner {
  padding-top: 0;
}

#authCardMain.hidden {
  display: none !important;
}

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

/* ——— هدر ——— */
.auth-header {
  margin-bottom: 20px;
}

.auth-header__brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-header__logo-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--auth-line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: grid;
  place-items: center;
}

.auth-header__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.auth-header__text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.auth-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--auth-text);
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.auth-subtitle {
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--auth-muted);
  line-height: 1.5;
}

.auth-intro {
  margin: -8px 0 20px;
  font-size: 0.8125rem;
  color: var(--auth-muted);
  line-height: 1.65;
  text-align: right;
}

.auth-intro strong {
  color: var(--auth-green-dark);
  font-weight: 700;
}

/* legacy */
.auth-logo { display: none; }
.auth-tagline { display: none; }

/* ——— تب‌ها ——— */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 12px;
  border: none;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  margin-bottom: 0;
  background: transparent;
  color: var(--auth-muted);
  font-family: var(--auth-font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none;
}

.auth-tab:hover:not(.is-active) {
  color: var(--auth-text);
}

.auth-tab.is-active {
  color: var(--auth-green-dark);
  background: #fff;
  border-bottom-color: transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* ——— پنل‌ها ——— */
.auth-pane { display: none; }
.auth-pane.is-active {
  display: block;
  animation: authPaneIn 0.25s ease;
}
.auth-pane[hidden] {
  display: none !important;
}

.auth-pane--mfa {
  padding: 0 24px 20px;
}

@keyframes authPaneIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ——— پیام‌ها ——— */
.auth-banner,
.auth-feedback {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  text-align: right;
}

.auth-banner.is-success,
.auth-feedback.is-success {
  background: var(--auth-success-bg);
  color: var(--auth-success);
}

.auth-banner.is-error,
.auth-feedback.is-error {
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
}

.auth-feedback.is-warn {
  background: var(--auth-warn-bg);
  color: var(--auth-warn);
}

.auth-feedback .auth-inline-action {
  display: inline;
  border: none;
  background: none;
  padding: 0;
  margin-right: 4px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--auth-green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-banner.hidden,
.auth-feedback.hidden,
.hidden { display: none !important; }

/* ——— فیلد موبایل ——— */
.auth-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 4px;
}

.auth-field-hint {
  font-size: 0.8125rem;
  color: var(--auth-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.auth-field--phone {
  margin-bottom: 18px;
}

.auth-input-wrap--phone {
  display: flex;
  align-items: stretch;
  direction: ltr;
  background: #fff;
  border: 1.5px solid var(--auth-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input-wrap--phone:focus-within {
  border-color: var(--auth-line-focus);
  box-shadow: 0 0 0 3px var(--auth-green-glow);
}

.auth-input-wrap--phone.is-valid {
  border-color: var(--auth-green);
}

.auth-phone-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  background: #fff;
}

.auth-phone-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--auth-green);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.auth-phone-check svg {
  display: block;
  width: 12px;
  height: 12px;
}

#loginOtpStep2:not(.hidden),
#loginPasswordView:not(.hidden) {
  margin-top: 4px;
  margin-bottom: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-line);
}

.auth-action-zone {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}

.auth-action-zone .auth-submit {
  margin-top: 0;
}

.auth-action-zone #loginOtpStep1:not(.hidden) + .auth-submit:not(.hidden) {
  margin-top: 8px;
}

/* ——— جداکننده + لینک ——— */
.auth-divider-link {
  position: relative;
  margin: 14px 0 2px;
  text-align: center;
}

.auth-divider-link::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 1px;
  background: var(--auth-line);
}

.auth-divider-link__btn {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 14px;
  border: none;
  background: #fff;
  font-family: var(--auth-font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-divider-link__btn:hover {
  color: var(--auth-green);
}

/* ——— فیلدها ——— */
.auth-field {
  margin-bottom: 16px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-form-row .auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.auth-optional {
  font-weight: 400;
  color: var(--auth-muted);
}

.auth-required {
  color: var(--auth-danger);
  font-weight: 600;
}

.auth-input-wrap { position: relative; }

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  font-family: var(--auth-font);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--auth-text);
  background: var(--auth-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input { direction: ltr; text-align: right; }
#regName, #contactName, #contactOrg, #contactCity,
.auth-field textarea {
  direction: rtl;
  text-align: right;
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
  color: #9ca3af;
}

.auth-field select {
  direction: rtl;
  text-align: right;
  cursor: pointer;
  appearance: none;
  background-color: var(--auth-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

.auth-field input:hover,
.auth-field select:hover,
.auth-field textarea:hover {
  border-color: #d1d5db;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: var(--auth-line-focus);
  box-shadow: 0 0 0 3px var(--auth-green-glow);
  background: var(--auth-white);
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-text);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}

/* فیلد موبایل — override عمومی (بدون border داخلی) */
.auth-field--phone .auth-phone-field input {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 50px;
  padding: 12px 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  direction: ltr;
  text-align: left;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #1f2937;
  caret-color: #1f2937;
  transition: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-field--phone .auth-phone-field input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.auth-field--phone .auth-phone-field input:hover,
.auth-field--phone .auth-phone-field input:focus {
  border: none;
  box-shadow: none;
  outline: none;
  background: #fff;
}

.auth-field--phone .auth-phone-field input:-webkit-autofill,
.auth-field--phone .auth-phone-field input:-webkit-autofill:hover,
.auth-field--phone .auth-phone-field input:-webkit-autofill:focus,
.auth-field--phone .auth-phone-field input:-webkit-autofill:active {
  -webkit-text-fill-color: #1f2937 !important;
  caret-color: #1f2937;
  font-weight: 500 !important;
  transition: background-color 9999s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.auth-input-wrap--otp input {
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 13px;
  background: #fff;
}

.auth-field textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 84px;
}

/* ——— دکمه‌ها ——— */
.auth-submit {
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--auth-radius-sm);
  background: linear-gradient(145deg, var(--auth-green-mid) 0%, var(--auth-green) 50%, var(--auth-green-dark) 100%);
  color: #fff;
  font-family: var(--auth-font);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px var(--auth-green-glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(31, 122, 83, 0.28);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.auth-submit--secondary {
  background: var(--auth-white);
  color: var(--auth-green-dark);
  border: 1px solid var(--auth-line);
  box-shadow: none;
}

.auth-submit--secondary:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: rgba(31, 122, 83, 0.28);
  color: var(--auth-green-dark);
  transform: none;
  box-shadow: none;
}

/* ——— بلوک نصب اپ ——— */
.auth-install-block {
  margin: 0;
  padding: 12px 28px 14px;
  border-top: 1px solid var(--auth-line);
  background: #fff;
}

.auth-install-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(31, 122, 83, 0.2);
  border-radius: 12px;
  background: #f9fafb;
  color: var(--auth-green-dark);
  font-family: var(--auth-font);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-install-btn:hover {
  transform: none;
  border-color: rgba(31, 122, 83, 0.35);
  background: #f0fdf4;
  box-shadow: none;
}

.auth-install-btn:active {
  transform: none;
}

.auth-install-btn__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--auth-green);
  color: #fff;
  box-shadow: none;
}

.auth-install-btn__icon svg {
  display: block;
}

.auth-install-btn__text {
  letter-spacing: -0.01em;
}

.auth-install-hint {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--auth-muted);
  text-align: center;
}

.auth-alt-row,
.auth-alt-link { display: none; }

.auth-link-btn {
  border: none;
  background: none;
  color: var(--auth-green);
  font-family: var(--auth-font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:hover:not(:disabled) { text-decoration: underline; }
.auth-link-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.auth-otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 0.8125rem;
}

.auth-timer {
  color: var(--auth-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
}

/* ——— مراحل ثبت‌نام ——— */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 22px;
}

.auth-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auth-muted);
}

.auth-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  background: #f3f4f6;
  border: 1px solid var(--auth-line);
}

.auth-step.is-active { color: var(--auth-green-dark); }

.auth-step.is-active .auth-step-num {
  background: var(--auth-green);
  border-color: var(--auth-green);
  color: #fff;
}

.auth-step.is-done { color: var(--auth-green); }

.auth-step.is-done .auth-step-num {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--auth-green-dark);
}

.auth-step-line {
  flex: 0 0 16px;
  height: 1px;
  background: var(--auth-line);
}

.auth-footer-note {
  margin: 0;
  padding: 10px 28px 14px;
  border-top: 1px solid var(--auth-line);
  text-align: center;
  font-size: 0.6875rem;
  color: #9ca3af;
  line-height: 1.5;
  background: var(--auth-white);
}

.auth-footer-link {
  color: var(--auth-green);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-link:hover { text-decoration: underline; }

.auth-field--checkbox { margin-top: 2px; }

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--auth-muted);
  line-height: 1.55;
  cursor: pointer;
}

.auth-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--auth-green);
}

.auth-check a {
  color: var(--auth-green);
  text-decoration: none;
}

.auth-mfa-title { font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.auth-mfa-desc { font-size: 0.8125rem; color: var(--auth-muted); margin: 0 0 18px; line-height: 1.6; }
.auth-mfa-setup {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--auth-line);
}
.auth-mfa-secret { font-family: ui-monospace, monospace; font-size: 0.78rem; word-break: break-all; margin: 8px 0; }
.auth-mfa-hint { font-size: 0.76rem; color: var(--auth-muted); margin: 0; }

.auth-otpauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: var(--auth-green-dark);
  font-family: var(--auth-font);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-otpauth-btn:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

/* ——— مودال ——— */
.bl-auth-modal .auth-card { max-width: 100%; }

.bl-auth-modal .auth-card--mfa .auth-card__main,
.bl-auth-modal .auth-card--mfa #authCardMain,
.bl-auth-modal .auth-card--mfa .auth-install-block,
.bl-auth-modal .auth-card--mfa .auth-footer-note {
  display: none !important;
}

.bl-auth-modal .auth-card--mfa .auth-pane--mfa.is-active {
  display: block;
}

/* موبایل: صفحهٔ ورود تمام‌عرض */
@media (max-width: 560px) {
  .bl-auth-modal .auth-card__toolbar {
    flex-shrink: 0;
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      0
      16px;
    min-height: 48px;
  }

  .bl-auth-modal .bl-auth-close {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: transparent;
    color: #111827;
    padding: 0;
  }

  .bl-auth-modal .bl-auth-close:hover {
    background: transparent;
    color: #374151;
  }

  .bl-auth-modal .auth-card__inner {
    flex: 0 0 auto;
    padding: 8px 20px 16px;
  }

  .bl-auth-modal .auth-header {
    margin-bottom: 16px;
  }

  .bl-auth-modal .auth-header__brand {
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
  }

  .bl-auth-modal .auth-header__logo-wrap {
    align-self: center;
    width: auto;
    height: auto;
    padding: 0;
    margin-bottom: 14px;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }

  .bl-auth-modal .auth-header__logo {
    width: 48px;
    height: 48px;
  }

  .bl-auth-modal .auth-header__text {
    padding-top: 0;
    width: 100%;
  }

  .bl-auth-modal .auth-title {
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.4;
    color: #111827;
    text-align: center;
  }

  .bl-auth-modal .auth-subtitle {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    color: #9ca3af;
    text-align: center;
  }

  .bl-auth-modal .auth-tabs {
    margin-bottom: 14px;
    padding: 3px;
    border-radius: 10px;
    background: #f3f4f6;
  }

  .bl-auth-modal .auth-tab {
    padding: 9px 10px;
    font-size: 0.8125rem;
    min-height: 40px;
  }

  .bl-auth-modal .auth-field-hint,
  .bl-auth-modal .auth-field--phone .auth-label {
    display: none;
  }

  .bl-auth-modal .auth-field {
    margin-bottom: 14px;
  }

  .bl-auth-modal .auth-field--phone {
    margin-bottom: 14px;
  }

  .bl-auth-modal .auth-input-wrap--phone {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: none;
  }

  .bl-auth-modal .auth-input-wrap--phone:focus-within {
    border-color: var(--auth-line-focus);
    box-shadow: 0 0 0 3px var(--auth-green-glow);
  }

  .bl-auth-modal .auth-field--phone .auth-phone-field input {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 500;
  }

  .bl-auth-modal .auth-field--phone .auth-phone-field input::placeholder {
    color: #c5cad1;
    text-align: right;
    direction: rtl;
  }

  .bl-auth-modal .auth-field input,
  .bl-auth-modal .auth-field select {
    border-radius: 8px;
    border-color: #e5e7eb;
    min-height: 48px;
    font-size: 16px;
  }

  .bl-auth-modal .auth-field input:focus,
  .bl-auth-modal .auth-field select:focus {
    border-color: var(--auth-line-focus);
    box-shadow: 0 0 0 3px var(--auth-green-glow);
  }

  .bl-auth-modal .auth-input-wrap--otp input {
    font-size: 1.125rem;
    min-height: 52px;
  }

  .bl-auth-modal .auth-submit {
    min-height: 48px;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 8px;
    background: var(--auth-green);
    box-shadow: none;
    margin-top: 0;
  }

  .bl-auth-modal .auth-submit:hover:not(:disabled) {
    filter: brightness(1.03);
    transform: none;
    box-shadow: none;
  }

  .bl-auth-modal .auth-action-zone {
    margin-top: 0;
    margin-bottom: 0;
  }

  .bl-auth-modal .auth-divider-link {
    margin: 14px 0 0;
  }

  .bl-auth-modal .auth-divider-link__btn {
    font-size: 0.8125rem;
    color: #6b7280;
    background: #fff;
    min-height: 36px;
  }

  .bl-auth-modal .auth-steps {
    margin-bottom: 18px;
  }

  .bl-auth-modal .auth-step {
    font-size: 0.68rem;
    gap: 4px;
  }

  .bl-auth-modal .auth-step-line {
    flex: 0 0 10px;
  }

  .bl-auth-modal .auth-install-block {
    margin-top: 0;
    padding: 12px 20px 10px;
    border-top: 1px solid #eef2ef;
    background: #fff;
  }

  .bl-auth-modal .auth-install-block.hidden {
    display: none !important;
  }

  .bl-auth-modal .auth-install-btn {
    min-height: 46px;
    border-radius: 10px;
    background: #f4faf7;
    border-color: rgba(31, 122, 83, 0.18);
  }

  .bl-auth-modal .auth-install-hint {
    margin-top: 8px;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
    color: #6b7280;
  }

  .bl-auth-modal .auth-footer-note {
    padding: 10px 20px max(14px, env(safe-area-inset-bottom));
    border-top: none;
    font-size: 0.6875rem;
    line-height: 1.6;
    color: #9ca3af;
    text-align: center;
  }

  .bl-auth-modal .auth-footer-link {
    font-weight: 600;
    color: var(--auth-green);
  }

  .bl-auth-modal .auth-banner,
  .bl-auth-modal .auth-feedback {
    border-radius: 8px;
    font-size: 0.8125rem;
  }

  .bl-auth-modal .auth-check {
    font-size: 0.75rem;
  }

  .bl-auth-modal .auth-card--mfa .auth-mfa-title {
    font-size: 1.0625rem;
    margin-bottom: 6px;
    text-align: center;
  }

  .bl-auth-modal .auth-card--mfa .auth-mfa-desc {
    margin-bottom: 14px;
    font-size: 0.8125rem;
    text-align: center;
  }

  .bl-auth-modal .auth-card--mfa .auth-pane--mfa {
    padding: 4px 20px 20px;
  }

  .bl-auth-modal .auth-card--mfa .auth-mfa-setup {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .bl-auth-modal .auth-card--mfa .auth-otpauth-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .auth-wrap {
    align-items: flex-start;
    padding:
      max(16px, env(safe-area-inset-top))
      16px
      max(16px, env(safe-area-inset-bottom));
  }

  .auth-card {
    max-width: 100%;
    border-radius: 16px;
  }

  .auth-card__inner {
    padding: 20px 18px 6px;
  }

  .auth-install-block {
    padding-inline: 18px;
  }

  .auth-footer-note {
    padding-inline: 18px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  #contactModal .auth-header {
    text-align: right;
  }

  #contactModal .auth-title {
    font-size: 1.125rem;
    text-align: right;
  }

  #contactModal .auth-subtitle {
    font-size: 0.8125rem;
    text-align: right;
  }

  #contactModal .auth-card__inner {
    padding-inline: 20px;
  }

  #contactModal .auth-intro {
    font-size: 0.8125rem;
    margin-bottom: 16px;
  }
}

#contactModal .bl-auth-dialog,
#contactModal .auth-card { max-width: 440px; }

@media (max-width: 560px) {
  .auth-card__inner { padding: 24px 20px 6px; }
  .auth-footer-note { padding-inline: 20px; }
  .auth-form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 480px) {
  .auth-header__logo-wrap { width: 48px; height: 48px; padding: 5px; }
  .auth-title { font-size: 1.1rem; }
  .auth-subtitle { font-size: 0.78rem; }
  .auth-field input { min-height: 44px; font-size: 0.9rem; }
  .auth-input-wrap--phone input { min-height: 48px; font-size: 0.9375rem; }
  .auth-install-btn { min-height: 48px; font-size: 0.9rem; }
  .auth-install-btn__icon { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-pane { animation: none; }
}
