/*
 * Agendo Super Admin — Dark theme
 */

:root {
    --sa-bg: #0a0e1a;
    --sa-bg-card: #111827;
    --sa-bg-sidebar: #0d1117;
    --sa-bg-input: #1a1f2e;
    --sa-border: #1f2937;
    --sa-text: #e5e7eb;
    --sa-text-muted: #6b7280;
    --sa-primary: #6366f1;
    --sa-primary-hover: #818cf8;
    --sa-success: #10b981;
    --sa-danger: #ef4444;
    --sa-sidebar-width: 240px;
}

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

body.sa-body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--sa-bg);
    color: var(--sa-text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sa-sidebar {
    width: var(--sa-sidebar-width);
    background: var(--sa-bg-sidebar);
    border-right: 1px solid var(--sa-border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sa-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--sa-border);
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}
.sa-sidebar-brand small { font-weight: 500; color: var(--sa-text-muted); margin-left: 0.25rem; }

.sa-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
}

.sa-nav a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    color: var(--sa-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.sa-nav a:hover { color: var(--sa-text); background: rgba(255,255,255,0.05); }
.sa-nav a.active { color: #fff; background: rgba(99,102,241,0.15); }
.sa-nav a.active svg { stroke: var(--sa-primary); }

.sa-nav-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sa-text-muted);
    padding: 1rem 0.75rem 0.375rem;
}

.sa-sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--sa-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sa-user { display: flex; align-items: center; gap: 0.5rem; }
.sa-user-avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sa-primary), #818cf8);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}
.sa-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--sa-text); }
.sa-user-role { font-size: 0.6875rem; color: var(--sa-text-muted); }

.sa-logout {
    color: var(--sa-text-muted);
    padding: 0.375rem;
    border-radius: 6px;
    transition: all 0.15s;
}
.sa-logout:hover { color: var(--sa-danger); background: rgba(239,68,68,0.1); }

/* Main */
.sa-main {
    flex: 1;
    margin-left: var(--sa-sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* Header */
.sa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.sa-header h1 { font-size: 1.5rem; font-weight: 700; }
.sa-header p { color: var(--sa-text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

.sa-back {
    font-size: 0.8125rem;
    color: var(--sa-text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.sa-back:hover { color: var(--sa-primary); }

/* Stats */
.sa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sa-stat {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 12px;
    padding: 1.25rem;
}
.sa-stat-value { font-size: 1.5rem; font-weight: 800; color: #fff; }
.sa-stat-label { font-size: 0.75rem; color: var(--sa-text-muted); margin-top: 0.25rem; }

/* Cards */
.sa-card {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.sa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sa-border);
}
.sa-card-header h2 { font-size: 0.875rem; font-weight: 700; }
.sa-card-body { padding: 1.25rem; }

/* Grid */
.sa-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* Table */
.sa-table { width: 100%; border-collapse: collapse; }
.sa-table th {
    padding: 0.625rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sa-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--sa-border);
}
.sa-table td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.sa-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Links & text */
.sa-link { color: var(--sa-primary); text-decoration: none; font-size: 0.8125rem; }
.sa-link:hover { text-decoration: underline; }
.sa-link-bold { font-weight: 600; color: var(--sa-text); text-decoration: none; }
.sa-link-bold:hover { color: var(--sa-primary); }
.sa-text-muted { color: var(--sa-text-muted); }
.sa-text-xs { font-size: 0.6875rem; }
.sa-text-success { color: var(--sa-success); }
.sa-text-danger { color: var(--sa-danger); }

/* Badge */
.sa-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(99,102,241,0.15);
    color: var(--sa-primary-hover);
}

/* Status */
.sa-status { font-size: 0.75rem; font-weight: 600; }
.sa-status--active { color: var(--sa-success); }
.sa-status--inactive { color: var(--sa-danger); }

/* Buttons */
.sa-btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--sa-primary);
    color: #fff;
    border: none; border-radius: 8px;
    font-size: 0.8125rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    text-decoration: none;
    transition: background 0.15s;
}
.sa-btn-primary:hover { background: var(--sa-primary-hover); }

.sa-btn-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--sa-text-muted);
    border: 1px solid var(--sa-border); border-radius: 8px;
    font-size: 0.8125rem; font-weight: 500;
    cursor: pointer; font-family: inherit;
    text-decoration: none;
    transition: all 0.15s;
}
.sa-btn-outline:hover { border-color: var(--sa-primary); color: var(--sa-primary); }

