/* Login page — building-themed backdrop and split layout */

.floor21-login {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

/* Dark theme on login only — navy / teal blue (rest of app uses standard dark) */
html[data-bs-theme="dark"] body.floor21-login {
  background-color: #0f1a28;
}

html[data-bs-theme="dark"] .floor21-login {
  --f21-login-grad: linear-gradient(145deg, #0a1220 0%, #152a52 38%, #1e4d6b 68%, #0d3d5c 100%);
  --f21-login-grad-soft: radial-gradient(ellipse 80% 60% at 20% 80%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(94, 184, 232, 0.12), transparent 50%);
  --f21-login-skyline: url("../images/login-skyline.svg");
  --f21-login-windows: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%237eeadb' stroke-opacity='.12' stroke-width='.8'%3E%3Crect x='4' y='4' width='16' height='16'/%3E%3Crect x='28' y='4' width='16' height='16'/%3E%3Crect x='4' y='28' width='16' height='16'/%3E%3Crect x='28' y='28' width='16' height='16'/%3E%3C/g%3E%3C/svg%3E");
  --f21-login-brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36' viewBox='0 0 72 36'%3E%3Cg fill='%23c4784a' fill-opacity='.08'%3E%3Crect x='2' y='2' width='32' height='14' rx='1'/%3E%3Crect x='38' y='2' width='32' height='14' rx='1'/%3E%3Crect x='20' y='20' width='32' height='14' rx='1'/%3E%3C/g%3E%3C/svg%3E");
  --f21-login-accent: #2dd4bf;
  --f21-login-accent-glow: rgba(45, 212, 191, 0.55);
  background: var(--f21-login-grad);
  color: #e8eef5;
}

.floor21-login__brand-corner {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: calc(100% - 5.5rem);
}

.floor21-login__brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 0.5rem;
}

.floor21-login__brand-link:hover .floor21-login__logo,
.floor21-login__brand-link:focus-visible .floor21-login__logo {
  box-shadow: 0 6px 20px rgba(8, 20, 40, 0.28);
}

.floor21-login__brand-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.floor21-login__theme-corner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

@media (min-width: 576px) {
  .floor21-login__brand-corner {
    top: 1.25rem;
    left: 1.5rem;
    gap: 0.75rem;
  }

  .floor21-login__theme-corner {
    top: 1.25rem;
    right: 1.5rem;
  }
}

[data-bs-theme="light"] .floor21-login__theme-corner .floor21-theme-toggle.btn-outline-light {
  color: #152a52;
  border-color: rgba(21, 42, 82, 0.35);
}

[data-bs-theme="light"] .floor21-login__theme-corner .floor21-theme-toggle.btn-outline-light:hover {
  background: rgba(21, 42, 82, 0.08);
  color: #152a52;
  border-color: rgba(21, 42, 82, 0.5);
}

.floor21-login__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--f21-login-grad-soft);
}

.floor21-login__backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--f21-login-windows);
  background-size: 48px 48px;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
}

.floor21-login__skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(34vh, 280px);
  overflow: hidden;
  pointer-events: none;
  background-image: var(--f21-login-skyline);
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center bottom;
  opacity: 0.95;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
}

.floor21-login__skyline-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  animation: floor21-skyline-twinkle 4s ease-in-out infinite alternate;
}

