:root {
  --navy-950: #041a35;
  --navy-900: #05264a;
  --navy-700: #12436f;
  --gold: #f2c300;
  --green: #159a6a;
  --ink: #202938;
  --muted: #667085;
  --line: #e8edf5;
  --soft: #fbfcfe;
  --white: #ffffff;
  --radius: 8px;
  font-family: Aptos, "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 14%, rgba(20, 184, 255, 0.16), transparent 32%),
    radial-gradient(circle at 84% 10%, rgba(135, 72, 255, 0.13), transparent 30%),
    linear-gradient(180deg, #050816 0%, #071327 56%, #081629 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 8, 22, 0.2), rgba(5, 8, 22, 0.06) 42%, rgba(5, 8, 22, 0.3)),
    linear-gradient(180deg, rgba(5, 8, 22, 0.08), rgba(5, 8, 22, 0.48));
}

.web3-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 520px);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 78px);
  min-height: 100vh;
  padding: clamp(22px, 5vw, 58px);
}

.brand-panel {
  display: grid;
  gap: 22px;
}

.brand-logo {
  display: block;
  width: min(500px, 82vw);
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.34));
}

.brand-copy span {
  display: inline-block;
  color: var(--gold);
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 560;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-copy h1 {
  max-width: 18ch;
  margin: 12px 0 14px;
  color: #ffffff;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 540;
  line-height: 1.12;
  text-shadow: 0 14px 34px rgba(5, 8, 22, 0.38);
}

.brand-copy p {
  max-width: 48ch;
  margin: 0;
  color: rgba(235, 242, 255, 0.78);
  line-height: 1.55;
}

.security-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}

.security-points div,
.login-card {
  border: 1px solid rgba(129, 216, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
}

.security-points div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.security-points strong {
  color: var(--navy-950);
  font-weight: 560;
}

.security-points span {
  color: var(--muted);
  font-size: 13px;
}

.login-card {
  padding: clamp(22px, 4vw, 34px);
}

.login-heading {
  margin-bottom: 22px;
}

.login-heading p,
.login-heading h2 {
  margin: 0;
}

.login-heading p,
.login-heading span,
.restricted-note {
  color: var(--muted);
}

.login-heading h2 {
  margin-top: 6px;
  color: var(--navy-950);
  font-size: 30px;
  font-weight: 560;
}

label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(16, 63, 117, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 63, 117, 0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.device-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(24, 166, 106, 0.16);
  border-radius: var(--radius);
  background: rgba(24, 166, 106, 0.08);
}

.device-box strong,
.device-box span {
  display: block;
}

.device-box strong {
  color: var(--navy-950);
  font-weight: 560;
}

.device-box span {
  color: var(--muted);
  font-size: 13px;
}

.device-box button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(6, 35, 68, 0.08);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy-900);
  font-weight: 520;
}

.device-box button.is-selected,
.primary-button.is-selected {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-950);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 12px 26px rgba(5, 8, 22, 0.18);
}

.primary-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy-950);
  font-weight: 560;
}

.primary-button.is-loading {
  background: linear-gradient(90deg, var(--gold), #ffe47a, var(--gold));
  background-size: 200% 100%;
  animation: loginPulse 1.2s ease-in-out infinite;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

@keyframes loginPulse {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.form-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.restricted-note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--navy-950);
  color: #ffffff;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .brand-copy h1,
  .brand-copy p,
  .brand-logo {
    margin-inline: auto;
    text-align: center;
  }

  .security-points {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(340px, 72vw);
    max-height: 220px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    gap: 20px;
    padding: 18px 16px;
  }

  .brand-panel {
    gap: 16px;
  }

  .brand-logo {
    width: min(260px, 76vw);
    max-height: 168px;
  }

  .brand-copy h1 {
    font-size: 30px;
  }

  .brand-copy p {
    max-width: 34ch;
  }

  .form-row,
  .device-box {
    grid-template-columns: 1fr;
  }

  .device-box {
    display: grid;
  }
}

.brand-copy h1,
.access-heading h2,
.role-grid strong,
.device-box strong {
  font-weight: 540;
  letter-spacing: 0;
}

.brand-copy span,
label,
.primary-button,
#challengeButton {
  font-weight: 520;
}

.access-card {
  background: rgba(255, 255, 255, 0.94);
}