.sa-btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem; font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--sa-border);
    background: transparent;
    color: var(--sa-text-muted);
    cursor: pointer; font-family: inherit;
    text-decoration: none;
    transition: all 0.15s;
}
.sa-btn-sm:hover { border-color: var(--sa-primary); color: var(--sa-primary); }

.sa-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Search */
.sa-search { display: flex; gap: 0.5rem; }
.sa-search input {
    padding: 0.5rem 0.875rem;
    background: var(--sa-bg-input);
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    color: var(--sa-text);
    font-size: 0.8125rem;
    font-family: inherit;
    min-width: 280px;
}
.sa-search input:focus { outline: none; border-color: var(--sa-primary); }
.sa-search button {
    padding: 0.5rem 1rem;
    background: var(--sa-primary);
    color: #fff; border: none; border-radius: 8px;
    font-size: 0.8125rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
}

/* Select */
.sa-select {
    padding: 0.5rem 0.75rem;
    background: var(--sa-bg-input);
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    color: var(--sa-text);
    font-size: 0.8125rem;
    font-family: inherit;
}

/* Empty */
.sa-empty {
    text-align: center;
    padding: 2rem;
    color: var(--sa-text-muted);
    font-size: 0.875rem;
}

/* Detail rows */
.sa-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.8125rem;
}
.sa-detail:last-child { border-bottom: none; }
.sa-detail span { color: var(--sa-text-muted); }

/* Activity */
.sa-activity-list { max-height: 400px; overflow-y: auto; }
.sa-activity-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.sa-activity-action { font-size: 0.8125rem; font-weight: 600; color: var(--sa-text); }
.sa-activity-meta { font-size: 0.75rem; color: var(--sa-text-muted); margin-top: 0.125rem; }
.sa-activity-time { font-size: 0.6875rem; color: var(--sa-text-muted); margin-top: 0.25rem; }

/* Tags */
.sa-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.sa-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: var(--sa-text-muted);
}

/* Log viewer */
.sa-log-viewer {
    max-height: 600px;
    overflow: auto;
    padding: 1rem;
}
.sa-log-viewer pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #d4d4d8;
    white-space: pre-wrap;
    word-break: break-all;
}

.sa-auto-refresh {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--sa-text-muted);
    cursor: pointer;
}

/* Login page */
.sa-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sa-bg);
    width: 100%;
}

.sa-login-card {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.sa-login-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2rem;
}
.sa-login-logo small { font-weight: 500; color: var(--sa-text-muted); margin-left: 0.25rem; }

.sa-login-card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.375rem;
}
.sa-login-card > p {
    font-size: 0.8125rem;
    color: var(--sa-text-muted);
    margin-bottom: 1.5rem;
}

