/* ─── DASHBOARD LAYOUT ─────────────────────────────────────────────────── */
.dashboard-layout {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

/* ─── TIMELINE ─────────────────────────────────────────────────────────── */
.timeline-container {
    position: relative;
    padding-left: 40px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-blue), var(--accent-purple), var(--bg-hover));
    opacity: 0.3;
}

.phase {
    margin-bottom: 48px;
    position: relative;
}

.phase-header {
    margin-bottom: 24px;
}

.phase-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.phase-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.phase-tag.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.phase-tag.current {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-blue);
}

.phase-tag.future {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.phase-period {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tl-item {
    position: relative;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tl-item:hover {
    transform: translateX(4px);
    border-color: var(--border-light);
}

.tl-item.highlight {
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
}

.tl-item::before {
    content: '';
    position: absolute;
    left: -49px;
    /* Adjust based on container padding */
    top: 24px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--text-muted);
    z-index: 10;
}

.phase.completed .tl-item::before {
    border-color: var(--accent-green);
    background: var(--accent-green);
}

.phase.current .tl-item::before {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.tl-item.future::before {
    border-color: var(--border);
    background: var(--bg-primary);
}

.tl-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    display: block;
}

.tl-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tl-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── TEST DASHBOARD ───────────────────────────────────────────────────── */
.test-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.dash-val {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.dash-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.val-ok {
    color: var(--accent-green);
}

.val-err {
    color: var(--accent-red);
}

.val-skip {
    color: var(--accent-yellow);
}

.val-total {
    color: var(--text-primary);
}

.test-matrix {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.test-matrix h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 600;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.mx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid transparent;
}

.mx-item.passed {
    border-color: rgba(16, 185, 129, 0.2);
}

.mx-item.failed {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

.mx-item.skipped {
    opacity: 0.5;
}

.mx-status {
    font-size: 16px;
}

.mx-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.mx-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.environment-info {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.loading-spinner {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}