/* -------------------------------------------------------
   STRUTTURA GENERALE
------------------------------------------------------- */

body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding-top: 20px;
}

/* -------------------------------------------------------
   HEADER CON FASCIA VERDE AUSER
------------------------------------------------------- */

header {
    background: #009739; /* Verde Auser ufficiale */
    padding: 20px;
    border-radius: 0 0 12px 12px;
    text-align: center;
    margin-bottom: 25px;
}

header .logo {
    width: 260px;
    display: block;
    margin: 0 auto 10px auto;
}

header h1 {
    color: white;
    font-size: 28px;
    margin: 0;
}

/* -------------------------------------------------------
   SELEZIONE SETTIMANA
------------------------------------------------------- */

.week-selector {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.week-selector input,
.week-selector button {
    margin-top: 10px;
}

.week-nav {
    margin-top: 10px;
}

.week-nav button {
    margin-right: 10px;
}

/* -------------------------------------------------------
   BOTTONI GENERALI
------------------------------------------------------- */

button {
    background: #009739;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #007f30;
}

.actions {
    margin: 15px 0;
    text-align: center;
}

/* -------------------------------------------------------
   SETTIMANA E ACCOMPAGNAMENTI (VERTICALE)
------------------------------------------------------- */

.week-container {
    display: flex;
    flex-direction: column; /* GIORNI IN VERTICALE */
    gap: 15px;
}

.day {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.day h2 {
    margin-top: 0;
    color: #009739;
    font-size: 18px;
}

/* -------------------------------------------------------
   ACCOMPAGNAMENTI
------------------------------------------------------- */

.entry {
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    position: relative;
}

/* -------------------------------------------------------
   BOTTONI DI MODIFICA E CANCELLAZIONE
------------------------------------------------------- */

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.delete-btn:hover {
    background: #a61c1c;
}

.edit-btn {
    position: absolute;
    top: 8px;
    right: 60px;
    background: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.edit-btn:hover {
    background: #0d47a1;
}

/* -------------------------------------------------------
   BOTTONE PDF
------------------------------------------------------- */

.pdf-btn {
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

.pdf-btn:hover {
    background: #e68900;
}

/* -------------------------------------------------------
   MODALI
------------------------------------------------------- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
    color: #444;
}

.close:hover {
    color: black;
}

/* -------------------------------------------------------
   FORM NEL MODALE
------------------------------------------------------- */

label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
}

textarea {
    height: 80px;
}

/* -------------------------------------------------------
   MODALE GESTIONE RISORSE
------------------------------------------------------- */

.riga {
    display: flex;
    justify-content: space-between;
    background: #f7f7f7;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid #ddd;
}

.remove-btn {
    background: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.remove-btn:hover {
    background: #a61c1c;
}

/* -------------------------------------------------------
   RESPONSIVE
------------------------------------------------------- */

@media (max-width: 600px) {
    .modal-content {
        width: 90%;
    }
}
.pdf-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #c62828;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pdf-message.show {
    opacity: 1;
}

.hidden {
    display: none;
}
