﻿@import "google-button.css";
.welcome-page .logo, .login-with-email-page .logo {
  width: 64px;
}

:root {
  --brand-deep: #1B1C20;
  --brand-accent: #374B7C;
  --brand-primary-2:#9A1C67;
  --brand-outline: #C94C88;
  --brand-primary: #960659;
  --brand-primary-hover:#AC0766;
  --surface: #FFFFFF;
  --border: #D7E1F5;
  --subtitle-color: #39373A;
  --brand-primary-gray: #818084;
  --error: #DC3545;
  --checkbox-accent: #960659;
  --correct: #30A76F;
  --font-head: "Montserrat", system-ui, Segoe UI, Roboto, Arial, sans-serif;
  --font-sans: "Roboto", system-ui, Segoe UI, Arial, sans-serif;

  --shadow-strong: 0px 20px 27px 0px #0000000D;
  --shadow-input: 0 1px 1.5px rgba(0,0,0,.06);
  
  --label-fs: 14px; --label-lh: 1;      --label-fw: 400; --label-track: 0.01em;
  --ph-fs:    14px; --ph-lh:    1;      --ph-fw:    400; --ph-track:  -0.39px;
  --ph-mobile-fs:    16px;
  --btn-fs:   12px; --btn-lh:  1.4;     --btn-fw:   600; --btn-track:  0.03em;
  --link-fs:  14px; --link-lh: 1.4;     --link-fw:  400;


  --h1-fs: 38px; --h1-lh: 120%; --h1-fw: 600;
  --p-fs: 16px; --p-lh: 24px; --p-fw: 400;
  --h1-mobile-fs: 26px;

  --u-offset: 0.22em;
  --u-thick:  0.07em;

  --u-0: 0;
  --u-4: 4px;
  --u-6: 6px;
  --u-8: 8px;
  --u-10: 10px;
  --u-12: 12px;
  --u-14: 14px;
  --u-16: 16px;
  --u-18: 18px;
  --u-20: 20px;
  --u-22: 22px;
  --u-24: 24px;
  --u-30: 30px;
  --u-31: 31px;
  --u-32: 32px;
  --u-36: 36px;
  --u-40: 40px;
  --u-44: 44px;
  --u-52: 52px;
  --u-57: 57px;
  --u-60: 60px;
  --u-68: 68px;
  --u-70: 70px;
  --u-72: 72px;
  --u-82: 82px;
  --u-90: 90px;
  --u-100: 100px;
  --u-105: 105px;
  --u-1380: 1380px;
  --u-200: 200px;
  --u-312: 312px;
  --u-360: 360px;
  --u-370: 370px;
  --u-446: 446px;
  --u-484: 484px;
  --u-550: 550px;
  --u-560: 560px;
  --u-600: 600px;
  --u-608: 608px;
  --u-724: 724px;
  --u-760: 760px;
  --u-803: 803px;
  
  --card-safe-w: 550px;
  --login-card-w: 550px;
  --login-card-h: 760px;
  --card-w: 600px;
  --card-h: 803px;
  --card-w-min: 320px;
  
  --login-card-w-fluid: clamp(var(--card-w-min), 42vw, var(--login-card-w));
  --card-w-fluid: clamp(var(--card-w-min), 42vw, var(--card-w));
  
  --card-pad-x:  clamp(16px, 6vw, 90px);
  --card-pad-top: clamp(32px, 8vw, 100px);
  --card-pad-btm: clamp(32px, 8vw, 100px);
  --bg-pad: 12px;
  --top-gap: 105px;
  --bg-w: 1380px;
  --frame-pad: 30px;
  --logo-top: 32px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-round: 50%;

  --gap-side: 31px;
  --gap-sm: 10px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --gap-xl: 20px;
  --gap-2xl: 24px;
  --gap-3xl: 40px;
  
  --lang-fs: 14px;
  --lang-lh: 1.4;
  --lang-fw: 500;
  --logo-gap: 24px;

  --otp-min-w: 32px;
  --otp-max-w: 60px;
  --otp-min-h: 38px;
  --otp-max-h: 68px;
  --otp-radius: 8px;
  --otp-bw: 1px;
  --otp-font: clamp(20px, 6vw, 32px);
  --otp-lh: 1;
  --otp-gap: clamp(8px, 2vw, 12px);

  --checkbox-size: 24px;
  --check-w: 10px;
  --check-h: 6px;
  --check-thick: 2px;

  --drawer-w: clamp(360px, 34vw, 446px);
  --drawer-gap: var(--gap-side, 31px);
  --drawer-total: calc(var(--drawer-w) + var(--drawer-gap));

  --success-card-w: 550px;
  --success-card-h: 608px;
  --success-pad-x: clamp(16px, 6vw, 90px);
  --success-pad-y: clamp(32px, 8vw, 100px);
  --success-size: 200px;
  --success-grad: linear-gradient(39.68deg, #FE8D02 -2.91%, #FA600A 21.24%, #F72B12 48.85%, #BD1637 73.5%, #820360 99.63%);

  --input-h: 40px;
  --input-radius: 6px;
  --input-pad-x: 12px;
  --input-pad-y: 0;
  --input-mb: 40px;
  --input-mt: 12px;
  --input-border: 1px solid var(--border);
  --input-bg: var(--surface);
  --input-placeholder: #B9C4DA;

  --btn-h: 52px;
  --btn-radius: 12px;
  
  --icon-pass-ok:  url("../img/rule_ok.svg");
  --icon-pass-not-ok: url("../img/rule_bad.svg");

  --dur-fast: .15s;
  --dur-med: .2s;
  --dur-slow: .28s;
  --timing: ease;

  --auth-bg-img: url('../img/iteid_bg_auth_block.svg?v=...');
  --policy-bg: rgba(129, 128, 132, 0.10);
  --policy-bg-sm: rgba(129, 128, 132, 0.05);

  --w-full: 100%;
  --h-full: 100%;
}

.card-safe{
  width: min(var(--w-full), var(--card-safe-w));
  margin-inline: auto;
  overflow: visible;
}
.card-safe__buttons{
  width: var(--w-full);
}

.auth-frame{
  min-height: 100svh;
  padding: var(--bg-pad);
  box-sizing: border-box;
  background: var(--surface);
}

.auth-content{
  grid-column: 2;
  width: var(--w-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: clamp(32px, 8vh, 100px);
  box-sizing: border-box;
}

.auth-content--full {
  padding-block: 0;
  min-height: calc(100vh - (var(--bg-pad) * 2));
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 960px) {
  .auth-content--full {
    min-height: calc(100vh - (var(--frame-pad) * 2));
  }
  .auth-content--full .success-card {
    min-height: auto;
  }
}

.card-safe > .auth-title,
.card-safe > .otp-intro,
.card-safe > .otp-timer,
.card-safe > .resend,
.card-safe > .consent,
.card-safe > .btn-row{
  width: var(--w-full);
  margin-left:auto;
  margin-right:auto;
}

.auth-canvas{
  background-image: var(--auth-bg-img),
          linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.10));

  background-size: cover, cover;
  background-position:
          center top,
          center;

  background-repeat: no-repeat, no-repeat;

  display: flex;
  align-items: stretch;
  place-items: center;
  justify-content: center;
  min-height: calc(100vh - (var(--bg-pad) * 2));
  width: var(--w-full);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.auth-stage{
  display: grid;
  grid-template-columns: 1fr minmax(var(--card-w-min), var(--card-w-fluid)) 1fr;
  gap: clamp(16px, 3vw, var(--gap-side));
  min-height: var(--h-full);
  width: var(--w-full);
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: transform var(--dur-slow) var(--timing);
  will-change: transform;
}
.auth-stage.stage-shift{
  transform: translateX(calc(var(--drawer-total) * -0.5));
}
@media (max-width: 1139px) {
  .auth-stage.stage-shift {
    transform: none;
  }
}

.form-card{ grid-column: 2; }
.side-hint{ grid-column: 3; }

.form-card {
  height: auto;
  grid-column: 2;
  width: var(--w-full);
  box-sizing: border-box;
  padding: var(--card-pad-top) var(--card-pad-x) var(--card-pad-btm);
  max-width: var(--login-card-w-fluid);
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  justify-self: center;
  transition: transform var(--dur-slow) var(--timing),
  box-shadow var(--dur-slow) var(--timing),
  opacity var(--dur-slow) var(--timing);
  will-change: transform;
}
.form-card .auth-footer-link{
}
.form-card--login {
  --card-pad-top: clamp(32px, 7vmin, 100px);
  --card-pad-btm: clamp(32px, 7vmin, 100px);
  max-width: var(--login-card-w-fluid);
}
.form-card--confirm{
  --card-pad-top: clamp(24px, 6vw, 72px);
  --card-pad-btm: clamp(24px, 6vw, 72px);
  max-width: var(--card-w-fluid);
}
@media (max-height: 700px){
  .auth-canvas{ padding-block: clamp(16px, 6vh, var(--top-gap)); }
}
.brand-logo {
  position: static;
  margin: var(--u-0) var(--u-0) clamp(12px, 2.5vw, 24px);
  display: flex;
  justify-content: center;
}
.brand-logo img {
  height: clamp(36px, 5vw, 60px);
  width: auto;
  max-width: var(--w-full);
}
.auth-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(38px, 4.2vw, var(--h1-fs));
  line-height: 1.2;
  text-align: center;
  margin: var(--u-0) var(--u-0) clamp(10px, 2.2vw, 16px);
}
.auth-subtitle{
  font-family: var(--font-sans);
  font-weight: 400;
  font-style: normal;
  font-size: var(--p-fs);
  line-height: 1.4;
  letter-spacing: var(--u-0);
  text-align: center;
  color: var(--subtitle-color);
  max-width: 46ch;
  margin: var(--u-0) auto var(--u-40, 40px);
}

