/* The original brand images remain unchanged. Never stretch or crop the logo. */
.login-view {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(24px, 5vh, 56px) max(20px, env(safe-area-inset-right)) clamp(24px, 5vh, 56px) max(20px, env(safe-area-inset-left));
  isolation: isolate;
  overflow: visible;
  background: #0c1219;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 43%, rgba(242, 194, 26, .045), transparent 46%),
    radial-gradient(ellipse at 78% 70%, rgba(63, 96, 122, .09), transparent 52%),
    linear-gradient(145deg, #0b1117, #111a23);
  filter: none;
  transform: none;
}

/* A quiet tunnel emblem replaces the oversized, clipped wordmark. */
.login-backdrop::after {
  content: "";
  position: absolute;
  top: 50%;
  left: clamp(24px, calc(50% - 660px), 18vw);
  width: min(29vw, 450px);
  aspect-ratio: 1;
  background: url('/TunLog_Symbol.png') center / contain no-repeat;
  opacity: .12;
  transform: translateY(-50%);
}

.login-card {
  width: min(460px, 100%);
  min-width: 0;
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid rgba(180, 194, 209, .14);
  border-top-color: rgba(242, 194, 26, .38);
  border-radius: 20px;
  background: rgba(17, 24, 32, .98);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .28);
  backdrop-filter: none;
}

.login-logo {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  margin: 0 0 28px;
}

.login-kicker {
  color: #bdc8d3;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .12em;
  overflow-wrap: anywhere;
}

.login-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.55rem, 3vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.login-card p {
  margin: 0 0 26px;
  font-size: .9rem;
  line-height: 1.6;
  color: #a8b5c2;
  overflow-wrap: anywhere;
}

.login-card label {
  margin: 18px 0;
  color: #d4dce5;
  font-size: .875rem;
  line-height: 1.5;
}

.login-card input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin-top: 8px;
  background: #0c131b;
  border-color: #354351;
  font-size: 1rem;
}

.login-card input:focus-visible,
.login-card button:focus-visible {
  outline: 2px solid var(--gold, #f2c21a);
  outline-offset: 3px;
}

.login-card button[type="submit"] {
  min-height: 46px;
  margin-top: 4px;
}

.login-card .error {
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .login-backdrop::after {
    top: 28px;
    right: 28px;
    left: auto;
    width: min(32vw, 180px);
    opacity: .055;
    transform: none;
  }
}

@media (max-width: 480px) {
  .login-view {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .login-card {
    padding: 24px;
    border-radius: 16px;
  }

  .login-logo {
    margin-bottom: 24px;
  }
}

/* Small landscape screens and an open software keyboard must remain scrollable. */
@media (max-height: 660px) {
  .login-view {
    align-items: start;
  }
}
