/* NMONITOR-style login refresh */
.login-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #eef7ff;
  background:
    linear-gradient(180deg, rgba(4, 10, 22, .34), rgba(4, 10, 22, .1) 42%, rgba(4, 10, 22, .64)),
    radial-gradient(circle at 50% 48%, rgba(10, 35, 70, .08), rgba(2, 8, 20, .22) 58%, rgba(2, 8, 20, .62) 100%),
    url("../assets/datacenter-login-wide.jpg") center / 100% 100% no-repeat;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 8, 18, .36), transparent 38%, transparent 62%, rgba(2, 8, 18, .42));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.login-shell::after {
  content: "";
  position: absolute;
  width: 44vw;
  max-width: 680px;
  aspect-ratio: 1;
  left: -12vw;
  top: -18vh;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(31, 216, 228, .26), rgba(31, 216, 228, .08) 42%, transparent 70%);
  filter: blur(4px);
  pointer-events: none;
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 430px);
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem);
}

.login-stage::before {
  display: none;
}

.login-stage::after {
  display: none;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1.25rem 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
}

.login-card > .login-logo,
.login-card > .login-brand-kicker,
.login-card > h1 {
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .55));
}

.login-card > .login-logo {
  margin-bottom: 1.05rem;
}

.login-card > .login-brand-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: .18rem .65rem;
  border-radius: 999px;
  background: rgba(3, 12, 24, .46);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}

.login-card::before {
  display: none;
}

.login-card::after {
  display: none;
}

.login-card .login-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 122px;
  height: 74px;
  margin: 0 auto 1.45rem;
  padding: .35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  object-fit: contain;
}

.login-brand-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 .25rem;
  color: rgba(255, 255, 255, .94);
  text-align: center;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.login-card h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 .35rem;
  color: #fff;
  text-align: center;
  font-size: 1.52rem;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .7);
  line-height: 1.15;
  letter-spacing: 0;
}

.login-card h1::after {
  content: "NCPA - Portal Admin";
  display: block;
  margin-top: .35rem;
  color: rgba(255, 255, 255, .96);
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 3px 16px rgba(0, 0, 0, .72);
}

.login-card form {
  position: relative;
  z-index: 1;
  width: min(385px, calc(100vw - 3rem));
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.4rem;
}

.login-card .field {
  gap: .42rem;
}

.login-card .field span {
  color: rgba(255, 255, 255, .9);
  font-size: .73rem;
  letter-spacing: .06em;
  text-align: left;
}

.login-card .field input {
  min-height: 50px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .95);
  color: #132033;
  font-size: .98rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.login-card .field input:focus {
  border-color: #1b9bb5;
  box-shadow: 0 0 0 3px rgba(27, 155, 181, .18);
}

.login-submit {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, #0a94d1, #0fb4ae);
  font-size: 1rem;
  box-shadow: 0 14px 34px rgba(4, 71, 122, .38);
}

.login-card .status {
  border-radius: 8px;
  box-shadow: none;
}

.login-copy,
.login-2fa-title {
  color: rgba(255, 255, 255, .96);
  text-align: center;
  text-shadow: 0 3px 16px rgba(0, 0, 0, .74);
}

.login-copy {
  max-width: min(430px, calc(100vw - 3rem));
  margin: .8rem auto 1rem;
  padding: .75rem .95rem;
  border-radius: 8px;
  background: rgba(2, 10, 22, .48);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
  line-height: 1.45;
}

.login-2fa-title {
  margin: 1rem 0 .65rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.login-card .field input[name*="totp"],
.login-card .field input[autocomplete="one-time-code"] {
  text-align: center;
  letter-spacing: .16em;
  font-weight: 800;
}

.qr-panel {
  border-radius: 8px;
  background: #f6fafc;
}

.login-page-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 1rem 1.25rem;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

@media (max-width: 860px) {
  .login-shell {
    overflow-x: hidden;
  }

  .login-stage {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  .login-stage::before {
    content: "NCPA Control Center";
    max-width: none;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
  }

  .login-stage::after {
    top: calc(50% + 245px);
    left: 1rem;
    width: min(300px, calc(100vw - 2rem));
    height: 52px;
    transform: none;
    opacity: .52;
  }

  .login-card {
    width: min(340px, calc(100vw - 2rem));
    max-width: 340px;
    justify-self: center;
    margin: 0 auto;
    padding: 1rem 0;
  }

  .login-card form {
    width: min(320px, calc(100vw - 3rem));
    margin-left: auto;
    margin-right: auto;
  }
}
