:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020b18;
  color: #f4f8ff;
  --va-desktop-background: url("brand/login-offshore-bg.jpg");
  --va-mobile-background: url("brand/login-mobile-clean.png");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { overflow: hidden; background: #020b18; color: #f4f8ff; }
button, input { font: inherit; }

.va-auth-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.va-auth-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: start center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(clamp(1.25rem, 4vh, 3rem), env(safe-area-inset-top))
    max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-right))
    max(clamp(1.25rem, 4vh, 3rem), env(safe-area-inset-bottom))
    max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  background: #03142d var(--va-desktop-background) center / cover no-repeat;
  isolation: isolate;
}
.va-auth-stage::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(1, 10, 26, .08), rgba(2, 14, 34, .06) 38%, rgba(1, 8, 23, .24)),
    radial-gradient(circle at 50% 12%, rgba(26, 111, 238, .16), transparent 38%);
  pointer-events: none;
}

.va-auth-shell {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.va-auth-brand {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 clamp(1.25rem, 3vh, 2.25rem);
  text-align: center;
}
.va-auth-wordmark {
  display: block;
  width: min(610px, 86vw);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .42));
}
.va-auth-brand p {
  width: min(680px, 94vw);
  margin: .9rem 0 0;
  color: #d6e1ec;
  font-size: clamp(.78rem, 1.3vw, 1.08rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .62);
}
.va-auth-brand::after {
  content: "";
  display: block;
  width: min(470px, 68vw);
  height: 2px;
  margin: .65rem auto 0;
  background: linear-gradient(90deg, transparent, #1a8cff 42%, #aee3ff 50%, #1a8cff 58%, transparent);
  box-shadow: 0 0 12px rgba(52, 157, 255, .85);
}

.va-auth-panel {
  position: relative;
  width: min(535px, 100%);
  padding: 2.15rem 3rem 1.75rem;
  border: 1px solid rgba(117, 169, 229, .64);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, rgba(10, 37, 70, .76), rgba(4, 21, 46, .84));
  box-shadow:
    0 0 0 1px rgba(117, 180, 255, .08) inset,
    0 1.5rem 3.6rem rgba(0, 0, 0, .38),
    0 0 1.6rem rgba(33, 121, 255, .18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.va-auth-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #249aff 42%, #b9e7ff 50%, #249aff 58%, transparent);
  box-shadow: 0 0 15px rgba(38, 151, 255, .85);
}
.va-auth-icon {
  width: 4.85rem;
  height: 4.85rem;
  margin: 0 auto 1.65rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 139, 255, .63);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 127, 255, .2), rgba(3, 20, 47, .34));
  box-shadow: 0 0 0 .75rem rgba(37, 106, 219, .08), 0 0 1.9rem rgba(40, 124, 255, .24);
}
.va-auth-icon svg {
  width: 2.35rem;
  height: 2.35rem;
  stroke: #e8f4ff;
  fill: none;
  stroke-width: 1.7;
  filter: drop-shadow(0 0 7px rgba(78, 170, 255, .75));
}

