.production-calendar {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

.calendar-controls {
    margin-bottom: 20px;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border: 1px solid #ccc;
}

.workday { background-color: #fff; }
.weekend { background-color: #ffcccc; }
.holiday { background-color: #ff9999; }
.preholiday { background-color: #ffffcc; }

.calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.calendar-month {
    break-inside: avoid;
}

.calendar-month h3 {
    text-align: center;
    margin-bottom: 10px;
}

.calendar-month table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-month th,
.calendar-month td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

.calendar-month th {
    background-color: #f5f5f5;
}

.calendar-month td.empty {
    background-color: #f9f9f9;
}

.calendar-month td.workday {
    background-color: #fff;
}

.calendar-month td.weekend {
    background-color: #ffcccc;
}

.calendar-month td.holiday {
    background-color: #ff9999;
    font-weight: bold;
}

.calendar-month td.preholiday {
    background-color: #ffffcc;
}

.calendar-statistics {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.calendar-statistics h3 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .calendar-container {
        grid-template-columns: 1fr;
    }
}