#login-screen {
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  overflow: hidden;
  background: #f3f6f8;
}

#login-screen .login-visual {
  order: 1;
  isolation: isolate;
  min-height: 100vh;
  padding: 30px 42px 26px;
  background-color: #0a1b28;
  background-image: linear-gradient(145deg, #0a1b28 0%, #102b39 58%, #0b202d 100%);
}

#login-screen .login-visual::before {
  z-index: -1;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  opacity: .34;
  background-image: linear-gradient(rgba(135, 190, 194, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(135, 190, 194, .07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(115deg, #000 0%, transparent 72%);
}

#login-screen .login-visual::after {
  z-index: -1;
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(73, 201, 188, .8) 30%, rgba(232, 160, 92, .68) 73%, transparent);
  opacity: .68;
}

#login-screen .visual-topline,
#login-screen .visual-bottomline {
  z-index: 6;
  align-items: center;
  color: rgba(224, 239, 240, .58);
  font-size: 10px;
  line-height: 1.4;
}

#login-screen .visual-brandline,
#login-screen .visual-edition {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#login-screen .visual-brandline b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(157, 215, 213, .4);
  border-radius: 7px;
  color: #e7f4f3;
  background: rgba(31, 86, 94, .52);
  font-size: 11px;
  font-weight: 800;
}

#login-screen .visual-brandline span {
  color: rgba(239, 247, 246, .82);
  font-size: 10px;
  font-weight: 700;
}

#login-screen .visual-edition {
  gap: 8px;
  font-size: 9px;
}

#login-screen .visual-edition i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e4ab72;
  box-shadow: 0 0 0 4px rgba(228, 171, 114, .12);
}

#login-screen .login-visual-copy {
  position: absolute;
  z-index: 5;
  top: 29%;
  left: 7.2%;
  width: 31%;
  max-width: 300px;
}

#login-screen .visual-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #8bd2cb;
  font-size: 10px;
  font-weight: 800;
}

#login-screen .visual-kicker::before {
  width: 23px;
  height: 1px;
  background: #d39a61;
  content: "";
}

#login-screen .login-visual-copy h2 {
  margin: 0;
  color: #f3f8f8;
  font-size: 35px;
  font-weight: 680;
  line-height: 1.36;
  letter-spacing: 0;
}

#login-screen .login-visual-copy h2 em {
  color: #83d4ca;
  font-style: normal;
}

#login-screen .login-visual-copy > p:not(.visual-kicker) {
  max-width: 290px;
  margin: 18px 0 23px;
  color: rgba(223, 237, 238, .65);
  font-size: 13px;
  line-height: 1.85;
}

#login-screen .visual-workflow {
  display: grid;
  gap: 11px;
}

#login-screen .visual-workflow span {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(233, 243, 243, .78);
  font-size: 11px;
  font-weight: 600;
}

#login-screen .visual-workflow b {
  color: #dba876;
  font-size: 9px;
  font-weight: 750;
}

#login-screen .signal-graphic {
  position: absolute;
  z-index: 1;
  inset: 10% 0 9% 29%;
  min-height: 0;
  overflow: visible;
}

#login-screen .signal-grid {
  inset: 3% 1%;
  opacity: .32;
  background-image:
    radial-gradient(ellipse at 57% 48%, rgba(72, 196, 185, .12), transparent 58%),
    linear-gradient(rgba(135, 205, 202, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 205, 202, .07) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  mask-image: radial-gradient(ellipse at 58% 50%, #000 12%, rgba(0, 0, 0, .7) 52%, transparent 78%);
}

#login-screen .signal-grid::before {
  position: absolute;
  inset: 16% 16% 13% 18%;
  border: 1px solid rgba(121, 210, 204, .14);
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(139, 218, 211, .07) 18px, transparent 19px),
    radial-gradient(ellipse at center, rgba(74, 174, 172, .07), transparent 68%);
  box-shadow: inset 0 0 42px rgba(52, 171, 166, .08), 0 0 32px rgba(52, 171, 166, .05);
  content: "";
  pointer-events: none;
}

#login-screen .signal-ring {
  border: 1px dashed rgba(131, 205, 201, .2);
  box-shadow: 0 0 25px rgba(76, 194, 186, .035);
  pointer-events: none;
}

