/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1e1e2d;
    --sidebar-text: #a2a3b7;
    --sidebar-hover: #2a2a3d;
    --sidebar-active-bg: rgba(67, 97, 238, 0.15);
    --sidebar-active-text: #4361ee;

    --primary: #4361ee;
    --primary-hover: #3651d4;
    --primary-light: rgba(67, 97, 238, 0.1);
    --success: #2ec4b6;
    --success-light: rgba(46, 196, 182, 0.1);
    --warning: #ffbe0b;
    --warning-light: rgba(255, 190, 11, 0.1);
    --danger: #ef476f;
    --danger-light: rgba(239, 71, 111, 0.1);
    --info: #118ab2;
    --info-light: rgba(17, 138, 178, 0.1);

    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --border: #e1e5eb;
    --border-light: #f0f2f5;

    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: 0.2s ease;

    --topbar-height: 60px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    font-size: 14px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--sidebar-text);
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.25);
    padding: 16px 12px 6px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none !important;
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.nav-badge.hidden {
    display: none;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
}

.api-status i {
    font-size: 0.5rem;
}

.api-status.ok i {
    color: var(--success);
}

.api-status.error i {
    color: var(--danger);
}

/* ── Main area ───────────────────────────────────────────── */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h2 {
    font-size: 1.15rem;
    font-weight: 600;
    flex: 1;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.content {
    flex: 1;
    padding: 24px;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Stat cards ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.cyan {
    background: var(--info-light);
    color: var(--info);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Filters bar ─────────────────────────────────────────── */
.filters-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23b2bec3' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 12px center;
    transition: border var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--card);
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-icon.text-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-icon.text-success:hover {
    background: var(--success-light);
    color: var(--success);
}

/* ── Data Table ──────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .cell-bold {
    font-weight: 600;
}

.data-table .cell-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
}

.data-table .cell-actions {
    white-space: nowrap;
    text-align: right;
    width: 1%;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}

.badge-lang_seed, .badge-lang-seed {
    background: var(--info-light);
    color: var(--info);
}

.badge-manual {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-unmatched_resolve, .badge-unmatched-resolve {
    background: var(--success-light);
    color: var(--success);
}

.badge-pending {
    background: var(--warning-light);
    color: #c08a00;
}

.badge-matched, .badge-resolved {
    background: var(--success-light);
    color: var(--success);
}

.badge-dismissed {
    background: var(--border-light);
    color: var(--text-muted);
}

.badge-default {
    background: var(--border-light);
    color: var(--text-secondary);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-info {
    font-size: 0.82rem;
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.pagination-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-controls button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}

.modal.wide {
    max-width: 900px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group .form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Toast ────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    min-width: 280px;
    max-width: 440px;
    animation: toastIn 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

.toast i {
    font-size: 1rem;
    flex-shrink: 0;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ── Loading ─────────────────────────────────────────────── */
.loading-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    color: var(--text-muted);
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px;
}

.loading-inline .spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* ── Import preview ──────────────────────────────────────── */
.import-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    resize: vertical;
    transition: border var(--transition);
}

.import-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.import-textarea::placeholder {
    color: var(--text-muted);
}

.import-preview {
    max-height: 300px;
    overflow: auto;
    margin-top: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.import-count {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ── Top-list ────────────────────────────────────────────── */
.top-list {
    list-style: none;
}

.top-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.top-list li:last-child {
    border-bottom: none;
}

.top-list .top-text {
    font-weight: 500;
    word-break: break-all;
}

.top-list .top-count {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 12px;
}

/* ── Grid layouts ────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Coverage bar ────────────────────────────────────────── */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .filters-bar {
        flex-direction: column;
    }

    .search-input {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   ML MONITORING PAGE
   ═══════════════════════════════════════════════════════════ */

/* ── Status bar ──────────────────────────────────────────── */
.mon-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
}

.mon-status-bar.ok {
    background: var(--success-light);
    border: 1px solid rgba(46, 196, 182, 0.25);
    color: #1a8a7e;
}

.mon-status-bar.bad {
    background: var(--danger-light);
    border: 1px solid rgba(239, 71, 111, 0.25);
    color: #c0392b;
}

.mon-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mon-status-bar.ok .mon-status-indicator {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.25);
    animation: pulse-green 2s infinite;
}

.mon-status-bar.bad .mon-status-indicator {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 71, 111, 0.25);
    animation: pulse-red 1s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(46, 196, 182, 0.1); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 3px rgba(239, 71, 111, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(239, 71, 111, 0.1); }
}

.mon-status-text {
    flex: 1;
}

.mon-status-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ── Pipeline doughnut ───────────────────────────────────── */
.mon-pipeline {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 8px 0;
}

.mon-doughnut {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.mon-doughnut-center {
    position: absolute;
    inset: 20%;
    background: var(--card);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mon-doughnut-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.mon-doughnut-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mon-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mon-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.mon-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mon-legend-label {
    flex: 1;
    color: var(--text-secondary);
}

.mon-legend-value {
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

.mon-legend-pct {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 42px;
    text-align: right;
}

/* ── Sparklines ──────────────────────────────────────────── */
.mon-sparklines {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mon-spark-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mon-spark-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.mon-spark-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mon-spark-value {
    font-size: 1rem;
    font-weight: 700;
}

.mon-spark-svg {
    width: 100%;
    height: 48px;
    display: block;
}

/* ── Alerts ──────────────────────────────────────────────── */
.mon-no-alerts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: var(--success);
}

.mon-no-alerts i {
    font-size: 2rem;
}

.mon-no-alerts p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mon-alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mon-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.mon-alert.critical {
    background: var(--danger-light);
    border-color: rgba(239, 71, 111, 0.2);
}

.mon-alert.warning {
    background: var(--warning-light);
    border-color: rgba(255, 190, 11, 0.2);
}

.mon-alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mon-alert.critical .mon-alert-icon {
    color: var(--danger);
}

.mon-alert.warning .mon-alert-icon {
    color: var(--warning);
}

.mon-alert-body {
    flex: 1;
}

.mon-alert-code {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.mon-alert-msg {
    font-size: 0.88rem;
    margin-top: 2px;
}

.mon-alert-badge {
    flex-shrink: 0;
}

.mon-thresholds {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Responsive adjustments ──────────────────────────────── */
@media (max-width: 768px) {
    .mon-pipeline {
        flex-direction: column;
        gap: 16px;
    }

    .mon-doughnut {
        width: 130px;
        height: 130px;
    }

    .mon-status-meta {
        display: none;
    }
}

