/* ═══════════════════════════════════════════════════════════
   ZeniBot — Admin Command Center CSS
   Light Mode · Bento Grid · Inter Typography
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #f8f9fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-surface: #f3f4f6;
    --bg-input: #ffffff;
    --bg-sidebar: #111827;

    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --border-accent: #6366f1;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-accent: #6366f1;
    --text-sidebar: #e5e7eb;
    --text-sidebar-muted: #6b7280;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.06);
    --accent-gradient: linear-gradient(135deg, #6366f1, #818cf8);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --success-border: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --warning-border: rgba(245, 158, 11, 0.2);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --danger-border: rgba(239, 68, 68, 0.2);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.08);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --sidebar-width: 220px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════ */

.app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ── Sidebar ──────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand h1 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.sidebar-brand p {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-sidebar-muted);
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-sidebar);
}

.nav-item.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.nav-item .icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-sidebar-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
}

.status-dot.green {
    background: var(--success);
}

/* ── Main ─────────────────────────────── */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px;
}

/* ── Views ─────────────────────────────── */

.view {
    display: none;
}

.view.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════
   Stat Cards Grid
   ═══════════════════════════════════════════════════════════ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--border);
}

.stat-card.accent {
    border-top-color: var(--accent);
}

.stat-card.success {
    border-top-color: var(--success);
}

.stat-card.warning {
    border-top-color: var(--warning);
}

.stat-card.danger {
    border-top-color: var(--danger);
}

.stat-card .label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   Section Cards (Bento)
   ═══════════════════════════════════════════════════════════ */

.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
}

.section-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-body {
    padding: 16px 20px;
}

/* ═══════════════════════════════════════════════════════════
   Provider Grid
   ═══════════════════════════════════════════════════════════ */

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.provider-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.15s;
}

.provider-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-muted {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-light);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════
   Tables
   ═══════════════════════════════════════════════════════════ */

.data-table,
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.data-table td,
.table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.data-table tr:last-child td,
.table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td,
.table tr:hover td {
    background: var(--bg-card-hover);
}

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Modal
   ═══════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 440px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════════════════════ */

.empty-state {
    padding: 40px 20px;
    text-align: center;
}

.empty-state .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.empty-state h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   Toast
   ═══════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-sidebar);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.25s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   Engine Panels
   ═══════════════════════════════════════════════════════════ */

.engine-panel {
    margin-top: 8px;
}

.engine-tab.active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

/* ═══════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════ */

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

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

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

