/* CSS KHUSUS DIAGRAM */
.grid-diagram { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 12px; 
}
.card-diagram { 
    background: linear-gradient(155deg, #e8f0eb 0%, #1DA1F2 100%); 
    border-radius: 8px; 
    padding: 12px; 
    box-shadow: 0 3px 5px -1px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
}
.card-diagram h3 { 
    margin: 0 0 8px 0; 
    font-size: 14px; 
    color: #444; 
    border-bottom: 2px solid rgba(255,255,255,0.8); 
    padding-bottom: 6px; 
}
.canvas-box { 
    position: relative; 
    height: 200px; 
    width: 100%; 
    margin-bottom: 8px; 
} 
#leg1, #leg2, #leg3 { 
    height: 160px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}
.item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 6px 10px; 
    border-radius: 5px; 
    cursor: pointer; 
    background: rgba(255, 255, 255, 0.2); 
    transition: background 0.2s; 
}
.item:hover { background: rgba(255, 255, 255, 0.4); }
.item span:first-child {
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
    padding-right: 8px;
}
.item.active { 
    background: rgba(255, 255, 255, 0.6); 
    font-weight: bold; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.badge-jml {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 13px; 
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    white-space: nowrap;
}