body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    padding: 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

th, td {
    padding: 12px 16px;
    border: 1px solid #ddd;
    text-align: left;
}

thead {
    background-color: #3498db;
    color: white;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Evidenziazione celle specifiche */
td[style*="lightgreen"] {
    background-color: #b6eab6 !important;
    color: #2c662d;
    text-align: center;
}
td[style*="lightcoral"] {
    background-color: #f7c6c6 !important;
    color: #912d2d;
    text-align: center;
}

/* ---------------------------- */
/* Form e input                 */
/* ---------------------------- */
form {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    max-width: 600px;
    /*margin-bottom: 40px;*/
    margin: 50px auto;
}

form div {
    margin: 15px auto;
}

input[type="text"],
input[type="date"],
input[type="file"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

button,
input[type="submit"],
input[type="button"],
a.button,
.btn {
    background-color: #3498db;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    margin-right: 5px;
    transition: background 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover,
.btn:hover {
    background-color: #2980b9;
}

input.admin-btn {
    background-color: #00c82a;
    color: white;
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

input.admin-btn:hover {
    background-color: #00911b;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}
form.login-form {
    max-width: 400px;
    margin: 0 auto;
}

form.login-form label {
    margin-top: 10px;
}

@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    td {
        position: relative;
        padding-left: 50%;
        white-space: nowrap;
    }

    td::before {
        position: absolute;
        top: 12px;
        left: 16px;
        font-weight: bold;
        white-space: nowrap;
    }

    td:nth-child(1)::before { content: "Utente"; }
    td:nth-child(2)::before { content: "Inizio"; }
    td:nth-child(3)::before { content: "Fine"; }
    td:nth-child(4)::before { content: "Orario"; }
    td:nth-child(5)::before { content: "Note"; }
    td:nth-child(6)::before { content: "Approvato"; }
    td:nth-child(7)::before { content: "Azioni"; }
}
.login-block {
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    width: 100%;
    margin: 50px auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-block h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

form.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

form.login-form input {
    width: 80%;
    max-width: 300px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

form.login-form button {
    width: 50%;
    max-width: 150px;
    padding: 10px;
    border-radius: 4px;
    border: none;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

form.login-form button:hover {
    background-color: #2980b9;
}

