/* REVA Login Responsive Guard — 2026-09-27
   Isolated to /login so the approved desktop appearance stays intact while
   preventing the sign-in card from collapsing on scaled/smaller desktops. */

html,body{max-width:100%;overflow-x:hidden}

.layout{
  grid-template-columns:minmax(0,1.12fr) minmax(380px,.88fr)!important;
  gap:clamp(28px,5vw,80px)!important;
}
.layout>.left{min-width:0!important}
.layout>.card{
  width:min(520px,100%)!important;
  min-width:380px!important;
  max-width:520px!important;
  justify-self:end!important;
}
.layout>.card form,
.layout>.card input,
.layout>.card button,
.layout>.card .sep,
.layout>.card .msg{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.layout>.card h2,
.layout>.card .desc,
.layout>.card label,
.layout>.card button{
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* A 1366px screen at 125% Windows/browser scaling is ~1093 CSS px.
   Switch cleanly to the single-card layout before the desktop grid can squeeze. */
@media (max-width:1120px){
  body{
    overflow:auto!important;
    overflow-x:hidden!important;
    min-height:100dvh!important;
    background-attachment:scroll!important;
  }
  .layout{
    display:block!important;
    width:min(calc(100% - 32px),560px)!important;
    min-height:100dvh!important;
    margin:0 auto!important;
    padding:112px 0 36px!important;
  }
  .layout>.left{display:none!important}
  .layout>.card{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:520px!important;
    margin:0 auto!important;
    justify-self:auto!important;
  }
  .brand{
    left:max(18px,env(safe-area-inset-left))!important;
    top:max(18px,env(safe-area-inset-top))!important;
  }
}

@media (max-width:480px){
  .layout{
    width:calc(100% - 20px)!important;
    padding-top:104px!important;
  }
  .layout>.card{
    padding-left:18px!important;
    padding-right:18px!important;
  }
}

@media (max-height:620px) and (orientation:landscape){
  .layout{
    width:min(calc(100% - 28px),620px)!important;
    padding-top:88px!important;
  }
}
