html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--c-primary);
  isolation: isolate;
}

/* Fullscreen background image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../images/map.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  pointer-events: none;
}

/* No extra overlay effects */
body::after {
  content: none;
}

.env-banner,
.navbar {
  flex: 0 0 auto;
}

.navbar {
  position: relative;
  z-index: 2;
  background: var(--c-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.navbar .brand,
.navbar .brand-subtitle {
  color: rgba(255, 255, 255, 0.88);
}

.navbar .brand-title {
  color: #ffffff;
}

.navbar .brand-logo,
.login-logo {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.container {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(16px, 3vh, 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-space {
  display: none;
}

.login-shell {
  width: min(520px, calc(100vw - 32px));
  max-width: 100%;
  margin: 0 auto;
  perspective: 1200px;
}

.login-card {
  position: relative;
  width: 100%;
  max-height: 100%;
  overflow: auto;
  scrollbar-width: none;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.26),
    0 8px 22px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.32) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(0) rotateX(0deg) rotateY(0deg) scale(1);
  transform-style: preserve-3d;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
  will-change: transform;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.28),
      rgba(255, 255, 255, 0.04) 42%,
      transparent 68%
    );
  opacity: 0.55;
  pointer-events: none;
}

.login-card::-webkit-scrollbar {
  display: none;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-intro {
  opacity: 0.8;
  margin-top: 0;
}

.login-actions-spacer {
  height: 14px;
}

.login-card .btn.primary {
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .login-card:hover {
    transform: translateY(-7px) rotateX(1.4deg) rotateY(-1.2deg) scale(1.012);
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.975);
    box-shadow:
      0 38px 100px rgba(0, 0, 0, 0.34),
      0 16px 36px rgba(0, 0, 0, 0.18),
      0 0 0 1px rgba(255, 255, 255, 0.42) inset;
  }
}

.login-card:focus-within {
  transform: translateY(-4px) scale(1.006);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.32),
    0 12px 30px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.40) inset;
}

@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  .login-card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card {
    transition: none;
    transform: none;
  }

  .login-card:hover,
  .login-card:focus-within {
    transform: none;
  }
}