/* ===== NEW BPR DASHBOARD STYLES (Dec 2024) ===== */

.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-container h2,
.dashboard-container h3,
.dashboard-container h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Workflow Progress */
.workflow-progress {
    margin-bottom: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.workflow-progress h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Workflow steps using CSS Grid for consistent layout */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 8px;
}

/* Connector line via CSS pseudo-element (no separate div needed) */
.workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.workflow-step.completed:not(:last-child)::after {
    background: var(--success);
}

/* Hide any manually added step-connector divs */
.step-connector {
    display: none;
}

.step-indicator {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    padding: 2px;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);  /* Unified color - was text-muted */
    border: 2px solid var(--border-color);
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
}

.workflow-step.completed .step-number {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.workflow-step.current .step-number {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.workflow-step.pending .step-number {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.step-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.workflow-step.current .step-name {
    color: var(--accent-primary);
}

.workflow-step.completed .step-name {
    color: var(--success);
}

.step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Current Status */
.current-status {
    margin-bottom: 30px;
}

.current-status h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.status-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.status-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.status-content h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.status-content p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Next Step */
.next-step {
    margin-bottom: 30px;
}

.next-step h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.next-step-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 24px;
}

.next-step-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.next-step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.next-step-btn {
    flex-shrink: 0;
    padding: 12px 24px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.next-step-btn:hover {
    background: var(--accent-primary-hover);
}

.alternative-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.alternative-actions span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.alt-action-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.alt-action-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Quick Stats */
.quick-stats {
    margin-bottom: 30px;
}

.quick-stats h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .workflow-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 0;
    }

    /* Adjust connector for wrapped items */
    .workflow-step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .workflow-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 0;
    }

    .next-step-card {
        flex-direction: column;
        align-items: stretch;
    }

    .next-step-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .workflow-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .workflow-step {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .step-info {
        text-align: left;
    }
}

/* Light theme overrides */
body.light-theme .workflow-progress,
body.light-theme .status-card,
body.light-theme .next-step-card,
body.light-theme .stat-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-theme .step-number {
    background: #ffffff;
    color: #64748b;
    border-color: #cbd5e1;
}

body.light-theme .alt-action-btn {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

body.light-theme .alt-action-btn:hover {
    background: #f1f5f9;
    border-color: #0ea5e9;
    color: #0284c7;
}

body.light-theme .workflow-step.pending .step-number {
    background: #ffffff;
}

body.light-theme .step-indicator {
    background: #ffffff;
}
