/* mySIMAN Forms C166 — visual-contract alignment with Consumer H277C163.
   Layout only: all selectors are scoped to Forms landing and Forms login.
   The original Forms theme, business logic and Worker remain untouched. */

/* The reference portal is an edge-to-edge login view, not a page panel. */
:root[data-theme="dark"] body:has(.forms-entry),
:root[data-theme="dark"] body:has(.forms-auth-shell) {
  background:radial-gradient(ellipse at 12% 5%,#17435466,transparent 52%),
             radial-gradient(ellipse at 95% 100%,#173b5b55,transparent 52%),#061522!important;
}
body:has(.forms-entry) .app,
body:has(.forms-auth-shell) .app {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-height:100dvh!important;
  padding:28px 16px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.forms-entry {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:min(1080px,100%)!important;
  max-width:1080px!important;
  min-height:0!important;
  padding:clamp(8px,2dvh,24px) 6px!important;
  gap:clamp(12px,2.5dvh,26px)!important;
  margin:auto!important;
  transform:none!important;
}
.forms-entry .forms-entry-brand {
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:6px!important;
  width:max-content!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
}
.forms-entry .forms-entry-brand .forms-logo-wrap {
  box-sizing:border-box!important;
  display:block!important;
  flex:none!important;
  width:calc(clamp(70px,16dvh,138px)*.8002853)!important;
  height:clamp(70px,16dvh,138px)!important;
  margin:0!important;
  padding:0!important;
}
.forms-entry .forms-entry-kicker {
  margin:0!important;
  font-size:11px!important;
  line-height:1.5!important;
  font-weight:800!important;
  text-transform:uppercase!important;
  letter-spacing:.2em!important;
}
.forms-entry .forms-entry-brand h1 {
  margin:0!important;
  font-size:clamp(23px,3.5vw,36px)!important;
  font-weight:740!important;
  line-height:1.2!important;
  letter-spacing:-.04em!important;
}
.forms-entry .forms-entry-brand p {
  margin:0!important;
  font-size:clamp(12px,1.5vw,14px)!important;
  line-height:1.5!important;
}
/* Exactly the Consumer card width, padding and vertical rhythm.
   Two Forms cards preserve the width of individual Consumer cards. */
.forms-entry .forms-access-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:clamp(9px,1.8vw,18px)!important;
  width:min(706px,100%)!important;
  max-width:706px!important;
  padding:0!important;
  margin:0 auto!important;
}
.forms-entry .forms-access-grid .forms-access-card,
:root[data-theme="dark"] .forms-entry .forms-access-grid .forms-access-card {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  width:100%!important;
  height:clamp(200px,35dvh,315px)!important;
  min-height:0!important;
  gap:clamp(9px,2dvh,18px)!important;
  padding:clamp(16px,2.4vw,30px)!important;
  border-radius:20px!important;
  border:1px solid rgba(78,186,217,.34)!important;
  background:linear-gradient(165deg,#103049,#092036)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.14),inset 0 1px rgba(255,255,255,.05)!important;
  transform:none!important;
  cursor:pointer!important;
}
.forms-entry .forms-access-icon {
  flex:none!important;
  width:clamp(48px,7dvh,70px)!important;
  height:clamp(48px,7dvh,70px)!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  border-radius:17px!important;
}
.forms-entry .forms-access-icon svg {width:31px!important;height:31px!important}
.forms-entry .forms-access-card h2 {
  flex:none!important;
  margin:0!important;
  font-size:clamp(17px,2vw,22px)!important;
  line-height:1.3!important;
  letter-spacing:-.025em!important;
  font-weight:750!important;
}
.forms-entry .forms-access-card p {
  flex:none!important;
  min-height:2.8em!important;
  max-width:200px!important;
  margin:0!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.forms-entry .forms-access-card .forms-access-button {
  box-sizing:border-box!important;
  flex:none!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:8px 18px!important;
  border-radius:999px!important;
  font-size:12px!important;
  line-height:1.55!important;
  font-weight:750!important;
}
.forms-entry .forms-entry-note {
  margin:2px 0 0!important;
  font-size:11px!important;
  line-height:1.5!important;
}
.forms-entry .forms-portal-theme {
  position:fixed!important;
  top:clamp(12px,2.2dvh,24px)!important;
  right:clamp(12px,2vw,26px)!important;
  left:auto!important;
  width:36px!important;
  height:36px!important;
  padding:0!important;
  z-index:20!important;
  border-radius:11px!important;
}

/* Consumer login-card contract — stable width, height, padding and slots. */
body:has(.forms-auth-shell) .app {
  height:100dvh!important;
  overflow:hidden!important;
}
.forms-auth-shell {
  box-sizing:border-box!important;
  width:min(440px,100%)!important;
  max-width:440px!important;
  margin:auto!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-card.panel {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  height:min(730px,calc(100dvh - 24px))!important;
  min-height:0!important;
  max-height:calc(100dvh - 24px)!important;
  margin:auto!important;
  overflow-y:auto!important;
  scrollbar-width:thin!important;
  padding:clamp(14px,3dvh,30px)!important;
  border-radius:24px!important;
  border:1px solid rgba(78,186,217,.34)!important;
  background:#0c2235!important;
  box-shadow:0 30px 90px #0005,0 1px 0 #fff08 inset!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-brand {
  flex:none!important;
  min-height:clamp(94px,20dvh,162px)!important;
  gap:6px!important;
  margin:0 0 8px!important;
  justify-content:center!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-logo-wrap {
  width:calc(clamp(70px,16dvh,138px)*.8002853)!important;
  height:clamp(70px,16dvh,138px)!important;
  max-height:138px!important;
  margin:0 auto 2px!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-brand h2 {
  margin:0!important;
  min-height:clamp(26px,4.2dvh,38px)!important;
  line-height:1.15!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-brand p {
  margin:0 0 10px!important;
  min-height:clamp(26px,5.2dvh,44px)!important;
  max-width:340px!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:72px 72px 48px!important;
  gap:12px!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form>div {margin:0!important;min-height:0!important}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form input.field {
  height:44px!important;min-height:44px!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form>button[type=submit] {
  height:48px!important;min-height:48px!important;margin:0!important;
}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-secondary {margin:12px 0 0!important}
.forms-auth-shell[data-auth-mode="login"] .forms-auth-footer {margin-top:auto!important}

@media (max-width:700px) {
  body:has(.forms-entry) .app {
    padding:12px 14px 18px!important;
    justify-content:flex-start!important;
  }
  .forms-entry {
    flex:0 0 auto!important;
    width:min(480px,100%)!important;
    padding:8px 0!important;
    gap:clamp(7px,1.7dvh,14px)!important;
    margin:clamp(30px,6.8dvh,55px) auto 0!important;
  }
  .forms-entry .forms-entry-brand .forms-logo-wrap {
    width:calc(clamp(45px,10dvh,70px)*.8002853)!important;
    height:clamp(45px,10dvh,70px)!important;
  }
  .forms-entry .forms-access-grid {
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:480px!important;
    gap:clamp(7px,1.2dvh,12px)!important;
  }
  .forms-entry .forms-access-grid .forms-access-card,
  :root[data-theme="dark"] .forms-entry .forms-access-grid .forms-access-card {
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-content:center!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    height:clamp(100px,18dvh,148px)!important;
    min-height:0!important;
    gap:14px!important;
    padding:clamp(11px,2dvh,20px)!important;
    border-radius:15px!important;
    text-align:left!important;
  }
  .forms-entry .forms-access-icon {
    flex:0 0 46px!important;
    width:46px!important;height:46px!important;
    border-radius:12px!important;
    margin:0!important;
  }
  .forms-entry .forms-access-icon svg {width:24px!important;height:24px!important}
  .forms-entry .forms-access-card h2 {
    flex:1 1 calc(100% - 83px)!important;
    font-size:17px!important;
  }
  .forms-entry .forms-access-card p {
    flex:1 1 55%!important;
    min-height:0!important;
    max-width:200px!important;
    margin:0 0 0 60px!important;
    font-size:12px!important;
  }
  .forms-entry .forms-access-card .forms-access-button {display:none!important}
  .forms-entry .forms-entry-note {font-size:10px!important}
}
@media (max-height:630px){
  .forms-entry .forms-entry-brand .forms-logo-wrap {
    height:clamp(45px,10dvh,70px)!important;
    width:calc(clamp(45px,10dvh,70px)*.8002853)!important;
  }
  .forms-entry .forms-entry-brand h1 {font-size:clamp(19px,3dvh,26px)!important}
  .forms-entry .forms-access-grid {gap:7px!important}
  .forms-entry .forms-access-grid .forms-access-card,
  :root[data-theme="dark"] .forms-entry .forms-access-grid .forms-access-card {
    height:clamp(66px,17dvh,98px)!important;
    gap:6px!important;
  }
  .forms-entry .forms-access-icon {width:35px!important;height:35px!important;flex-basis:35px!important}
  .forms-entry .forms-access-card h2 {font-size:14px!important;flex-basis:calc(100% - 55px)!important}
  .forms-entry .forms-access-card p {font-size:11px!important;margin-left:41px!important}
  .forms-entry .forms-entry-note {display:none!important}
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-card.panel {
    padding:clamp(8px,1.3dvh,14px)!important;
  }
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-brand {
    min-height:68px!important;margin:0 0 2px!important;
  }
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-logo-wrap {width:21px!important;height:26px!important}
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-brand h2 {font-size:21px!important;min-height:25px!important}
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-brand p {display:none!important}
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form {
    grid-template-rows:64px 64px 43px!important;gap:5px!important;
  }
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form input.field {height:38px!important;min-height:38px!important}
  .forms-auth-shell[data-auth-mode="login"] .forms-auth-card .auth-form>button[type=submit] {height:43px!important;min-height:43px!important}
}
@media(max-width:700px) and (max-height:430px){
  .forms-entry .forms-entry-brand p{display:none!important}
  .forms-entry .forms-access-grid .forms-access-card,
  :root[data-theme="dark"] .forms-entry .forms-access-grid .forms-access-card {height:60px!important;padding:8px 12px!important}
  .forms-entry .forms-access-card p {display:none!important}
  .forms-entry {margin-top:14px!important}
}
/* Preserve Forms' light mode rather than force Consumer's dark-only styling. */
:root[data-theme="light"] .forms-entry .forms-access-grid .forms-access-card {
  background:linear-gradient(165deg,#fff,#edf6fc)!important;
  color:#16364a!important;
  border-color:#c4dce9!important;
}
:root[data-theme="light"] .forms-entry .forms-entry-brand h1,
:root[data-theme="light"] .forms-entry .forms-access-card h2 {color:#16364a!important}
:root[data-theme="light"] .forms-entry .forms-entry-brand p,
:root[data-theme="light"] .forms-entry .forms-access-card p {color:#57738b!important}
:root[data-theme="light"] .forms-entry .forms-access-grid .forms-access-card .forms-access-button {
  background:#e4f5f9!important;color:#067894!important;border-color:#b3dee7!important;
}
/* The source Forms .app defaults to a row flex direction. Consumer's landing
   is laid out vertically; force that direction to avoid mobile centering drift. */
body:has(.forms-entry) .app,
body:has(.forms-auth-shell) .app {flex-direction:column!important}
/* Forms retains a genuine light theme; reference Consumer is dark-only. */
:root[data-theme="light"] .forms-entry .forms-entry-kicker {color:#087c9e!important}
:root[data-theme="light"] .forms-entry .forms-entry-brand h1,
:root[data-theme="light"] .forms-entry .forms-access-card h2 {color:#16364a!important}
:root[data-theme="light"] .forms-entry .forms-entry-brand p,
:root[data-theme="light"] .forms-entry .forms-entry-note,
:root[data-theme="light"] .forms-entry .forms-access-card p {color:#57738b!important}
:root[data-theme="light"] .forms-entry .forms-access-icon {
  color:#087c9e!important;
  background:#dff4f6!important;
  border-color:#a6e4eb!important;
}
:root[data-theme="light"] .forms-entry .forms-portal-theme {
  color:#087c9e!important;background:#edf8fc!important;border-color:#b2dce9!important;
}
:root[data-theme="light"] .forms-auth-shell[data-auth-mode="login"] .forms-auth-card.panel {
  background:linear-gradient(155deg,#fff,#eef6fb)!important;
  color:#16354b!important;
  border-color:#b9dbe9!important;
  box-shadow:0 18px 46px rgba(12,58,83,.11)!important;
}
