* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: url('/public/assets/image/sfo1.jpg') no-repeat center center fixed;
    background-size: cover;
    background-position: center;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.3rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: 100px;
}

.icons {
    position: absolute;
    right: 5%;
    font-size: 1.15rem;
    color: #000000;
    cursor: pointer;
    text-decoration: none;
    display: none;
}

#check {
    display: none;
}

header::before {
    content: '';
    position: absolute;
    background-color: rgba(0, 0, 0, .1);
    backdrop-filter: blur(50px);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.navigation a {
    text-decoration: none;
    font-size: 1.15rem;
    color: #000;
    margin-left: 2.5rem;
    font-weight: 500;
}

.logo {
    width: 80px;
    background: transparent;
    background-position: center;
    font-size: 2rem;
    text-decoration: none;
}

.logo_box {
    display: flex;
    justify-content: center;
    align-items: center;
}


.form-box h1 {
    font-size: 2em;
    color: black;
    text-align: center;
}

.form-box h2 {
    font-size: 1, 5em;
    color: black;
    text-align: center;
    margin-top: 5px;
}


#input_s input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #000000;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-box {
    border-bottom: 1px solid #000;
    margin: 25px 0;
    flex: 1 1 35%;
    display: flex;
    align-items: center;
    position: relative;

}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #000000;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box label {
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 1em;
    color: #000000;
    font-weight: 500;
    pointer-events: none;
}

.btn {
    text-align: center;
    text-decoration: none;
    width: auto;
    height: 45px;
    background: #000;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #ffffff;
    font-weight: 500;
    margin: 10px auto;
    display: block;
    padding: 10px 20px;
}

.btn_clr {
    text-align: center;
    text-decoration: none;
    width: auto;
    height: 30px; /* più basso */
    background: #000;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em; /* font più piccolo */
    color: #ffffff;
    font-weight: 500;
    margin: 5px auto; /* margini più stretti */
    display: block;
    padding: 5px 15px; /* padding più piccolo */
}


.error {
    background: #F2DEDE;
    color: #A94442;
    padding: 10px;
    width: 95%;
    border-radius: 5px;
    margin: 20px auto;
    text-align: center;
}

.success {
    background: #eaffec;
    color: #42ff94;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    margin: 20px auto;
    text-align: center;
}

.popup-content {
    margin-top: 5px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    width: auto;
    max-width: 325px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 90px auto;
}

.form-box>div:first-child {
    text-align: center;
}

button {
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    display: block;
    cursor: pointer;
}

button:hover {
    background-color: #000000;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-container input[type="checkbox"] {
    width: 60px;
    height: 20px;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    display: inline-block;
    position: relative;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked {
    background-color: #333;
    border-color: #333;
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    position: absolute;
    top: 1px;
    left: 4px;
}

.checkbox-container label p {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

.checkbox-container label {
    cursor: pointer;
}

.ref_ip {
    appearance: none;
    color: #000;
}

.popup-content {
    margin-top: 5px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 10px auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .popup-content {
        width: 350px;
        position: absolute;
    }
}


.remember-forgot {
    font-size: .9em;
    color: #000;
    font-weight: 500;
    margin: 15px 0 15px;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input {
    accent-color: black;
    margin-right: 3px;
}

.remember-forgot a {
    color: #000;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}


.register {
    font-size: .9em;
    color: #000;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.register-pa {
    color: #000;
    text-decoration: none;
    text-align: left;
}

.register-pa:hover {
    text-decoration: underline;
}


/* Corresponding Psw */

.password-message {
    margin-top: 8px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.password-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.password-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Corresponding Psw */


.div_success {
    width: 300px;
    max-width: 1200px;
    /* Larghezza massima opzionale */
    margin: 0 auto;
    /* Centratura orizzontale */
    padding: 20px;
    text-align: center;
    /* Allineamento testo al centro */
}



/* Imposta lo stile di base per il footer */
#footer {
    background-color: #333;
    /* Colore di sfondo scuro */
    color: white;
    /* Colore del testo chiaro */
    padding: 20px 0;
    /* Spaziatura interna */
    font-size: 14px;
    /* Imposta la dimensione del testo */
    text-align: center;
    /* Centra il testo di base */
    margin-top: 5px;
    /* Spazio sopra il footer */
    position: relative;
}

/* Contenitore per i contenuti del footer */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    /* Adatta il layout su schermi più piccoli */
}

/* Colonna a sinistra del footer */
.footer-left {
    flex: 1;
    text-align: left;
}

/* Colonna centrale del footer */
.footer-center {
    flex: 2;
}

.footer-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-center li {
    display: inline;
}

.footer-center a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-center a:hover {
    color: #a8a8a8;
    /* Colore di hover per i link */
}

/* Colonna a destra del footer */
.footer-right {
    flex: 1;
    text-align: right;
}

.footer-right p {
    margin-bottom: 10px;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
}

.social-icons li {
    display: inline;
}

.social-icons a {
    color: white;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #a8a8a8;
    /* Colore di hover per le icone social */
}

/* Responsività: rendiamo il layout mobile-friendly */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        /* Disposizione verticale su schermi piccoli */
        text-align: center;
    }

    .footer-center ul {
        flex-direction: column;
        /* I link si disporranno in colonna */
        gap: 10px;
    }
}


@media (max-width: 768px) {
    body {
        min-height: 100vh;
        background: url('/public/assets/image/sfo1.jpg') no-repeat center center fixed;
        background-size: cover;
        background-position: center;
        height: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .icons {
        display: inline-flex;
    }

    #check {
        display: none;
    }

    #check:checked~.icons #icon.menu {
        display: none;
    }

    .icons #icon-close {
        display: none;
    }

    #check:checked~.icons #icon.close {
        display: block;
    }

    .navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 0;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
        background: rgba(0, 0, 0, .1);
        backdrop-filter: blur(50px);
        overflow: hidden;
        transition: .3s ease;
    }

    #check:checked~.navigation {
        height: auto;
    }

    .navigation a {
        display: block;
        font-size: 1.1rem;
        margin: 1.5rem 0;
        text-align: center;
        transition: translatey(-50px);
        transition: .3s ease;
    }

    #check:checked~.navigation a {
        transition: translatey(-50px);
        opacity: 1;
        transition-delay: calc(.15s * var(--i));
    }

    .table {
        font-size: 0.8em;
    }

    .logo {
        width: 80px;
        background: transparent;
        background-position: left;
        font-size: 2rem;
        text-decoration: none;
    }
}


.select_minimal {
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 16px;
    color: #626262;
    font-weight: 600;
    padding: 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
}

/* Colore grigio solo quando il valore è vuoto */
select.select_minimal:has(option:checked[hidden]) {
    color: gray;
}

/* Imposta colore nero per tutte le opzioni nella tendina */
.select_minimal option {
    color: black;
}


#searchresult {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    overflow-x: hidden;
}

.search-item {
    padding: 5px 10px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.search-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.search-item:hover {
    background-color: #f8f9fa;
    color: #000000;
    font-weight: bold;
    transform: translateX(2px);
}

.search-item.highlighted {
    background-color: #e9f5ff;
    font-weight: 500;
}

/* Scrollbar personalizzata */
#searchresult::-webkit-scrollbar {
    width: 6px;
}

#searchresult::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

#searchresult::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#searchresult::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.no-result {
    padding: 5px 10px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}
