/* =======================================
   Upmidify – GLPI Login Theme (Blue)
   ======================================= */

/* Background: Upmidify-like blue gradient */
body.welcome-anonymous,
body.page-anonymous,
.page-anonymous {
  background: radial-gradient(1100px 700px at 18% 18%, rgba(43,108,255,.50) 0%, rgba(20,86,165,.22) 35%, rgba(6,32,72,.0) 70%),
              linear-gradient(180deg, #1e70b6 0%, #135d9b 35%, #0e467c 70%, #0a2f5a 100%) !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}

/* Add a soft overlay feel (keeps it "website-like") */
.page-anonymous::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 45%);
}

/* Layout spacing */
.page-anonymous .flex-fill {
  padding-left: 24px;
  padding-right: 24px;
}

/* Card: cleaner, premium */
.page-anonymous .card,
.login-container .card,
#login .card {
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.35) !important;
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(8px);
}

/* Headline stronger */
.page-anonymous h1,
.page-anonymous h2,
.page-anonymous .card-title {
  color: #0b1b3a !important;
  font-weight: 800 !important;
}

/* Labels a bit darker */
.page-anonymous label,
.page-anonymous .form-label {
  color: rgba(11,27,58,.80) !important;
  font-weight: 600 !important;
}

/* Inputs: more modern */
.form-control,
select,
input[type="text"],
input[type="password"] {
  border-radius: 12px !important;
  border: 1px solid rgba(11,27,58,.18) !important;
  background: rgba(255,255,255,.96) !important;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #2b6cff !important;
  box-shadow: 0 0 0 .25rem rgba(43,108,255,.22) !important;
}

/* Buttons: Upmidify blue */
.btn-primary,
.btn-success,
button[type="submit"],
input[type="submit"] {
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 700 !important;
  background: linear-gradient(180deg, #2b6cff 0%, #1e4dd8 100%) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(30,77,216,.30) !important;
}

.btn-primary:hover,
.btn-success:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-primary:active,
.btn-success:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: translateY(0px);
}

/* Checkbox accent (best effort across browsers) */
input[type="checkbox"] {
  accent-color: #1e4dd8;
}

/* Footer text: cleaner on blue */
.page-anonymous .mt-4,
.page-anonymous .text-muted,
.page-anonymous small,
.page-anonymous .copyright {
  color: rgba(255,255,255,.75) !important;
}

/* ==================================================
   Upmidify Logo – FINAL (Login + Internal)
   Internal GLPI uses <span class="glpi-logo">
   ================================================== */

/* ---------------- LOGIN PAGE ---------------- */
.page-anonymous .glpi-logo img,
.page-anonymous .glpi-logo svg {
  display: none !important;
  visibility: hidden !important;
}

.page-anonymous .glpi-logo {
  all: unset !important;
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin-bottom: 20px !important;
}

.page-anonymous .glpi-logo::before {
  content: "";
  display: inline-block !important;

  background: url("/pics/logos/logo_GLPI.png") center/contain no-repeat !important;

  width: 300px;
  height: 150px;
}

/* ---------------- INTERNAL APP ---------------- */
/* IMPORTANT: internal logo is a SPAN with background-image set by GLPI */
body:not(.welcome-anonymous) .glpi-logo {
  /* remove GLPI logo */
  background-image: none !important;
  background: none !important;

  /* show Upmidify logo directly on the element */
  background-image: url("/pics/logos/logo_GLPI.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;

  /* sizing for sidebar */
  display: block !important;
  width: 100% !important;
  height: 80px !important;
  margin: 16px auto 14px auto !important;
}

/* ensure we DO NOT inject a second logo internally */
body:not(.welcome-anonymous) .glpi-logo::before,
body:not(.welcome-anonymous) .navbar-brand::before,
body:not(.welcome-anonymous) .brand::before,
body:not(.welcome-anonymous) .logo::before {
  content: none !important;
  display: none !important;
}