#login-screen .signal-ring::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(190, 255, 241, .98) 0 2px, rgba(85, 222, 205, .45) 3px, transparent 6px);
  content: "";
  filter: drop-shadow(0 0 5px rgba(96, 235, 218, .8));
  animation: login-orbit-glint 22s linear infinite;
}

#login-screen .ring-one {
  width: min(84%, 520px);
  height: auto;
  aspect-ratio: 1;
}

#login-screen .ring-two {
  width: min(58%, 360px);
  height: auto;
  aspect-ratio: 1;
  border-color: rgba(216, 171, 119, .25);
}

#login-screen .ring-two::after {
  background: radial-gradient(circle at 50% 0%, rgba(255, 222, 174, .9) 0 2px, rgba(224, 177, 122, .36) 3px, transparent 6px);
  filter: drop-shadow(0 0 5px rgba(227, 175, 112, .62));
  animation-duration: 17s;
}

#login-screen .ring-three {
  width: min(29%, 180px);
  height: auto;
  aspect-ratio: 1;
  border-color: rgba(202, 231, 229, .18);
}

#login-screen .ring-three::after {
  opacity: .7;
  animation-duration: 13s;
}

#login-screen .signal-core {
  position: relative;
  isolation: isolate;
  width: 94px;
  height: 94px;
  background: radial-gradient(circle at 36% 30%, #54c5bb, #238984 68%, #17646c);
  box-shadow: 0 0 0 10px rgba(56, 169, 163, .1), 0 0 34px rgba(63, 192, 181, .28), 0 0 78px rgba(63, 192, 181, .16);
  transform-origin: center;
  animation: login-core-heartbeat 2.2s ease-in-out infinite;
}

#login-screen .signal-core::before {
  position: absolute;
  z-index: -1;
  inset: -13px;
  border: 1px solid rgba(135, 240, 223, .48);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(95, 232, 213, .27), inset 0 0 18px rgba(95, 232, 213, .12);
  content: "";
  animation: login-core-aura 3.6s ease-in-out infinite;
  pointer-events: none;
}

#login-screen .signal-core img {
  width: 76px;
  height: 76px;
  filter: drop-shadow(0 0 7px rgba(222, 255, 249, .72));
}

#login-screen .signal-scan {
  position: absolute;
  z-index: 2;
  top: 4%;
  left: 8%;
  width: 84%;
  height: 1px;
  opacity: .5;
  background: linear-gradient(90deg, transparent, rgba(116, 222, 211, .9), rgba(227, 174, 119, .58), transparent);
  box-shadow: 0 0 14px rgba(79, 201, 190, .34);
  animation: login-signal-scan 12s linear infinite;
  pointer-events: none;
}

#login-screen .signal-trace {
  position: absolute;
  z-index: 1;
  width: 18%;
  height: 13%;
  opacity: .48;
  border-top: 1px solid rgba(122, 196, 192, .52);
  border-right: 1px solid rgba(122, 196, 192, .3);
  border-radius: 0 18px 0 0;
  pointer-events: none;
}

#login-screen .trace-one { top: 27%; left: 13%; }
#login-screen .trace-two { right: 12%; bottom: 25%; transform: rotate(180deg); }

#login-screen .signal-label {
  z-index: 3;
  color: rgba(211, 232, 231, .66);
  font-size: 9px;
}

#login-screen .signal-node {
  z-index: 4;
  color: rgba(227, 240, 239, .78);
  font-size: 9px;
}

#login-screen .signal-metric {
  z-index: 5;
  min-width: 100px;
  padding: 11px 13px;
  border-color: rgba(160, 214, 211, .25);
  border-radius: 7px;
  background: rgba(11, 35, 48, .88);
  box-shadow: 0 16px 35px rgba(0, 0, 0, .2);
}

#login-screen .signal-metric b { font-size: 17px; }
#login-screen .signal-metric small { color: rgba(223, 239, 238, .68); font-size: 10px; }
#login-screen .metric-one { top: 13%; right: 6%; }
#login-screen .metric-two { right: 6%; bottom: 12%; left: auto; animation-delay: -2.5s; }

#login-screen .model-orbit {
  z-index: 4;
  border-color: rgba(181, 224, 218, .17);
  background: rgba(10, 32, 44, .52);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#login-screen .model-orbit img {
  border-radius: 50%;
  background: rgba(248, 252, 251, .94);
  box-shadow: 0 0 0 1px rgba(194, 237, 229, .36), 0 0 12px rgba(100, 216, 201, .16);
}

