.calendar-container {
    max-width: 100%;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.calendar-header {
    display: flex;
    justify-content: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    color: #45B7D1;
    padding: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    min-height: 400px;
}

.day {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    min-height: 110px;
    min-width: 0;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
}

    .day:not(.read-only):hover {
        border-color: #4ECDC4;
        background-color: #e8f7fb;
        box-shadow: 0 4px 12px rgba(69, 183, 209, 0.2);
        transform: translateY(-2px);
    }

    .day.read-only {
        cursor: default;
    }

.day .day-number {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.day.today {
    border-color: #FF6B6B;
    background-color: #fff5f5;
}

    .day.today .day-number {
        color: #FF6B6B;
        font-weight: bold;
    }

.day-number {
    text-align: center;
    margin-bottom: 4px;
}

.day-content {
    flex: 1;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
}

.day-content-ov {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-content-ov-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}


.day-content-cd {
    color: #444;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 56px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #666;
}

    .mode-btn:hover,
    .mode-btn.active {
        border-color: #4ECDC4;
        color: #4ECDC4;
    }

    .form-group label {
        display: block;
        color: #333;
        font-weight: 600;
        font-size: 14px;
    }

.calendar-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .calendar-add-row select {
        flex: 1;
    }

.item-card {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

    .item-card:hover {
        border-color: #45B7D1;
        box-shadow: 0 2px 8px rgba(69, 183, 209, 0.1);
    }

.item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.item-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #666;
}

    .btn-icon:hover {
        background-color: #f0f0f0;
        color: #4ECDC4;
    }

.btn-delete-icon:hover {
    color: #FF6B6B;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #333;
}

.calendar-legend-title {
    font-weight: 600;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
    }

    .calendar-grid {
        gap: 8px;
    }

    .day {
        min-height: 70px;
        padding: 8px;
    }

    .day-number {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
    }

    .calendar-grid {
        gap: 6px;
    }

    .day {
        min-height: 60px;
        padding: 6px;
    }

    .day-number {
        font-size: 14px;
    }

    .weekday {
        font-size: 10px;
        padding: 5px;
    }

    .calendar-add-row {
        flex-direction: column;
        align-items: stretch;
    }
}