.sa-form-group {
    margin-bottom: 1rem;
}
.sa-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sa-text);
    margin-bottom: 0.375rem;
}
.sa-form-group input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--sa-bg-input);
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    color: var(--sa-text);
    font-size: 0.875rem;
    font-family: inherit;
}
.sa-form-group input:focus {
    outline: none;
    border-color: var(--sa-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.sa-form-group input::placeholder { color: var(--sa-text-muted); }

.sa-login-card .sa-btn-primary {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
}

.sa-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}
.sa-alert--error {
    background: rgba(239,68,68,0.1);
    color: var(--sa-danger);
    border: 1px solid rgba(239,68,68,0.2);
}

/* ═══════════════════════════════════════════
   OPERATIONS CENTER
   ═══════════════════════════════════════════ */

/* Controls */
.sa-ops-controls { display: flex; align-items: center; gap: 1rem; }
.sa-ops-updated { font-size: 0.75rem; color: var(--sa-text-muted); }

/* Status Grid */
.sa-ops-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sa-ops-status-card {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 12px;
    padding: 1.25rem;
}
.sa-ops-status-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.sa-ops-status-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sa-text-muted); }
.sa-ops-status-value { font-size: 1rem; font-weight: 700; color: #fff; }
.sa-ops-status-detail { font-size: 0.75rem; color: var(--sa-text-muted); margin-top: 0.25rem; }

/* Pulse dots */
.sa-pulse {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.sa-pulse--green { background: var(--sa-success); animation: saPulse 2s infinite; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
.sa-pulse--red { background: var(--sa-danger); animation: saPulseRed 2s infinite; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
.sa-pulse--yellow { background: #f59e0b; animation: saPulseYellow 2s infinite; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
.sa-pulse--gray { background: var(--sa-text-muted); }

@keyframes saPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes saPulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes saPulseYellow {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Progress bars */
.sa-progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sa-progress-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.sa-progress-bar--success { background: var(--sa-success); }
.sa-progress-bar--danger { background: var(--sa-danger); }
.sa-progress-bar--warning { background: #f59e0b; }
.sa-progress-bar--primary { background: var(--sa-primary); }

.sa-ops-progress-labels { display: flex; justify-content: space-between; margin-top: 0.375rem; font-size: 0.6875rem; }

/* Metrics grid */
.sa-ops-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.sa-ops-metric { text-align: center; }
.sa-ops-metric-value { font-size: 1.5rem; font-weight: 800; }
.sa-ops-metric-label { font-size: 0.6875rem; color: var(--sa-text-muted); margin-top: 0.125rem; }

/* Resources */
.sa-ops-resource { margin-bottom: 1rem; }
.sa-ops-resource:last-child { margin-bottom: 0; }
.sa-ops-resource-header { display: flex; justify-content: space-between; margin-bottom: 0.375rem; font-size: 0.8125rem; }

/* Timeline */
.sa-ops-timeline { max-height: 400px; overflow-y: auto; }
.sa-ops-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.sa-ops-timeline-item:hover { background: rgba(255,255,255,0.02); }

.sa-ops-timeline-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.375rem;
}
.sa-ops-timeline-dot--info { background: var(--sa-primary); }
.sa-ops-timeline-dot--warning { background: #f59e0b; }
.sa-ops-timeline-dot--error { background: var(--sa-danger); }
.sa-ops-timeline-dot--critical { background: #dc2626; box-shadow: 0 0 8px rgba(220,38,38,0.5); }

.sa-ops-timeline-content { flex: 1; min-width: 0; }
.sa-ops-timeline-title { font-size: 0.8125rem; font-weight: 600; }
.sa-ops-timeline-detail { font-size: 0.75rem; color: var(--sa-text-muted); margin-top: 0.125rem; word-break: break-all; }
.sa-ops-timeline-time { font-size: 0.6875rem; color: var(--sa-text-muted); white-space: nowrap; }

/* Row highlights */
.sa-row-danger { border-left: 3px solid var(--sa-danger); }
.sa-row-warning { border-left: 3px solid #f59e0b; }
.sa-row-success { border-left: 3px solid var(--sa-success); }

/* Danger card */
.sa-card--danger { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.05); }

/* Alert rows */
.sa-ops-alert-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8125rem;
}
.sa-ops-alert-row:last-child { border-bottom: none; }
.sa-ops-alert-icon { font-size: 1rem; flex-shrink: 0; }
.sa-ops-alert-row code {
    background: rgba(255,255,255,0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Tabs (support) */
.sa-ops-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sa-border);
    margin-bottom: 1.25rem;
}
.sa-ops-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sa-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.sa-ops-tab:hover { color: var(--sa-text); }
.sa-ops-tab.active { color: var(--sa-primary); border-bottom-color: var(--sa-primary); }

.sa-ops-tab-content { display: none; }
.sa-ops-tab-content.active { display: block; }

/* Search (support) */
.sa-ops-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--sa-bg-input);
    border: 1px solid var(--sa-border);
    border-radius: 10px;
    padding: 0.125rem 1rem;
    transition: border-color 0.15s;
}
.sa-ops-search-wrapper:focus-within { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.sa-ops-search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--sa-text);
    font-size: 0.9375rem;
    font-family: inherit;
    padding: 0.75rem 0;
    outline: none;
}
.sa-ops-search-input::placeholder { color: var(--sa-text-muted); }

.sa-ops-search-results { margin-top: 1rem; }
.sa-ops-search-result {
    display: block;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--sa-border);
    text-decoration: none;
    color: var(--sa-text);
    transition: background 0.15s;
}
.sa-ops-search-result:hover { background: rgba(99,102,241,0.08); }
.sa-ops-search-result-main { margin-bottom: 0.25rem; }

/* Notes (support) */
.sa-ops-textarea {
    width: 100%;
    background: var(--sa-bg-input);
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    color: var(--sa-text);
    font-size: 0.875rem;
    font-family: inherit;
    padding: 0.75rem;
    resize: vertical;
}
.sa-ops-textarea:focus { outline: none; border-color: var(--sa-primary); }

.sa-ops-note {
    padding: 1rem;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.sa-ops-note--pinned { border-color: var(--sa-primary); background: rgba(99,102,241,0.05); }
.sa-ops-note-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.8125rem; }
.sa-ops-note-body { font-size: 0.8125rem; color: var(--sa-text); line-height: 1.5; }
.sa-ops-note-form { padding-bottom: 1rem; border-bottom: 1px solid var(--sa-border); }

/* ─── FLOW VISUALIZATIONS ─── */

/* Pipeline */
.sa-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}
.sa-pipeline-node {
    background: var(--sa-bg);
    border: 2px solid var(--sa-border);
    border-radius: 12px;
    padding: 1.25rem 2rem;
    text-align: center;
    min-width: 130px;
    transition: border-color 0.3s;
}
.sa-pipeline-node--primary { border-color: rgba(99,102,241,0.4); }
.sa-pipeline-node--success { border-color: rgba(16,185,129,0.4); }
.sa-pipeline-node--danger { border-color: rgba(239,68,68,0.4); }
.sa-pipeline-value { font-size: 1.75rem; font-weight: 800; color: #fff; }
.sa-pipeline-label { font-size: 0.75rem; color: var(--sa-text-muted); margin-top: 0.25rem; }

.sa-pipeline-arrow {
    width: 50px;
    height: 2px;
    background: var(--sa-border);
    position: relative;
    flex-shrink: 0;
}
.sa-pipeline-arrow::after {
    content: '';
    position: absolute;
    right: -1px; top: -4px;
    border: 5px solid transparent;
    border-left-color: var(--sa-border);
}
.sa-pipeline-dot {
    width: 6px; height: 6px;
    background: var(--sa-primary);
    border-radius: 50%;
    position: absolute;
    top: -2px;
    animation: saFlowDot 2s linear infinite;
}
@keyframes saFlowDot {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% - 6px); opacity: 0; }
}

.sa-pipeline-split {
    width: 30px;
    height: 2px;
    background: var(--sa-border);
    flex-shrink: 0;
}

/* Funnel */
.sa-funnel { padding: 0.5rem 0; }
.sa-funnel-step { margin-bottom: 6px; }
.sa-funnel-bar {
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    transition: width 0.6s ease;
    min-width: 60px;
}
.sa-funnel-bar-text { font-size: 0.75rem; font-weight: 600; color: #fff; white-space: nowrap; }

/* Source bars */
.sa-ops-source-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.875rem; }
.sa-ops-source-row:last-child { margin-bottom: 0; }
.sa-ops-source-label { display: flex; align-items: center; gap: 0.5rem; width: 100px; font-size: 0.8125rem; flex-shrink: 0; }
.sa-ops-source-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sa-ops-source-bar-wrapper { flex: 1; height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.sa-ops-source-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.sa-ops-source-value { font-size: 0.8125rem; font-weight: 600; min-width: 80px; text-align: right; white-space: nowrap; }

/* Bar chart */
.sa-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
    padding-bottom: 20px;
    position: relative;
}
.sa-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}
.sa-bar-col--wide { min-width: 30px; }
.sa-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    background: var(--sa-primary);
    transition: height 0.5s ease;
    min-height: 2px;
}
.sa-bar--current { background: var(--sa-success); box-shadow: 0 0 8px rgba(16,185,129,0.3); }
.sa-bar-label {
    position: absolute;
    bottom: -18px;
    font-size: 0.625rem;
    color: var(--sa-text-muted);
}

