/* SCOUT Dashboard Styles */

/* Reset and base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #ca8a04;
    --error: #dc2626;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
    text-align: center;
}

.sidebar-brand a {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 6px;
    display: block;
    text-indent: 6px;
}

.sidebar-brand-sub {
    font-size: 0.5rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-links a {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-right: 3px solid transparent;
}

.sidebar-nav .nav-links a:hover {
    background: var(--bg);
    color: var(--text);
}

.sidebar-nav .nav-links a.active {
    color: var(--primary);
    font-weight: 600;
    border-right: 3px solid var(--primary);
}

/* Sidebar divider */
.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 1rem;
}

/* Sidebar "Back" link */
.nav-section-back {
    font-size: 0.8125rem;
    color: var(--text-muted) !important;
}

.nav-section-back:hover {
    color: var(--primary) !important;
}

/* Project name in sidebar */
.nav-project-name {
    padding: 0.375rem 1.25rem 0.25rem;
}

.nav-project-name a {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-project-name a:hover {
    color: var(--primary);
}

/* Sidebar step links */
.nav-steps a.nav-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-right: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.nav-steps a.nav-step:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-step-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 600;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
}

.nav-step-indicator-done {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.nav-step-indicator-current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.nav-step-done {
    color: var(--success) !important;
}

.nav-step-current {
    color: var(--primary) !important;
    font-weight: 600;
    border-right-color: var(--primary) !important;
}

/* Secondary nav section (smaller, muted) */
.nav-secondary a {
    font-size: 0.8125rem;
}

/* Top bar (user info, top-right) */
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-user-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.topbar-user-link:hover {
    color: var(--primary);
}

.topbar-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
}

.topbar-logout:hover {
    color: var(--error);
}

/* Sidebar toggle (mobile) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 101;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.375rem 0.625rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
}

/* Main wrapper */
.main-wrapper {
    margin-left: 180px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.no-sidebar .main-wrapper {
    margin-left: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
}

main.container {
    flex: 1;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    margin-top: auto;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--bg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Links */
a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

/* Page headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Lists */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-title {
    font-weight: 500;
}

.list-item-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Chat interface */
.chat-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    height: calc(100vh - 130px);
    min-height: 500px;
}

.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    line-height: 1.5;
}

.message-user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-assistant {
    align-self: flex-start;
    background: var(--bg);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.chat-form {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send {
    padding: 0 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-send:hover {
    background: var(--primary-dark);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat sidebar */
.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.extracted-fields {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.extracted-fields h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.field-item:last-child {
    border-bottom: none;
}

.field-label {
    color: var(--text-muted);
}

.field-value {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.field-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: normal;
}

/* Launch Project button (inline in chat input area) */
.chat-launch {
    padding: 0 1.25rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.chat-launch:hover {
    background: #15803d;
}

.chat-launch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading spinner */
.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* Detail page */
.detail-header {
    margin-bottom: 1.5rem;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-meta {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.detail-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

/* Utility classes */
.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-sm {
    font-size: 0.875rem;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden {
    display: none !important;
}

/* Admin sub-navigation */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

/* Status indicator dots */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot-ok { background: var(--success); }
.status-dot-warn { background: var(--warning); }
.status-dot-error { background: var(--error); }

/* Danger button */
.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    color: var(--border);
    margin: 0 0.25rem;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* Pipeline Steps */
.pipeline-steps {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    min-width: 60px;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
}

.step-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.step-done .step-indicator {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-done .step-label {
    color: var(--success);
}

.step-current .step-indicator {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-current .step-label {
    color: var(--primary);
    font-weight: 600;
}

.pipeline-connector {
    flex: 1;
    height: 2px;
    background: var(--border);
    min-width: 16px;
    margin-bottom: 20px;
}

.connector-done {
    background: var(--success);
}

/* Wizard Action Card */
.wizard-action {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.wizard-action-complete {
    border-color: var(--success);
}

.wizard-action-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wizard-action-detail {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.source-form .form-row {
    margin-bottom: 1rem;
}

/* Warning button */
.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #a16207;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.modal-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

/* JSON Display */
.json-display {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--radius);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre;
    tab-size: 2;
}

/* Code inline */
code {
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    border: 1px solid var(--border);
}

/* Health bar */
.health-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.health-value {
    font-size: 0.875rem;
    font-weight: 600;
}

.health-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.health-dot-ok { background: #22c55e; }
.health-dot-error { background: #ef4444; }
.health-dot-unknown { background: #94a3b8; }

.health-level-cool {
    background: #dcfce7;
    color: #166534;
}

.health-level-warm {
    background: #fef9c3;
    color: #854d0e;
}

.health-level-hot {
    background: #ffedd5;
    color: #9a3412;
}

.health-level-throttle {
    background: #fee2e2;
    color: #991b1b;
}

.health-level-critical {
    background: #fecaca;
    color: #7f1d1d;
}

.health-level-unknown {
    background: #f1f5f9;
    color: #475569;
}

.text-warning {
    color: var(--warning);
}

/* Pending items */
.pending-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
}

.pending-row:last-of-type {
    border-bottom: none;
}

.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}

.pending-badge-active {
    background: var(--primary);
    color: white;
}

.pending-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
        padding-top: 3rem;
    }

    .chat-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .chat-sidebar {
        order: -1;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-row {
        flex-direction: column;
    }

    .pipeline-steps {
        gap: 0;
        padding: 1rem 0.5rem;
    }

    .step-label {
        font-size: 0.5625rem;
    }
}

/* Batch harvest progress bar */
.batch-progress-bar {
    height: 0.5rem;
    background: var(--border);
    border-radius: 0.25rem;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
    width: 0%;
}

/* Pipeline stage progress bar */
.pipeline-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.pipeline-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Turbo pipeline step pills */
.turbo-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.turbo-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s;
}

.turbo-pill-pending {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-muted, #888);
}

.turbo-pill-current {
    background: var(--warning, #f59e0b);
    color: #fff;
    animation: turbo-pulse 1.5s ease-in-out infinite;
}

.turbo-pill-done {
    background: var(--success, #22c55e);
    color: #fff;
}

.turbo-arrow {
    color: var(--text-muted, #888);
    font-size: 0.85rem;
}

@keyframes turbo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Wide modal for data preview */
.modal-card-wide {
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    width: 95%;
}

/* Source row status indicators */
.source-row-complete td:first-child { border-left: 3px solid var(--success); }
.source-row-failed td:first-child { border-left: 3px solid var(--error); }
.source-row-running { opacity: 0.85; }
.source-row-unavailable { opacity: 0.5; }

/* Auto-approved badge */
.badge-auto-approved {
    background: var(--success);
    color: white;
}

/* Checkbox in table */
.source-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Confirm sources button bar */
.confirm-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.confirm-count {
    font-weight: 500;
    color: var(--text-muted);
}