@media (min-width: 1140px) and (max-width: 1319px) {
  :root {
    --frame-pad: 40px;
    --card-pad-x: 90px;
    --card-pad-top: 100px;
    --card-pad-btm: 100px;
  }
  .auth-canvas {
    height: calc(100vh - (var(--bg-pad) * 2));
  }
}

@media (min-width: 960px) and (max-width: 1139px) {
  :root {
    --frame-pad: 30px;
    --card-pad-x: 70px;
    --card-pad-top: 90px;
    --card-pad-btm: 90px;
  }
  .auth-canvas {
    height: calc(100vh - (var(--bg-pad) * 2));
  }
}

@media (min-width: 560px) and (max-width: 959px) {
  :root {
    --card-pad-x: 57px;
    --card-pad-top: 82px;
    --card-pad-btm: 82px;
  }
  .auth-title {
    font-size: var(--h1-mobile-fs);
    margin-bottom: 12px;
  }
  .form-card > .card-safe,
  .form-card > .auth-title,
  .form-card > .auth-subtitle {
    max-width: 484px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .form-card::before,
  .form-card::after {
    content: "";
    flex: 1 1 0;
  }
  .form-card > .brand-logo,
  .form-card > .auth-title,
  .form-card > .auth-subtitle,
  .form-card > .card-safe,
  .form-card > form,
  .form-card > .btn-row,
  .form-card > .auth-footer-link {
    max-width: 484px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

}

@media (max-width: 559px) {
  :root {
    --bg-pad: 12px;
  }

}

.label{
  font-family: var(--font-sans), sans-serif;
  font-weight: var(--label-fw);
  font-style: normal;
  font-size: var(--label-fs);
  line-height: var(--label-lh);
  letter-spacing: var(--label-track);
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  color:var(--subtitle-color);
}
.input {
  width: var(--w-full);
  height: var(--input-h);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  border: var(--input-border);
  padding: var(--input-pad-y) var(--input-pad-x);
  font-family: var(--font-sans);
  font-size: var(--ph-fs);
  font-weight: var(--ph-fw);
  line-height: var(--ph-lh);
  letter-spacing: var(--u-0);
  box-shadow: var(--shadow-input);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  margin-bottom: var(--input-mb);
  box-sizing: border-box;
  margin-top: var(--input-mt);
  flex: 0 0 auto;
}
.input::placeholder{
  font-family: var(--font-sans);
  font-size: var(--ph-fs);
  font-weight: var(--ph-fw);
  line-height: var(--ph-lh);
  letter-spacing: var(--ph-track);
  color: var(--input-placeholder);
}
.input:focus{
  outline:0; border-color:#9CA9C9; box-shadow:0 0 0 2px rgba(156,169,201,.25);
}
.input--error{
  border-color: var(--error) !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69,.2) !important;
}
.form-grid .input{
  width: var(--w-full);
  height: var(--input-h);
  border-radius: var(--input-radius);
  padding: 10px var(--input-pad-x);
  border-width: 1px;
  box-sizing: border-box;
}

.form-grid .btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  width: var(--w-full);
}