.va-auth-form, .entry-form { display: grid; gap: 1.15rem; }
.va-auth-form label, .va-auth-panel label {
  display: grid;
  gap: .55rem;
  color: #f2f6fc;
  font-size: .94rem;
  font-weight: 750;
}
.va-auth-input { position: relative; display: flex; align-items: center; }
.va-auth-input > svg {
  position: absolute;
  left: .95rem;
  width: 1.45rem;
  height: 1.45rem;
  stroke: #94a9c0;
  fill: none;
  stroke-width: 1.65;
  pointer-events: none;
}
.va-auth-panel input {
  width: 100%;
  min-height: 3.45rem;
  padding: .85rem 3.1rem .85rem 1rem;
  border: 1px solid rgba(123, 160, 201, .54);
  border-radius: .65rem;
  background: rgba(5, 24, 52, .76);
  color: #fff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2) inset;
}
.va-auth-input input { padding-left: 3.15rem; }
.va-auth-panel input::placeholder { color: #8498ad; }
.va-auth-panel input:focus {
  border-color: #5daaff;
  box-shadow: 0 0 0 3px rgba(56, 143, 255, .18), 0 0 18px rgba(48, 132, 255, .11);
}
.va-auth-panel input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 100vmax #071d3a inset;
}
.va-password-toggle {
  position: absolute;
  right: .55rem;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: #91a8bf;
  cursor: pointer;
}
.va-password-toggle svg { width: 1.45rem; height: 1.45rem; stroke: currentColor; fill: none; stroke-width: 1.65; }
.va-password-toggle:hover, .va-password-toggle:focus-visible { color: #dceeff; background: rgba(69, 137, 224, .14); }

.va-auth-submit, .va-auth-panel button:not(.va-password-toggle):not(.va-auth-link):not(.text-button) {
  min-height: 3.55rem;
  border: 1px solid rgba(57, 151, 255, .72);
  border-radius: .7rem;
  padding: .75rem 1rem;
  background: linear-gradient(90deg, #278cff 0%, #2468ef 54%, #1e4edb 100%);
  box-shadow: 0 .5rem 1.4rem rgba(6, 55, 171, .32), 0 0 1.1rem rgba(40, 134, 255, .22) inset;
  color: #fff;
  font-weight: 850;
  letter-spacing: .025em;
  cursor: pointer;
}
.va-auth-submit { margin-top: .2rem; text-transform: uppercase; }
.va-auth-panel button:hover { filter: brightness(1.08); }
.va-auth-panel button:disabled { opacity: .6; cursor: wait; }
.va-auth-divider {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1.35rem 0 1rem;
  color: #c1ccd8;
  font-size: .88rem;
}
.va-auth-divider::before, .va-auth-divider::after { content: ""; height: 1px; flex: 1; background: rgba(132, 158, 188, .34); }
.va-auth-link, .text-button {
  display: block;
  min-height: 2.75rem;
  margin: 0 auto;
  padding: .45rem .7rem;
  border: 0;
  background: transparent;
  color: #58aaff;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .25rem;
  cursor: pointer;
}
.va-auth-secondary:empty { display: none; }
.va-auth-secondary:not(:empty) { margin-top: .65rem; color: #c8d9e8; font-size: .82rem; line-height: 1.45; text-align: center; }
.va-auth-secondary p { margin: 0; }
.va-auth-meta {
  display: grid;
  justify-items: center;
  gap: .5rem;
  margin-top: 1.05rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(127, 153, 185, .18);
  color: #aebdcc;
  text-align: center;
  font-size: .82rem;
}
.va-auth-help { display: flex; align-items: center; gap: .55rem; }
.va-auth-help svg { width: 1.25rem; height: 1.25rem; stroke: #9eb4c9; fill: none; stroke-width: 1.6; }
.va-auth-trust {
  display: grid;
  gap: .28rem;
  margin-top: .85rem;
  padding: .72rem .78rem;
  border: 1px solid rgba(123, 169, 213, .28);
  border-radius: .68rem;
  background: rgba(3, 18, 41, .58);
  color: #b8c9d9;
  font-size: .72rem;
  line-height: 1.45;
}
.va-auth-trust strong {
  display: block;
  width: 100%;
  color: #e8f4ff;
  font-size: .76rem;
  letter-spacing: .015em;
  text-align: center;
}
.va-auth-trust p { margin: 0; }
.va-auth-trust a { color: #8ed2ff; font-weight: 750; text-underline-offset: .14rem; }
.va-auth-trust a:hover, .va-auth-trust a:focus-visible { color: #d9f2ff; }
.va-auth-host { color: #e8f4ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; overflow-wrap: anywhere; }
.va-auth-message {
  margin: 0 0 1rem;
  padding: .75rem .8rem;
  border: 1px solid #315a70;
  border-radius: .65rem;
  background: #0d2b3c;
  color: #d9f1ff;
  font-size: .88rem;
  line-height: 1.45;
}
.va-auth-message.error { border-color: #9a3b40; background: #421e24; color: #ffc0ba; }

.va-auth-panel--verification { padding-top: 1.35rem; }
.va-auth-panel--verification .va-auth-icon { width: 4.25rem; height: 4.25rem; margin-bottom: 1rem; }
.va-auth-panel--verification .va-auth-icon svg { width: 2rem; height: 2rem; }
.entry-kicker { color: #8bdcff; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
h1 { margin: .4rem 0 .5rem; font-size: clamp(1.65rem, 3.1vw, 2rem); letter-spacing: -.04em; text-align: center; }
h2 { margin: 0 0 .45rem; font-size: 1.15rem; }
h3 { margin: 0 0 .45rem; font-size: 1rem; }
.entry-intro, .entry-help, .entry-followup p { color: #c2d0dd; line-height: 1.5; }
.entry-intro { margin: 0 0 1rem; text-align: center; }
.entry-help { display: none; }
.entry-followup { margin-top: .8rem; padding-top: .9rem; border-top: 1px solid rgba(127, 153, 185, .24); }
.entry-form { margin-top: 1rem; }
.onboarding-panel, .mfa-panel {
  display: grid;
  gap: .8rem;
  margin-top: .85rem;
  padding: .9rem;
  border: 1px solid #315a70;
  border-radius: .75rem;
  background: rgba(7, 29, 58, .9);
}
.onboarding-panel[hidden], .mfa-panel[hidden] { display: none; }
.onboarding-panel > p, .mfa-panel > p { margin: 0; }
.mfa-qr { width: min(14rem, 100%); margin: 0 auto; border: .55rem solid white; border-radius: .55rem; background: white; }
.va-auth-panel button.secondary { width: 100%; margin-top: .75rem; background: #183d62; box-shadow: none; color: #e8f4ff; }
.va-auth-panel button.text-button { width: 100%; margin-top: .25rem; color: #bfeeff; }

@media (max-height: 920px) and (min-width: 641px) {
  .va-auth-stage { padding-top: max(.9rem, env(safe-area-inset-top)); padding-bottom: max(.9rem, env(safe-area-inset-bottom)); }
  .va-auth-brand { margin-bottom: .9rem; }
  .va-auth-wordmark { width: min(470px, 76vw); }
  .va-auth-brand p { margin-top: .45rem; font-size: .72rem; }
  .va-auth-brand::after { margin-top: .4rem; }
  .va-auth-panel { padding: 1.3rem 2.4rem 1.15rem; }
  .va-auth-icon { width: 3.65rem; height: 3.65rem; margin-bottom: 1rem; }
  .va-auth-icon svg { width: 1.85rem; height: 1.85rem; }
  .va-auth-form { gap: .85rem; }
  .va-auth-panel input { min-height: 3rem; }
  .va-auth-submit { min-height: 3.05rem; }
  .va-auth-divider { margin: .85rem 0 .55rem; }
  .va-auth-meta { margin-top: .6rem; padding-top: .65rem; }
}

@media (max-width: 640px) {
  body { overflow: auto; }
  .va-auth-stage {
    position: absolute;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(clamp(11rem, 28vh, 16.5rem), env(safe-area-inset-top))
      max(.85rem, env(safe-area-inset-right))
      max(1.35rem, env(safe-area-inset-bottom))
      max(.85rem, env(safe-area-inset-left));
    background: #020b18 var(--va-mobile-background) center top / cover no-repeat;
  }
  .va-auth-stage::before { background: linear-gradient(180deg, rgba(1, 10, 26, .02), rgba(1, 8, 23, .14)); }
  #accountSurface {
    padding-top: max(clamp(11.5rem, 22vh, 12rem), env(safe-area-inset-top));
  }
  #accountSurface .entry-intro,
  #accountSurface #signedInMessage { display: none; }
  .va-auth-shell { width: 100%; }
  .va-auth-brand { display: none; }
  .va-auth-panel { width: min(390px, 100%); padding: 1.25rem 1.3rem 1.1rem; border-radius: 1.15rem; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .va-auth-icon { width: 3.4rem; height: 3.4rem; margin-bottom: 1rem; box-shadow: 0 0 0 .55rem rgba(37, 106, 219, .08), 0 0 1.35rem rgba(40, 124, 255, .24); }
  .va-auth-icon svg { width: 1.8rem; height: 1.8rem; }
  .va-auth-form, .entry-form { gap: .8rem; }
  .va-auth-panel input { min-height: 3rem; font-size: 1rem; }
  .va-auth-submit, .va-auth-panel button:not(.va-password-toggle):not(.va-auth-link):not(.text-button) { min-height: 3.05rem; }
  .va-auth-divider { margin: .85rem 0 .45rem; }
  .va-auth-meta { margin-top: .55rem; padding-top: .65rem; }
  .va-auth-trust { margin-top: .65rem; padding: .62rem .68rem; font-size: .69rem; }
  .entry-help { margin-top: .8rem; }
}

@media (orientation: landscape) and (max-height: 520px) and (min-width: 641px) {
  body { overflow: auto; }
  .va-auth-stage { position: absolute; place-items: center; min-height: 100dvh; padding: max(.7rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) max(.7rem, env(safe-area-inset-bottom)) max(.7rem, env(safe-area-inset-left)); }
  .va-auth-shell { width: min(1040px, 100%); display: grid; grid-template-columns: minmax(230px, .8fr) minmax(430px, 1.2fr); gap: clamp(1rem, 3vw, 2.5rem); align-items: center; }
  .va-auth-brand { display: flex; margin: 0; }
  .va-auth-wordmark { width: min(100%, 470px); }
  .va-auth-brand p { margin-top: .55rem; font-size: clamp(.58rem, 1.2vw, .78rem); letter-spacing: .18em; }
  .va-auth-brand::after { width: 78%; margin-top: .45rem; }
  .va-auth-panel { width: 100%; padding: .85rem 1.25rem .75rem; border-radius: 1rem; }
  .va-auth-icon { width: 2.7rem; height: 2.7rem; margin-bottom: .5rem; box-shadow: 0 0 0 .4rem rgba(37, 106, 219, .07); }
  .va-auth-icon svg { width: 1.4rem; height: 1.4rem; }
  .va-auth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .va-auth-form .va-auth-submit { grid-column: 1 / -1; }
  .va-auth-form label { gap: .25rem; font-size: .78rem; }
  .va-auth-panel input { min-height: 2.75rem; padding-top: .55rem; padding-bottom: .55rem; }
  .va-auth-submit, .va-auth-panel button:not(.va-password-toggle):not(.va-auth-link):not(.text-button) { min-height: 2.75rem; padding: .5rem .75rem; }
  .va-auth-divider { margin: .45rem 0 .2rem; }
  .va-auth-link { min-height: 2.75rem; padding: .2rem .5rem; }
  .va-auth-secondary:not(:empty), .va-auth-meta { display: none; }
  .va-auth-trust { margin-top: .35rem; padding: .4rem .55rem; font-size: .62rem; line-height: 1.3; }
  .va-auth-trust p:last-child { display: none; }
  .va-auth-panel--verification .va-auth-icon, .entry-intro, .entry-help { display: none; }
  .entry-kicker { font-size: .62rem; }
  h1 { margin: .2rem 0 .3rem; font-size: 1.45rem; }
  .entry-followup { margin-top: .35rem; padding-top: .45rem; }
  .entry-followup > p { margin: .25rem 0; font-size: .78rem; }
  .onboarding-panel { margin-top: .35rem; padding: .55rem; gap: .45rem; }
  .onboarding-panel > p { font-size: .75rem; }
  #mfaChallengeForm { grid-template-columns: minmax(0, 1fr) minmax(10rem, .65fr); align-items: end; margin-top: .4rem; }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 640px) {
  .va-auth-stage {
    position: absolute;
    place-items: center;
    min-height: 100dvh;
    padding: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left));
    background: #020b18 var(--va-desktop-background) center / cover no-repeat;
  }
  .va-auth-shell { width: min(535px, 100%); }
  #accountSurface { padding: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); }
  .va-auth-brand { display: none; }
  .va-auth-panel { width: 100%; padding: .65rem 1rem .55rem; border-radius: .9rem; }
  .va-auth-panel--signin .va-auth-icon, .va-auth-panel--verification .va-auth-icon, .entry-intro, .entry-help { display: none; }
  .va-auth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .va-auth-form .va-auth-submit { grid-column: 1 / -1; }
  .va-auth-form label { gap: .2rem; font-size: .72rem; }
  .va-auth-panel input { min-height: 2.75rem; padding-top: .45rem; padding-bottom: .45rem; }
  .va-auth-submit, .va-auth-panel button:not(.va-password-toggle):not(.va-auth-link):not(.text-button) { min-height: 2.75rem; padding: .4rem .65rem; }
  .va-auth-divider { margin: .3rem 0 .05rem; }
  .va-auth-link { min-height: 2.75rem; padding: .15rem .45rem; }
  .va-auth-secondary:not(:empty), .va-auth-meta { display: none; }
  .va-auth-trust { margin-top: .25rem; padding: .32rem .48rem; font-size: .58rem; line-height: 1.25; }
  .va-auth-trust p:last-child { display: none; }
  .entry-kicker { font-size: .58rem; }
  h1 { margin: .1rem 0 .2rem; font-size: 1.25rem; }
  .entry-followup { margin-top: .2rem; padding-top: .3rem; }
  .entry-followup > h2 { margin-bottom: .2rem; font-size: .95rem; }
  .entry-followup > p { margin: .15rem 0; font-size: .7rem; }
  .onboarding-panel { margin-top: .25rem; padding: .4rem; gap: .3rem; }
  .onboarding-panel > p { font-size: .68rem; }
  #mfaChallengeForm { grid-template-columns: minmax(0, 1fr) minmax(9rem, .7fr); align-items: end; margin-top: .3rem; }
}

@media (forced-colors: active) {
  .va-auth-stage { position: relative; min-height: 100%; padding: 1.5rem; overflow: auto; background: Canvas; color: CanvasText; }
  .va-auth-stage::before, .va-auth-brand::after { display: none; }
  .va-auth-shell { display: flex; width: min(620px, 100%); }
  .va-auth-brand { display: flex; }
  .va-auth-wordmark { display: none; }
  .va-auth-brand p { margin: 0; color: CanvasText; }
  .va-auth-panel { width: 100%; padding: 1.5rem; border: 2px solid CanvasText; background: Canvas; color: CanvasText; box-shadow: none; backdrop-filter: none; }
  .va-auth-panel::before { display: none; }
  .va-auth-icon { border: 2px solid CanvasText; background: Canvas; box-shadow: none; }
  .va-auth-icon svg { stroke: CanvasText; filter: none; }
  .va-auth-panel label, .entry-intro, .entry-help, .entry-followup p, .va-auth-trust, .va-auth-trust strong, .va-auth-trust a, .va-auth-host { color: CanvasText; }
  .va-auth-trust { border: 2px solid CanvasText; background: Canvas; }
  .va-auth-panel input { border: 2px solid FieldText; background: Field; color: FieldText; forced-color-adjust: auto; }
  .va-auth-submit, .va-auth-panel button:not(.va-password-toggle):not(.va-auth-link):not(.text-button) { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; box-shadow: none; }
  .va-password-toggle, .va-auth-link, .text-button { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .va-auth-message { border: 2px solid CanvasText; background: Canvas; color: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
