/* Login background - smart e-commerce print factory */

.login-screen {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.login-bg-mechanism {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.24;
}

.login-bg-stroke {
  fill: none;
  stroke: #2a2d35;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-bg-stroke--flow {
  stroke: rgba(58, 120, 180, 0.28);
  stroke-dasharray: 5 9;
  animation: loginStrokeFlow 6s linear infinite;
}

.login-bg-tag {
  fill: rgba(255, 255, 255, 0.38);
  stroke: rgba(42, 45, 53, 0.12);
  stroke-width: 1;
}

.login-bg-tag-hole {
  fill: #eef1f5;
  stroke: rgba(42, 45, 53, 0.14);
  stroke-width: 1;
}

.login-bg-hub {
  fill: rgba(var(--brand-rgb), 0.12);
  stroke: rgba(var(--brand-rgb), 0.35);
  stroke-width: 1;
  animation: loginHubPulse 3s ease-in-out infinite;
}

.login-bg-stack--a {
  animation: loginTagStackA 14s ease-in-out infinite alternate;
}

.login-bg-stack--b {
  animation: loginTagStackB 16s ease-in-out infinite alternate;
}

.login-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.login-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 38%, rgba(var(--brand-rgb), 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 30% 25% at 22% 12%, rgba(255, 106, 0, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 30% 25% at 78% 14%, rgba(224, 46, 36, 0.03) 0%, transparent 70%);
  animation: loginGlowShift 8s ease-in-out infinite alternate;
}

.login-screen-inner {
  position: relative;
  z-index: 2;
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(42, 45, 53, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px rgba(58, 120, 180, 0.06),
    0 28px 72px rgba(30, 35, 45, 0.11),
    0 8px 24px rgba(30, 35, 45, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: loginCardFloat 6s ease-in-out infinite;
}

.site-footer {
  position: relative;
  z-index: 2;
}

@keyframes loginTagStackA {
  from { transform: translate(0, 0) rotate(-3deg); }
  to { transform: translate(10px, -12px) rotate(3deg); }
}

@keyframes loginTagStackB {
  from { transform: translate(0, 0) rotate(4deg); }
  to { transform: translate(-12px, 10px) rotate(-3deg); }
}

@keyframes loginStrokeFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -56; }
}

@keyframes loginHubPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes loginGlowShift {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

@keyframes loginCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg-stack--a,
  .login-bg-stack--b,
  .login-bg-stroke--flow,
  .login-bg-hub,
  .login-bg-glow,
  .login-card {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .login-bg-mechanism {
    opacity: 0.12;
  }
  .login-card {
    animation: none;
  }
}
