:root {
  --navy-950: #081a36;
  --navy-900: #102b57;
  --navy-800: #183b73;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --gold-500: #c79a2b;
  --gold-100: #f8edce;
  --red-700: #b91c1c;
  --red-100: #fee2e2;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --text: #13213b;
  --text-soft: #52627c;
  --text-muted: #66758b;
  --line: #dfe6ef;
  --shadow: 0 12px 34px rgba(8, 26, 54, .1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #edf2f8;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input { font: inherit; }

button { color: inherit; cursor: pointer; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  border-radius: 9px;
  background: #fff;
  color: var(--navy-900);
  padding: 10px 14px;
  box-shadow: 0 8px 25px rgba(8,26,54,.18);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .16s ease;
}

.skip-link:focus { transform: translateY(0); }

.login-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(390px, .92fr) minmax(520px, 1.08fr);
}

.brand-panel {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 14%, rgba(49,112,219,.7), transparent 33%),
    linear-gradient(145deg, var(--navy-900) 0%, #0c2550 48%, var(--navy-950) 100%);
  color: #fff;
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom right, #000, transparent 76%);
}

.brand-panel::after {
  position: absolute;
  right: -12%;
  bottom: -22%;
  z-index: -1;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255,255,255,.018),
    0 0 0 140px rgba(255,255,255,.014);
  content: "";
}

.brand-panel__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
}

.brand-panel__glow--one {
  top: 31%;
  right: -80px;
  width: 220px;
  height: 220px;
  background: rgba(37,99,235,.22);
}

.brand-panel__glow--two {
  bottom: -80px;
  left: 10%;
  width: 260px;
  height: 260px;
  background: rgba(199,154,43,.1);
}

.brand-panel__content {
  display: flex;
  width: min(100%, 680px);
  min-height: 100%;
  flex-direction: column;
  margin-left: auto;
  padding: clamp(34px, 6vw, 76px) clamp(36px, 6vw, 82px);
}

.brand {
  display: inline-flex;
  width: min(310px, 76%);
  align-self: flex-start;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-panel__message {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0 48px;
}

.eyebrow,
.environment-badge,
.demo-credentials__flag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow {
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #dce9ff;
  padding: 7px 11px;
}

.brand-panel h1 {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 820;
  letter-spacing: -.045em;
  line-height: 1.04;
}

.brand-panel__message > p {
  max-width: 580px;
  margin: 22px 0 0;
  color: rgba(235,243,255,.74);
  font-size: clamp(16px, 1.45vw, 20px);
}

.benefit-list {
  display: grid;
  max-width: 590px;
  gap: 1px;
  margin: 42px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  list-style: none;
  box-shadow: 0 18px 46px rgba(4,18,41,.18);
}

.benefit-list li {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 2px 14px;
  align-items: center;
  background: rgba(12,38,80,.8);
  padding: 15px 17px;
  backdrop-filter: blur(12px);
}

.benefit-list li > span {
  grid-row: 1 / 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(199,154,43,.42);
  border-radius: 11px;
  background: rgba(199,154,43,.12);
  color: #f7d46f;
  font-size: 11px;
  font-weight: 850;
}

.benefit-list strong { font-size: 14px; }
.benefit-list small { color: rgba(235,243,255,.64); font-size: 12px; }

.brand-panel__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(235,243,255,.66);
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(199,154,43,.14);
}

.status-dot--gold { background: var(--gold-500); }

.login-main {
  display: grid;
  min-width: 0;
  place-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(37,99,235,.08), transparent 28%),
    linear-gradient(145deg, #f8fafd, #edf2f8);
  padding: clamp(28px, 5vw, 72px);
}

.login-card {
  width: min(100%, 540px);
  border: 1px solid rgba(215,224,235,.92);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.environment-badge {
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 6px 10px;
  font-size: 10px;
}

.environment-badge--demo {
  border-color: var(--gold-100);
  background: var(--blue-50);
  color: var(--navy-800);
  box-shadow: inset 0 -2px 0 var(--gold-500);
}

.environment-badge .status-dot {
  width: 7px;
  height: 7px;
  border: 0;
  box-shadow: none;
}

.login-card__heading h2 {
  margin: 20px 0 0;
  color: var(--navy-950);
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -.035em;
  line-height: 1.12;
}

.login-card__heading p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.login-alert {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: var(--red-100);
  color: var(--red-700);
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 650;
}

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

.login-alert__icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 27px;
}

.login-form[hidden],
.demo-credentials[hidden] { display: none; }

.field {
  display: grid;
  gap: 7px;
}

.field > span:first-child {
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.field > small {
  color: var(--text-muted);
  font-size: 11px;
}

.field__control {
  display: grid;
  min-height: 50px;
  grid-template-columns: 22px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 0 14px;
  box-shadow: 0 1px 2px rgba(16,43,87,.025);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field__control:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37,99,235,.11);
}

.field__control:has(input[aria-invalid="true"]) {
  border-color: #e98e8e;
  background: #fffafa;
}