#login-screen .visual-bottomline {
  color: rgba(208, 228, 228, .54);
  font-size: 9px;
}

#login-screen .login-panel {
  order: 2;
  position: relative;
  align-items: center;
  min-width: 0;
  min-height: 100vh;
  padding: 60px 52px 112px;
  border-left: 1px solid #e5ebee;
  background: #f5f7f9;
}

#login-screen .login-panel > * {
  width: min(100%, 438px);
}

#login-screen .brand-mark {
  gap: 13px;
  color: #152b3c;
  font-size: 16px;
  font-weight: 760;
}

#login-screen .brand-mark img {
  width: 44px;
  height: 44px;
  border: 1px solid #e5ebee;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(20, 47, 61, .08);
}

#login-screen .eyebrow {
  margin-top: 37px;
  color: #4b8f8d;
  font-size: 10px;
  font-weight: 800;
}

#login-screen .login-panel h1 {
  margin: 13px 0 0;
  color: #152b3c;
  font-size: 37px;
  font-weight: 720;
  line-height: 1.28;
  letter-spacing: 0;
}

#login-screen .login-panel h1 em {
  color: #258d89;
  font-style: normal;
}

#login-screen .login-subtitle {
  margin: 12px 0 0;
  color: #71808b;
  font-size: 13px;
  line-height: 1.65;
}

#login-screen .auth-mode-switch {
  width: 100%;
  gap: 3px;
  margin: 24px 0 17px;
  padding: 4px;
  border-color: #e1e8eb;
  border-radius: 7px;
  background: #eaf0f2;
}

#login-screen .auth-mode-switch button {
  min-height: 39px;
  color: #6a7a85;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 680;
}

#login-screen .auth-mode-switch button.active {
  color: #173449;
  background: #fff;
  box-shadow: 0 1px 4px rgba(24, 50, 64, .12);
}

#login-screen .auth-sms-note {
  margin: -3px 0 14px;
  color: #536d79;
  font-size: 12px;
}

#login-screen .auth-mode-switch,
#login-screen .auth-sms-note,
#login-screen .stack-form,
#login-screen .auth-login-links {
  width: min(100%, 380px);
  max-width: 380px;
}

#login-screen .stack-form {
  gap: 15px;
}

#login-screen .stack-form label {
  gap: 7px;
  color: #405463;
  font-size: 12px;
  font-weight: 700;
}

#login-screen .stack-form input {
  min-width: 0;
  min-height: 49px;
  padding: 0 14px;
  border-color: #d8e1e5;
  border-radius: 6px;
  color: #1a3343;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15, 36, 48, .025);
}

#login-screen .stack-form input::placeholder { color: #9aa8b0; }

#login-screen .stack-form input:focus {
  border-color: #4ba9a3;
  box-shadow: 0 0 0 3px rgba(56, 169, 163, .13);
}

#login-screen .auth-code-row { grid-template-columns: minmax(0, 1fr) 124px; gap: 9px; }

#login-screen .auth-code-button {
  min-width: 0;
  min-height: 49px;
  padding: 0 10px;
  border: 1px solid #d0e7e5;
  border-radius: 6px;
  color: #287c79;
  background: #edf7f6;
  font-size: 12px;
}

#login-screen .primary-button.wide {
  min-height: 49px;
  margin-top: 4px;
  padding: 0 16px;
  border: 1px solid #123448;
  border-radius: 6px;
  color: #fff;
  background: #153a4d;
  box-shadow: 0 5px 13px rgba(21, 58, 77, .13);
  font-size: 14px;
  font-weight: 720;
}

#login-screen .primary-button.wide:hover {
  transform: translateY(-1px);
  background: #1c4d5c;
  box-shadow: 0 8px 18px rgba(21, 58, 77, .18);
}

#login-screen .button-arrow { color: #9de0d7; font-size: 20px; }

#login-screen .auth-login-links {
  margin-top: 5px;
}

#login-screen .text-button {
  padding: 7px 0;
  color: #317f7d;
  font-size: 12px;
}

#login-screen .text-button:hover { color: #174d5a; }

