.panel-gantt,
.panel-results {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 24px;
    position: relative;
    z-index: 1;
    margin-left: 24px;
    margin-right: 24px;
}

@media (min-width: 768px) {

    .panel-gantt,
    .panel-results {
        margin-left: auto;
        margin-right: auto;
    }
}

.gantt-container {
    display: flex;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 100, 0.15);
}

.gantt-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-deep);
    font-weight: 700;
    font-size: 0.75rem;
    font-family: var(--mono);
    position: relative;
    overflow: hidden;
    animation: ganttGrow .5s ease-out both;
    cursor: default;
    transition: filter .2s;
    min-width: 28px;
    text-shadow: none;
}

.gantt-bar:hover {
    filter: brightness(1.3);
    z-index: 2;
}

.gantt-bar.idle {
    background: repeating-linear-gradient(45deg,
            rgba(90, 138, 90, 0.08),
            rgba(90, 138, 90, 0.08) 4px,
            transparent 4px,
            transparent 8px);
    color: var(--text-dim);
    font-size: 0.65rem;
}

@keyframes ganttGrow {
    from {
        max-width: 0;
        opacity: 0;
    }

    to {
        max-width: 600px;
        opacity: 1;
    }
}

.gantt-bar.cpu-active {
    animation: cpuPulse 0.4s ease-in-out infinite alternate;
}

@keyframes cpuPulse {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.4);
    }
}

.gantt-timestamps {
    display: flex;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
}

.gantt-ts {
    text-align: left;
    position: relative;
}

.gantt-ts::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 1px;
    height: 4px;
    background: var(--neon-green);
    opacity: 0.4;
}

.sim-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 2px solid rgba(0, 255, 100, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
}

.sim-controls label {
    font-family: var(--font);
    font-size: 0.4rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    background: rgba(0, 255, 100, 0.15);
    border-radius: 3px;
    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--neon-green);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 255, 100, 0.4);
}

.speed-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    min-width: 40px;
}

.cpu-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--neon-pink);
}

.cpu-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
    animation: cpuBlink 0.6s ease-in-out infinite alternate;
}

.cpu-dot.idle-dot {
    background: var(--text-dim);
    box-shadow: none;
    animation: none;
}

@keyframes cpuBlink {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    border-bottom: 2px solid rgba(0, 255, 100, 0.15);
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(0, 255, 100, 0.06);
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text);
}

tbody tr {
    animation: rowIn .3s ease-out both;
}

tbody tr:nth-child(even) {
    background: rgba(0, 255, 100, 0.02);
}

@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pid-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pid-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.metrics-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric-card {
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-family: var(--font);
    font-size: 0.35rem;
    font-weight: 400;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 100, 0.4);
}

.power-bar-wrap {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin: 6px 0;
    border: 1px solid rgba(0, 255, 100, 0.1);
}

.power-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
    box-shadow: 0 0 8px;
}

@media (max-width: 860px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .metrics-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-cards {
        grid-template-columns: 1fr;
    }
}