html[data-bs-theme="dark"] .floor21-login__skyline-lights {
  background-image:
    radial-gradient(circle at 12% 72%, rgba(45, 212, 191, 0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 24% 58%, rgba(94, 184, 232, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle at 31% 82%, rgba(184, 255, 244, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 38% 48%, rgba(94, 184, 232, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 46% 68%, rgba(45, 212, 191, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle at 52% 38%, rgba(240, 198, 116, 0.65) 0 1.5px, transparent 2px),
    radial-gradient(circle at 58% 78%, rgba(94, 184, 232, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle at 64% 55%, rgba(45, 212, 191, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 71% 42%, rgba(184, 255, 244, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle at 76% 70%, rgba(94, 184, 232, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 82% 58%, rgba(45, 212, 191, 0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 88% 75%, rgba(240, 198, 116, 0.6) 0 1.5px, transparent 2px);
}

html[data-bs-theme="light"] .floor21-login__skyline {
  opacity: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%);
}

html[data-bs-theme="light"] .floor21-login__skyline-lights {
  opacity: 0.65;
  background-image:
    radial-gradient(circle at 12% 72%, rgba(13, 110, 98, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 24% 58%, rgba(26, 90, 138, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 31% 82%, rgba(201, 162, 39, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 38% 48%, rgba(26, 90, 138, 0.65) 0 1.5px, transparent 2px),
    radial-gradient(circle at 46% 68%, rgba(13, 110, 98, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 52% 38%, rgba(201, 162, 39, 0.6) 0 1.5px, transparent 2px),
    radial-gradient(circle at 58% 78%, rgba(26, 90, 138, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 71% 42%, rgba(13, 110, 98, 0.75) 0 1.5px, transparent 2px),
    radial-gradient(circle at 76% 70%, rgba(201, 162, 39, 0.65) 0 1.5px, transparent 2px),
    radial-gradient(circle at 82% 58%, rgba(26, 90, 138, 0.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 88% 75%, rgba(13, 110, 98, 0.65) 0 1.5px, transparent 2px);
}

@keyframes floor21-skyline-twinkle {
  0% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floor21-login__skyline-lights {
    animation: none;
    opacity: 0.45;
  }
}

.floor21-login__shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 992px) {
  .floor21-login__shell {
    flex-direction: row;
  }
}

/* —— Hero / decorative column —— */
.floor21-login__hero {
  display: none;
  flex: 1 1 52%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

@media (min-width: 992px) {
  .floor21-login__hero {
    display: flex;
  }
}

.floor21-login__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--f21-login-brick);
  background-size: 72px 36px;
  opacity: 0.7;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, transparent 65%);
}

.floor21-login__hero-inner {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.floor21-login__logo {
  display: block;
  flex-shrink: 0;
  height: 2.65rem;
  width: auto;
  max-width: min(11rem, 55vw);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.2rem 0.55rem;
  box-shadow: 0 4px 16px rgba(8, 20, 40, 0.22);
}

html[data-bs-theme="dark"] .floor21-login__lede {
  color: rgba(232, 238, 245, 0.78);
}

.floor21-login__title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

html[data-bs-theme="dark"] .floor21-login__title {
  color: #fff;
}

.floor21-login__tagline {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1.25rem;
}

html[data-bs-theme="dark"] .floor21-login__tagline {
  color: #5eead4;
}

.floor21-login__lede {
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 2rem;
}

.floor21-login__mobile-brand {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-bottom: 1.35rem;
  text-align: center;
}

@media (min-width: 992px) {
  .floor21-login__mobile-brand {
    display: none;
  }
}

.floor21-login__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.floor21-login__features li {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  text-align: left;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

html[data-bs-theme="dark"] .floor21-login__features li {
  color: rgba(232, 238, 245, 0.72);
}

html[data-bs-theme="dark"] .floor21-login__features li::before {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 10px var(--f21-login-accent-glow);
}

html[data-bs-theme="light"] .floor21-login__features li::before {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.55);
}

/* —— Form column —— */
.floor21-login__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 2.5rem;
}

/* Desktop split: hero ~52% | sign-in column 48% (same structure in both themes) */
@media (min-width: 992px) {
  .floor21-login__main {
    flex: 0 0 48%;
    max-width: 520px;
    min-width: 0;
    padding: 2.5rem 2.5rem 3rem;
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.15);
  }

  html[data-bs-theme="dark"] .floor21-login__main {
    background: rgba(8, 14, 26, 0.45);
    border-left-color: rgba(255, 255, 255, 0.08);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.22);
  }

  html[data-bs-theme="light"] .floor21-login__main {
    background: rgba(255, 255, 255, 0.55);
    border-left-color: rgba(21, 42, 82, 0.1);
    box-shadow: -12px 0 48px rgba(21, 42, 82, 0.08);
  }
}

.floor21-login__card-wrap {
  width: 100%;
  max-width: 420px;
}

.floor21-login__card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.floor21-login__card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  text-align: center;
}

/* Dark theme on login — blue card and form */
html[data-bs-theme="dark"] .floor21-login__card {
  --bs-card-bg: rgba(14, 24, 42, 0.88);
  --bs-card-border-color: rgba(255, 255, 255, 0.1);
  --bs-card-color: #e8eef5;
  background: rgba(14, 24, 42, 0.88);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e8eef5;
}

html[data-bs-theme="dark"] .floor21-login__card .floor21-login__card-title {
  color: #fff;
}

html[data-bs-theme="dark"] .floor21-login__card .form-label {
  color: rgba(232, 238, 245, 0.9);
}

html[data-bs-theme="dark"] .floor21-login__card .form-control {
  background-color: rgba(8, 14, 26, 0.75);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e8eef5;
}

html[data-bs-theme="dark"] .floor21-login__card .form-control::placeholder {
  color: rgba(232, 238, 245, 0.4);
}

html[data-bs-theme="dark"] .floor21-login__card .form-control:focus {
  background-color: rgba(8, 14, 26, 0.92);
  border-color: rgba(45, 212, 191, 0.5);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.18);
}

html[data-bs-theme="dark"] .floor21-login__card .text-muted {
  color: rgba(232, 238, 245, 0.55) !important;
}

html[data-bs-theme="dark"] .floor21-login__card .btn-primary {
  background: linear-gradient(118deg, #1a4d6b 0%, #0d6e62 100%);
  border-color: rgba(45, 212, 191, 0.35);
}

html[data-bs-theme="dark"] .floor21-login__card .btn-primary:hover {
  background: linear-gradient(118deg, #1e5a7a 0%, #0f8578 100%);
  border-color: rgba(45, 212, 191, 0.55);
}

@media (min-width: 992px) {
  html[data-bs-theme="dark"] .floor21-login__card {
    background: rgba(12, 20, 36, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  html[data-bs-theme="light"] .floor21-login__card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(21, 42, 82, 0.1);
    box-shadow: none;
  }
}

@media (min-width: 992px) {
  .floor21-login__card-title {
    display: none;
  }
}

/* Decorative accents on mobile (visible when hero hidden) */
.floor21-login__accent {
  display: block;
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

html[data-bs-theme="dark"] .floor21-login__accent--teal {
  width: 220px;
  height: 220px;
  background: #2dd4bf;
  top: -60px;
  right: -40px;
}

html[data-bs-theme="dark"] .floor21-login__accent--blue {
  width: 180px;
  height: 180px;
  background: #5eb8e8;
  bottom: 15%;
  left: -50px;
}

html[data-bs-theme="light"] .floor21-login__accent--teal {
  width: 220px;
  height: 220px;
  background: #2dd4bf;
  top: -60px;
  right: -40px;
}

html[data-bs-theme="light"] .floor21-login__accent--blue {
  width: 180px;
  height: 180px;
  background: #5eb8e8;
  bottom: 15%;
  left: -50px;
}

@media (min-width: 992px) {
  .floor21-login__accent {
    display: none;
  }
}

/* Light theme */
html[data-bs-theme="light"] body.floor21-login {
  background-color: #e8eef5;
}

html[data-bs-theme="light"] .floor21-login {
  --f21-login-skyline: url("../images/login-skyline-light.svg");
  --f21-login-brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36' viewBox='0 0 72 36'%3E%3Cg fill='%231e4d6b' fill-opacity='.06'%3E%3Crect x='2' y='2' width='32' height='14' rx='1'/%3E%3Crect x='38' y='2' width='32' height='14' rx='1'/%3E%3Crect x='20' y='20' width='32' height='14' rx='1'/%3E%3C/g%3E%3C/svg%3E");
  --f21-login-grad: linear-gradient(145deg, #e8eef5 0%, #d4e4f0 40%, #c5e8e2 100%);
  --f21-login-grad-soft: radial-gradient(ellipse 80% 60% at 15% 85%, rgba(13, 110, 98, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(30, 77, 107, 0.07), transparent 50%);
  --f21-login-windows: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%231e4d6b' stroke-opacity='.1' stroke-width='.8'%3E%3Crect x='4' y='4' width='16' height='16'/%3E%3Crect x='28' y='4' width='16' height='16'/%3E%3Crect x='4' y='28' width='16' height='16'/%3E%3Crect x='28' y='28' width='16' height='16'/%3E%3C/g%3E%3C/svg%3E");
  background: var(--f21-login-grad);
  color: #1a2a3a;
}

[data-bs-theme="light"] .floor21-login__title {
  color: #152a52;
}

[data-bs-theme="light"] .floor21-login__tagline {
  color: #0d6e62;
}

[data-bs-theme="light"] .floor21-login__lede,
[data-bs-theme="light"] .floor21-login__features li {
  color: rgba(26, 42, 58, 0.75);
}

[data-bs-theme="light"] .floor21-login__card {
  border-color: rgba(21, 42, 82, 0.1);
  box-shadow: 0 12px 40px rgba(21, 42, 82, 0.1);
}

[data-bs-theme="light"] .floor21-login__accent--teal {
  opacity: 0.2;
}

[data-bs-theme="light"] .floor21-login__accent--blue {
  opacity: 0.18;
}

/* Keep login backdrop visible while POST + redirect completes (avoids white flash). */
body.floor21-login--pending {
  overflow: hidden;
}

.floor21-login__pending {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 32, 0.42);
  backdrop-filter: blur(2px);
}

html[data-bs-theme="light"] .floor21-login__pending {
  background: rgba(255, 255, 255, 0.55);
}

.floor21-login__pending-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 0.75rem;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  font-weight: 500;
}
