:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --bg-color: #f8f9fa;
    --text-color: #000;
    --border-color: #e0e0e0;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    background: linear-gradient(135deg, #f8fafd 0%, #eef2f6 100%);
    padding: 1.2rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

footer {
    background: linear-gradient(135deg, #f8fafd 0%, #eef2f6 100%);
    color: var(--primary-color);
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.header-login {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.header-back {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.header-login a,
.header-back a {
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: inline-flex;
    padding: 10px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.header-login a:hover,
.header-back a:hover {
    color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.header-login a:hover, .header-back a:hover {
    transform: translateY(-3px) scale(1.05);
}

.utente-icona {
    width: 24px;
    height: 24px;
}

main {
    flex: 1;
    padding: 30px 20px;
    max-width: 65%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}


input,
select {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
}

input[type="text"]:focus,
select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

input[type="text"] {
    flex: 1;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s;
}

button:hover {
    background-color: #2980b9;
}

button:active {
    transform: scale(0.97);
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}


/* --- Sezione Ricerca --- */
.search-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.search-filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.search-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-reset {
    background-color: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    font-weight: 600;
}

.btn-reset:hover {
    background-color: #e74c3c;
    color: white;
}

.exams-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

#lista {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}

#lista li {
    background-color: white;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


#lista li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #ccc;
}

#lista li label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
    gap: 15px;
}

#lista li input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary-color); /* serve per Coloraree la spunta di azzurro */
    margin: 0;
}

.formCliente {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
}

.formInsert {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.formInsert.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.formInsert.vertical .formCoppia {
    align-items: center;
    width: 100%;
}

.formInsert.vertical .formCoppia input {
    max-width: 450px;
    padding: 16px 20px;
    font-size: 1.15rem;
    text-align: center;
}

.formInsert.vertical .formCoppia label {
    font-size: 1.1rem;
}

.form-login {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 60px;
}

.form-login button {
    padding: 15px 40px;
    font-size: 1.2rem;
    width: 100%;
    max-width: 450px;
}

.main-centrato {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.formCoppia {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formCoppia label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
}

.formCoppia input,
.formCoppia textarea {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #f9fafb;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

.formCoppia input:focus,
.formCoppia textarea:focus {
    border-color: var(--secondary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    outline: none;
}

.buttonFormCliente {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}



.exam-nome {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.exam-categoria {
    flex: 1;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.exam-prezzo {
    flex: 1;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

/* Resposive per pagina di Login */
.login-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.login-body main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

@media (max-width: 768px) {
    .formInsert {
        grid-template-columns: 1fr;
    }

    .formInsert.vertical .formCoppia input {
        max-width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
    }

    .formInsert.vertical .formCoppia label {
        font-size: 0.9rem;
    }

    .form-login {
        max-width: 90%;
        padding: 25px 20px;
        margin: 10px auto;
    }

    .form-login h2 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    .form-login button {
        padding: 12px 20px;
        font-size: 1rem;
        max-width: 100%;
    }

    .header-login {
        text-align: right;
        right: 15px;
        left: 15px;
    }

    .logo {
        height: 50px;
    }

    main {
        max-width: 95%;
        padding: 20px 15px;
    }

        /* header,
        footer {
            text-align: center;
            padding: 0.8rem 1rem;
        } */
}