.column-1 {
    flex: 20;
    min-width: 0;
}

#left1_section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

#left1_section .panel {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}


#left1_section .panel h3 {
    font-size: 1rem;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
}

#left1_section .panel-content {
    font-size: 14px;
    color: #666;
}

#left1_cell_right_bottom .panel-content {
    flex: 1;
    overflow-y: auto;
}

#left1_canteen_content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.canteen-item {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.canteen-item:hover {
    background-color: #f5f5f5;
    border-color: #4CAF50;
}

.canteen-item.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#left1_section #left1_combo_panel {
    padding: 0;
    border: 1px solid #cc7704;
}

/* Canteen Filter Panel - Definitive Fix */
#left1_section #left1_filter_panel {
    flex: 0 0 auto; /* Height is based on content */
    flex-direction: row; /* Override .panel's column direction */
    justify-content: space-around;
    padding: 8px;
    background-color: #f7f7f7;
    border: 1px solid #e0e0e0;
}


.canteen-filter-tab {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
    margin: 0 4px;
}

.canteen-filter-tab:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.canteen-filter-tab.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
    font-weight: bold;
}

/* Canteen Panel */
#left1_canteen_panel {
    border: 1px solid #cc7704;
    flex-grow: 1;
    overflow-y: auto;
}

#left1_combo_grid {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
}

.combo-cell {
    overflow: hidden;
}

.combo-cell-left-top {
    grid-column: 1;
    grid-row: 1;
}

.combo-cell-right-top {
    grid-column: 2;
    grid-row: 1;
}

.combo-cell-left-bottom {
    grid-column: 1;
    grid-row: 2;
}

.combo-cell-right-bottom {
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
}

#left1_combo_area {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#left1_combo_tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    align-items: center;
}

.combo-tab {
    flex: 1;
    padding: 4px 0;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 32px;
    width: 32px;
}

.combo-tab:hover {
    background-color: #e0e0e0;
}

.combo-tab.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

#left1_meal_tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
}

.meal-tab {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.meal-tab:hover {
    background-color: #e0e0e0;
}

.meal-tab.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#left1_combo_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    padding: 4px;
}

.combo-card {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.combo-card:hover {
    background-color: #f5f5f5;
    border-color: #2196F3;
}

.combo-card.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.combo-card-id {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
    flex-shrink: 0;
}

.combo-card.active .combo-card-id {
    color: rgba(255,255,255,0.7);
}