.form-grid .btn{
  width: 100%;
  box-sizing: border-box;
  height: 52px;
}
.btn-row {
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  border-radius:var(--btn-radius); 
  cursor:pointer;
  border:none;
  width: auto;
  font-family: var(--font-head);
  font-weight: var(--btn-fw);
  font-style: normal;
  font-size: var(--btn-fs);
  line-height: var(--btn-lh);
  letter-spacing: var(--btn-track);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none !important;
}
.btn-block {
  display: flex;
  width: var(--w-full);
  height: var(--btn-h);
  border-radius: var(--btn-radius);
  flex: 0 0 auto;
}
.btn,
.btn-block,
.form-grid .btn {
  min-height: var(--btn-h);
  box-sizing: border-box;
}
.btn-primary {
  flex: 1;
  color: var(--surface);
  background: rgb(154,28,103);
  
}

.btn-primary:hover {
  filter: brightness(1.05);
  background: var(--brand-primary-hover);
}
.btn-outline {
  flex: 1;
  background: var(--surface);
  color: var(--brand-primary);
  border: 1px solid var(--brand-outline);
}
.btn-outline:hover {
  filter: brightness(1.03);
}
.btn[disabled], .btn[aria-disabled="true"] {
  background: rgb(154, 28, 103); 
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.auth-footer-link{ text-align:center; }
.auth-footer-link__btn{
  appearance:none;
  background:none; border:0;
  cursor:pointer;
  font-family: var(--font-sans);
  font-weight: var(--link-fw);
  font-style: normal;
  font-size: var(--link-fs);
  line-height: var(--link-lh);
  letter-spacing: 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: var(--u-offset);
  text-decoration-thickness: var(--u-thick);
  text-decoration-skip-ink: auto;
  color: var(--subtitle-color);
  margin-top: var(--u-40, 40px);
}
.auth-footer-link__btn:hover{
  color: var(--brand-primary-hover);
  text-underline-offset: .18em;
  text-decoration-thickness: .09em;
  filter: brightness(1.03);
}

.auth-footer-link__btn:active{
  filter: brightness(0.98);
}

.auth-footer-link__btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.auth-footer-link__btn::after{
  margin-left: .35em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.auth-footer-link__btn:hover::after{ opacity:1; transform: translateX(0); }
.side-hint{
  width:320px; color:#E7EEF9; text-align:center;
  font: 400 14px/22px "Roboto", system-ui, Segoe UI, Arial, sans-serif;
}
@media (max-width:959px){ .side-hint{ width:auto; max-width:560px; color:#F2F5FA; } }

.lang-switch{
  position:absolute; top:40px; right:40px;
  display:flex; align-items:center; gap:6px;
  font-family: var(--font-sans);
  font-weight: var(--lang-fw);
  font-size: var(--lang-fs);
  line-height: var(--lang-lh);
  letter-spacing: 0;
  color:#F6EAF2;
  z-index: 100;
}
.lang-switch a{
  color: inherit;
  text-decoration: none;
  opacity: .5;
  transition: opacity .15s ease;
  outline: none;
}
.lang-switch a:hover{ opacity:.95; }
.lang-switch a:focus-visible{
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
  border-radius: 4px;
}
.lang-switch .active{
  color:#FFFFFF;
  font-weight: 600;
  opacity: 1;
  pointer-events: none;
}
.lang-switch .sep{ opacity:.5; }

@media (max-width: 959px) {
  .lang-switch {
    top: 30px;
    right: 30px;
    color: var(--brand-deep);
  }
  .lang-switch a {
    color: inherit;
    opacity: .6;
  }
  .lang-switch .active {
    color: var(--brand-deep);
    opacity: 1;
  }
}

@media (max-width: 559px) {
  .lang-switch {
    top: 36px;
    right: 36px;
  }
}

.otp-timer{
  text-align:center;
  margin: 0 0 40px;
  color:var(--brand-deep);
  font: 400 22px/1.4 "Roboto", system-ui, Segoe UI, Arial, sans-serif;
  letter-spacing: -0.44px;
}

.otp-intro{
  font-family: "Roboto", system-ui, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0;
  text-align: center;
  color: var(--subtitle-color);
  margin: 0 0 40px;
}

.otp-intro .otp-email{
  font-weight: 600;
  color: var(--brand-deep);
}

.otp-grid{
  display:flex;
  justify-content:center;
  width: min(100%, var(--card-safe-w));
  gap: var(--otp-gap);
  margin: 0 0 24px;
}
.otp-cell{
  width: clamp(var(--otp-min-w),
  calc((100% - 5 * var(--otp-gap)) / 6),
  var(--otp-max-w));
  height: auto;
  aspect-ratio: 60 / 68;
  border-radius: var(--otp-radius);
  border: var(--otp-bw) solid var(--border, var(--brand-primary-gray));
  background:#fff;
  text-align:center;
  font-family: var(--font-head, "Montserrat"), system-ui, Segoe UI, Roboto, Arial, sans-serif;
  font-size: var(--otp-font);
  line-height: var(--otp-lh);
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  box-sizing:border-box;
  box-shadow: 0 1px 1.5px rgba(0,0,0,.06);
  transition: border-color .15s, box-shadow .15s;
}
.otp-cell:focus{
  outline: 0;
  border-color: #9CA9C9;
  box-shadow: 0 0 0 3px rgba(156,169,201,.25);
}

.otp-cell--error{
  border-color:var(--error) !important;
  box-shadow:0 0 0 3px rgba(220,53,69,.18);
}

.otp-error {
  min-height: 0;
  margin-top: 0px;
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 14px;
  line-height: 140%;
  color: var(--error);
  opacity: 0;
  transition: opacity .2s ease, max-height .2s ease, margin-top .2s ease;
  max-height: 0;
  overflow: hidden;
}
.otp-error--show {
  opacity: 1;
  max-height: 100px;
}

@media (max-width: 959px) {
  .otp-grid {
    max-width: 370px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
.consent{
  display:flex;
  align-items:center;
  gap: 10px;
  justify-content:center;
  margin: 0 0 40px;
}
.consent-box {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center; justify-content: center;
}

.consent-checkbox {
  appearance: auto;
  accent-color: var(--brand-primary);
  transform: scale(1.05);
  transform-origin: center;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
}
.consent-text{
  font-family: "Roboto", system-ui, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: -0.39px;
  color:var(--subtitle-color);
}
.consent-text a{ color: inherit; text-decoration: underline; }

#otpCard {
  position: relative;
  overflow: visible;
}
#otpCard .otp-error{
  display:block;
  width: min(100%, var(--card-safe-w));
  margin: 0px auto 24px;
  text-align:center;
}

#otpCard .otp-error.otp-error--show{
  opacity:1;
  max-height:100px;
}

.form-card .policy-drawer{
  position:absolute; 
  top:0; bottom:0;
  left: calc(100% - var(--drawer-gap));
  width: var(--drawer-w);
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  opacity:1; 
  transition: transform .28s ease, opacity .2s ease;
  will-change: transform;
  z-index:2;
}

.form-card.policy-open { margin-right: 0; transform: none; position: relative; }


.policy-inner{  
  position: absolute;
  inset: var(--drawer-gap);
  padding: 40px 40px 40px 40px;
  border-radius: 16px;
  background: rgba(129, 128, 132, 0.10);;
  overflow:auto; color:var(--brand-deep);
  display:flex;
  flex-direction:column;
  margin: 0;
}

.policy-title {
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: 0;
  margin: 0 0 16px;
  color: var(--brand-deep);
}
.policy-body{
  overflow: auto;
  box-sizing: border-box;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.35) transparent;
}
.policy-body,
.policy-close-text {
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0;
  color: var(--subtitle-color);
;
}

.policy-body::-webkit-scrollbar{
  width: 0px;
  height: 0px;
}
.policy-body::-webkit-scrollbar-track{
  background: transparent;
}
.policy-body::-webkit-scrollbar-thumb{
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.policy-text .policy-link{
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 0.08em;
  color: inherit;
}
.policy-text .policy-link:hover{
  text-decoration-thickness: 0.10em;
  filter: brightness(1.02);
}



@media (min-width: 960px) and  (max-width: 1139px) {
  .auth-frame {
    min-height: 100vh;
    padding: var(--bg-pad);
    box-sizing: border-box;
    background: var(--surface);
  }
  .auth-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .auth-canvas {
    width: 100%;
    height: calc(100vh - (var(--bg-pad) * 2));
    max-height: calc(100vh - (var(--bg-pad) * 2));
    padding: var(--bg-pad);
    box-sizing: border-box;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .form-card {
    max-width: min(100%, 560px);
    margin: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow-y: auto;
  }
  #otpForm,
  #otpCard {
    display: contents;
  }
  
  .form-card > * {
    flex: 0 0 auto;
  }
  .form-card .policy-drawer {
    position: static;
    width: 100%;
    border-radius: 12px;
    order: 3;
  }

  .form-card.brand-logo { order: 0; }
  .form-card.auth-title { order: 1; }
  .form-card.otp-intro  { order: 2; }
  .form-card.otp-timer  { order: 3; }
  .form-card.otp-grid   { order: 4; }

  .consent    { order: 5; }
  
  .form-card .policy-inner {
    position: static;
    inset: auto;
    padding: 16px;
    background: rgba(129, 128, 132, 0.05);
    border-radius: 12px;
    max-height: 312px;
    overflow: auto;
  }

  .form-card .policy-title {
    display: none;
  }

  .form-card .policy-body {
    font-size: 12px;
    line-height: 1.4;
  }

  .form-card .policy-drawer {
    order: 6;
  }
  .resend     { order: 7; }
  .btn-row    { order: 8; }
  .auth-footer-link { order: 9; }
}
@media (max-width: 959px) {
  .auth-frame {
    height: 100vh;
    min-height: 100vh;
    padding: var(--bg-pad);
    box-sizing: border-box;
    background: var(--surface);
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
  }

  .auth-canvas {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding: 16px;
    box-sizing: border-box;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
  }

  .auth-stage {
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
  }
  .form-card,
  .form-card--confirm {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    border-radius: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .form-card--confirm::before,
  .form-card--confirm::after {
    content: none;
  }
  
  .form-card--confirm > form,
  .form-card--confirm > .card-safe {
    order: 3;
  }
  .form-card--confirm .brand-logo  { order: 0; }
  .form-card--confirm .auth-title  { order: 1; }
  .form-card--confirm .otp-intro   { order: 2; }
  .form-card--confirm .otp-timer   { order: 4; }
  .form-card--confirm .otp-grid    { order: 5; }
  .form-card--confirm .consent     { order: 6; }
  .form-card--confirm .resend      { order: 8; }
  .form-card--confirm .btn-row     { order: 9; }
  .form-card--confirm .policy-drawer {
    order: 7;
    position: static;
    width: 100%;
    border-radius: 12px;
    background: #fff;
  }

  .form-card--confirm .policy-inner {
    position: static;
    inset: auto;
    padding: 16px 16px 16px;
    border-radius: 12px;
    max-height: 200px;
    overflow: auto;
  }

  .form-card--confirm .policy-title {
    display: none;
  }
  #otpForm,
  #otpCard {
    display: contents;
  }

  .consent {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
  }

  .consent-text {
    text-align: left;
    max-width: 360px;
  }

  .consent-checkbox {
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    flex: 0 0 var(--checkbox-size);
    min-width: var(--checkbox-size);
    min-height: var(--checkbox-size);
  }
}
@media (max-width: 559px) {
  .policy-body {
    font-size: 12px;
    line-height: 1.4;
  }
}

.resend{
  text-align:center;
  margin: 10px 0 40px;
  font: 400 14px/1.4 "Roboto", system-ui, Segoe UI, Arial, sans-serif;
  color: var(--brand-primary-gray);
}
.resend-link{
  background:none;
  border:none;
  padding:0 0 0 5px;
  font-size: var(--link-fs);
  text-decoration: underline solid;
  text-underline-offset: var(--u-offset);
  text-decoration-thickness: var(--u-thick);
  text-decoration-skip-ink: auto;
  color: var(--brand-primary);
  cursor:pointer;
}
.resend-link:disabled{
  opacity: 0.85;
  cursor:not-allowed;
  color: var(--brand-deep);
  text-decoration: none;
}

.resend-link:hover{
  color: var(--brand-primary);
}
.success-card{
  width: min(100%, var(--success-card-w));
  height: auto;
  margin-inline: auto;
  padding: var(--success-pad-y) var(--success-pad-x);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-strong);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-sizing: border-box;
}

.success-icon{
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(39.68deg,#FE8D02 -2.91%,#FA600A 21.24%,#F72B12 48.85%,#BD1637 73.5%,#820360 99.63%);
  display: grid;
  place-items: center;
  opacity: 0.5;
}

.success-icon svg{
  width: 90px;
  height: 90px;
  display: block;
}

.success-title{
  font-family: var(--font-head, "Montserrat"), system-ui, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: var(--h1-fs);
  line-height: 120%;
  text-align: center;
  margin: 8px 0 0;
}

.success-text{
  font-family: "Roboto", system-ui, Segoe UI, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  text-align: center;
  color: var(--subtitle-color);
  margin: 0;
}

.success-card .success-text .mail{
  font-weight: 600 !important;
  color: var(--brand-deep);

}

@media (max-width: 960px) {
  .auth-content--full {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 0;
    box-sizing: border-box;
  }
  .success-card {
    height: 100%;
    width: 100%;
    max-width: none;
    min-height: 0;
    justify-content: center;
    padding: var(--success-pad-y) var(--success-pad-x);
    box-sizing: border-box;
  }

  .success-icon{
    width: 120px;
    height: 120px;
    border-radius: 50%;

    display: grid;
    place-items: center;
    opacity: 0.5;
  }

  .success-icon svg{
    width: 54px;
    height: 54px;
    display: block;
  }
}

.field-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 24px 0 12px;
}

.password-field{
  position: relative;
  align-items: center;
  width: 100%;
  margin: 0;
}

.password-field + .password-field{
  margin-top: 12px;
}

.password-field:last-of-type{
  margin-bottom: 24px;
}
.password-field .input{
  flex: 1 1 auto;
  padding-right: 44px;
  margin: 0;
}

.password-field:has(+ .otp-error:not([hidden])) .input {
  margin-bottom: 0;
}

.password-field + .otp-error:not([hidden]) {
  margin-top: -34px;
  margin-bottom: 30px;
}
.pass-toggle{
  position:absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width:24px;height:24px;
  padding:0;
  display:flex;
  align-items:center; 
  justify-content:center;
  border:0;
  background:transparent;
  cursor:pointer;
  touch-action:manipulation;
}
.pass-icon{ 
  width: 24px;
  height: 24px; display:block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.pass-toggle::before{
  content:"";
  display:block;
}
.pass-toggle[aria-pressed="true"]::before{
  content: none;
}

.pass-toggle:focus-visible{
}

#pwdForm .field-row {
  margin: 24px 0 6px;
}
#pwdForm .password-field {
  margin-top: var(--input-mt);
  margin-bottom: var(--input-mb);
}
#pwdForm .password-field .input {
  margin-top: 0; 
  margin-bottom: 0;
}
#pwdForm .btn-row {
  margin-top: 0;
}
#pwdForm .field-row .label{
  color: var(--brand-deep);
  transition: color .15s ease;
}

