/* Base Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background: #007bff;
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

/* Moduli e Tabelle */
form, table {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], 
input[type="email"], 
input[type="date"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Importante per width: 100% */
}

button[type="submit"], .btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    margin-top: 10px;
}

button[type="submit"]:hover, .btn:hover {
    background: #218838;
}

/* Tabella Prenotazioni (Admin) */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 0.9em; /* Rende il testo leggibile su schermi piccoli */
}

th {
    background-color: #f2f2f2;
}

/* Responsive Design */
@media (min-width: 768px) {
    /* Regole per Tablet e Desktop */
    .container {
        width: 80%;
    }
    
    form, table {
        width: 800px; /* Limita la larghezza su desktop per leggibilità */
        margin-left: auto;
        margin-right: auto;
    }

    button[type="submit"], .btn {
        width: auto;
        padding: 10px 20px;
        display: inline-block;
    }
}

/* Utilità */
.msg-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}
.error {
    color: red;
    font-weight: bold;
}