/* MicroLink Auth Experience · responsive by width + viewport height
   Goal: premium brand presentation, readable forms, no clipped CTA at 100% zoom. */
:root{
  --auth-font:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,Ubuntu,Cantarell,"Fira Sans",sans-serif;
  --auth-blue:#0766ff;
  --auth-blue-700:#0052d6;
  --auth-blue-900:#073d91;
  --auth-red:#f10f2f;
  --auth-navy:#071f3f;
  --auth-text:#17304d;
  --auth-muted:#617792;
  --auth-line:#d8e4f1;
  --auth-soft:#f4f8fd;
  --auth-soft-2:#eaf3ff;
  --auth-danger:#c6283d;
  --auth-danger-soft:#fff1f4;
  --auth-white:#fff;
  --auth-shadow:0 24px 60px rgba(19,58,107,.12),0 4px 16px rgba(19,58,107,.06);
}

*{box-sizing:border-box}
button,input,textarea,select{font-family:inherit}
html{min-width:320px;background:var(--auth-soft)}
html,body.auth-page{margin:0;width:100%;min-height:100%;color:var(--auth-text)}
body.auth-page{
  min-height:100dvh;
  overflow-x:hidden;
  overflow-y:auto;
  background:#f4f8fd!important;
  font-family:var(--auth-font);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.auth-modern-shell{
  width:100%;
  min-height:100dvh;
  display:grid;
  grid-template-columns:minmax(390px,1.04fr) minmax(500px,.96fr);
  align-items:stretch;
  background:#fff;
}

/* ---------- brand / sales panel ---------- */
.auth-showcase{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  padding:clamp(34px,5.2vw,74px);
  overflow:hidden;
  background:
    radial-gradient(circle at 83% 10%,rgba(7,102,255,.15) 0 17%,transparent 17.2%),
    radial-gradient(circle at 4% 96%,rgba(241,15,47,.07) 0 16%,transparent 16.3%),
    linear-gradient(145deg,#f8fbff 0%,#edf5ff 55%,#f9fbff 100%);
  border-right:1px solid #d7e4f3;
}
.auth-showcase:before{
  content:"";
  position:absolute;
  z-index:-1;
  width:250px;
  height:250px;
  right:-88px;
  bottom:8%;
  border:1px solid rgba(7,102,255,.13);
  border-radius:50%;
  box-shadow:0 0 0 44px rgba(7,102,255,.025),0 0 0 88px rgba(7,102,255,.018);
  pointer-events:none;
}
.auth-logo{
  display:block;
  width:clamp(160px,17vw,235px);
  max-width:62%;
  height:auto;
  object-fit:contain;
  margin:0 0 clamp(20px,3vh,32px);
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.auth-kicker{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  gap:8px;
  min-height:31px;
  padding:6px 11px;
  margin:0 0 14px;
  border:1px solid #cfe0f7;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--auth-blue-700);
  font-size:12px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
  backdrop-filter:blur(8px);
}
.auth-kicker:before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:var(--auth-blue);
  box-shadow:0 0 0 4px rgba(7,102,255,.11);
}
.auth-showcase h1{
  margin:0;
  max-width:680px;
  color:var(--auth-navy);
  font-size:clamp(35px,3.75vw,54px);
  line-height:1.055;
  letter-spacing:-.042em;
  text-wrap:balance;
}
.auth-showcase>p{
  margin:clamp(14px,2.2vh,21px) 0 0;
  max-width:590px;
  color:#536d89;
  font-size:clamp(14px,1.1vw,16px);
  line-height:1.62;
}
.auth-value-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  width:min(610px,100%);
  margin-top:clamp(20px,3.2vh,32px);
}
.auth-value-item{
  min-width:0;
  padding:13px 14px;
  border:1px solid rgba(198,216,237,.9);
  border-radius:14px;
  background:rgba(255,255,255,.72);
  box-shadow:0 6px 22px rgba(31,78,133,.04);
  backdrop-filter:blur(7px);
}
.auth-value-item strong{
  display:block;
  margin-bottom:3px;
  color:#173b68;
  font-size:12px;
  line-height:1.3;
  letter-spacing:.01em;
}
.auth-value-item span{
  display:block;
  color:#6a8097;
  font-size:12px;
  line-height:1.45;
}
.auth-value-item:before{
  content:"✓";
  float:left;
  display:grid;
  place-items:center;
  width:21px;
  height:21px;
  margin:0 9px 10px 0;
  border-radius:7px;
  background:#e8f2ff;
  color:var(--auth-blue);
  font-size:12px;
  font-weight:900;
}
.auth-showcase-note{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:18px;
  color:#71879f;
  font-size:12px;
  line-height:1.4;
}
.auth-showcase-note:before{
  content:"";
  width:20px;
  height:2px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--auth-red) 0 45%,var(--auth-blue) 45% 100%);
}
/* Compatibility for older auth markup if one page is cached. */
.auth-feature-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.auth-feature-row span{display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #d5e3f3;border-radius:10px;background:rgba(255,255,255,.78);color:#34516e;font-size:12px;font-weight:700}
.auth-feature-row span:before{content:"✓";color:var(--auth-blue);font-weight:900}

/* ---------- form panel ---------- */
.auth-form-panel{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-width:0;
  min-height:100dvh;
  padding:clamp(24px,3.7vw,52px) clamp(24px,4.8vw,68px);
  overflow-y:auto;
  background:
    linear-gradient(rgba(255,255,255,.96),rgba(255,255,255,.96)),
    radial-gradient(circle at 100% 0%,#dceaff,transparent 45%);
  scrollbar-gutter:stable;
}
.auth-card.auth-card-modern{
  width:min(500px,100%);
  margin:0!important;
  padding:clamp(24px,2.6vw,32px)!important;
  gap:0!important;
  border:1px solid #e2ebf5!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:var(--auth-shadow)!important;
}
.auth-register-page .auth-card.auth-card-modern{width:min(520px,100%)}
.auth-mobile-logo{
  display:none;
  width:180px;
  max-width:55vw;
  height:auto;
  object-fit:contain;
  margin:0 auto 24px;
  background:transparent!important;
}
.auth-card-modern .auth-eyebrow{
  display:block;
  margin:0 0 8px;
  color:var(--auth-blue-700);
  font-size:12px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.auth-card-modern h2{
  margin:0!important;
  color:var(--auth-navy)!important;
  font-size:clamp(27px,2.1vw,32px);
  line-height:1.15;
  letter-spacing:-.028em;
}
.auth-card-modern .auth-intro{
  margin:8px 0 21px;
  color:var(--auth-muted);
  font-size:13px;
  line-height:1.55;
}
.auth-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:13px;
}
.auth-field label{
  color:#173653!important;
  font-size:12px!important;
  font-weight:780!important;
  line-height:1.35;
}
.auth-field .field-hint{font-weight:550;color:#7a8fa5;font-size:12px}
.auth-card-modern input{
  width:100%;
  height:46px;
  padding:0 13px!important;
  border:1px solid #cbdbea!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--auth-text)!important;
  font-size:14px!important;
  outline:none;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.auth-card-modern input::placeholder{color:#8195aa;opacity:1}
.auth-card-modern input:hover{border-color:#9db8d5!important}
.auth-card-modern input:focus{border-color:var(--auth-blue)!important;box-shadow:0 0 0 4px rgba(7,102,255,.10)!important;background:#fff!important}
.auth-password-wrap{position:relative}
.auth-password-wrap input{padding-right:52px!important}
.auth-card-modern .auth-password-toggle{
  position:absolute;
  right:5px;
  top:50%;
  transform:translateY(-50%);
  display:grid!important;
  place-items:center;
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#526d87!important;
  box-shadow:none!important;
  cursor:pointer;
  z-index:2;
}
.auth-password-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.auth-password-toggle .auth-eye-off{display:none}
.auth-password-toggle.is-visible .auth-eye-open{display:none}
.auth-password-toggle.is-visible .auth-eye-off{display:block}
.auth-card-modern .auth-password-toggle:hover,.auth-card-modern .auth-password-toggle:focus-visible{background:var(--auth-soft-2)!important;color:var(--auth-blue-700)!important;outline:none!important}
.auth-card-modern .auth-password-toggle:focus-visible{box-shadow:0 0 0 3px rgba(7,102,255,.12)!important}

.auth-card-modern .btn-primary{
  width:100%;
  min-height:47px;
  height:47px;
  margin:7px 0 0!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#0a6cff 0%,#0058e9 100%)!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:850!important;
  letter-spacing:.005em;
  box-shadow:0 10px 24px rgba(0,88,233,.22)!important;
  cursor:pointer;
  transition:transform .14s ease,filter .14s ease,box-shadow .14s ease;
}
.auth-card-modern .btn-primary:hover{filter:brightness(.97);box-shadow:0 13px 30px rgba(0,82,214,.26)!important;transform:translateY(-1px)}
.auth-card-modern .btn-primary:active{transform:translateY(0)}
.auth-card-modern .btn-primary:focus-visible{outline:3px solid rgba(7,102,255,.20);outline-offset:3px}
.auth-card-modern .btn-secondary{
  width:100%;
  min-height:44px;
  padding:0 16px!important;
  border:1px solid #bed2e8!important;
  border-radius:12px!important;
  background:#f8fbff!important;
  color:#174f98!important;
  font-size:13px!important;
  font-weight:800!important;
  box-shadow:none!important;
  cursor:pointer;
}
.auth-card-modern .btn-secondary:hover{background:#eef6ff!important;border-color:#9fbee0!important}
.auth-card-modern .auth-alt{
  margin:17px 0 0!important;
  color:var(--auth-muted)!important;
  font-size:13px;
  text-align:center;
  line-height:1.45;
}
.auth-card-modern .auth-alt a{color:var(--auth-blue-700)!important;font-weight:850;text-decoration:none}
.auth-card-modern .auth-alt a:hover{text-decoration:underline;text-underline-offset:3px}
.auth-card-modern .form-error{
  margin:0 0 16px;
  padding:11px 13px;
  border:1px solid #f0bdc7!important;
  border-radius:11px!important;
  background:var(--auth-danger-soft)!important;
  color:#8e2032!important;
  font-size:12px;
  line-height:1.45;
}
.auth-security-note{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:17px;
  padding-top:15px;
  border-top:1px solid #e4edf6;
  color:#6a8096;
  font-size:12px;
  line-height:1.48;
}
.auth-security-note strong{color:#36516e}
.auth-security-dot{flex:0 0 auto;width:8px;height:8px;margin-top:4px;border-radius:50%;background:var(--auth-blue);box-shadow:0 0 0 4px rgba(7,102,255,.09)}
.auth-register-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 13px}
.auth-register-body,.auth-register-actions{min-width:0}
.auth-register-body{position:relative}
.auth-register-actions{position:relative;z-index:2}
.auth-register-grid .auth-field.full{grid-column:1/-1}
.auth-policy-note{
  margin:0 0 3px;
  padding:9px 11px;
  border:1px solid #deebf8;
  border-radius:10px;
  background:#f7fbff;
  color:#698097;
  font-size:12px;
  line-height:1.45;
  text-align:left;
}
.auth-policy-note a{color:var(--auth-blue-700);text-decoration:none;font-weight:850}
.auth-policy-note a:hover{text-decoration:underline;text-underline-offset:2px}
.auth-form-footer{
  width:min(500px,100%);
  margin-top:13px;
  color:#8496a9;
  font-size:12px;
  text-align:center;
  line-height:1.45;
}
.auth-register-page .auth-form-footer{width:min(520px,100%)}
.auth-form-footer a{color:#6f8398;font-weight:800;text-decoration:none}
.auth-form-footer a:hover{color:var(--auth-blue-700);text-decoration:underline;text-underline-offset:2px}
.auth-trust-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 17px;
}
.auth-trust-row span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border:1px solid #dce8f4;
  border-radius:999px;
  background:#f9fcff;
  color:#5e7790;
  font-size:12px;
  font-weight:700;
}
.auth-trust-row span:before{content:"";width:5px;height:5px;border-radius:50%;background:var(--auth-blue)}
.auth-otp-code input{font-size:22px!important;letter-spacing:.28em;text-align:center;font-weight:800;color:#113965!important}
.auth-card-divider{height:1px;margin:18px 0;background:#e4edf6}
.auth-secondary-form{margin:0}

/* ---------- tablet / narrower desktop ---------- */
@media(max-width:1120px) and (min-width:921px){
  .auth-modern-shell{grid-template-columns:minmax(350px,.88fr) minmax(500px,1.12fr)}
  .auth-showcase{padding:36px clamp(32px,4vw,48px)}
  .auth-showcase h1{font-size:clamp(34px,4vw,45px)}
  .auth-logo{width:190px;margin-bottom:22px}
  .auth-value-grid{grid-template-columns:1fr}
  .auth-value-item:nth-child(n+3){display:none}
  .auth-form-panel{padding-left:36px;padding-right:36px}
}

/* ---------- critical: short laptop screens / zoom ---------- */
@media(min-width:921px) and (max-height:800px){
  .auth-showcase{justify-content:center;padding-top:28px;padding-bottom:28px}
  .auth-logo{width:clamp(145px,14vw,190px);margin-bottom:17px}
  .auth-kicker{min-height:27px;padding:5px 9px;margin-bottom:11px;font-size:12px}
  .auth-showcase h1{font-size:clamp(31px,3.35vw,45px);line-height:1.03}
  .auth-showcase>p{margin-top:12px;font-size:13px;line-height:1.5}
  .auth-value-grid{margin-top:17px;gap:8px}
  .auth-value-item{padding:10px 11px;border-radius:12px}
  .auth-value-item span{font-size:12px}
  .auth-showcase-note{margin-top:12px;font-size:12px}
  .auth-form-panel{justify-content:center;padding-top:18px;padding-bottom:18px}
  .auth-card.auth-card-modern{padding:22px 25px!important;border-radius:19px!important}
  .auth-card-modern .auth-intro{margin-bottom:16px}
  .auth-field{margin-bottom:10px;gap:5px}
  .auth-card-modern input{height:43px}
  .auth-card-modern .btn-primary{height:44px;min-height:44px}
  .auth-card-modern .auth-alt{margin-top:13px!important}
  .auth-security-note{margin-top:13px;padding-top:12px}
  .auth-trust-row{margin-bottom:13px}
  .auth-policy-note{padding:7px 9px}
  .auth-form-footer{margin-top:9px}
}

@media(min-width:921px) and (max-height:690px){
  .auth-showcase{padding-top:22px;padding-bottom:22px}
  .auth-logo{width:135px;margin-bottom:12px}
  .auth-kicker{margin-bottom:9px}
  .auth-showcase h1{font-size:clamp(29px,3vw,39px)}
  .auth-showcase>p{margin-top:9px;line-height:1.42}
  .auth-value-grid{margin-top:12px}
  .auth-value-item:nth-child(n+3){display:none}
  .auth-showcase-note{margin-top:9px}
  .auth-form-panel{justify-content:flex-start;padding-top:14px;padding-bottom:14px}
  .auth-card.auth-card-modern{padding:18px 22px!important}
  .auth-card-modern h2{font-size:26px}
  .auth-card-modern .auth-intro{margin:6px 0 12px;font-size:12px}
  .auth-trust-row{margin-bottom:10px}
  .auth-field{margin-bottom:8px}
  .auth-card-modern input{height:41px}
  .auth-card-modern .btn-primary{height:42px;min-height:42px}
  .auth-security-note{margin-top:10px;padding-top:9px}
  .auth-form-footer{margin-top:7px}
}

/* Registration is the densest auth screen. On short desktop viewports,
   reserve a permanent footer slot for privacy + primary CTA + sign-in.
   Only the fields area scrolls; the submit button never leaves the card. */
@media(min-width:921px) and (max-height:760px){
  .auth-register-page .auth-form-panel{
    justify-content:center;
    overflow:hidden;
    padding-top:10px;
    padding-bottom:10px;
  }
  .auth-register-page #registerForm.auth-card.auth-card-modern{
    position:relative;
    display:block!important;
    width:min(520px,100%);
    height:calc(100dvh - 20px);
    max-height:calc(100dvh - 20px);
    min-height:0;
    overflow:hidden;
    padding:16px 20px 126px!important;
  }
  .auth-register-page #registerForm .auth-register-body{
    display:block;
    height:100%;
    max-height:100%;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-right:5px;
    scrollbar-gutter:stable;
  }
  .auth-register-page #registerForm .ml-register-cta{
    position:absolute!important;
    left:20px;
    right:20px;
    bottom:12px;
    z-index:1000;
    display:block!important;
    width:auto!important;
    margin:0!important;
    padding:9px 0 0!important;
    border-top:1px solid #e4edf6;
    background:#fff!important;
    box-shadow:0 -10px 22px rgba(24,67,117,.05);
  }
  .auth-register-page #registerForm .ml-register-policy{margin:0 0 6px!important;font-size:12px!important;line-height:1.35!important}
  .auth-register-page #registerForm .ml-register-submit{height:42px!important;min-height:42px!important}
  .auth-register-page #registerForm .ml-register-signin{margin-top:7px!important;font-size:12px!important}
  .auth-register-page .auth-form-footer{display:none}
}

@media(min-width:921px) and (max-height:620px){
  .auth-register-page #registerForm.auth-card.auth-card-modern{
    height:calc(100dvh - 12px);
    max-height:calc(100dvh - 12px);
    padding:12px 18px 116px!important;
  }
  .auth-register-page #registerForm .ml-register-cta{left:18px;right:18px;bottom:8px;padding-top:7px!important}
  .auth-register-page #registerForm .ml-register-policy{font-size:11px!important;margin-bottom:5px!important}
  .auth-register-page #registerForm .ml-register-submit{height:40px!important;min-height:40px!important}
  .auth-register-page #registerForm .ml-register-signin{margin-top:5px!important;font-size:12px!important}
  .auth-register-page .auth-card-modern h2{font-size:23px}
  .auth-register-page .auth-card-modern .auth-intro{margin:4px 0 9px;font-size:12px;line-height:1.38}
  .auth-register-page .auth-card-modern .auth-eyebrow{margin-bottom:5px;font-size:12px}
  .auth-register-page .auth-field{margin-bottom:7px;gap:4px}
  .auth-register-page .auth-card-modern input{height:39px}
  .auth-register-page .auth-field-help{font-size:12px}
}

/* ---------- one-column / mobile ---------- */
@media(max-width:920px){
  .auth-modern-shell{grid-template-columns:1fr;min-height:100dvh;background:#f5f9fe}
  .auth-showcase{display:none}
  .auth-form-panel{
    justify-content:flex-start;
    min-height:100dvh;
    padding:max(28px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom));
    background:linear-gradient(180deg,#f2f7fd 0%,#fff 34%,#fff 100%);
  }
  .auth-mobile-logo{display:block}
  .auth-card.auth-card-modern{margin:auto 0!important;box-shadow:0 18px 45px rgba(24,67,117,.10)!important}
  .auth-form-footer{margin-bottom:4px}
}
@media(max-width:560px){
  .auth-form-panel{padding-left:14px;padding-right:14px}
  .auth-card.auth-card-modern{padding:22px 18px!important;border-radius:18px!important}
  .auth-register-grid{grid-template-columns:1fr;gap:0}
  .auth-register-grid .auth-field.full{grid-column:auto}
  .auth-card-modern h2{font-size:26px}
  .auth-mobile-logo{width:160px;margin-bottom:20px}
  .auth-trust-row{gap:6px}
  .auth-security-note{font-size:12px}
}
@media(max-width:380px){
  .auth-form-panel{padding-left:10px;padding-right:10px}
  .auth-card.auth-card-modern{padding:20px 15px!important}
  .auth-card-modern input{font-size:13px!important}
}

@media(prefers-reduced-motion:reduce){
  .auth-card-modern .btn-primary,.auth-card-modern input{transition:none!important}
}

/* Account recovery / security additions */
.auth-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.auth-field-label-row label{margin:0}.auth-field-label-row a{font-size:13px;font-weight:700;color:#0766ff;text-decoration:none}.auth-field-label-row a:hover{text-decoration:underline}.form-success{margin:0 0 14px;padding:11px 13px;border:1px solid #b9e5cb;border-radius:12px;background:#f1fbf5;color:#17653b;font-size:13px;line-height:1.45}.auth-recovery-hint{padding:12px 14px;border-radius:14px;background:#f5f8fc;border:1px solid #e2e9f3;font-size:13px;line-height:1.5;color:#536172}.auth-recovery-hint strong{color:#1e2b3b}.auth-danger-note{padding:12px 14px;border-radius:14px;background:#fff6f6;border:1px solid #ffd8d8;color:#8f2b2b;font-size:13px;line-height:1.5}

/* Global-ready auth controls */
.auth-locale-switch{position:fixed;z-index:90;top:16px;right:18px;display:flex;gap:3px;padding:3px;border:1px solid #d8e4f1;border-radius:10px;background:rgba(255,255,255,.9);box-shadow:0 5px 18px rgba(32,70,115,.08);backdrop-filter:blur(9px)}
.auth-locale-switch a{padding:5px 8px;border-radius:7px;color:#70859a;font-size:12px;font-weight:900;text-decoration:none}.auth-locale-switch a.active{background:#eaf3ff;color:#0766ff}
.auth-phone-row{display:grid;grid-template-columns:118px 1fr;gap:8px}.auth-phone-row select,.auth-phone-row input{min-width:0}.auth-field-help{display:block;color:#7a8da1;font-size:12px;line-height:1.4}
@media(max-width:540px){.auth-locale-switch{top:10px;right:10px}.auth-phone-row{grid-template-columns:105px 1fr}}
.auth-phone-row .auth-country-code{flex:0 0 112px;min-width:96px;text-align:center;font-weight:700;letter-spacing:.01em}
@media(max-width:420px){.auth-phone-row .auth-country-code{flex-basis:96px}}