#pwdForm .field-row .label.label--error{
  color: var(--error);
}

.app-version{
  position: fixed;
  left: 30px;
  bottom: 8px;
  z-index: 10;
  font: 400 12px/1.2 Roboto, system-ui, Segoe UI, Arial, sans-serif;
  color: var(--brand-deep);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 8px;
  padding: 6px 8px;
}
.change-pass-link{ text-align:center; }
.change-pass-link__btn{
  appearance:none;
  background:none; border:0;
  cursor:pointer;
  font-family: var(--font-sans);
  font-weight: var(--link-fw);
  font-style: normal;
  font-size: var(--link-fs);
  line-height: var(--link-lh);
  letter-spacing: 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: var(--u-offset);
  text-decoration-thickness: var(--u-thick);
  text-decoration-skip-ink: auto;
  color: var(--subtitle-color);
}
.change-pass-link__btn:hover{
  color: var(--brand-primary-hover);
  text-underline-offset: .18em;
  text-decoration-thickness: .09em;
  filter: brightness(1.03);
}

.auth-footer-link__btn:active{
  filter: brightness(0.98);
}

.pwd-rules{
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
}
.pwd-rules .rule{
  display: grid;
  align-items: center;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  margin: 10px 0;
  font: 400 12px/1 Roboto, system-ui, Segoe UI, Arial, sans-serif;
  color: var(--brand-deep);
  letter-spacing: -0.39px;
}
.rule-icon{
  width: 12px; height: 12px; display: inline-block;
  background: var(--icon-pass-not-ok) center/contain no-repeat;
}
.rule.ok .rule-icon{ width: 16px; height: 16px; 
  background: var(--icon-pass-ok) center/contain no-repeat; 
}

