/* === BASE === */
body {
    font-family: "Inter", sans-serif;
    background: #fafafa;
    color: #222;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 92%;
    margin: 40px auto;
    text-align: center;
}

.head {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 45px;
    flex-wrap: nowrap;
}

/* === TITOLI === */
h1 {
    font-weight: 600;
    color: #111;
}

/* === CALENDARIO === */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-header h2 {
    margin: 0;
    font-weight: 600;
    color: #222;
}

.calendar-header button {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.calendar-header button:hover {
    background: rgba(25, 118, 210, 0.1);
}

.day {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    min-height: 100px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}
.day:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.day strong {
    font-weight: 600;
    color: #444;
}

/* === PAGAMENTI === */
.payment {
    background: #e9f0ff;
    color: #1a1a1a;
    padding: 6px 8px;
    margin-top: 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: left;
    box-shadow: inset 0 0 0 1px #c8d8f0;
}
.payment.red {
    background: #ffebeb;
    border: 1px solid #e74c3c;
    color: #c0392b;
}
.payment.paid {
    opacity: 0.6;
    text-decoration: line-through;
}

/* === BOTTONE AGGIUNTA === */
button {
    margin: 30px 0;
    padding: 12px 22px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
button:hover {
    background: #1565c0;
    transform: scale(1.06);
    cursor: pointer;
}

/* === RIEPILOGO === */
.summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 40px;
}
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.card h3 {
    margin-bottom: 10px;
    font-weight: 500;
    color: #444;
}
.card p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #111;
}
.card.red {
    background: #ffeaea;
    border: 1px solid #e74c3c;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #fff;
    color: #000;
    padding: 30px;
    border-radius: 12px;
    width: 320px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.close {
    float: right;
    cursor: pointer;
    font-size: 22px;
    color: #888;
}
.close:hover {
    color: #000;
}

/* === FORM === */
label {
    display: block;
    margin-top: 15px;
    font-weight: 500;
}
input, button[type=submit] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}
input:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
}
button[type=submit] {
    margin-top: 25px;
    background: #1976d2;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
button[type=submit]:hover {
    background: #1565c0;
}