#login-screen .auth-form-title {
  color: #173449;
  font-size: 16px;
}

#login-screen .login-trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid #e1e8eb;
  color: #72818b;
  font-size: 10px;
}

#login-screen .login-trustline span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#login-screen .login-trustline i {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  color: #287c79;
  background: #dfefed;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

#login-screen .login-copyright {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  bottom: 20px;
  left: 50%;
  width: max-content !important;
  max-width: calc(100% - 40px);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  color: #9ba7ad;
  font-size: 9px;
  line-height: 1.5;
}

#login-screen .login-copyright a {
  color: inherit;
  text-decoration: none;
}

#login-screen .login-copyright a:hover,
#login-screen .login-copyright a:focus-visible {
  color: #287c79;
  text-decoration: underline;
}

@keyframes login-signal-scan {
  0% { top: 4%; opacity: 0; }
  12% { opacity: .55; }
  88% { opacity: .4; }
  100% { top: 96%; opacity: 0; }
}

@keyframes login-core-heartbeat {
  0%, 18%, 100% { transform: scale(1); }
  6% { transform: scale(1.06); }
  11% { transform: scale(1.015); }
  15% { transform: scale(1.045); }
}

@keyframes login-core-aura {
  0%, 100% { opacity: .48; transform: scale(.97); }
  50% { opacity: .9; transform: scale(1.035); }
}

@keyframes login-orbit-glint {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1250px) and (min-width: 901px) {
  #login-screen .login-visual { padding-right: 28px; padding-left: 32px; }
  #login-screen .login-visual-copy { left: 6.5%; width: 33%; }
  #login-screen .login-visual-copy h2 { font-size: 30px; }
  #login-screen .login-visual-copy > p:not(.visual-kicker) { font-size: 12px; }
  #login-screen .signal-graphic { left: 31%; }
  #login-screen .login-panel { padding-right: 36px; padding-left: 36px; }
  #login-screen .login-panel h1 { font-size: 34px; }
}

@media (max-width: 900px) {
  #login-screen {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
  }

  #login-screen .login-visual {
    order: 1;
    display: flex;
    flex: 0 0 244px;
    min-height: 244px;
    padding: 17px 23px;
  }

  #login-screen .visual-brandline b { width: 29px; height: 29px; }
  #login-screen .visual-brandline span { font-size: 9px; }
  #login-screen .visual-edition { font-size: 9px; }

  #login-screen .login-visual-copy {
    top: 72px;
    left: 25px;
    width: 52%;
  }

  #login-screen .visual-kicker { margin-bottom: 8px; font-size: 8px; }
  #login-screen .login-visual-copy h2 { font-size: 24px; line-height: 1.3; }
  #login-screen .login-visual-copy > p:not(.visual-kicker),
  #login-screen .visual-workflow,
  #login-screen .visual-bottomline { display: none; }

  #login-screen .signal-graphic { inset: 0 0 0 35%; }
  #login-screen .signal-ring.ring-one { width: min(85%, 230px); }
  #login-screen .signal-ring.ring-two { width: min(59%, 160px); }
  #login-screen .signal-ring.ring-three { width: min(29%, 82px); }
  #login-screen .signal-core { width: 58px; height: 58px; box-shadow: 0 0 0 8px rgba(56, 169, 163, .12), 0 0 24px rgba(63, 192, 181, .24), 0 0 44px rgba(63, 192, 181, .12); }
  #login-screen .signal-core::before { inset: -9px; }
  #login-screen .signal-core img { width: 47px; height: 47px; padding: 3px; }
  #login-screen .model-orbit { width: 31px; height: 31px; justify-content: center; padding: 3px; }
  #login-screen .model-orbit img { width: 23px !important; height: 23px !important; padding: 3px; border-radius: 6px; }
  #login-screen .model-orbit span,
  #login-screen .signal-label,
  #login-screen .signal-node,
  #login-screen .signal-metric,
  #login-screen .signal-trace { display: none; }
  #login-screen .login-visual .model-orbit { offset-path: ellipse(28% 27% at 53% 50%); }
  #login-screen .login-visual .orbit-four,
  #login-screen .login-visual .orbit-seven,
  #login-screen .login-visual .orbit-eight { offset-path: ellipse(20% 19% at 53% 50%); }

  #login-screen .login-panel {
    order: 2;
    flex: 1 0 auto;
    align-self: stretch;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    min-width: 0;
    min-height: calc(100vh - 244px);
    min-height: calc(100svh - 244px);
    padding: 18px 25px 112px;
    border: 0;
    background: #f5f7f9;
  }

  #login-screen .login-copyright { bottom: 18px; }

  #login-screen .login-panel > * { width: min(calc(100vw - 64px), 438px) !important; max-width: 438px; }
  #login-screen .brand-mark img { width: 40px; height: 40px; }
  #login-screen .eyebrow { margin-top: 27px; }
  #login-screen .login-panel h1 { margin-top: 10px; font-size: 31px; }
  #login-screen .login-subtitle { margin-top: 8px; }
  #login-screen .auth-mode-switch { margin-top: 19px; }
  #login-screen .login-trustline { margin-top: 20px; }
}

