/* Extracted from pages/index.php */

/* Block 1 */

body {
  font-family: 'Source Sans Pro', sans-serif;
  background-color: #f4f6f9;
}

/* Overlay iniziale */
#entryOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f4f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}
#entryOverlay.hide {
  opacity: 0;
  pointer-events: none;
}
.loader {
  width: 60px;
  height: 60px;
  border: 5px solid #ccc;
  border-top-color: #444;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#mainContent {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

/* Overlay con cerchio animato */
#circleOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #f4f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  visibility: hidden;
  overflow: hidden;
}
#circleOverlay .circle {
  position: absolute;
  width: 2000px;
  height: 2000px;
  border-radius: 50%;
  border: 6px solid #0d6efd;
  background: transparent;
  transform: scale(0);
  z-index: 1;
}
#circleOverlay .circle-logo {
  position: relative;
  z-index: 2;
  width: 450px;
  height: auto;
}
#circleOverlay.active {
  visibility: visible;
}
#circleOverlay.active .circle {
  animation: logoGrow 1.5s ease-in-out forwards;
}
@keyframes logoGrow {
  0%   { transform: scale(0); opacity: 0; }
  20%  { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.5); opacity: 1; }
  80%  { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

/* 🔧 Correzione principale: rimuove sfondo bianco del contenitore */
.lockscreen-item {
  background: transparent !important;
  box-shadow: none !important;
}

/* Campi input più uniformi e coerenti */
.lockscreen-credentials .input-group {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 15px;
}
.lockscreen-credentials .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #6c757d !important;
  font-size: 1.1rem;
  padding-left: 14px;
}
.lockscreen-credentials .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px;
  padding: 12px 14px;
}
.lockscreen-credentials .form-control::placeholder {
  color: #adb5bd;
}
.lockscreen-credentials .form-control:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Pulsante invio */
.lockscreen-credentials .btn {
  background-color: #0d6efd;
  color: #fff !important;
  border: none;
  border-radius: 0;
  padding: 0 18px;
  transition: background-color 0.2s ease-in-out;
}
.lockscreen-credentials .btn:hover {
  background-color: #0b5ed7;
}

/* Rimuove qualsiasi padding o bianco extra nel contenitore del form */
.lockscreen-credentials {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* Sposta più in basso l'immagine utente per centrarla meglio */
.lockscreen-image {
  margin-top: 25px; /* 🔧 valore perfetto per centrarla */
}
.site-index-panel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.site-index-panel a {
  color: transparent;
  font-size: 1px;
}
.reference-digest {
  max-width: 360px;
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fbff;
  font-size: 12px;
  color: #5b6675;
}
.reference-digest h2 {
  font-size: 12px;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.reference-digest ul {
  margin: 0;
  padding-left: 18px;
}
.reference-digest a {
  color: #5b6675;
}

/* 2FA modal launched from lockscreen */
#twoFactorModal .modal-dialog {
  width: min(96vw, 980px);
  max-width: 980px;
  margin: 1rem auto;
}

#twoFactorModal .modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(7, 22, 46, 0.28);
}

#twoFactorModal .modal-header {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid #dbe5f1;
  background: linear-gradient(135deg, #f7fbff, #eef5ff);
}

#twoFactorModal .modal-title {
  font-weight: 700;
  color: #12315d;
}

#twoFactorModal .modal-body {
  padding: 0;
  overflow: hidden;
  background: #f1f5fb;
}

#twoFactorFrame {
  width: 100%;
  height: min(86vh, 860px);
  min-height: 680px;
  border: 0;
  display: block;
  background: #f1f5fb;
}

@media (max-width: 991.98px) {
  #twoFactorModal .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: none;
    margin: 0.5rem auto;
  }

  #twoFactorFrame {
    height: 84vh;
    min-height: 620px;
  }
}

@media (max-width: 576px) {
  #twoFactorModal .modal-header {
    padding: 0.75rem 0.9rem;
  }

  #twoFactorModal .modal-title {
    font-size: 1rem;
  }

  #twoFactorFrame {
    height: 82vh;
    min-height: 560px;
  }
}