/* Stacked bars */
.sa-bar-stacked {
    width: 100%;
    border-radius: 3px 3px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.5s ease;
}
.sa-bar-segment { width: 100%; }
.sa-bar-segment--success { background: var(--sa-success); }
.sa-bar-segment--danger { background: var(--sa-danger); }

/* Period selector */
.sa-ops-period-selector { display: flex; gap: 0; border: 1px solid var(--sa-border); border-radius: 8px; overflow: hidden; }
.sa-ops-period {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sa-text-muted);
    background: none;
    border: none;
    border-right: 1px solid var(--sa-border);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.sa-ops-period:last-child { border-right: none; }
.sa-ops-period:hover { color: var(--sa-text); background: rgba(255,255,255,0.03); }
.sa-ops-period.active { color: #fff; background: var(--sa-primary); }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
    .sa-sidebar { transform: translateX(-100%); }
    .sa-main { margin-left: 0; }
    .sa-grid-2 { grid-template-columns: 1fr; }
    .sa-ops-status-grid { grid-template-columns: repeat(2, 1fr); }
    .sa-pipeline { flex-direction: column; gap: 0.5rem; }
    .sa-pipeline-arrow { width: 2px; height: 30px; }
    .sa-pipeline-arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top-color: var(--sa-border); border-left-color: transparent; }
    .sa-pipeline-split { width: 2px; height: 20px; }
    .sa-pipeline-dot { animation: none; display: none; }
}