@media (max-width: 520px) {
  #login-screen .login-visual { flex-basis: 226px; min-height: 226px; padding: 14px 17px; }
  #login-screen .visual-topline { font-size: 8px; }
  #login-screen .visual-brandline { gap: 7px; }
  #login-screen .visual-brandline b { width: 27px; height: 27px; font-size: 9px; }
  #login-screen .visual-brandline span { font-size: 8px; }
  #login-screen .visual-edition { gap: 6px; font-size: 7px; }
  #login-screen .visual-edition i { width: 5px; height: 5px; }
  #login-screen .login-visual-copy { top: 66px; left: 19px; width: 55%; }
  #login-screen .login-visual-copy h2 { font-size: 22px; }
  #login-screen .visual-kicker { font-size: 7px; }
  #login-screen .signal-graphic { inset: 0 -5% 0 37%; }
  #login-screen .login-visual .model-orbit { offset-path: ellipse(25% 24% at 52% 50%); }
  #login-screen .login-visual .orbit-four,
  #login-screen .login-visual .orbit-seven,
  #login-screen .login-visual .orbit-eight { offset-path: ellipse(18% 17% at 52% 50%); }
  #login-screen .login-panel { min-height: calc(100vh - 226px); min-height: calc(100svh - 226px); padding: 15px 20px 112px; }
  #login-screen .login-panel > * { width: min(calc(100vw - 48px), 438px) !important; max-width: 438px; }
  #login-screen .login-copyright {
    right: 20px;
    bottom: 12px;
    left: 20px;
    display: flex;
    width: auto !important;
    max-width: none;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transform: none;
  }
  #login-screen .brand-mark { font-size: 15px; }
  #login-screen .brand-mark img { width: 38px; height: 38px; }
  #login-screen .eyebrow { margin-top: 23px; }
  #login-screen .login-panel h1 { font-size: 29px; }
  #login-screen .login-subtitle { font-size: 12px; }
  #login-screen .stack-form { gap: 13px; }
  #login-screen .auth-code-row { grid-template-columns: minmax(0, 1fr) 112px; gap: 7px; }
  #login-screen .auth-code-button { padding: 0 6px; font-size: 11px; }
  #login-screen .login-trustline { gap: 9px 13px; font-size: 9px; }
}

/* Improve small login-page copy while keeping the existing two-panel layout. */
#login-screen .visual-topline,
#login-screen .visual-bottomline { color: rgba(224, 239, 240, .72); font-size: 11px; }
#login-screen .visual-brandline span { font-size: 11px; }
#login-screen .visual-edition { font-size: 10px; }
#login-screen .visual-kicker { font-size: 12px; }
#login-screen .login-visual-copy > p:not(.visual-kicker) { color: rgba(223, 237, 238, .76); font-size: 15px; }
#login-screen .visual-workflow span { color: rgba(233, 243, 243, .88); font-size: 13px; }
#login-screen .visual-workflow b { font-size: 11px; }
#login-screen .signal-label { color: rgba(211, 232, 231, .8); font-size: 11px; }
#login-screen .signal-node { color: rgba(227, 240, 239, .9); font-size: 11px; }
#login-screen .signal-metric small { color: rgba(223, 239, 238, .78); font-size: 12px; }
#login-screen .model-orbit { font-size: 12px; }
#login-screen .brand-mark { font-size: 17px; }
#login-screen .eyebrow { font-size: 12px; }
#login-screen .login-subtitle { color: #657783; font-size: 15px; }
#login-screen .auth-mode-switch button { font-size: 14px; }
#login-screen .auth-sms-note { font-size: 14px; }
#login-screen .stack-form label { font-size: 14px; }
#login-screen .stack-form input { font-size: 16px; }
#login-screen .auth-code-button { font-size: 14px; }
#login-screen .primary-button.wide { font-size: 16px; }
#login-screen .text-button { font-size: 14px; }
#login-screen .auth-form-title { font-size: 18px; }
#login-screen .login-trustline { color: #637580; font-size: 12px; }
#login-screen .login-trustline i { width: 17px; height: 17px; font-size: 10px; }
#login-screen .login-copyright { color: #7b8992; font-size: 10px; }

