.contPrinc{
    width:100%;
    height:100%;
    min-height:calc(100dvh - 66px - 360px);
    display:flex;
    justify-content: center;
    align-items: center;
    margin-top:66px;
    background: url('/src/img/background_pattern.svg'),
        var(--first-color);
    color:var(--bs-body-color);
}
@media(max-width:770px){
    .loginForm{
        width:90%;
    }
}
@media(min-width:770px){
    .loginForm{
        width:50%;
    }
}
.loginForm{
    padding:3%;
    border-radius:25px;
    margin-bottom:2%;
    margin-top:2%;
    background:var(--bs-body-bg);
}
.cFlex{
    display: flex;
    flex-direction: row;
    gap:5px;
    justify-content: center;
    align-items: center;
}
.btnSubmit{
    width:100%;
}
input[type="checkbox"]{
    width:20px;
    height:20px;
}
.azienda, .privato{
    display:none;
}

/* Animazioni fade-in per cambio tipo cliente */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Indicatore forza password */
.password-strength-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-strength-bg {
    flex: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.password-strength-bar.weak {
    background-color: #dc3545;
}

.password-strength-bar.medium {
    background-color: #ffc107;
}

.password-strength-bar.strong {
    background-color: #17a2b8;
}

.password-strength-bar.very-strong {
    background-color: #28a745;
}

.password-strength-text {
    min-width: 80px;
    font-weight: 600;
}

/* Requisiti password con feedback visivo */
.password-requirements ul li {
    transition: all 0.2s ease;
    color: #6c757d;
    margin-bottom: 4px;
}

.password-requirements ul li i {
    font-size: 8px;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.password-requirements ul li.met {
    color: #28a745;
}

.password-requirements ul li.met i {
    color: #28a745;
}

.password-requirements ul li.met i::before {
    content: "\f058"; /* fa-check-circle */
}

.password-requirements ul li.unmet {
    color: #dc3545;
}

.password-requirements ul li.unmet i {
    color: #dc3545;
}

.password-requirements ul li.unmet i::before {
    content: "\f057"; /* fa-times-circle */
}

/* Helper text migliorato */
.form-text {
    display: block;
    margin-top: 0.25rem;
}

/* Tooltip icon styling */
label i.fa-circle-info {
    font-size: 0.9rem;
    cursor: help;
    transition: color 0.2s ease;
}

label i.fa-circle-info:hover {
    color: var(--first-color) !important;
}

/* Migliorie feedback validazione Bootstrap */
.form-control.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Miglioramenti checkbox privacy */
input[type="checkbox"]:checked {
    background-color: var(--first-color);
    border-color: var(--first-color);
}

/* Miglioramenti responsive per mobile */
@media(max-width: 576px) {
    .loginForm {
        width: 95%;
        padding: 5%;
    }

    .password-strength-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .password-strength-text {
        margin-top: 4px;
    }

    .cFlex {
        flex-direction: column;
        gap: 10px;
    }

    .cFlex select {
        width: 100% !important;
    }

    .row .col-sm {
        margin-bottom: 10px;
    }
}

/* Loading state per bottone submit */
.btnSubmit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus states migliorati */
.form-control:focus,
.form-select:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--first-color-rgb), 0.25);
}

/* Transizioni smooth per tutti gli input */
.form-control,
.form-select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

/* Miglioramento spazio tra campi form */
.mb-3 {
    margin-bottom: 1.25rem !important;
}