/* ==============================================================================
   Real-Time Audit Generation Progress & Live Flow Stylesheet
   ============================================================================== */

.progress-container {
    max-width: 760px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.progress-header {
    background: #0f172a;
    color: #ffffff;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.progress-header h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}
.progress-target-meta {
    font-size: 13px;
    color: #94a3b8;
}

.progress-bar-wrapper {
    background: #f1f5f9;
    height: 8px;
    width: 100%;
    position: relative;
}
.progress-bar-active {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #10b981);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-body {
    padding: 32px;
}

/* Stepper List */
.stepper-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.25s ease;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.step-item.step-done {
    background: #f0fdf4;
    border-color: #dcfce7;
    color: #166534;
}
.step-item.step-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.step-item.step-pending {
    color: #94a3b8;
}
.step-item.step-failed {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.step-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}
.step-pending .step-icon {
    background: #e2e8f0;
    color: #64748b;
}
.step-done .step-icon {
    background: #10b981;
    color: #ffffff;
}
.step-active .step-icon {
    background: #2563eb;
    color: #ffffff;
    animation: pulse 1.5s infinite;
}
.step-failed .step-icon {
    background: #ef4444;
    color: #ffffff;
}

.step-name {
    font-size: 13.5px;
    font-weight: 600;
    flex: 1;
}

.step-status-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.step-done .step-status-tag {
    background: #dcfce7;
    color: #15803d;
}
.step-active .step-status-tag {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Spinner Animation */
.spinner-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Real-time Diagnostics Terminal */
.live-log-box {
    margin-top: 24px;
    background: #0f172a;
    border-radius: 8px;
    padding: 16px;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #1e293b;
}
.log-line {
    margin-bottom: 4px;
    line-height: 1.4;
    display: flex;
    gap: 8px;
}
.log-time {
    color: #64748b;
    flex-shrink: 0;
}
.log-msg {
    color: #38bdf8;
}
.log-msg.error {
    color: #f87171;
}
.log-msg.success {
    color: #4ade80;
}