.input--ok{
  border-color: var(--correct) !important;
  box-shadow: 0 0 0 3px rgba(46,125,50,.12);
}
.input--error{
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(209,67,67,.10);
}

#setPwdForm .field-row { margin: 24px 0 0px; }

#setPwdForm .password-field {
  margin-top: var(--input-mt);
}

#setPwdForm .password-field + .password-field {
  margin-top: 24px;
}

#setPwdForm #mismatchError {
  margin: 6px 0 0;
}
#setPwdForm .password-field:last-of-type {
  margin-bottom: 24px;
}
#setPwdForm .password-field .input {
  margin-top: 0;
  margin-bottom: 0;
}

#setPwdForm .pwd-rules {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
#setPwdForm .pwd-rules .rule {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}

#setPwdForm .btn-row {
  margin-top: 40px;
}

.input--ok {
  border-color: #2BC48A;
  box-shadow: var(--correct);
}

#setPwdForm {
  max-height: 724px;;
}

.pwd-hint {
  display: none;
  margin: 16px 0 0;
  font: 400 12px/1.4 Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--subtitle-color);
}

@media (max-width: 960px) {
  .card-safe {
    width: min(100%, 550px);
  }

  #setPwdForm .pwd-rules {
    display: none;
  }

  #setPwdForm .pwd-hint {
    display: block;
  }
  .input,
  input[type="email"],
  input[type="text"],
  input[type="password"] {
    font-size: var(--ph-mobile-fs);
  }
}

