/* Login Page Styles */

/* Input con icona inline */
.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1rem;
  z-index: 10;
}

.input-with-icon input {
  padding-left: 40px;
  transition: all 0.3s ease;
}

.input-with-icon input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: #86b7fe;
}

/* Bottone login moderno */
#button_conferma {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 12px 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#button_conferma:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#button_conferma:active:not(:disabled) {
  transform: translateY(0);
}

#button_conferma:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#button_conferma .btn-text {
  transition: opacity 0.2s ease;
}

#button_conferma.loading .btn-text {
  opacity: 0;
}

/* Spinner loading */
.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#button_conferma.loading .btn-spinner {
  display: inline-block;
}

.spinner-border-sm {
  width: 1.2rem;
  height: 1.2rem;
  border-width: 0.15em;
}

/* Messaggi di errore/successo moderni */
.alert-modern {
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 500;
  animation: slideInDown 0.4s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-modern .alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-modern.alert-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.alert-modern.alert-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.alert-modern.shake {
  animation: shake 0.5s ease-in-out;
}

/* Card login migliorata */
.login-card {
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Logo dinamico e responsive */
.logo-container {
  margin-bottom: 1rem;
}

.login-logo {
  width: 100%;
  max-width: 350px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Responsive logo sizing */
@media (max-width: 576px) {
  .login-logo {
    max-width: 260px;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .login-logo {
    max-width: 300px;
  }
}

@media (min-width: 769px) {
  .login-logo {
    max-width: 380px;
  }
}

/* Animazioni */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Input form-control migliorato */
#codice_dipendente {
  height: 45px;
  border-radius: 8px;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
}

#codice_dipendente:focus {
  border-color: #667eea;
}

/* Titolo */
.login-title {
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