@media (max-width: 900px) {
  #login-screen .visual-topline { font-size: 10px; }
  #login-screen .visual-brandline span { font-size: 10px; }
  #login-screen .visual-edition { font-size: 9px; }
  #login-screen .visual-kicker { font-size: 10px; }
  #login-screen .login-visual-copy h2 { font-size: 25px; }
}

@media (max-width: 520px) {
  #login-screen .visual-topline { font-size: 9px; }
  #login-screen .visual-brandline span { font-size: 9px; }
  #login-screen .visual-edition { font-size: 8px; }
  #login-screen .visual-kicker { font-size: 9px; }
  #login-screen .login-visual-copy h2 { font-size: 24px; }
  #login-screen .brand-mark { font-size: 16px; }
  #login-screen .login-subtitle { font-size: 13px; }
  #login-screen .auth-code-button { font-size: 13px; }
  #login-screen .login-trustline { gap: 9px 13px; font-size: 11px; }
}

/* Keep the login canvas fixed while longer auth forms use a compact panel. */
#login-screen {
  height: 100vh;
  height: 100svh;
  min-height: 0;
}

#login-screen .login-visual,
#login-screen .login-panel {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  box-sizing: border-box;
}

#login-screen .login-panel {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(75, 128, 136, .34) transparent;
  scrollbar-width: thin;
}

#login-screen .login-panel::-webkit-scrollbar { width: 6px; }
#login-screen .login-panel::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(75, 128, 136, .28); }

#login-screen:has(#register-form:not(.hidden)) .login-panel,
#login-screen:has(#forgot-password-form:not(.hidden)) .login-panel {
  justify-content: flex-start;
  padding: clamp(16px, 4svh, 36px) 52px 20px;
}

#login-screen:has(#register-form:not(.hidden)) .login-subtitle,
#login-screen:has(#forgot-password-form:not(.hidden)) .login-subtitle,
#login-screen:has(#register-form:not(.hidden)) .login-trustline,
#login-screen:has(#forgot-password-form:not(.hidden)) .login-trustline {
  display: none;
}

#login-screen:has(#register-form:not(.hidden)) .brand-mark,
#login-screen:has(#forgot-password-form:not(.hidden)) .brand-mark {
  gap: 10px;
  font-size: 15px;
}

#login-screen:has(#register-form:not(.hidden)) .brand-mark img,
#login-screen:has(#forgot-password-form:not(.hidden)) .brand-mark img {
  width: 36px;
  height: 36px;
}

#login-screen:has(#register-form:not(.hidden)) .eyebrow,
#login-screen:has(#forgot-password-form:not(.hidden)) .eyebrow {
  margin-top: 10px;
  font-size: 11px;
}

#login-screen:has(#register-form:not(.hidden)) .login-panel h1,
#login-screen:has(#forgot-password-form:not(.hidden)) .login-panel h1 {
  margin: 5px 0 12px;
  font-size: clamp(24px, 3.5svh, 32px);
  line-height: 1.12;
}

#login-screen:has(#register-form:not(.hidden)) .stack-form,
#login-screen:has(#forgot-password-form:not(.hidden)) .stack-form {
  gap: clamp(8px, 1.1svh, 11px);
}

#login-screen:has(#register-form:not(.hidden)) .stack-form label,
#login-screen:has(#forgot-password-form:not(.hidden)) .stack-form label {
  gap: 4px;
  font-size: clamp(12px, 1.45svh, 13px);
}