@media (max-width: 540px) {
  .input {
    margin-bottom: var(--u-20);
  }

  #setPwdForm .password-field {
    margin-bottom: var(--u-16);
  }

  #setPwdForm .pwd-rules {
    display: none;
  }
  #setPwdForm .pwd-hint {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 12px;
  }
}
.global-error-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 10px);
  max-width: min(480px, 100% - 32px);
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff;
  color: black;
  font: 400 14px/1.4 "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1100;
}

.global-error-banner--visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.global-error-banner__icon {
  flex: 0 0 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  position: relative;
  margin-top: 2px;
  box-sizing: border-box;
}
.global-error-banner__icon::before,
.global-error-banner__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--error, #DC3545);
  border-radius: 999px;
  transform-origin: center;
}
.global-error-banner__icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.global-error-banner__icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.global-error-banner__text {
  flex: 1 1 auto;
}

.global-error-banner__close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 0 0 8px;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 959px) {
  .auth-title {
    font-size: var(--h1-mobile-fs);
    margin-bottom: 12px;
  }

  .auth-frame {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding: var(--bg-pad);
    box-sizing: border-box;
    background: var(--surface);

    display: flex;
    justify-content: center;
    align-items: stretch;

    overflow: hidden;
  }

  .auth-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: calc(100vh - 2 * var(--bg-pad));
    min-height: calc(100dvh - 2 * var(--bg-pad));
    height: auto;
    max-height: none;

    border-radius: var(--radius-lg);
    padding: 16px;
    box-sizing: border-box;

    display: flex;
    justify-content: center;
    align-items: stretch;

    overflow: hidden;
  }

  .auth-stage {
    flex: 1 1 auto;
    width: 100%;

    height: auto;
    min-height: 0;

    display: flex;
    justify-content: center;
    align-items: stretch;

    box-sizing: border-box;
  }

  .form-card,
  .form-card--login {
    grid-column: auto;
    width: 100%;
    max-width: none;
    background: #fff;
    border-radius: 16px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    height: auto;
    min-height: calc(100vh - 2 * var(--bg-pad) - 2 * 16px);
    min-height: calc(100dvh - 2 * var(--bg-pad) - 2 * 16px);
    max-height: calc(100vh - 2 * var(--bg-pad) - 2 * 16px);
    max-height: calc(100dvh - 2 * var(--bg-pad) - 2 * 16px);
    overflow-y: auto;
    margin: 0 auto;
    padding: 32px 16px calc(var(--btn-h) + 32px);
  }

  .card-safe {
    width: 100%;
    margin-inline: auto;

    display: flex;
    flex-direction: column;
    flex: 0 0 auto;

    min-height: 0;
    overflow: visible;
  }

  .card-safe .btn-row {
    margin-top: 16px;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 20;
    background: var(--surface);
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .card-safe__buttons {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;

    background: var(--surface);
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .card-safe__buttons .btn-block {
    padding-bottom: 0;
  }

  .auth-footer-link {
    margin-top: 0px;
    padding-bottom: 12px;
  }

  .card-safe__buttons,
  .form-grid .btn-row,
  .form-grid .btn {
    width: 100%;
  }

  .form-card--confirm {
    grid-column: auto;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    max-height: calc(100vh - 2 * var(--bg-pad) - 2 * 16px);
    max-height: calc(100dvh - 2 * var(--bg-pad) - 2 * 16px);
    background: #fff;
    border-radius: 16px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    min-height: 0;
    height: auto;
    margin-top: auto;
    margin-bottom: auto;
    overflow-y: auto;
    padding: 24px 16px;
  }

  .form-card--confirm .card-safe {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;

    padding-bottom: calc(var(--btn-h) + 24px);
  }

  .form-card--confirm .card-safe .btn-row {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--surface);
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }


  .form-card--confirm::before,
  .form-card--confirm::after {
    content: none;
  }

  .form-card--confirm > form,
  .form-card--confirm > .card-safe {
    order: 3;
  }

  .form-card--confirm .brand-logo {
    order: 0;
  }

  .form-card--confirm .auth-title {
    order: 1;
  }

  .form-card--confirm .otp-intro {
    order: 2;
  }

  .form-card--confirm .otp-timer {
    order: 4;
  }

  .form-card--confirm .otp-grid {
    order: 5;
  }

  .form-card--confirm .consent {
    order: 6;
  }

  .form-card--confirm .policy-drawer {
    order: 7;
    position: static;
    width: 100%;
    border-radius: 12px;
    background: #fff;
  }

  .form-card--confirm .resend {
    order: 8;
  }

  .form-card--confirm .btn-row {
    order: 9;
  }

  .form-card--confirm .policy-inner {
    position: static;
    inset: auto;
    padding: 16px 16px 16px;
    border-radius: 12px;
    max-height: 200px;
    overflow: auto;
  }

  .form-card--confirm .policy-title {
    display: none;
  }

  .form-card--login .card-safe .btn-block {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;

    z-index: 20;
    padding-top: 0;
    padding-bottom: 0;
  }

  #otpForm,
  #otpCard {
    display: contents;
  }

  .consent {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
  }

  .consent-text {
    text-align: left;
    max-width: 360px;
  }

  .consent-checkbox {
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    flex: 0 0 var(--checkbox-size);
    min-width: var(--checkbox-size);
    min-height: var(--checkbox-size);
  }

  .resend {
    margin: 10px 0 18px;
  }

  .global-error-banner {
    box-shadow: var(--shadow-strong);
  }
}

@media (max-width: 559px) {
  .form-card,
  .form-card--login,
  .form-card--confirm {
    padding: 24px 16px calc(var(--btn-h) + 24px);
  }
  .form-card::before,
  .form-card::after,
  .form-card--confirm::before,
  .form-card--confirm::after {
    content: "";
    flex: 1 1 0;
  }
}

@media (max-width: 959px) and (max-height: 360px) {
  .form-card,
  .form-card--login,
  .form-card--confirm {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
    padding-bottom: 24px;
  }

  .form-card--confirm .card-safe {
    max-height: none;
    overflow-y: visible;
    padding-bottom: 24px;
  }

  .card-safe .btn-row,
  .form-card--confirm .card-safe .btn-row,
  .card-safe__buttons,
  .card-safe > .btn.btn-block,
  .form-card--login .card-safe .btn-block {
    position: static;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: auto;
    padding-bottom: 0;
  }

  .auth-footer-link {
    padding-bottom: 24px;
  }
}