.field__control svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #789;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.field__control input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.field__control input::placeholder { color: #9aa7b8; }

.field__control--password {
  grid-template-columns: 22px minmax(0,1fr) auto;
  padding-right: 7px;
}

.password-toggle {
  min-width: 64px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--blue-700);
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 800;
}

.password-toggle:hover { background: var(--blue-50); }

.login-form__meta {
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
}

.login-form__meta [data-login-status] {
  color: var(--blue-700);
  font-weight: 750;
  text-align: right;
}

.account-help-link {
  color: var(--blue-700);
  font-weight: 750;
  text-decoration: none;
}

.account-help-link:hover { text-decoration: underline; }

.submit-button {
  display: inline-grid;
  min-height: 52px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--blue-700);
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  padding: 10px 18px;
  box-shadow: 0 11px 25px rgba(37,99,235,.24);
  font-size: 14px;
  font-weight: 820;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.submit-button::before { content: ""; }

.submit-button:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(37,99,235,.3);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.submit-button:disabled { cursor: wait; opacity: .78; }

.submit-button__spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.36);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit-button:not(.is-loading) .submit-button__spinner { visibility: hidden; }

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

.mfa-form { gap: 16px; }

.mfa-step-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--blue-100);
  border-left: 3px solid var(--gold-500);
  border-radius: 12px;
  background: var(--blue-50);
  padding: 13px;
}

.mfa-step-note__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--blue-100);
  border-radius: 10px;
  background: #fff;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 900;
}

.mfa-step-note strong {
  color: var(--navy-900);
  font-size: 13px;
}

.mfa-step-note p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
}

.mfa-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
  padding: 5px;
}

.mfa-methods button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.mfa-methods button:hover { color: var(--blue-700); }

.mfa-methods button.is-active {
  border-color: var(--blue-100);
  background: #fff;
  color: var(--navy-900);
  box-shadow: inset 0 -2px 0 var(--gold-500), 0 2px 7px rgba(16, 43, 87, .06);
}

.mfa-code-control input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .12em;
}

.mfa-expiry {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.mfa-restart {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--blue-700);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
}

.mfa-restart:hover { text-decoration: underline; }

.demo-credentials {
  margin-top: 26px;
  border: 1px solid #d8e5f5;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbff, #f2f7fd);
  padding: 17px;
}

.demo-credentials__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.demo-credentials__flag {
  color: var(--blue-700);
  font-size: 9px;
}

.demo-credentials h3 {
  margin: 4px 0 0;
  color: var(--navy-900);
  font-size: 15px;
}

.demo-credentials__shield {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 900;
}

.demo-credentials > p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.demo-credentials dl {
  display: grid;
  gap: 1px;
  margin: 13px 0 0;
  overflow: hidden;
  border: 1px solid #dce6f1;
  border-radius: 9px;
  background: #dce6f1;
}

.demo-credentials dl > div {
  display: grid;
  grid-template-columns: 70px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.9);
  padding: 8px 10px;
}

.demo-credentials dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-credentials dd { min-width: 0; margin: 0; }

.demo-credentials code {
  display: block;
  overflow: hidden;
  color: var(--navy-900);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-fill {
  width: 100%;
  margin-top: 12px;
  border: 1px solid #cbd9eb;
  border-radius: 9px;
  background: #fff;
  color: var(--blue-700);
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 800;
}

.demo-fill:hover { border-color: var(--blue-500); background: var(--blue-50); }

.login-card__footer {
  margin: 23px 0 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(59,130,246,.42);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; }
  .brand-panel__content {
    width: 100%;
    padding: 28px clamp(24px, 7vw, 64px) 34px;
  }
  .brand { width: min(240px, 65%); }
  .brand-panel__message { padding: 38px 0 14px; }
  .brand-panel h1 { max-width: 720px; font-size: clamp(32px, 7vw, 50px); }
  .brand-panel__message > p { max-width: 720px; }
  .benefit-list { display: none; }
  .brand-panel__footer { margin-top: 26px; }
  .login-main { padding: clamp(24px, 7vw, 58px); }
}

@media (max-width: 560px) {
  .brand-panel__content { padding: 22px 20px 27px; }
  .brand { width: 210px; }
  .brand-panel__message { padding: 28px 0 10px; }
  .brand-panel h1 { margin-top: 17px; font-size: 32px; }
  .brand-panel__message > p { margin-top: 15px; font-size: 15px; }
  .brand-panel__footer { margin-top: 18px; font-size: 11px; }
  .login-main { display: block; padding: 18px 12px 28px; }
  .login-card { border-radius: 18px; padding: 25px 20px; }
  .login-card__heading h2 { margin-top: 16px; font-size: 29px; }
  .login-form { margin-top: 23px; }
  .login-form__meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .login-form__meta [data-login-status] { text-align: left; }
  .mfa-methods { grid-template-columns: 1fr; }
  .demo-credentials dl > div { grid-template-columns: 58px minmax(0,1fr); }
  .demo-credentials code { 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;
  }
}