@media (max-width: 640px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
    }

    .sidebar-brand p,
    .nav-item span:not(.icon) {
        display: none;
    }

    .sidebar-brand h1 {
        font-size: 14px;
    }

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

    .content {
        padding: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Code/Pre
   ═══════════════════════════════════════════════════════════ */

code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

pre {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   Pipeline Brain Visualization
   ═══════════════════════════════════════════════════════════ */

.pipeline {
    position: relative;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
    overflow: hidden;
    margin-bottom: 24px;
}

.pipeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.pipeline-title {
    text-align: center;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    position: relative;
}

.pipeline-title span {
    background: linear-gradient(90deg, #818cf8, #34d399, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pipeline Flow Row */
.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    position: relative;
}

.pipeline-stage {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

/* Pipeline Node */
.pipe-node {
    position: relative;
    text-align: center;
    padding: 12px 8px;
    min-width: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
}

.pipe-node:hover {
    transform: translateY(-4px);
}

.pipe-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 8px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pipe-node:hover .pipe-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--node-glow);
}

.pipe-node.active .pipe-icon {
    animation: nodeGlow 2s ease-in-out infinite;
}

.pipe-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pipe-sublabel {
    font-size: 9px;
    margin-top: 2px;
    opacity: 0.5;
}

/* Node colors */
.pipe-node[data-stage="input"] {
    --node-color: #3b82f6;
    --node-glow: rgba(59, 130, 246, 0.4);
}

.pipe-node[data-stage="vas"] {
    --node-color: #8b5cf6;
    --node-glow: rgba(139, 92, 246, 0.4);
}

.pipe-node[data-stage="vel"] {
    --node-color: #a855f7;
    --node-glow: rgba(168, 85, 247, 0.4);
}

.pipe-node[data-stage="vog"] {
    --node-color: #ec4899;
    --node-glow: rgba(236, 72, 153, 0.4);
}

.pipe-node[data-stage="veg"] {
    --node-color: #f59e0b;
    --node-glow: rgba(245, 158, 11, 0.4);
}

.pipe-node[data-stage="llm"] {
    --node-color: #10b981;
    --node-glow: rgba(16, 185, 129, 0.4);
}

.pipe-node[data-stage="k1"] {
    --node-color: #ef4444;
    --node-glow: rgba(239, 68, 68, 0.4);
}

.pipe-node[data-stage="math"] {
    --node-color: #06b6d4;
    --node-glow: rgba(6, 182, 212, 0.4);
}

.pipe-node[data-stage="ledger"] {
    --node-color: #22c55e;
    --node-glow: rgba(34, 197, 94, 0.4);
}

.pipe-node[data-stage="output"] {
    --node-color: #6366f1;
    --node-glow: rgba(99, 102, 241, 0.4);
}

.pipe-icon {
    background: linear-gradient(135deg, var(--node-color), rgba(255, 255, 255, 0.1));
    box-shadow: 0 4px 12px var(--node-glow);
}

.pipe-label {
    color: var(--node-color);
}

.pipe-sublabel {
    color: #64748b;
}

/* Connection Arrow */
.pipe-arrow {
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #475569, transparent);
    position: relative;
    flex-shrink: 0;
}

.pipe-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid #475569;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* Data Packet Animation */
.pipe-arrow .data-packet {
    position: absolute;
    top: -4px;
    left: -6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(99, 102, 241, 0.3);
    opacity: 0;
}

.pipeline.animating .pipe-arrow .data-packet {
    animation: dataFlow 3s ease-in-out forwards;
}

/* Stagger each arrow's animation */
.pipeline.animating .pipeline-stage:nth-child(1) .pipe-arrow .data-packet {
    animation-delay: 0s;
}

.pipeline.animating .pipeline-stage:nth-child(2) .pipe-arrow .data-packet {
    animation-delay: 0.3s;
}

.pipeline.animating .pipeline-stage:nth-child(3) .pipe-arrow .data-packet {
    animation-delay: 0.6s;
}

.pipeline.animating .pipeline-stage:nth-child(4) .pipe-arrow .data-packet {
    animation-delay: 0.9s;
}

.pipeline.animating .pipeline-stage:nth-child(5) .pipe-arrow .data-packet {
    animation-delay: 1.2s;
}

.pipeline.animating .pipeline-stage:nth-child(6) .pipe-arrow .data-packet {
    animation-delay: 1.5s;
}

.pipeline.animating .pipeline-stage:nth-child(7) .pipe-arrow .data-packet {
    animation-delay: 1.8s;
}

.pipeline.animating .pipeline-stage:nth-child(8) .pipe-arrow .data-packet {
    animation-delay: 2.1s;
}

.pipeline.animating .pipeline-stage:nth-child(9) .pipe-arrow .data-packet {
    animation-delay: 2.4s;
}

/* Highlight active node during animation */
.pipeline.animating .pipeline-stage:nth-child(1) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 0s 1;
}

.pipeline.animating .pipeline-stage:nth-child(2) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 0.3s 1;
}

.pipeline.animating .pipeline-stage:nth-child(3) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 0.6s 1;
}

.pipeline.animating .pipeline-stage:nth-child(4) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 0.9s 1;
}

.pipeline.animating .pipeline-stage:nth-child(5) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 1.2s 1;
}

.pipeline.animating .pipeline-stage:nth-child(6) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 1.5s 1;
}

.pipeline.animating .pipeline-stage:nth-child(7) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 1.8s 1;
}

.pipeline.animating .pipeline-stage:nth-child(8) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 2.1s 1;
}

.pipeline.animating .pipeline-stage:nth-child(9) .pipe-node .pipe-icon {
    animation: nodeGlow 0.5s ease 2.4s 1;
}

/* Keyframes */
@keyframes nodeGlow {

    0%,
    100% {
        box-shadow: 0 4px 12px var(--node-glow);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px var(--node-glow), 0 0 60px var(--node-glow);
        transform: scale(1.15);
    }
}

@keyframes dataFlow {
    0% {
        left: -6px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 6px);
        opacity: 0;
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Live Request Indicator */
.pipeline-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 12px;
    color: #94a3b8;
}

.pipeline-live .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 4px var(--success);
    }

    50% {
        opacity: 0.4;
        box-shadow: 0 0 12px var(--success);
    }
}

/* Pipeline Detail Panel */
.pipe-detail {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    display: none;
}

.pipe-detail.active {
    display: block;
    animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pipe-detail h4 {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 8px;
}

.pipe-detail p {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.6;
}

.pipe-detail code {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Pipeline Controls */
.pipeline-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.pipeline-controls .btn {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 12px;
    padding: 6px 14px;
}

.pipeline-controls .btn:hover {
    background: rgba(99, 102, 241, 0.25);
}

/* Responsive pipeline */
@media (max-width: 1200px) {
    .pipeline-flow {
        flex-wrap: wrap;
        gap: 4px;
    }

    .pipe-node {
        min-width: 64px;
    }

    .pipe-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .pipe-arrow {
        width: 16px;
    }
}