:root {
  --ink: #0d1b35;
  --muted: #60708c;
  --blue: #0869d8;
  --blue-deep: #034ea2;
  --cyan: #37c9e9;
  --line: rgba(87, 119, 158, .22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: #eaf4ff; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--ink); background: #eaf4ff; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, h2, p { margin: 0; }

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.18fr) minmax(430px, .82fr);
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  background:
    radial-gradient(circle at 88% 5%, rgba(65, 199, 234, .2), transparent 25%),
    linear-gradient(135deg, #e7f4ff 0%, #f8fbff 55%, #e8f4ff 100%);
}

.login-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(44px, 5vw, 78px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(4, 33, 75, .14) 0%, rgba(3, 38, 85, .24) 35%, rgba(1, 25, 63, .92) 100%),
    linear-gradient(105deg, rgba(2, 72, 151, .76), rgba(3, 91, 179, .16)),
    url("../assets/campus-arrival.png") center / cover no-repeat;
}

.login-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
  content: "";
}

.login-hero::after {
  position: absolute;
  inset: auto -12% -28% 20%;
  z-index: -1;
  height: 54%;
  border-radius: 50%;
  background: rgba(22, 137, 231, .3);
  filter: blur(80px);
  content: "";
  will-change: transform;
  animation: heroWashDrift 15s ease-in-out -4s infinite;
}

.hero-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.hero-glow-one { top: 10%; left: 8%; width: 220px; height: 220px; background: rgba(47, 197, 240, .18); will-change: transform; animation: heroGlowNorthEast 9s ease-in-out infinite; }
.hero-glow-two { right: 8%; bottom: 20%; width: 150px; height: 150px; background: rgba(121, 100, 255, .18); will-change: transform; animation: heroGlowSouthWest 11s ease-in-out -3s infinite; }

