:root {
  --navy-950: #031630;
  --navy-900: #061d3d;
  --navy-800: #0a2a52;
  --ink: #071c3a;
  --muted: #61718a;
  --line: #cad3df;
  --paper: #ffffff;
  --canvas: #f7f9fc;
  --accent: #9d1535;
  --accent-dark: #820f2b;
  --cyan: #70d7ff;
  --shadow: 0 18px 45px rgba(14, 30, 55, 0.14), 0 4px 12px rgba(14, 30, 55, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--navy-950);
}
button, input { font: inherit; }
a { color: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 78px;
  overflow: hidden;
}

.login-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(560px, 55%) minmax(500px, 45%);
}

/*
 * The left side is one continuous background image. All copy, logos,
 * network paths, and icons are separate HTML/SVG layers above it.
 */
.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 720px;
  color: #f8fbff;
  background-image: url("assets/hero-background.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Dark/readability layer over the full image—not a separate top block. */
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 15, 36, .88) 0%, rgba(2, 20, 46, .67) 47%, rgba(2, 24, 51, .28) 100%),
    linear-gradient(180deg, rgba(2, 17, 40, .50) 0%, rgba(2, 17, 40, .08) 45%, rgba(1, 13, 31, .42) 100%);
}

/* Fine technical texture above the picture, below all content. */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  background-image: radial-gradient(rgba(112, 215, 255, .55) 0.8px, transparent 0.8px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.68) 62%, transparent 100%);
}

.brand {
  position: absolute;
  z-index: 5;
  top: 28px;
  left: 38px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.brand img { width: 58px; height: 58px; }

.hero-copy {
  position: absolute;
  z-index: 5;
  top: 22%;
  left: 9.5%;
  width: min(720px, calc(100% - 70px));
}
.hero-copy .hero-title {
  margin: 0;
  font-size: clamp(43px, 3.7vw, 59px);
  line-height: 1.04;
  letter-spacing: -.046em;
  font-weight: 790;
  white-space: nowrap;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .34);
}
.hero-copy .hero-title span { display: inline; }
.hero-copy .hero-title span::after {
  content: ".";
  color: #df1748;
}
.hero-copy .accent-rule {
  width: 90px;
  height: 4px;
  margin: 28px 0 24px;
  border-radius: 999px;
  background: #d01843;
  box-shadow: 0 0 16px rgba(208, 24, 67, .25);
}
.hero-copy p {
  margin: 0;
  max-width: 390px;
  color: rgba(242, 247, 255, .90);
  font-size: 20px;
  line-height: 1.52;
  letter-spacing: -.015em;
  text-shadow: 0 2px 13px rgba(0, 0, 0, .55);
}

.hero-partners {
  position: absolute;
  z-index: 5;
  left: 38px;
  bottom: 34px;
  width: fit-content;
  max-width: min(500px, calc(100% - 76px));
  padding: 14px 17px 15px;
  border: 1px solid rgba(230, 239, 250, .44);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(250, 252, 255, .93), rgba(235, 243, 251, .87));
  box-shadow: 0 18px 40px rgba(0, 10, 28, .32);
  backdrop-filter: blur(12px);
}
.partners-kicker {
  display: block;
  margin-bottom: 9px;
  color: #536781;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.partners-logos {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.partner { display: flex; align-items: center; min-width: 0; }
.partner-uofm { flex: 0 0 auto; }
.partner-uofm img {
  display: block;
  width: auto;
  max-width: 230px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}
.partners-divider {
  align-self: stretch;
  width: 1px;
  min-height: 48px;
  background: rgba(70, 91, 119, .24);
}
.partner-usdot { flex: 0 0 auto; gap: 9px; }
.partner-usdot img { display: block; width: 48px; height: 48px; flex: 0 0 48px; }
.partner-usdot span { color: #233d61; font-size: 10px; font-weight: 760; line-height: 1.25; }

.login-panel {
  position: relative;
  min-height: 720px;
  display: grid;
  place-items: center;
  padding: 42px 40px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 26%, rgba(205, 216, 232, .2), transparent 30%),
    linear-gradient(135deg, #fbfcfe 0%, #f5f7fa 100%);
}
.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .48;
  background-image: radial-gradient(#cbd3de 0.75px, transparent 0.75px);
  background-size: 8px 8px;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 38%, #000 100%);
}
.login-panel::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -250px;
  bottom: -135px;
  border: 1px solid rgba(119, 135, 156, .16);
  border-radius: 48% 52% 58% 42%;
  box-shadow:
    -28px -25px 0 1px rgba(119, 135, 156, .10),
    -54px -50px 0 1px rgba(119, 135, 156, .08),
    -80px -75px 0 1px rgba(119, 135, 156, .06);
  transform: rotate(-18deg);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 480px);
  min-height: 700px;
  padding: 31px 42px 28px;
  border: 1px solid rgba(171, 183, 199, .52);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow);
}
.login-mark { display: block; width: 112px; height: 112px; margin: 0 auto 7px; }
.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 38px;
  line-height: 1.14;
  letter-spacing: -.035em;
  font-weight: 780;
}
.login-subtitle { margin: 8px 0 26px; text-align: center; color: var(--muted); font-size: 18px; }