@media (max-width: 640px) {
    .sa-main { padding: 1rem; }
    .sa-header { flex-direction: column; }
    .sa-stats { grid-template-columns: repeat(2, 1fr); }
    .sa-ops-status-grid { grid-template-columns: 1fr 1fr; }
    .sa-ops-metric-grid { grid-template-columns: repeat(2, 1fr); }
    .sa-ops-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .sa-ops-tab { white-space: nowrap; padding: 0.625rem 0.875rem; }
}

/* ═══ PIPELINE TESTER ═══ */
.sa-pipe-selector { display: flex; gap: 0.75rem; align-items: center; }
.sa-pipe-selected {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}
.sa-pipe-selected-name { font-weight: 700; color: #fff; }
.sa-pipe-selected-slug { color: var(--sa-text-muted); font-size: 0.75rem; margin-left: 0.5rem; }
.sa-pipe-selected-remove { cursor: pointer; color: var(--sa-text-muted); padding: 0.25rem; }
.sa-pipe-selected-remove:hover { color: var(--sa-danger); }

/* Vertical Timeline */
.sa-pipe-timeline { position: relative; padding-left: 2rem; margin: 1.5rem 0; }
.sa-pipe-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--sa-border);
}

.sa-pipe-step {
    position: relative;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.sa-pipe-step.visible { opacity: 1; transform: translateY(0); }

.sa-pipe-step-dot {
    position: absolute;
    left: -2rem;
    top: 0.875rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sa-border);
    border: 2px solid var(--sa-bg);
    z-index: 1;
}
.sa-pipe-step--pass .sa-pipe-step-dot { background: var(--sa-success); box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.sa-pipe-step--fail .sa-pipe-step-dot { background: var(--sa-danger); box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.sa-pipe-step--warning .sa-pipe-step-dot { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.sa-pipe-step--skip .sa-pipe-step-dot { background: var(--sa-text-muted); }

.sa-pipe-step-card {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 10px;
    padding: 0.875rem 1.125rem;
    transition: border-color 0.3s;
}
.sa-pipe-step--pass .sa-pipe-step-card { border-color: rgba(16,185,129,0.2); }
.sa-pipe-step--fail .sa-pipe-step-card { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.03); }
.sa-pipe-step--warning .sa-pipe-step-card { border-color: rgba(245,158,11,0.2); }

.sa-pipe-step-header { display: flex; justify-content: space-between; align-items: center; }
.sa-pipe-step-label { font-size: 0.8125rem; font-weight: 700; color: #fff; }
.sa-pipe-step-meta { display: flex; align-items: center; gap: 0.625rem; }
.sa-pipe-step-time { font-size: 0.6875rem; color: var(--sa-text-muted); font-family: 'JetBrains Mono', monospace; }
.sa-pipe-step-icon { font-size: 0.875rem; }

.sa-pipe-step-message {
    font-size: 0.8125rem;
    color: var(--sa-text-muted);
    margin-top: 0.375rem;
}
.sa-pipe-step--fail .sa-pipe-step-message { color: var(--sa-danger); }

.sa-pipe-step-details {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.75rem;
    color: var(--sa-text-muted);
}
.sa-pipe-step-details code {
    background: rgba(255,255,255,0.06);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
}

/* Summary */
.sa-pipe-summary {
    background: var(--sa-bg-card);
    border: 1px solid var(--sa-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.sa-pipe-summary.visible { opacity: 1; transform: translateY(0); }
.sa-pipe-summary-item { text-align: center; }
.sa-pipe-summary-value { font-size: 1.5rem; font-weight: 800; }
.sa-pipe-summary-label { font-size: 0.6875rem; color: var(--sa-text-muted); margin-top: 0.125rem; }

/* Spinner */
.sa-pipe-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--sa-border);
    border-top-color: var(--sa-primary);
    border-radius: 50%;
    animation: saSpin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes saSpin { to { transform: rotate(360deg); } }
