.cabin-calendar {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cabin-month {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

.month-header {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.calendar-grid {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.calendar-header {
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cabin-label {
    min-width: 150px;
    padding: 12px;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
    font-weight: 600;
    background-color: #f5f5f5;
    position: sticky;
    left: 0;
    z-index: 11;
}

.day-header {
    min-width: 35px;
    width: 35px;
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
    border-right: 1px solid #f0f0f0;
}

.cabin-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.cabin-row:last-child {
    border-bottom: none;
}

.day-cell {
    min-width: 35px;
    width: 35px;
    height: 40px;
    border-right: 1px solid #f0f0f0;
    position: relative;
    transition: opacity 0.2s;
}

.day-cell.available {
    background-color: #fff;
}

.day-cell.available:hover {
    background-color: #f9f9f9;
}

.day-cell.booked {
    opacity: 0.85;
    cursor: pointer;
}

.day-cell.booked:hover {
    opacity: 1;
}

.day-cell.booking-start {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.day-cell.booking-end {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.group-name {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 5;
}

.calendar-legend {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.calendar-legend h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #555;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-text {
    font-size: 14px;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cabin-label {
        min-width: 100px;
        font-size: 13px;
    }
    
    .day-header,
    .day-cell {
        min-width: 30px;
        width: 30px;
    }
    
    .group-name {
        font-size: 10px;
        left: 4px;
    }
    
    .month-header {
        font-size: 20px;
    }
}