.ws-container-28b9e841 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f8faff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

.ws-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.ws-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ws-badge {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.ws-badge.ws-active {
    background: #cbf4c9;
    border-color: #b7e4b5;
    color: #166534;
}

.ws-search {
    width: 100%;
    max-width: 300px;
}

.ws-search input {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 100%;
}

.ws-grid-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ws-grid {
    display: grid;
    grid-template-columns: 180px repeat(4, minmax(180px, 1fr));
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    min-width: 900px; /* Forces scrolling on small screens instead of crushing cards */
}

.ws-cell {
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 16px;
}
.ws-cell:nth-child(5n) { border-right: none; }

.ws-col-header {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    background: #f8faff;
}
.ws-row-header {
    font-weight: 700;
    font-size: 14px;
    color: #334155;
    display: flex;
    align-items: center;
}

.ws-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    position: relative;
    transition: all 0.4s ease;
}

.ws-card h4 { margin: 8px 0; font-size: 14px; color: #1e293b; }

.ws-card-top { display: flex; justify-content: space-between; color: #64748b; }

.ws-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}
.ws-status.feasible { background: #cbf4c9; color: #166534; }
.ws-status.overload { background: #b91c1c; color: #fff; }
.ws-status.fixed { background: #cbf4c9; color: #166534; }

.ws-progress {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}
.ws-bar { height: 100%; background: #3b82f6; transition: width 0.5s ease, background-color 0.5s ease; }
.ws-bar-danger { background: #b91c1c; }
.ws-bar-fixed { background: #3b82f6; }

.ws-cap { color: #64748b; transition: color 0.4s ease; }

/* Red Card Specifics */
.ws-card-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}
.ws-card-danger h4, .ws-card-danger .ws-cap, .ws-card-danger .ws-card-top span:first-child {
    color: #991b1b;
    transition: color 0.4s ease;
}

/* Fixed State */
.ws-card-danger.is-fixed {
    background: #fff;
    border: 1px solid #cbd5e1;
    transform: scale(1);
    box-shadow: none;
    z-index: 1;
}
.ws-card-danger.is-fixed h4, .ws-card-danger.is-fixed .ws-cap, .ws-card-danger.is-fixed .ws-card-top span:first-child {
    color: inherit;
}
.ws-card-danger.is-fixed .ws-card-top span:first-child {
    color: #64748b;
}
.ws-card-danger.is-fixed h4 {
    color: #1e293b;
}

/* Animations */
.ws-card-danger.anim-playing:not(.is-fixed) {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.2);
    z-index: 10;
}

.ws-cursor-anim {
    position: absolute;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M7 2l12 11.2-5.8.5 3.3 7.3-2.2 1-3.2-7.4-4.4 4.7z"/></svg>') no-repeat center center;
    background-size: contain;
    bottom: -30px;
    right: -30px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 100;
}

.ws-card-danger.anim-cursor-move:not(.is-fixed) .ws-cursor-anim {
    opacity: 1;
    bottom: 20px;
    right: 20px;
}

.ws-card-danger.anim-cursor-hover-btn:not(.is-fixed) .ws-cursor-anim {
    bottom: 120px;
    right: 50px;
}

.ws-card-danger.anim-cursor-click-btn:not(.is-fixed) .ws-cursor-anim {
    transform: scale(0.8);
}

.ws-card-danger.is-fixed .ws-cursor-anim {
    opacity: 0;
    transition: opacity 0.3s;
}

.ws-predictive-popover {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
}
.ws-predictive-popover::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.ws-card-danger.anim-show-popover:not(.is-fixed) .ws-predictive-popover {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.ws-card-danger.is-fixed .ws-predictive-popover {
    opacity: 0;
    pointer-events: none;
}

.ws-predictive-popover h5 { margin: 0 0 8px; color: #1e293b; font-size: 14px; }
.ws-predictive-popover p { margin: 0 0 12px; color: #64748b; font-size: 12px; }
.ws-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 12px;
    transition: background 0.2s;
}
.ws-btn:hover { background: #2563eb; }
.ws-card-danger.anim-cursor-click-btn .ws-btn { background: #2563eb; }

.ws-footer {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}
.ws-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.feasible-dot { background: #3b82f6; }
.atrisk-dot { background: #f59e0b; }
.danger-dot { background: #dc2626; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .ws-header {
        flex-direction: column;
    }
    .ws-search {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .ws-container-28b9e841 {
        padding: 16px;
    }
    .ws-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
}
