html:has(.mlp-auth-shell),
body:has(.mlp-auth-shell) {
  overflow: hidden !important;
  background: #f4f6fb !important;
}

.mlp-auth-shell,
.mlp-auth-shell * {
  box-sizing: border-box;
}

.mlp-auth-shell {
  --mlp-primary: #2864f0;
  --mlp-primary-dark: #1d4fd1;
  --mlp-ink: #14192b;
  --mlp-muted: #838da0;
  --mlp-line: #e4e8f0;
  --mlp-surface: #ffffff;
  --mlp-tint: #f2f6ff;

  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 60% at 50% 0%, #eaf0ff 0%, #f4f6fb 55%, #f4f6fb 100%);
  color: var(--mlp-ink);
  direction: rtl;
  font-family: 'Vazirmatn', 'IRANSans', -apple-system, 'Segoe UI', Tahoma, sans-serif;
  margin: 0 !important;
  padding: 0 !important;
  animation: mlpFadeIn .35s ease both;
}

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

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

.mlp-auth-main {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100%;
  margin: 0 auto;
  padding: clamp(10px, 2vh, 20px) clamp(18px, 4vw, 26px) clamp(10px, 2vh, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: clamp(8px, 1.8vh, 18px);
}

.mlp-auth-back {
  position: absolute;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  right: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--mlp-surface);
  color: var(--mlp-ink) !important;
  text-decoration: none !important;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(20, 25, 43, .07) !important;
  transition: transform .15s ease, box-shadow .15s ease;
}

.mlp-auth-back:active {
  transform: scale(.92);
  box-shadow: 0 3px 8px rgba(20, 25, 43, .08) !important;
}

.mlp-auth-home {
  position: absolute;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  left: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--mlp-surface);
  color: var(--mlp-ink) !important;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(20, 25, 43, .07) !important;
  transition: transform .15s ease, box-shadow .15s ease;
}

.mlp-auth-home:active {
  transform: scale(.92);
  box-shadow: 0 3px 8px rgba(20, 25, 43, .08) !important;
}

.mlp-auth-home-icon,
.mlp-auth-home-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.mlp-auth-home-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mlp-auth-brand {
  flex-shrink: 0;
  text-align: center;
  margin-top: clamp(28px, 6vh, 46px);
  animation: mlpRise .5s ease .05s both;
}

.mlp-auth-brand-text {
  display: block;
  font-size: clamp(20px, 4vh, 30px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--mlp-ink);
}

.mlp-auth-tagline {
  margin-top: clamp(4px, 1vh, 8px);
  color: var(--mlp-muted);
  font-size: clamp(11px, 1.6vh, 14px);
  font-weight: 600;
}

.mlp-auth-content {
  width: 100%;
  flex-shrink: 0;
  background: var(--mlp-surface);
  border-radius: 28px;
  padding: clamp(16px, 3vh, 28px) clamp(14px, 3vw, 22px) clamp(12px, 2.5vh, 24px);
  box-shadow: 0 24px 48px -24px rgba(20, 25, 43, .18);
  animation: mlpRise .5s ease .1s both;
}

.mlp-auth-heading {
  text-align: center;
  margin: 0 0 clamp(10px, 2vh, 24px);
}

.mlp-auth-heading h1 {
  display: block !important;
  margin: 0 0 6px !important;
  color: var(--mlp-ink) !important;
  font-size: clamp(15px, 2.6vh, 20px) !important;
  line-height: 1.4 !important;
  font-weight: 800 !important;
}

.mlp-auth-heading p {
  margin: 0;
  color: var(--mlp-muted);
  font-size: clamp(11px, 1.6vh, 13.5px);
  line-height: 1.7;
}

.mlp-form {
  display: grid;
  gap: clamp(8px, 1.6vh, 16px);
}

.mlp-field-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5468;
}

