.auth-error,
.auth-success {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

.d-none {
    display: none !important;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-error {
    border-left: 5px solid #d32f2f;
    color: #d32f2f;
    background: linear-gradient(to right, rgba(255, 234, 234, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
}

.auth-success {
    border-left: 5px solid #388e3c;
    color: #388e3c;
    background: linear-gradient(to right, rgba(232, 245, 233, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
}

.auth-error svg,
.auth-success svg {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    fill: currentColor;
    flex-shrink: 0;
}

.auth-error::after,
.auth-success::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, currentColor 0%, transparent 100%);
    opacity: 0.2;
}

.auth-message {
    flex: 1;
}

.auth-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px;
    margin-left: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.auth-close svg {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Stili per i badge di errore nei campi */
.form-error {
    color: #d32f2f;
    font-size: 12px;
    font-weight: 500;
    display: none;
    margin-left: 10px;
    background-color: #ffeaea;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.form-label-container {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .form-label-container {
        align-items: center;
        align-items: flex-start;
    }
    
    .form-error {
    margin-left: 0;
    margin-top: 0px;
    white-space: normal;
}
}

.form-control.is-invalid {
    border-color: #d32f2f;
    background-color: #fff6f6;
}

.form-control.is-invalid:focus {
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.1);
}

.loading-spinner {
    opacity: 0.7;
}