/*
 * LIB3RTY login experience for GLPI 10.0.16.
 * Scoped to templates/pages/login.html.twig only.
 */

:root {
   --lib3rty-green: #97d700;
   --lib3rty-green-deep: #75ab00;
   --lib3rty-graphite: #1d242c;
   --lib3rty-graphite-2: #151b22;
   --lib3rty-black: #000000;
   --lib3rty-white: #ffffff;
   --lib3rty-muted: #aeb8c4;
}

.welcome-anonymous {
   min-height: 100svh;
   overflow: hidden;
   background:
      radial-gradient(circle at 16% 14%, rgba(151, 215, 0, 0.2), transparent 19rem),
      radial-gradient(circle at 82% 18%, rgba(151, 215, 0, 0.12), transparent 24rem),
      linear-gradient(135deg, #1d242c 0%, #151b22 54%, #0a0d10 100%);
   color: var(--lib3rty-white);
   font-family: "Microsoft Sans Serif", "Segoe UI", Arial, sans-serif;
}

.welcome-anonymous::before {
   content: "";
   position: fixed;
   inset: 0;
   pointer-events: none;
   background-image: url("../pics/lib3rty-pattern-dark.jpg");
   background-size: cover;
   background-position: center;
   opacity: 0.24;
   mix-blend-mode: screen;
}

.welcome-anonymous::after {
   content: "";
   position: fixed;
   inset: 0;
   pointer-events: none;
   background:
      linear-gradient(90deg, rgba(151, 215, 0, 0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(151, 215, 0, 0.05) 1px, transparent 1px);
   background-size: 72px 72px;
   mask-image: radial-gradient(circle at 50% 45%, black, transparent 72%);
   opacity: 0.35;
}

.welcome-anonymous .page-anonymous {
   position: relative;
   z-index: 1;
   min-height: 100svh;
}

.welcome-anonymous .flex-fill {
   min-height: 100svh;
   margin-top: 0 !important;
   padding: clamp(0.75rem, 2vh, 1.8rem) clamp(0.75rem, 2.2vw, 2rem) 0.85rem !important;
}

.welcome-anonymous .container-tight {
   width: min(1160px, 100%);
   max-width: 1160px !important;
   padding: 0 !important;
}

.welcome-anonymous .text-center:has(.glpi-logo) {
   display: none;
}

.welcome-anonymous .card.card-md {
   position: relative;
   overflow: hidden;
   border: 1px solid rgba(151, 215, 0, 0.22);
   border-radius: 28px;
   background: linear-gradient(135deg, rgba(19, 25, 31, 0.92), rgba(10, 13, 16, 0.96));
   box-shadow:
      0 28px 90px rgba(0, 0, 0, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
   backdrop-filter: blur(18px);
}

.welcome-anonymous .card.card-md::before {
   content: "";
   position: absolute;
   inset: -1px;
   pointer-events: none;
   border-radius: inherit;
   background:
      linear-gradient(115deg, rgba(151, 215, 0, 0.7), transparent 32%, transparent 66%, rgba(151, 215, 0, 0.4));
   opacity: 0.42;
   mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
   mask-composite: exclude;
   padding: 1px;
}

.welcome-anonymous .card-body {
   position: relative;
   z-index: 1;
   padding: 0;
}

.lib3rty-login {
   position: relative;
   min-height: clamp(500px, 78svh, 630px);
}

.lib3rty-login-grid {
   min-height: clamp(500px, 78svh, 630px);
}

.lib3rty-login-visual {
   position: relative;
   overflow: hidden;
   min-height: clamp(500px, 78svh, 630px);
   background:
      radial-gradient(circle at 28% 26%, rgba(151, 215, 0, 0.27), transparent 18rem),
      linear-gradient(150deg, rgba(29, 36, 44, 0.94), rgba(8, 10, 13, 0.97));
}

.lib3rty-login-visual::before {
   content: none;
}

.lib3rty-login-visual::after {
   content: "";
   position: absolute;
   inset: auto -18% -24% -18%;
   height: 48%;
   background:
      radial-gradient(circle, rgba(151, 215, 0, 0.24) 0 2px, transparent 3px),
      linear-gradient(90deg, transparent, rgba(151, 215, 0, 0.2), transparent);
   background-size: 42px 42px, 100% 100%;
   transform: perspective(700px) rotateX(62deg);
   transform-origin: bottom;
   opacity: 0.6;
}

.lib3rty-visual-inner {
   position: relative;
   z-index: 2;
   display: flex;
   min-height: clamp(500px, 78svh, 630px);
   flex-direction: column;
   justify-content: flex-end;
   padding: clamp(1.5rem, 3.4vw, 3rem);
}

.lib3rty-network {
   position: absolute;
   inset: 9% 9% 31% 9%;
   filter: drop-shadow(0 0 18px rgba(151, 215, 0, 0.22));
}

.lib3rty-network::before,
.lib3rty-network::after {
   content: "";
   position: absolute;
   left: 50%;
   top: 50%;
   transform: translate(-50%, -50%);
}

.lib3rty-network::before {
   z-index: 3;
   width: clamp(46px, 8vw, 72px);
   aspect-ratio: 1;
   border: 1px solid rgba(238, 255, 207, 0.46);
   border-radius: 10px;
   background:
      linear-gradient(135deg, rgba(151, 215, 0, 0.22), rgba(151, 215, 0, 0.05)),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
   box-shadow:
      0 0 0 7px rgba(151, 215, 0, 0.04),
      inset 0 0 18px rgba(151, 215, 0, 0.18),
      0 0 36px rgba(151, 215, 0, 0.2);
}

.lib3rty-network::after {
   z-index: 0;
   width: min(70%, 360px);
   aspect-ratio: 1;
   border-radius: 50%;
   background:
      radial-gradient(circle, rgba(151, 215, 0, 0.18), transparent 58%),
      repeating-linear-gradient(90deg, rgba(151, 215, 0, 0.04) 0 1px, transparent 1px 22px),
      repeating-linear-gradient(0deg, rgba(151, 215, 0, 0.035) 0 1px, transparent 1px 22px);
   opacity: 0.7;
}

.lib3rty-network .node {
   position: absolute;
   z-index: 2;
   width: 10px;
   height: 10px;
   border: 2px solid rgba(238, 255, 207, 0.92);
   border-radius: 50%;
   background: var(--lib3rty-green);
   box-shadow:
      0 0 0 8px rgba(151, 215, 0, 0.08),
      0 0 24px rgba(151, 215, 0, 0.82);
   animation: lib3rtyNodePulse 3.6s ease-in-out infinite;
}

.lib3rty-network .node-a {
   top: 50%;
   left: 7%;
   transform: translateY(-50%);
}

.lib3rty-network .node-b {
   top: 50%;
   right: 7%;
   transform: translateY(-50%);
   animation-delay: -1.2s;
}

.lib3rty-network .node-c {
   top: 10%;
   left: 50%;
   transform: translateX(-50%);
   animation-delay: -2.1s;
}

.lib3rty-network .node-d {
   bottom: 10%;
   left: 50%;
   transform: translateX(-50%);
   animation-delay: -3.2s;
}

.lib3rty-network .line {
   position: absolute;
   z-index: 1;
   overflow: visible;
   height: 1px;
   border-radius: 999px;
   background:
      linear-gradient(90deg, transparent, rgba(151, 215, 0, 0.18), rgba(151, 215, 0, 0.92), rgba(151, 215, 0, 0.18), transparent);
   box-shadow: 0 0 14px rgba(151, 215, 0, 0.34);
   transform-origin: left center;
   animation: lib3rtySignal 3.8s ease-in-out infinite;
}

.lib3rty-network .line::before,
.lib3rty-network .line::after {
   content: "";
   position: absolute;
}

.lib3rty-network .line::before {
   width: 1px;
   height: clamp(26px, 7vh, 52px);
   background: linear-gradient(180deg, transparent, rgba(151, 215, 0, 0.72), transparent);
   box-shadow: 0 0 12px rgba(151, 215, 0, 0.24);
}

.lib3rty-network .line::after {
   top: -2px;
   left: 18%;
   width: 28%;
   height: 5px;
   border-radius: 999px;
   background: linear-gradient(90deg, transparent, rgba(151, 215, 0, 0.85), transparent);
   filter: blur(1px);
   animation: lib3rtyPacket 3.8s ease-in-out infinite;
}

.lib3rty-network .line-a {
   top: 50%;
   left: 9%;
   width: 82%;
   transform: none;
}

.lib3rty-network .line-a::before {
   left: 23%;
   bottom: 0;
}

.lib3rty-network .line-b {
   top: 64%;
   left: 19%;
   width: 62%;
   transform: none;
   animation-delay: -1.1s;
}

.lib3rty-network .line-b::before {
   right: 18%;
   bottom: 0;
   height: clamp(18px, 5vh, 38px);
}

.lib3rty-network .line-c {
   top: 11%;
   left: 50%;
   width: 1px;
   height: 78%;
   transform: none;
   background: linear-gradient(180deg, transparent, rgba(151, 215, 0, 0.18), rgba(151, 215, 0, 0.86), rgba(151, 215, 0, 0.18), transparent);
   animation-delay: -2.4s;
}

.lib3rty-network .line-c::before {
   top: 24%;
   right: 0;
   width: clamp(34px, 8vw, 76px);
   height: 1px;
   background: linear-gradient(90deg, transparent, rgba(151, 215, 0, 0.72), transparent);
}

.lib3rty-network .line-c::after {
   top: 8%;
   left: -2px;
   width: 5px;
   height: 25%;
   background: linear-gradient(180deg, transparent, rgba(151, 215, 0, 0.85), transparent);
   animation: lib3rtyPacketY 3.8s ease-in-out infinite;
}

.lib3rty-visual-copy {
   position: relative;
   max-width: 24rem;
}

.lib3rty-visual-copy strong {
   display: block;
   color: var(--lib3rty-green);
   font-size: clamp(1.55rem, 2.6vw, 2.35rem);
   font-weight: 800;
   line-height: 1;
   text-transform: uppercase;
}

.lib3rty-visual-copy span {
   display: block;
   margin-top: 1rem;
   color: rgba(255, 255, 255, 0.76);
   font-size: 0.96rem;
   line-height: 1.55;
}

.lib3rty-login-panel {
   display: flex;
   flex-direction: column;
   justify-content: center;
   padding: clamp(1.6rem, 3.8vw, 3.4rem);
   border-left: 1px solid rgba(151, 215, 0, 0.14);
   background:
      radial-gradient(circle at 72% 18%, rgba(151, 215, 0, 0.12), transparent 18rem),
      linear-gradient(155deg, rgba(29, 36, 44, 0.96) 0%, rgba(18, 24, 30, 0.98) 58%, rgba(8, 10, 13, 0.98) 100%);
   color: var(--lib3rty-white);
}

.lib3rty-login-panel .card-header {
   margin-bottom: clamp(1.5rem, 4vh, 2.4rem) !important;
   padding: 0;
   border: 0;
   background: transparent;
   text-align: left;
}

.lib3rty-login-logo {
   display: block;
   width: min(270px, 70vw);
   height: auto;
   margin: 0 auto;
   filter: drop-shadow(0 12px 26px rgba(151, 215, 0, 0.08));
}

.lib3rty-login-panel .form-label {
   color: rgba(255, 255, 255, 0.88);
   font-size: 0.88rem;
   font-weight: 700;
}

.lib3rty-login-panel .form-label-description a {
   color: var(--lib3rty-green-deep);
   font-weight: 700;
}

.lib3rty-login-panel .form-control,
.lib3rty-login-panel .form-select,
.lib3rty-login-panel .select2-container--default .select2-selection--single {
   min-height: 2.85rem;
   border: 1px solid rgba(255, 255, 255, 0.14);
   border-radius: 14px;
   background-color: rgba(255, 255, 255, 0.08);
   color: var(--lib3rty-white);
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 26px rgba(0, 0, 0, 0.16);
}

.lib3rty-login-panel .form-control:focus,
.lib3rty-login-panel .form-select:focus {
   border-color: var(--lib3rty-green);
   background-color: rgba(255, 255, 255, 0.11);
   box-shadow: 0 0 0 0.22rem rgba(151, 215, 0, 0.18), 0 14px 30px rgba(0, 0, 0, 0.2);
}

.lib3rty-login-panel .form-check-input {
   border-color: rgba(255, 255, 255, 0.42);
   background-color: rgba(255, 255, 255, 0.08);
}

.lib3rty-login-panel .form-check-input:checked {
   border-color: var(--lib3rty-green-deep);
   background-color: var(--lib3rty-green-deep);
}

.lib3rty-login-panel .form-footer {
   margin-top: 1.35rem;
}

.lib3rty-login-panel .btn-primary {
   min-height: 3rem;
   border: 0;
   border-radius: 16px;
   background:
      linear-gradient(135deg, var(--lib3rty-green) 0%, #83c500 100%);
   color: #111820;
   box-shadow: 0 16px 34px rgba(117, 171, 0, 0.28);
   font-weight: 800;
   letter-spacing: 0.01em;
   text-transform: uppercase;
   transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.lib3rty-login-panel .btn-primary:hover,
.lib3rty-login-panel .btn-primary:focus {
   color: #0d1116;
   filter: brightness(1.03);
   box-shadow: 0 20px 42px rgba(117, 171, 0, 0.36);
   transform: translateY(-1px);
}

.lib3rty-login-panel .alert-danger {
   border-color: rgba(223, 21, 41, 0.22);
   border-radius: 14px;
}

.lib3rty-login-extra {
   padding: 0 2rem 2rem;
   background: var(--lib3rty-graphite);
}

.welcome-anonymous .text-muted,
.welcome-anonymous .text-muted a {
   color: rgba(255, 255, 255, 0.7) !important;
}

.welcome-anonymous .text-muted.mt-3 {
   margin-top: 0.75rem !important;
   font-size: 0.82rem;
}

.lib3rty-orbit {
   display: none;
}

.lib3rty-orbit span {
   position: absolute;
   width: 6px;
   height: 6px;
   border-radius: 50%;
   background: var(--lib3rty-green);
   box-shadow: 0 0 20px rgba(151, 215, 0, 0.9);
   opacity: 0.75;
   animation: lib3rtyDrift 9s linear infinite;
}

.lib3rty-orbit span:nth-child(1) {
   top: 16%;
   left: 45%;
}

.lib3rty-orbit span:nth-child(2) {
   top: 62%;
   left: 12%;
   animation-delay: -3s;
}

.lib3rty-orbit span:nth-child(3) {
   right: 14%;
   bottom: 18%;
   animation-delay: -6s;
}

@keyframes lib3rtyPulse {
   0%,
   100% {
      transform: scale(1);
      opacity: 1;
   }
   50% {
      transform: scale(0.72);
      opacity: 0.68;
   }
}

@keyframes lib3rtyFloat {
   0%,
   100% {
      transform: translate3d(0, 0, 0);
   }
   50% {
      transform: translate3d(0, -12px, 0);
   }
}

@keyframes lib3rtyNodePulse {
   0%,
   100% {
      box-shadow:
         0 0 0 6px rgba(151, 215, 0, 0.06),
         0 0 18px rgba(151, 215, 0, 0.62);
   }
   50% {
      box-shadow:
         0 0 0 12px rgba(151, 215, 0, 0.12),
         0 0 32px rgba(151, 215, 0, 0.92);
   }
}

@keyframes lib3rtySignal {
   0%,
   100% {
      opacity: 0.25;
      filter: saturate(0.8);
   }
   50% {
      opacity: 1;
      filter: saturate(1.3);
   }
}

@keyframes lib3rtyPacket {
   0% {
      left: 4%;
      opacity: 0;
   }
   35%,
   65% {
      opacity: 1;
   }
   100% {
      left: 70%;
      opacity: 0;
   }
}

@keyframes lib3rtyPacketY {
   0% {
      top: 4%;
      opacity: 0;
   }
   35%,
   65% {
      opacity: 1;
   }
   100% {
      top: 68%;
      opacity: 0;
   }
}

@keyframes lib3rtyDrift {
   0% {
      transform: translate3d(0, 0, 0);
   }
   50% {
      transform: translate3d(22px, -26px, 0);
   }
   100% {
      transform: translate3d(0, 0, 0);
   }
}

@media (max-width: 991.98px) {
   .welcome-anonymous {
      overflow-y: auto;
   }

   .welcome-anonymous .flex-fill {
      min-height: 100svh;
      padding: 0.8rem !important;
   }

   .welcome-anonymous .card.card-md {
      border-radius: 22px;
   }

   .lib3rty-login,
   .lib3rty-login-grid,
   .lib3rty-login-visual,
   .lib3rty-visual-inner {
      min-height: 0;
   }

   .lib3rty-login-visual {
      min-height: 230px;
   }

   .lib3rty-visual-inner {
      padding: 1.4rem;
      justify-content: flex-end;
   }

   .lib3rty-network {
      inset: 8% 10% 35% 10%;
   }

   .lib3rty-visual-copy strong {
      font-size: clamp(1.45rem, 5.8vw, 2rem);
   }

   .lib3rty-login-panel {
      border-left: 0;
      border-top: 1px solid rgba(151, 215, 0, 0.14);
      padding: clamp(1.25rem, 4.5vw, 2rem);
   }

   .lib3rty-login-logo {
      width: min(230px, 66vw);
   }
}

@media (max-width: 575.98px) {
   .welcome-anonymous {
      overflow-y: auto;
   }

   .welcome-anonymous .flex-fill {
      justify-content: flex-start !important;
      padding: 0.55rem !important;
   }

   .welcome-anonymous .card.card-md {
      border-radius: 18px;
   }

   .lib3rty-login-visual {
      min-height: 185px;
   }

   .lib3rty-network {
      inset: 9% 12% 38% 12%;
   }

   .lib3rty-login-visual::before {
      background-size: 120px auto;
      background-position: 86% 18%;
   }

   .lib3rty-visual-copy span {
      display: none;
   }

   .lib3rty-login-panel {
      padding: 1.1rem;
   }

   .lib3rty-login-logo {
      width: min(190px, 70vw);
   }

   .lib3rty-login-panel .card-header {
      margin-bottom: 1.1rem !important;
   }

   .lib3rty-login-panel .mb-3,
   .lib3rty-login-panel .mb-4 {
      margin-bottom: 0.85rem !important;
   }

   .lib3rty-login-panel .form-control {
      min-height: 2.65rem;
   }

   .lib3rty-login-panel .btn-primary {
      min-height: 2.75rem;
   }
}

@media (prefers-reduced-motion: reduce) {
   .lib3rty-network .node,
   .lib3rty-network .line,
   .lib3rty-orbit span {
      animation: none;
   }
}