#login-screen:has(#register-form:not(.hidden)) .stack-form input,
#login-screen:has(#forgot-password-form:not(.hidden)) .stack-form input {
  min-height: clamp(40px, 5svh, 46px);
  padding-right: 12px;
  padding-left: 12px;
  font-size: clamp(13px, 1.6svh, 15px);
}

#login-screen:has(#register-form:not(.hidden)) .auth-code-button,
#login-screen:has(#forgot-password-form:not(.hidden)) .auth-code-button,
#login-screen:has(#register-form:not(.hidden)) .primary-button.wide,
#login-screen:has(#forgot-password-form:not(.hidden)) .primary-button.wide {
  min-height: clamp(40px, 5svh, 46px);
}

#login-screen:has(#register-form:not(.hidden)) .text-button,
#login-screen:has(#forgot-password-form:not(.hidden)) .text-button {
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 13px;
}

#login-screen:has(#register-form:not(.hidden)) .login-copyright,
#login-screen:has(#forgot-password-form:not(.hidden)) .login-copyright {
  position: static;
  width: min(100%, 380px) !important;
  max-width: 380px;
  margin: 12px auto 0;
  padding-bottom: 12px;
  transform: none;
}

@media (max-width: 900px) {
  #login-screen {
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  #login-screen .login-visual {
    flex: 0 0 clamp(226px, 30svh, 244px);
    height: auto;
    min-height: 0;
  }

  #login-screen .login-panel {
    height: auto;
    min-height: 0;
    flex: 1 1 0%;
    max-height: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 18px;
    scroll-padding-block: 16px;
  }

  #login-screen:has(#register-form:not(.hidden)) .login-panel,
  #login-screen:has(#forgot-password-form:not(.hidden)) .login-panel {
    padding: clamp(12px, 2svh, 24px) 25px 16px;
  }
}

@media (max-width: 520px) {
  #login-screen .login-visual { flex-basis: 226px; min-height: 0; }

  #login-screen:has(#register-form:not(.hidden)) .login-panel,
  #login-screen:has(#forgot-password-form:not(.hidden)) .login-panel {
    padding: clamp(10px, 1.8svh, 17px) 20px 14px;
  }

  #login-screen:has(#register-form:not(.hidden)) .brand-mark,
  #login-screen:has(#forgot-password-form:not(.hidden)) .brand-mark,
  #login-screen:has(#register-form:not(.hidden)) .eyebrow,
  #login-screen:has(#forgot-password-form:not(.hidden)) .eyebrow {
    display: none;
  }

  #login-screen:has(#register-form:not(.hidden)) .login-panel h1,
  #login-screen:has(#forgot-password-form:not(.hidden)) .login-panel h1 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3.1svh, 26px);
  }

  #login-screen:has(#register-form:not(.hidden)) .stack-form,
  #login-screen:has(#forgot-password-form:not(.hidden)) .stack-form {
    gap: clamp(7px, .9svh, 9px);
  }

  #login-screen:has(#register-form:not(.hidden)) .stack-form label,
  #login-screen:has(#forgot-password-form:not(.hidden)) .stack-form label {
    gap: 3px;
    font-size: 12px;
  }

  #login-screen:has(#register-form:not(.hidden)) .stack-form input,
  #login-screen:has(#forgot-password-form:not(.hidden)) .stack-form input,
  #login-screen:has(#register-form:not(.hidden)) .auth-code-button,
  #login-screen:has(#forgot-password-form:not(.hidden)) .auth-code-button,
  #login-screen:has(#register-form:not(.hidden)) .primary-button.wide,
  #login-screen:has(#forgot-password-form:not(.hidden)) .primary-button.wide {
    min-height: clamp(38px, 4.6svh, 41px);
  }

  #login-screen:has(#register-form:not(.hidden)) .stack-form input,
  #login-screen:has(#forgot-password-form:not(.hidden)) .stack-form input {
    font-size: 13px;
  }

  #login-screen:has(#register-form:not(.hidden)) .text-button,
  #login-screen:has(#forgot-password-form:not(.hidden)) .text-button {
    padding-top: 2px;
    padding-bottom: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #login-screen .signal-scan { animation: none; }
  #login-screen .signal-core,
  #login-screen .signal-core::before,
  #login-screen .signal-ring::after { animation: none; }
  #login-screen .signal-node,
  #login-screen .signal-metric,
  #login-screen .signal-particle { animation: none; }
}
