.portal-welcome {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1000px);
  grid-auto-rows: max-content;
  justify-content: center;
  align-content: safe center;
  padding: clamp(20px, 5vh, 60px) clamp(16px, 4vw, 48px);
  overflow-y: auto;
  background: radial-gradient(ellipse at 18% 22%, #e2eaf8, transparent 60%), #f5f7fb;
}
body:has(#portal-workspace-root:not([hidden])) .portal-welcome { display: none; }

.portal-welcome-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 486px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 28px;
  box-shadow: 0 26px 64px -32px #22365842;
}
.portal-welcome-brand {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 44px 20px;
  text-align: center;
  color: #fff;
  background: radial-gradient(ellipse at 48% 42%, #214c8d, transparent 68%),
    linear-gradient(144deg, #101e37 15%, #142b57 62%, #142757);
}
.portal-welcome-brand::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(#a4c5ff1a 1px, transparent 1px),
    linear-gradient(90deg, #a4c5ff1a 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000, transparent 72%);
}
.portal-welcome-brand h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 39px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.portal-welcome-signal {
  display: grid;
  place-items: center;
  position: relative;
  width: min(100%, 420px);
  height: 192px;
}
.portal-welcome-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mask-image: linear-gradient(90deg, transparent, #000 17%, #000 83%, transparent);
}
.portal-welcome-wave i {
  width: 3px;
  height: var(--bar-height, 14%);
  border-radius: 4px;
  background: linear-gradient(#65a4ff52, #a3dcff, #65a4ff52);
  box-shadow: 0 0 13px #80b8ff50;
}
.portal-welcome-wave i:nth-child(4n + 2) { --bar-height: 22%; }
.portal-welcome-wave i:nth-child(4n + 3) { --bar-height: 34%; }
.portal-welcome-wave i:nth-child(4n + 4) { --bar-height: 49%; }
.portal-welcome-wave i:nth-child(7n + 4) { --bar-height: 64%; }
.portal-welcome-phone {
  display: grid;
  place-items: center;
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid #aecfff92;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, #2a5799, #16335f);
  box-shadow: 0 0 0 14px #9dc6ff23, 0 0 0 30px #9dc6ff10, 0 10px 40px #0c1a3855;
}
.portal-welcome-phone img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 5px 12px #08163566);
}

.portal-welcome .admin-login-card {
  align-self: center;
  justify-self: center;
  width: min(100%, 410px);
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.portal-welcome .auth-form-body { padding: 34px clamp(24px, 4vw, 40px); }
.portal-welcome .admin-login-heading {
  margin-bottom: 16px;
  font-size: 21px;
  text-align: center;
}
.portal-welcome .admin-login-fields label { background: #f8f8fa; border-color: #dedee4; }
.portal-welcome .admin-login-fields label:focus-within { background: #fff; border-color: #0071e3; box-shadow: 0 0 0 2px #0071e317; }
.portal-welcome .admin-login-button { background: #006edb; box-shadow: none; }
.portal-welcome .admin-login-button:hover { background: #005bbb; }
.portal-welcome button:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }

@media (max-width: 680px) {
  .portal-welcome { grid-template-columns: minmax(0, 440px); }
  .portal-welcome-frame { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .portal-welcome-brand { gap: 6px; padding: 14px 20px 24px; }
  .portal-welcome-brand h1 { font-size: clamp(24px, 7vw, 31px); }
  .portal-welcome-signal { height: 118px; }
  .portal-welcome-phone { width: 74px; box-shadow: 0 0 0 9px #9dc6ff23, 0 0 0 17px #9dc6ff10; }
  .portal-welcome-phone img { width: 46px; height: 46px; }
  .portal-welcome .auth-form-body { padding: 26px 24px; }
}

.portal-auth-links { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.portal-auth-links button { min-height: 44px; border: 0; padding: 0 8px; background: none; color: #0068cf; font-size: 13px; cursor: pointer; }
.portal-auth-links button:hover { text-decoration: underline; }
.portal-auth-notice { margin: 14px 0 0; color: #51515a; font-size: 12px; line-height: 1.6; }
.portal-code-row { display: flex; gap: 8px; min-width: 0; }
.portal-code-row label { flex: 1; min-width: 0; }
.portal-code-row > button { width: 100px; flex-shrink: 0; border: 0; background: #ebf3ff; color: #006edb; border-radius: 12px; font-size: 12px; }