.hero-content { display: grid; width: min(690px, 100%); gap: 28px; animation: fadeRise .75s ease-out both; }
.hero-brand { position: absolute; top: clamp(28px, 4vw, 56px); left: clamp(32px, 5vw, 78px); display: inline-flex; align-items: center; }
.hero-brand img { width: 370px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hero-copy { display: grid; gap: 18px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-eyebrow i { width: 28px; height: 2px; border-radius: 2px; background: #50d5f3; box-shadow: 0 0 14px #50d5f3; }
.login-hero h1 { max-width: 650px; font-size: clamp(42px, 5.2vw, 72px); line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.login-hero h1 em { color: #80e6fa; font-style: normal; }
.login-hero p { max-width: 610px; color: rgba(255,255,255,.85); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.7; }
.hero-services { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-services span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.23); border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px rgba(255,255,255,.18); backdrop-filter: blur(12px); font-size: 11px; font-weight: 800; }
.hero-proof { display: flex; align-items: center; gap: 14px; padding-top: 7px; color: rgba(255,255,255,.74); font-size: 12px; }
.hero-proof strong { color: white; }
.hero-proof strong::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #55e0b0; box-shadow: 0 0 12px #55e0b0; content: ""; }

.login-panel { position: relative; display: grid; min-height: 100vh; place-items: center; padding: clamp(30px, 5vw, 72px) clamp(22px, 4.2vw, 64px); }
.login-panel::before, .login-panel::after { position: absolute; border-radius: 50%; pointer-events: none; content: ""; will-change: transform; }
.login-panel::before { top: 6%; right: -80px; width: 230px; height: 230px; background: rgba(47, 196, 233, .17); filter: blur(3px); animation: panelCircleWest 10.5s ease-in-out infinite; }
.login-panel::after { bottom: 4%; left: -70px; width: 180px; height: 180px; background: rgba(76, 116, 239, .12); filter: blur(4px); animation: panelCircleNorthEast 13s ease-in-out -5s infinite; }
.login-wrap { position: relative; z-index: 1; display: grid; width: min(470px, 100%); gap: 16px; }

.login-character {
  position: absolute;
  bottom: 6px;
  left: -214px;
  z-index: 3;
  width: 300px;
  pointer-events: none;
  filter: drop-shadow(0 26px 24px rgba(13, 54, 99, .2));
  animation: characterEnter .85s .18s cubic-bezier(.2,.72,.2,1) both, characterFloat 5.6s 1.1s ease-in-out infinite;
}
.login-character img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.character-glow { position: absolute; right: 2%; bottom: 7%; width: 72%; height: 22%; border-radius: 50%; background: rgba(50, 179, 230, .23); filter: blur(24px); transform: rotate(-7deg); }

.login-card {
  position: relative;
  display: grid;
  width: 100%;
  gap: 20px;
  padding: clamp(25px, 3vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(244,250,255,.62));
  box-shadow: 0 34px 80px rgba(15, 65, 117, .18), inset 0 1px rgba(255,255,255,.96);
  backdrop-filter: blur(24px) saturate(155%);
  animation: cardEnter .7s .08s ease-out both;
}
.login-card::before { position: absolute; top: 0; left: 8%; width: 84%; height: 1px; background: linear-gradient(90deg, transparent, white, transparent); content: ""; }
.login-heading { display: flex; align-items: center; justify-content: center; }
.login-brand { display: grid; flex: 0 0 auto; width: min(395px, 100%); min-height: 94px; place-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-brand img { width: 100%; height: auto; }

.portal-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; min-height: 48px; padding: 5px; border: 1px solid rgba(79, 115, 157, .1); border-radius: 16px; background: rgba(224, 235, 246, .7); }
.portal-tabs button { min-width: 0; padding: 0 8px; border: 0; border-radius: 12px; color: #53647e; background: transparent; font-size: 11px; font-weight: 850; cursor: pointer; transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.portal-tabs button:hover { color: var(--blue); }
.portal-tabs button:focus-visible { outline: 3px solid rgba(8, 105, 216, .2); outline-offset: 2px; }
.portal-tabs button.is-active { color: var(--blue-deep); background: rgba(255,255,255,.94); box-shadow: 0 8px 20px rgba(21, 74, 131, .11); }
.login-fields { display: grid; gap: 15px; }
.field { display: block; }
.floating-field { position: relative; }
.field input { width: 100%; min-height: 55px; padding: 9px 17px 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.72); font-size: 14px; font-weight: 650; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease; }
.field input:hover { border-color: rgba(8,105,216,.36); }
.field input:focus { border-color: rgba(8,105,216,.64); background: #fff; box-shadow: 0 0 0 4px rgba(8,105,216,.11), 0 9px 22px rgba(13,79,145,.08); }
.field-label { position: absolute; top: 50%; left: 17px; color: #71819a; font-size: 13px; font-weight: 700; line-height: 1; pointer-events: none; transform: translateY(-50%); transform-origin: left center; transition: color .18s ease, transform .18s ease, top .18s ease, font-size .18s ease; }
.floating-field input:focus + .field-label,
.floating-field input:not(:placeholder-shown) + .field-label,
.floating-field input:-webkit-autofill + .field-label,
.floating-field input:autofill + .field-label,
.floating-field.is-filled .field-label {
  top: 12px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: none;
}
.floating-field input:-webkit-autofill,
.floating-field input:autofill {
  padding-top: 18px;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}
.password-field input { padding-right: 54px; }
.password-toggle { position: absolute; top: 50%; right: 9px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 11px; color: #5c7391; background: transparent; cursor: pointer; transform: translateY(-50%); transition: color .18s ease, background .18s ease; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--blue); background: #eaf3fe; outline: none; }
.password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.password-toggle .eye-closed, .password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.login-options { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: -2px; }
.remember-row { display: inline-flex; align-items: center; gap: 9px; color: #50617a; font-size: 12px; font-weight: 700; cursor: pointer; }
.remember-row input { width: 17px; height: 17px; margin: 0; border: 1px solid #9cb0c8; border-radius: 5px; accent-color: var(--blue); }
.forgot-link { color: var(--blue); font-size: 12px; font-weight: 850; }
.forgot-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.forgot-link:focus-visible { border-radius: 4px; outline: 3px solid rgba(8,105,216,.18); outline-offset: 3px; }

.submit-button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 11px; border: 0; border-radius: 16px; color: white; background: linear-gradient(115deg, #0758b8, #087be0 58%, #1d9ae5); box-shadow: 0 15px 28px rgba(5,92,184,.25), inset 0 1px rgba(255,255,255,.28); font-size: 13px; font-weight: 900; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.submit-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform .18s ease; }
.submit-button:hover:not(:disabled), .submit-button:focus-visible:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 34px rgba(5,92,184,.32), inset 0 1px rgba(255,255,255,.28); }
.submit-button:hover svg { transform: translateX(3px); }
.submit-button:focus-visible { outline: 4px solid rgba(8,105,216,.2); outline-offset: 3px; }
.submit-button:disabled { cursor: wait; filter: saturate(.75); opacity: .82; }
.submit-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.38); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.submit-button.is-loading .submit-spinner { display: block; }
.submit-button.is-loading svg { display: none; }
.form-status, .signup-note, .terms-note { text-align: center; }
.form-status { min-height: 0; margin: -5px 0; color: var(--muted); font-size: 12px; }
.form-status:empty { display: none; }
.form-status.is-error { display: block; padding: 10px 12px; border: 1px solid rgba(185,28,28,.14); border-radius: 12px; color: #a61b1b; background: rgba(254,226,226,.65); line-height: 1.45; }
.form-status.is-success { color: #087443; }
.signup-note { color: var(--muted); font-size: 12px; }
.signup-note a { color: var(--blue); font-weight: 900; }
.login-trust { display: flex; align-items: center; gap: 10px; color: #8492a7; font-size: 9px; font-weight: 750; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.login-trust span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(94,120,153,.22)); }
.login-trust span:last-child { transform: rotate(180deg); }
.terms-note { color: #75859b; font-size: 10px; line-height: 1.5; }

@keyframes cardEnter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes heroGlowNorthEast {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  45% { transform: translate3d(24px, -20px, 0) scale(1.07); }
  72% { transform: translate3d(10px, -7px, 0) scale(.98); }
}
@keyframes heroGlowSouthWest {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  38% { transform: translate3d(-26px, 18px, 0) scale(.94); }
  76% { transform: translate3d(-9px, 31px, 0) scale(1.08); }
}
@keyframes heroWashDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-35px, -18px, 0) scale(1.08); }
}
@keyframes panelCircleWest {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  42% { transform: translate3d(-42px, 14px, 0) scale(1.08); }
  74% { transform: translate3d(-18px, -11px, 0) scale(.96); }
}
@keyframes panelCircleNorthEast {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  36% { transform: translate3d(30px, -34px, 0) scale(.95); }
  78% { transform: translate3d(14px, -12px, 0) scale(1.1); }
}
@keyframes characterEnter { from { opacity: 0; transform: translate3d(-20px, 18px, 0) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes characterFloat { 50% { transform: translate3d(0, -6px, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1060px) {
  .login-page { grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); }
  .login-hero { padding: 42px; }
  .hero-brand { left: 42px; }
  .login-hero h1 { font-size: clamp(38px, 5vw, 54px); }
  .login-character { left: -158px; width: 235px; }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; overflow: visible; }
  .login-hero { min-height: 370px; align-items: flex-end; padding: 92px 28px 34px; }
  .hero-content { gap: 15px; }
  .hero-brand { top: 24px; left: 28px; }
  .hero-brand img { width: 128px; }
  .hero-copy { gap: 10px; }
  .login-hero h1 { max-width: 540px; font-size: clamp(35px, 8vw, 50px); }
  .login-hero p { max-width: 560px; font-size: 14px; line-height: 1.55; }
  .hero-services, .hero-proof { display: none; }
  .login-panel { min-height: auto; padding: 30px 18px 44px; }
  .login-wrap { margin-top: -62px; }
  .login-character { top: -144px; right: 8px; bottom: auto; left: auto; z-index: 0; width: 142px; opacity: .94; filter: drop-shadow(0 16px 18px rgba(13,54,99,.18)); }
  .login-card { z-index: 2; }
}

@media (max-width: 520px) {
  .login-hero { min-height: 315px; padding: 82px 20px 76px; }
  .hero-brand { top: 20px; left: 20px; }
  .hero-eyebrow { display: none; }
  .login-hero h1 { font-size: 34px; }
  .login-hero p { display: none; }
  .login-panel { padding-inline: 12px; }
  .login-wrap { margin-top: -80px; }
  .login-card { gap: 17px; padding: 22px 18px; border-radius: 24px; }
  .login-character { top: -116px; right: 3px; width: 112px; }
  .login-brand { width: min(190px, 72%); min-height: 58px; }
  .portal-tabs { min-height: 47px; }
  .portal-tabs button { padding: 0 4px; font-size: 10px; }
}

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