:root {
  color: #152238;
  background: #edf3f8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 86% 12%, rgba(64, 132, 255, .13), transparent 31rem),
    radial-gradient(circle at 12% 88%, rgba(61, 187, 157, .10), transparent 27rem),
    #edf3f8;
}

button, input { font: inherit; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(310px, .88fr) minmax(480px, 1.12fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 92px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(12, 39, 70, .97), rgba(18, 69, 116, .96)),
    #102e4e;
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
}

.brand-panel::before {
  width: 32rem;
  height: 32rem;
  right: -19rem;
  top: -13rem;
}

.brand-panel::after {
  width: 23rem;
  height: 23rem;
  left: -13rem;
  bottom: -12rem;
}

.brand-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(150deg, #2f7fe8, #0b355e);
  box-shadow: 0 18px 42px rgba(0, 18, 44, .25);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.05em;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #2171d4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.brand-copy .eyebrow { color: #76b4ff; }

.brand-copy h1 {
  margin: 0;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
}

.brand-description {
  max-width: 440px;
  margin: 25px 0 0;
  color: rgba(238, 247, 255, .76);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
}

.brand-status {
  position: absolute;
  left: clamp(42px, 7vw, 92px);
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(238, 247, 255, .74);
  font-size: 13px;
  font-weight: 650;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #56d3a8;
  box-shadow: 0 0 0 5px rgba(86, 211, 168, .13);
}

.form-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(24px, 6vw, 84px);
}

.login-card {
  width: min(100%, 480px);
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 28px 70px rgba(28, 53, 81, .12);
  backdrop-filter: blur(18px);
}

.mobile-brand { display: none; }

.card-heading h2 {
  margin: 0;
  color: #142137;
  font-size: clamp(31px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.card-heading > p:last-child {
  margin: 13px 0 0;
  color: #69788d;
  font-size: 16px;
  line-height: 1.5;
}

.field-group { margin-top: 25px; }

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: #273750;
  font-size: 14px;
  font-weight: 750;
}

.field-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #cbd6e2;
  border-radius: 14px;
  outline: none;
  color: #152238;
  background: rgba(255, 255, 255, .92);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field-group input::placeholder { color: #9aa7b8; }

.field-group input:hover { border-color: #9eb3c8; }

.field-group input:focus {
  border-color: #2775d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(39, 117, 216, .13);
}

.password-control { position: relative; }
.password-control input { padding-right: 54px; }

.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 9px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #6e7e92;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover { color: #1c66c1; background: #eef5ff; }
.password-toggle:focus-visible { outline: 3px solid rgba(39, 117, 216, .25); }
.password-toggle svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.form-error {
  margin-top: 19px;
  padding: 12px 14px;
  border: 1px solid #f1c1c7;
  border-radius: 12px;
  color: #9f2838;
  background: #fff1f3;
  font-size: 14px;
  line-height: 1.4;
}

.submit-button {
  display: grid;
  width: 100%;
  min-height: 54px;
  margin-top: 25px;
  padding: 0 22px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #163c62, #0f2e4f);
  box-shadow: 0 12px 26px rgba(18, 54, 88, .22);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .06em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(18, 54, 88, .27);
}

.submit-button:focus-visible { outline: 4px solid rgba(39, 117, 216, .22); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.submit-button.is-loading .button-label { display: none; }

.button-spinner {
  display: none;
  width: 21px;
  height: 21px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

.access-note {
  margin: 19px 0 0;
  color: #7b899a;
  text-align: center;
  font-size: 13px;
}

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

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { padding: 24px; }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
    color: #17324f;
    font-weight: 850;
    font-size: 17px;
  }
  .brand-mark-small {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .form-panel { align-items: start; padding: 18px 14px; }
  .login-card { margin-top: 4vh; padding: 25px 20px; border-radius: 22px; }
  .mobile-brand { margin-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .button-spinner { animation-duration: 1.4s; }
}
