/* ==========================================================================
   Dashboard
   / — authenticated home / overview page
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section Titles
   -------------------------------------------------------------------------- */

.dash-section-title {
    font-size: var(--crypto-font-size-lg, 1.125rem);
    font-weight: 600;
    color: var(--crypto-text-primary);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Phase 1: Setup Prerequisites — Vertical Stepper
   -------------------------------------------------------------------------- */

.dash-setup {
    animation: wsp-fade-up 0.3s ease both;
}

.dash-setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dash-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: var(--crypto-radius-md, 12px);
    overflow: hidden;
}

[data-bs-theme="dark"] .dash-setup-steps {
    background: #14131c;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .dash-setup-steps {
    background: #ffffff;
    border: 1px solid rgba(100, 100, 160, 0.12);
    box-shadow: 0 1px 3px rgba(100, 100, 160, 0.08), 0 2px 8px rgba(100, 100, 160, 0.05);
}

.dash-setup-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    position: relative;
    transition: background 0.15s;
}

[data-bs-theme="dark"] .dash-setup-step + .dash-setup-step {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .dash-setup-step + .dash-setup-step {
    border-top: 1px solid rgba(100, 100, 160, 0.08);
}

/* Step indicator (circle) */
.dash-setup-step-indicator {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .dash-setup-step-indicator {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--crypto-text-muted);
}

[data-bs-theme="light"] .dash-setup-step-indicator {
    background: rgba(100, 100, 160, 0.05);
    border: 2px solid rgba(100, 100, 160, 0.14);
    color: var(--crypto-text-muted);
}

/* Done state */
.dash-setup-step--done .dash-setup-step-indicator {
    background: var(--crypto-accent-500, #7879f6);
    border-color: var(--crypto-accent-500, #7879f6);
    color: #fff;
}

/* Current state */
.dash-setup-step--current .dash-setup-step-indicator {
    border-color: var(--crypto-accent-500, #7879f6);
    color: var(--crypto-accent-500, #7879f6);
    box-shadow: 0 0 0 3px rgba(120, 121, 246, 0.15);
}

[data-bs-theme="dark"] .dash-setup-step--current {
    background: rgba(120, 121, 246, 0.04);
}

[data-bs-theme="light"] .dash-setup-step--current {
    background: rgba(120, 121, 246, 0.03);
}

/* Locked state */
.dash-setup-step--locked {
    opacity: 0.45;
}

.dash-setup-step--locked .dash-setup-step-indicator {
    font-size: 0.75rem;
}

/* Step content */
.dash-setup-step-content {
    flex: 1;
    min-width: 0;
    padding-top: 0.125rem;
}

.dash-setup-step-title {
    font-size: var(--crypto-font-size-sm, 0.875rem);
    font-weight: 600;
    color: var(--crypto-text-primary);
    margin-bottom: 0.25rem;
}

.dash-setup-step--done .dash-setup-step-title {
    color: var(--crypto-text-secondary);
}

.dash-setup-step-desc {
    font-size: var(--crypto-font-size-sm, 0.875rem);
    color: var(--crypto-text-secondary);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Phase 2: First Evidence Milestones — Horizontal Track
   -------------------------------------------------------------------------- */

.dash-milestones-section {
    animation: wsp-fade-up 0.3s ease both;
}

.dash-steps-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dash-steps-progress {
    font-size: var(--crypto-font-size-sm, 0.875rem);
    color: var(--crypto-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.dash-milestones {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--crypto-radius-md, 12px);
    overflow-x: auto;
}

[data-bs-theme="dark"] .dash-milestones {
    background: #14131c;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .dash-milestones {
    background: #ffffff;
    border: 1px solid rgba(100, 100, 160, 0.12);
    box-shadow: 0 1px 3px rgba(100, 100, 160, 0.08), 0 2px 8px rgba(100, 100, 160, 0.05);
}

.dash-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 100px;
    transition: opacity 0.15s;
}

.dash-milestone:hover {
    opacity: 0.8;
    text-decoration: none;
}

.dash-milestone-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .dash-milestone-icon {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--crypto-text-muted);
}

[data-bs-theme="light"] .dash-milestone-icon {
    background: rgba(100, 100, 160, 0.05);
    border: 2px solid rgba(100, 100, 160, 0.14);
    color: var(--crypto-text-muted);
}

.dash-milestone--done .dash-milestone-icon {
    background: var(--crypto-accent-500, #7879f6);
    border-color: var(--crypto-accent-500, #7879f6);
    color: #fff;
}

.dash-milestone-label {
    font-size: var(--crypto-font-size-xs, 0.75rem);
    font-weight: 500;
    color: var(--crypto-text-secondary);
    text-align: center;
    white-space: nowrap;
}

.dash-milestone--done .dash-milestone-label {
    color: var(--crypto-text-primary);
}

.dash-milestone-hint {
    font-size: 0.675rem;
    font-family: var(--crypto-font-mono, var(--tblr-font-monospace));
    color: var(--crypto-text-muted);
    text-align: center;
    white-space: nowrap;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1.3;
}

[data-bs-theme="dark"] .dash-milestone-hint {
    background: rgba(120, 121, 246, 0.10);
    color: rgba(255, 255, 255, 0.55);
}

[data-bs-theme="light"] .dash-milestone-hint {
    background: rgba(100, 100, 160, 0.06);
    color: var(--crypto-text-muted);
}

.dash-milestone-connector {
    flex: 1;
    height: 2px;
    min-width: 20px;
    margin-bottom: 2.5rem;
}

[data-bs-theme="dark"] .dash-milestone-connector {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .dash-milestone-connector {
    background: rgba(100, 100, 160, 0.10);
}

/* CLI install hint */
.dash-cli-hint {
    padding: 0.75rem 1rem;
    border-radius: var(--crypto-radius-sm, 8px);
    border-left: 3px solid var(--crypto-accent-500, #7879f6);
}

[data-bs-theme="dark"] .dash-cli-hint {
    background: rgba(120, 121, 246, 0.06);
}

[data-bs-theme="light"] .dash-cli-hint {
    background: rgba(120, 121, 246, 0.06);
}

/* --------------------------------------------------------------------------
   Quick Stats Cards
   -------------------------------------------------------------------------- */

.dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.dash-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    border-radius: var(--crypto-radius-md, 12px);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

[data-bs-theme="dark"] .dash-stat-card {
    background: #14131c;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .dash-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .dash-stat-card {
    background: #ffffff;
    border: 1px solid rgba(100, 100, 160, 0.12);
    box-shadow: 0 1px 3px rgba(100, 100, 160, 0.08), 0 2px 8px rgba(100, 100, 160, 0.05);
}

[data-bs-theme="light"] .dash-stat-card:hover {
    box-shadow: 0 4px 12px rgba(100, 100, 160, 0.14);
}

.dash-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.dash-stat-icon--repos {
    background: rgba(120, 121, 246, 0.12);
    color: #7879f6;
}

.dash-stat-icon--releases {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.dash-stat-icon--snapshots {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.dash-stat-icon--attestations {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.dash-stat-icon--preservations {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.dash-stat-value {
    font-size: var(--crypto-font-size-2xl, 1.5rem);
    font-weight: 700;
    color: var(--crypto-text-primary);
    line-height: 1;
}

.dash-stat-label {
    font-size: var(--crypto-font-size-xs, 0.75rem);
    font-weight: 500;
    color: var(--crypto-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Activity Timeline
   Re-uses .activity-timeline from repositories.css
   -------------------------------------------------------------------------- */

.dash-activity {
    animation: wsp-fade-up 0.3s ease 0.1s both;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-stats .dash-stat-card:last-child {
        grid-column: span 2;
    }

    .dash-setup-header,
    .dash-steps-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dash-setup-step {
        padding: 1rem;
    }

    .dash-milestones {
        padding: 1rem;
    }

    .dash-milestone {
        min-width: 80px;
    }
}

@media (max-width: 576px) {
    .dash-stats {
        grid-template-columns: 1fr 1fr;
    }
}