.login-error {
  margin: -13px 0 18px;
  padding: 11px 13px;
  border: 1px solid #f0b8c4;
  border-radius: 8px;
  background: #fff1f4;
  color: #86142f;
  font-size: 14px;
}
.login-error:focus { outline: 3px solid rgba(157, 21, 53, .18); outline-offset: 2px; }

.field-group { margin-bottom: 20px; }
.field-group label { display: block; margin: 0 0 8px; font-size: 15px; font-weight: 740; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; width: 22px; height: 22px; color: #18345d; pointer-events: none; }
.input-shell input {
  width: 100%;
  height: 52px;
  border: 1px solid #718198;
  border-radius: 6px;
  outline: none;
  padding: 0 48px;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input-shell input::placeholder { color: #65758a; }
.input-shell input:focus { border-color: #315f98; box-shadow: 0 0 0 3px rgba(49, 95, 152, .12); }
.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  color: #526b8b;
  background: transparent;
  cursor: pointer;
}
.password-toggle:hover { background: #f1f4f8; }
.password-toggle svg { width: 22px; height: 22px; }

.form-options {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 4px 0 18px;
  color: #263c5d;
  font-size: 14px;
}
.checkbox-label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--accent); }

.turnstile-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 65px;
  margin: 0 0 18px;
}
.turnstile-shell .cf-turnstile { width: 100%; }
.turnstile-status {
  margin: 0;
  color: #52647d;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.turnstile-status.is-error { color: #86142f; }
.turnstile-noscript {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #f0b8c4;
  border-radius: 6px;
  color: #86142f;
  background: #fff1f4;
  font-size: 13px;
}

.login-button {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: linear-gradient(180deg, #a7163b 0%, #94102f 100%);
  box-shadow: 0 7px 18px rgba(157, 21, 53, .19);
  font-size: 18px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-button:hover { filter: brightness(1.04); box-shadow: 0 10px 23px rgba(157, 21, 53, .25); }
.login-button:active { transform: translateY(1px); }
.login-button:disabled { cursor: wait; filter: saturate(.72); opacity: .82; }

/* Both lines wrap the icon + text as one group. */
.security-note {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 28px 0 0;
  color: #65758d;
}
.security-rule { height: 1px; background: #d2d9e2; }
.security-content {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  color: #65758d;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.security-content svg { width: 23px; height: 23px; color: #526f97; }

.page-footer {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 39px 0 44px;
  color: rgba(234, 241, 250, .82);
  background: linear-gradient(90deg, #061a36 0%, #071c39 55%, #061833 100%);
  font-size: 14px;
}
.footer-message, .footer-meta { display: flex; align-items: center; }
.footer-message { gap: 12px; }
.footer-message svg { width: 27px; height: 27px; color: #cc3154; }
.footer-meta { gap: 26px; }

@media (max-width: 1220px) {
  .login-main { grid-template-columns: minmax(500px, 52%) minmax(470px, 48%); }
  .hero-copy .hero-title { font-size: 43px; }
  .hero-partners { width: min(460px, calc(100% - 56px)); left: 28px; bottom: 24px; }
  .partner-uofm img { max-height: 49px; }
  .partner-usdot { flex-basis: 140px; }
  .login-card { padding-inline: 34px; }
}

@media (max-width: 1100px) {
  .login-page { grid-template-rows: minmax(0, 1fr) auto; }
  .login-main { display: block; }
  .hero-panel { display: none; }
  .login-panel { min-height: calc(100vh - 72px); padding: 28px 18px; }
  .login-card { min-height: auto; width: min(100%, 480px); padding: 30px 28px; }
  .login-card h1 { font-size: 32px; }
  .page-footer { min-height: 72px; padding: 14px 20px; justify-content: center; text-align: center; }
  .footer-message { display: none; }
  .footer-meta { gap: 14px; }
}

@media (max-width: 520px) {
  .login-panel { min-height: calc(100vh - 56px); padding: 0; background: #fff; }
  .login-card { min-height: calc(100vh - 56px); border: 0; border-radius: 0; box-shadow: none; padding: 25px 22px; }
  .login-mark { width: 104px; height: 104px; margin-bottom: 12px; }
  .login-subtitle { margin-bottom: 25px; }
  .form-options { margin-bottom: 28px; }
  .security-note { gap: 10px; }
  .security-content { font-size: 13px; gap: 6px; }
  .page-footer { min-height: 56px; padding-block: 10px; }
  .footer-meta { font-size: 11px; line-height: 1.35; }
}

@media (max-width: 360px) {
  .login-card { padding-inline: 10px; }
}
