:root {
  --navy-950: #03183d;
  --navy-900: #06265b;
  --navy-800: #0b377a;
  --blue-600: #1767d5;
  --blue-500: #2f7cf0;
  --red-500: #ef2b30;
  --yellow-400: #ffd33d;
  --ink: #10213d;
  --muted: #66738c;
  --line: #d9e2ef;
  --white: #ffffff;
  --shadow: 0 32px 90px rgba(0, 17, 55, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(47, 124, 240, 0.34), transparent 31rem),
    radial-gradient(circle at 92% 88%, rgba(239, 43, 48, 0.19), transparent 28rem),
    linear-gradient(145deg, #03183d 0%, #082c67 48%, #031a45 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

button,
input {
  font: inherit;
}

a {
  color: var(--blue-500);
}

a:hover {
  color: var(--yellow-400);
}

.page-shell {
  position: relative;
  width: min(1220px, calc(100% - 34px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 22px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 22px;
}

.portal {
  align-self: center;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 34px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.brand-panel {
  position: relative;
  overflow: hidden;
  padding: 36px clamp(30px, 5vw, 70px) 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(47, 124, 240, 0.13), transparent 26rem),
    linear-gradient(155deg, #ffffff 0%, #f6f9fe 57%, #edf4fc 100%);
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.brand-panel::before {
  width: 290px;
  height: 290px;
  left: -190px;
  top: -170px;
  border: 42px solid rgba(23, 103, 213, 0.08);
}

.brand-panel::after {
  width: 340px;
  height: 340px;
  right: -220px;
  bottom: -220px;
  border: 50px solid rgba(239, 43, 48, 0.07);
}

.logo-frame {
  position: relative;
  z-index: 1;
  width: min(520px, 94%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 24px 58px rgba(6, 38, 91, 0.12),
    inset 0 0 0 1px rgba(6, 38, 91, 0.06);
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-top: 24px;
}

.eyebrow,
.form-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--red-500);
}

.brand-copy h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(2.25rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.brand-copy p:last-child {
  max-width: 480px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.62;
}

.access-panel {
  position: relative;
  padding: clamp(34px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 110% -10%, rgba(47, 124, 240, 0.5), transparent 23rem),
    radial-gradient(circle at -10% 110%, rgba(239, 43, 48, 0.16), transparent 20rem),
    linear-gradient(155deg, var(--navy-950), var(--navy-800));
}

.access-panel::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -210px;
  bottom: -210px;
  border-radius: 50%;
  border: 44px solid rgba(255, 255, 255, 0.045);
}

.access-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
}

.form-kicker {
  color: var(--yellow-400);
}

.access-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 3vw, 3.1rem);
  letter-spacing: -0.045em;
}

.form-intro {
  margin: 10px 0 31px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

form {
  display: grid;
  gap: 10px;
}

label {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.89rem;
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  outline: none;
  box-shadow: 0 8px 18px rgba(0, 15, 49, 0.12);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: var(--yellow-400);
  box-shadow: 0 0 0 4px rgba(255, 211, 61, 0.2), 0 10px 22px rgba(0, 15, 49, 0.18);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 72px;
}

.show-password {
  position: absolute;
  top: 50%;
  right: 11px;
  transform: translateY(-50%);
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--blue-600);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

.show-password:hover,
.show-password:focus-visible {
  color: var(--navy-900);
  background: rgba(47, 124, 240, 0.1);
  outline: none;
}

.login-button {
  position: relative;
  min-height: 56px;
  margin-top: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: var(--navy-950);
  background: linear-gradient(135deg, #ffe167, var(--yellow-400));
  box-shadow: 0 16px 30px rgba(255, 211, 61, 0.2);
  font-weight: 880;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(255, 211, 61, 0.27);
  filter: saturate(1.08);
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

.login-button:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.52);
  outline-offset: 3px;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  border: 2px solid rgba(3, 24, 61, 0.28);
  border-top-color: var(--navy-950);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.login-button.is-loading .button-label {
  display: none;
}

.login-button.is-loading .button-spinner {
  display: block;
}

.login-message[hidden] {
  display: none;
}

.login-message {
  margin-top: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  color: #4b151b;
  background: #fff3f4;
  border: 1px solid #f7bfc4;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 15, 49, 0.15);
  animation: reveal 260ms ease both;
}

.message-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: var(--red-500);
  border-radius: 50%;
  font-weight: 900;
}

.login-message p {
  margin: 2px 0 0;
  line-height: 1.56;
}

.login-message a {
  color: var(--blue-600);
  font-weight: 880;
}

.login-message a:hover {
  color: var(--navy-900);
}

footer {
  min-height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.84rem;
}

footer a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  text-decoration: none;
}

footer a:hover {
  color: var(--yellow-400);
}

.footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red-500);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(760px, calc(100% - 24px));
    padding-top: 18px;
  }

  .portal {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .brand-panel {
    padding: 28px 24px 34px;
  }

  .logo-frame {
    width: min(430px, 88vw);
  }

  .brand-copy {
    margin-top: 18px;
  }

  .brand-copy p:last-child {
    margin-top: 13px;
  }

  .access-panel {
    padding: 46px 26px 52px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 16px, 500px);
    padding-top: 8px;
  }

  .portal {
    border-radius: 24px;
  }

  .brand-panel {
    padding: 18px 14px 28px;
  }

  .logo-frame {
    width: 100%;
    border-radius: 18px;
  }

  .brand-copy h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .brand-copy p:last-child {
    font-size: 0.94rem;
  }

  .access-panel {
    padding: 38px 20px 44px;
  }

  .access-card h2 {
    font-size: 2.35rem;
  }

  footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
