/* The login screen only: login box, input affixes, the ambient ghost background and their responsive rules. Nothing here applies once the operator is authenticated. */

/* Login screen */
.login-wrapper {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  position: relative;
  overflow: hidden;
}
.login-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  width: 100%;
  background: var(--background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  animation: navIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 3.5rem;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@keyframes navIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}
.login-box {
  width: 100%;
  max-width: 420px;
  background: transparent;
  border: 0;
  padding: 2.25rem 1rem;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
@keyframes cardIn {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.login-title {
  font-family: var(--font-sans);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 0.375rem;
  color: var(--foreground);
  line-height: 1.2;
}
.login-subtitle {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0 0 1.75rem;
  text-align: center;
}
.login-meta {
  position: relative;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.login-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 1px;
  transform: translateX(-50%);
  background: var(--border);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 14%,
    #000 38%,
    #000 62%,
    transparent 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 14%,
    #000 38%,
    #000 62%,
    transparent 86%,
    transparent 100%
  );
}
.login-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  height: 1.5rem;
}
.login-chip i {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.login-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: center;
}
.login-footer i {
  color: var(--muted-foreground);
}

/* Input affixes */
.input-affix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-affix input {
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
  width: 100%;
}
.input-affix .affix-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--muted-foreground);
  pointer-events: none;
  font-size: 0.875rem;
}
.input-affix .affix-btn {
  position: absolute;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.input-affix .affix-btn:hover {
  background: transparent;
  color: var(--foreground);
}

/* Login ambient background */
.ghost-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.ghost-bg .ghost {
  position: absolute;
  color: var(--foreground);
  opacity: 0.04;
  animation: ghostFloat 16s ease-in-out infinite;
}
.dark .ghost-bg .ghost {
  opacity: 0.07;
}
.ghost-bg .ghost-1 {
  top: 10%;
  left: 6%;
  font-size: 2.25rem;
  animation-delay: 0s;
  animation-duration: 14s;
}
.ghost-bg .ghost-2 {
  top: 22%;
  left: 18%;
  font-size: 1.5rem;
  animation-delay: -2s;
  animation-duration: 18s;
}
.ghost-bg .ghost-3 {
  top: 70%;
  left: 9%;
  font-size: 2.75rem;
  animation-delay: -4s;
  animation-duration: 20s;
}
.ghost-bg .ghost-4 {
  top: 55%;
  left: 24%;
  font-size: 1.25rem;
  animation-delay: -6s;
  animation-duration: 13s;
}
.ghost-bg .ghost-5 {
  top: 85%;
  left: 36%;
  font-size: 1.75rem;
  animation-delay: -8s;
  animation-duration: 17s;
}
.ghost-bg .ghost-6 {
  top: 12%;
  left: 42%;
  font-size: 1.5rem;
  animation-delay: -10s;
  animation-duration: 19s;
}
.ghost-bg .ghost-7 {
  top: 30%;
  right: 12%;
  font-size: 3rem;
  animation-delay: -3s;
  animation-duration: 22s;
}
.ghost-bg .ghost-8 {
  top: 50%;
  right: 6%;
  font-size: 1.875rem;
  animation-delay: -5s;
  animation-duration: 15s;
}
.ghost-bg .ghost-9 {
  top: 78%;
  right: 18%;
  font-size: 2rem;
  animation-delay: -7s;
  animation-duration: 21s;
}
.ghost-bg .ghost-10 {
  top: 18%;
  right: 30%;
  font-size: 1.25rem;
  animation-delay: -9s;
  animation-duration: 16s;
}
.ghost-bg .ghost-11 {
  top: 62%;
  right: 38%;
  font-size: 1.625rem;
  animation-delay: -11s;
  animation-duration: 18s;
}
.ghost-bg .ghost-12 {
  top: 92%;
  left: 52%;
  font-size: 1.375rem;
  animation-delay: -1s;
  animation-duration: 23s;
}

@keyframes ghostFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(-4deg);
  }
  25% {
    transform: translate(14px, -18px) rotate(3deg);
  }
  50% {
    transform: translate(-10px, -30px) rotate(-5deg);
  }
  75% {
    transform: translate(8px, -14px) rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghost-bg .ghost {
    animation: none;
  }
}

/* Responsive layout */
@media (max-width: 640px) {
  .login-topbar-inner {
    padding: 0 1rem;
    gap: 0.5rem;
    height: 3.25rem;
  }
  .login-box {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }
  .login-title {
    font-size: 1.375rem;
  }
  .ghost-bg .ghost-7 {
    font-size: 2rem;
  }
  .ghost-bg .ghost-3 {
    font-size: 1.75rem;
  }
}
@media (max-width: 380px) {
  .brand-text {
    display: none;
  }
  .login-main {
    padding: 1rem;
  }
}