.mlp-input {
  width: 100%;
  height: clamp(44px, 7vh, 56px);
  padding: 0 18px;
  border: 1.5px solid var(--mlp-line);
  border-radius: 16px;
  background: #fafbfd;
  color: var(--mlp-ink);
  font: inherit;
  font-size: 16px;
  direction: ltr;
  text-align: left;
  outline: 0;
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.mlp-input:focus,
.mlp-mobile-input-wrap:focus-within {
  border-color: var(--mlp-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(40, 100, 240, .1) !important;
}

.mlp-input-rtl {
  direction: rtl;
  text-align: right;
}

.mlp-code {
  text-align: center;
  letter-spacing: 10px;
  font-size: 20px;
  font-weight: 800;
}

.mlp-mobile-input-wrap {
  display: flex;
  direction: ltr;
  align-items: center;
  height: clamp(46px, 7.2vh, 58px);
  border: 1.5px solid var(--mlp-line);
  border-radius: 16px;
  background: #fafbfd;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.mlp-country-code {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  color: var(--mlp-ink);
  font-size: 15px;
  font-weight: 800;
  border-right: 1px solid var(--mlp-line);
}

.mlp-country-code,
.mlp-country-code bdi {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: left;
  white-space: nowrap;
}

.mlp-mobile-input-wrap .mlp-input {
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  background: transparent;
  box-shadow: none !important;
  font-size: 16px;
}

.mlp-mobile-input-wrap .mlp-input::placeholder {
  color: #b6bcc8;
  opacity: 1;
}

.mlp-phone-icon {
  width: 46px;
  display: grid;
  place-items: center;
  color: var(--mlp-primary);
}

.mlp-phone-icon svg {
  width: 19px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mlp-btn {
  height: clamp(44px, 7vh, 56px);
  margin-top: clamp(2px, .6vh, 6px);
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--mlp-primary), var(--mlp-primary-dark));
  color: #fff !important;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px -6px rgba(40, 100, 240, .45) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.mlp-btn:hover {
  box-shadow: 0 14px 26px -6px rgba(40, 100, 240, .5) !important;
}

.mlp-btn:active {
  transform: scale(.98);
}

.mlp-btn-arrow {
  font-size: 20px;
  font-weight: 400;
}

.mlp-btn:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none !important;
}

.mlp-link-btn {
  border: 0;
  background: transparent;
  color: var(--mlp-primary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px;
  transition: opacity .12s ease;
}

.mlp-link-btn:disabled {
  opacity: .4;
}

.mlp-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.mlp-alert {
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #fff1f1;
  color: #b3261e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.mlp-alert.is-ok {
  background: #eefaf0;
  color: #146c3b;
}

.mlp-name-box {
  margin-bottom: 2px;
}

.mlp-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mlp-name-grid > div {
  display: grid;
  gap: 6px;
}

.mlp-auth-consent {
  position: relative;
  margin: clamp(10px, 2vh, 20px) auto 0;
  max-width: 420px;
  padding-right: 26px;
  text-align: center;
  color: var(--mlp-muted);
  font-size: clamp(10.5px, 1.4vh, 12.5px);
  line-height: 1.8;
}

.mlp-auth-consent span:not(.mlp-shield) {
  color: var(--mlp-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mlp-shield {
  position: absolute;
  right: 0;
  top: 0;
  color: #b7c0cf;
  font-size: 20px;
}

.mlp-legacy {
  display: block;
  text-align: center;
  margin-top: clamp(8px, 1.6vh, 14px);
  color: var(--mlp-muted) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mlp-auth-benefits {
  flex-shrink: 0;
  margin: 0;
  padding: clamp(10px, 2vh, 20px) 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mlp-auth-benefits > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 4px;
}

.mlp-benefit-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--mlp-tint);
  color: var(--mlp-primary);
}

.mlp-benefit-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mlp-auth-benefits strong {
  font-size: 12.5px;
  color: #384154;
  font-weight: 800;
}

.mlp-auth-benefits small {
  font-size: 11px;
  color: var(--mlp-muted);
}

.mlp-auth-signoff {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #aab2c0;
  font-size: clamp(12px, 1.8vh, 15px);
  line-height: 1.4;
  font-style: italic;
}

.mlp-auth-signoff strong {
  font-weight: 700;
  color: #8c96a8;
}

.mlp-auth-signoff i {
  display: block;
  width: 34px;
  height: 2px;
  background: #d2d8e2;
  margin: 8px auto 0;
  border-radius: 2px;
}

@media (max-width: 390px) {
  .mlp-auth-content { border-radius: 22px; }
}

/* Everything must fit in one viewport — no scrolling, on any device.
   As height shrinks, decorative sections drop out before core fields would. */
@media (max-height: 760px) {
  .mlp-auth-signoff { display: none; }
}

@media (max-height: 640px) {
  .mlp-auth-benefits { display: none; }
}

@media (max-height: 520px) {
  .mlp-legacy { display: none; }
  .mlp-auth-brand-text { font-size: 20px; }
  .mlp-auth-tagline { display: none; }
}

/* v1.5.7: auth is the only visible application on this route. */
html.mlp-auth-page,
html.mlp-auth-page body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  background: #f4f6fb !important;
  overflow: hidden !important;
}

body.mlp-auth-page > .mlp-auth-shell {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
}
