/* ============================================
   MONITOR DE APIS - Estilos globales
   ============================================ */

:root {
    --sidebar-bg: #2d4a7c;
    --sidebar-bg-dark: #243f6b;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --sidebar-text: #c8d8f0;
    --sidebar-text-active: #ffffff;
    --sidebar-accent: #7ab3f0;
    --content-bg: #f4f6fa;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --dur-ok: #22c55e;
    --dur-info: #3b82f6;
    --dur-warning: #f59e0b;
    --dur-danger: #ef4444;
}

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

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--content-bg);
    color: #1e293b;
    font-size: 14px;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.monitor-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.monitor-main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
}

.monitor-content {
    padding: 2rem;
    max-width: 1600px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    transition: width 0.25s ease;
    overflow: hidden;
    align-self: flex-start;
}

/* Modo colapsado */
.sidebar--collapsed {
    width: var(--sidebar-collapsed-width);
}
.sidebar--collapsed .brand-text,
.sidebar--collapsed .nav-text,
.sidebar--collapsed .nav-section-label,
.sidebar--collapsed .footer-company,
.sidebar--collapsed .brand-toggle-hint {
    display: none;
}
.sidebar--collapsed .sidebar-brand {
    justify-content: center;
    padding: 1.1rem 0;
}
.sidebar--collapsed .sidebar-nav .nav-item {
    margin: 0.15rem 0.5rem;
}
.sidebar--collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0.65rem;
}
.sidebar--collapsed .nav-icon {
    width: auto;
    font-size: 1.15rem;
}
.sidebar--collapsed .footer-status {
    justify-content: center;
}
.sidebar--collapsed .status-dot {
    margin: 0;
}

/* Hint de toggle dentro del brand */
.brand-toggle-hint {
    margin-left: auto;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
    flex-shrink: 0;
}
.sidebar-brand:hover .brand-toggle-hint {
    color: rgba(255,255,255,0.9);
}

/* Ajuste del main al colapsarse */
.monitor-main {
    transition: margin-left 0.25s ease;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    text-decoration: none !important;
    color: #ffffff !important;
    min-height: 64px;
    background: var(--sidebar-bg-dark);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.sidebar-brand:hover {
    background: rgba(0,0,0,0.15);
}

.brand-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #fff;
}

.brand-icon .bi {
    line-height: 1;
    display: flex;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.brand-sub {
    font-size: 0.67rem;
    color: rgba(200, 220, 255, 0.65);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Nav */
.sidebar-nav {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    flex: 1;
}

.nav-section-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(180, 210, 255, 0.45);
    padding: 0.5rem 1.25rem 0.25rem;
    margin-top: 0.25rem;
}

.sidebar-nav .nav-item { margin: 0.15rem 0.75rem; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
    padding: 0.6rem 0.875rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.nav-icon {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.15s ease;
    line-height: 1;
}

/* Colores base por módulo */
.nav-icon--amber  { color: #fbbf24; }
.nav-icon--green  { color: #4ade80; }
.nav-icon--purple { color: #a78bfa; }
.nav-icon--red    { color: #f87171; }

/* Hover */
.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.10);
    color: #ffffff;
}
.sidebar-nav .nav-link:hover .nav-icon--amber  { color: #fde68a; }
.sidebar-nav .nav-link:hover .nav-icon--green  { color: #86efac; }
.sidebar-nav .nav-link:hover .nav-icon--purple { color: #c4b5fd; }
.sidebar-nav .nav-link:hover .nav-icon--red    { color: #fca5a5; }

/* Activo */
.sidebar-nav .nav-link.active { background: rgba(255,255,255,0.12); color: #ffffff; }
.sidebar-nav .nav-link.active .nav-icon--amber  { color: #fef08a; }
.sidebar-nav .nav-link.active .nav-icon--green  { color: #bbf7d0; }
.sidebar-nav .nav-link.active .nav-icon--purple { color: #ddd6fe; }
.sidebar-nav .nav-link.active .nav-icon--red    { color: #fecaca; }
.sidebar-nav .nav-link.active .nav-text { font-weight: 600; color: #ffffff; }

.nav-text {
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* Footer */
.sidebar-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    background: var(--sidebar-bg-dark);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse-green 2.5s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.footer-company {
    font-size: 0.72rem;
    color: rgba(200, 220, 255, 0.75) !important;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================
   PÁGINA HEADER
   ============================================ */
.page-header { border-bottom: 2px solid var(--border-color); padding-bottom: 1rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 0 0 0.25rem; }

/* ============================================
   API CARDS (lista de APIs)
   ============================================ */
.api-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    user-select: none;
}

.api-card:hover {
    border-color: var(--sidebar-accent);
    box-shadow: 0 4px 16px rgba(59,130,246,0.15);
    transform: translateY(-1px);
}

.api-card--selected {
    border-color: var(--sidebar-accent);
    background: #eff6ff;
    box-shadow: 0 4px 16px rgba(59,130,246,0.2);
}

.api-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.api-card__info { flex: 1; min-width: 0; }
.api-card__name { font-weight: 700; margin: 0 0 0.25rem; font-size: 1rem; color: #0f172a; }
.api-card__desc { font-size: 0.8rem; color: #64748b; margin: 0 0 0.5rem; line-height: 1.4; }
.api-card__status { flex-shrink: 0; }

/* ============================================
   BITÁCORA COMPONENT
   ============================================ */
.sinc-bitacora {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.bitacora-toolbar {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1rem;
}

.toolbar-group { display: flex; align-items: center; }

/* ============================================
   KPI CARDS
   ============================================ */
.kpi-label { margin-bottom: 0.75rem; }

.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.kpi-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.kpi-card--success { background: #f0fdf4; border-color: #86efac; }
.kpi-card--danger { background: #fef2f2; border-color: #fca5a5; animation: pulse-red 2s infinite; }
.kpi-card--muted { background: #f8fafc; }

@keyframes pulse-red {
    0%, 100% { border-color: #fca5a5; }
    50% { border-color: #ef4444; }
}

.kpi-card__value { font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1; }
.kpi-card--success .kpi-card__value { color: #16a34a; }
.kpi-card--danger .kpi-card__value { color: #dc2626; }
.kpi-card__label { font-size: 0.72rem; color: #64748b; margin-top: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================
   TABLA BITÁCORA
   ============================================ */
.table-filters {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.bitacora-table { margin: 0; }

.bitacora-table thead th {
    background: #f1f5f9;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    white-space: nowrap;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}

.bitacora-table tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.sortable { cursor: pointer; user-select: none; }
.sortable:hover { background: #e2e8f0 !important; }

.tabla-nombre {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #1e293b;
}

/* Duration bar */
.dur-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.dur-value { font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.dur-bar { width: 60px; height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.dur-bar__fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }

.dur-ok { color: var(--dur-ok); }
.dur-info { color: var(--dur-info); }
.dur-warning { color: var(--dur-warning); }
.dur-danger { color: var(--dur-danger); }

.dur-bar__fill.dur-ok { background: var(--dur-ok); }
.dur-bar__fill.dur-info { background: var(--dur-info); }
.dur-bar__fill.dur-warning { background: var(--dur-warning); }
.dur-bar__fill.dur-danger { background: var(--dur-danger); }

/* ============================================
   COMING SOON
   ============================================ */
.coming-soon {
    text-align: center;
    padding: 5rem 2rem;
    color: #94a3b8;
}
.coming-soon__icon { font-size: 4rem; display: block; margin-bottom: 1rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .monitor-main { margin-left: 0; }
    .sidebar { transform: translateX(-100%); }
    .monitor-content { padding: 1rem; }
    .kpi-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   APIS SELECTOR
   ============================================ */
.apis-selector {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1rem;
}

.apis-app-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    transition: all 0.15s ease;
}

/* ============================================
   LOG MODAL (Blob Storage)
   ============================================ */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.log-btn { opacity: 0.6; transition: opacity 0.15s; }
.log-btn:hover { opacity: 1; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-log-panel {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

.modal-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: #181825;
    flex-shrink: 0;
}

.modal-log-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.log-content {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: #cdd6f4;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}
.log-file-btn {
    border-color: rgba(255,255,255,0.15);
    color: #cdd6f4;
    background: rgba(255,255,255,0.05);
    text-align: left;
}
.log-file-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}

/* ============================================
   JSON VIEWER
   ============================================ */
.json-viewer {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #cdd6f4;
    white-space: pre-wrap;
    word-break: break-all;
}

.json-key    { color: #89b4fa; }   /* blue - claves */
.json-str    { color: #a6e3a1; }   /* green - strings */
.json-num    { color: #fab387; }   /* orange - números */
.json-bool   { color: #f38ba8; }   /* red - booleans */
.json-null   { color: #6c7086; }   /* gray - null */
.json-bracket{ color: #cba6f7; }   /* purple - {} [] */
.json-colon  { color: #94e2d5; }   /* teal - : */
.json-comma  { color: #6c7086; }   /* gray - , */
.json-plain  { color: #cdd6f4; }   /* plain text */

.ndjson-sep {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.75rem 0;
}

/* ── Resumen / Mission Control ───────────────── */
.mc-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Extend dark bg to fill the full monitor-content area */
    background:
        radial-gradient(circle at 14% -12%, rgba(96,165,250,0.14), transparent 34rem),
        #090b12;
    margin: -2rem;
    padding: 2rem;
    min-height: calc(100vh - var(--sidebar-width, 0px));
    color: #f8fafc;
}
.mc-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a3447;
}
.mc-topbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.mc-ts { color: #64748b; font-size: .75rem; font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace; }
.mc-label {
    color: #64748b;
    font: 800 .68rem/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 4px;
}
.mc-title { margin: 0; font-size: clamp(1.4rem, 2.5vw, 2rem); color: #f8fafc; line-height: 1.1; }
.mc-sub   { margin: 6px 0 0; color: #94a3b8; font-size: .88rem; }
.mc-badge {
    display: inline-flex; align-items: center;
    border: 1px solid #2a3447; border-radius: 999px;
    padding: 5px 10px;
    font: 800 .68rem/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace;
    text-transform: uppercase; letter-spacing: .08em;
}
.mc-badge--ok   { color: #22c55e; background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.2); }
.mc-badge--warn { color: #fbbf24; background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.2); }
.mc-badge--danger{ color: #ef4444; background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.2); }
.mc-badge--muted { color: #94a3b8; background: rgba(148,163,184,.08); }
.mc-panel {
    background: color-mix(in srgb, #121722 94%, #000);
    border: 1px solid #2a3447;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.32);
}
/* KPI grid */
.mc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 900px) { .mc-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .mc-kpi-grid { grid-template-columns: 1fr; } }
.mc-kpi { display: grid; gap: 8px; }
.mc-kpi-val {
    font: 900 2.2rem/.95 "SF Mono", "JetBrains Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mc-kpi-unit { font-size: 1rem; font-weight: 400; margin-left: 2px; }
.mc-kpi-val--accent  { color: #60a5fa; }
.mc-kpi-val--success { color: #22c55e; }
.mc-kpi-val--warn    { color: #fbbf24; }
.mc-kpi-val--danger  { color: #ef4444; }
.mc-delta { color: #94a3b8; font-size: .82rem; }
/* Charts grid */
.mc-charts-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}
@media (max-width: 900px) { .mc-charts-grid { grid-template-columns: 1fr; } }
.mc-panel-head {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px;
    margin-bottom: 16px;
}
.mc-panel-title { margin: 4px 0 0; font-size: 1rem; color: #f8fafc; }
.mc-chart-box { height: 260px; min-width: 0; }
.mc-chart-box canvas { width: 100% !important; height: 100% !important; }
.mc-chart-box--sm { height: 220px; }
.mc-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2.5rem; text-align: center;
}

/* ── Resumen Page (legacy) ───────────────────── */
.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: .85rem;
    padding: 1.25rem 1.5rem 1rem;
    height: 100%;
}
.chart-card__title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    margin-bottom: 1rem;
}
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}
/* Sparkline v2 */
.spark-bars-v2 {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 90px;
    margin-bottom: .35rem;
}
.spark-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    cursor: default;
}
.spark-pct-label {
    font-size: .58rem;
    font-weight: 700;
    height: 14px;
    line-height: 14px;
}
.spark-col-bg {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}
.spark-col-fill {
    width: 100%;
    border-radius: 2px 2px 0 0;
    min-height: 3px;
    transition: opacity .15s;
}
.spark-col:hover .spark-col-fill { opacity: .7; }
.spark-col-label {
    font-size: .6rem;
    color: #94a3b8;
    margin-top: 2px;
}
.spark-legend-v2 {
    display: flex;
    gap: .75rem;
    font-size: .74rem;
    color: #64748b;
    flex-wrap: wrap;
    align-items: center;
    margin-top: .4rem;
}
.sleg-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 3px;
}
/* Donut */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .5rem 0;
}
.donut-legend { display: flex; flex-direction: column; gap: .4rem; }
.dl-item { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: #475569; }
.dl-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
/* Endpoint bars */
.ep-bars { display: flex; flex-direction: column; gap: .55rem; padding: .25rem 0; }
.ep-row  { display: flex; align-items: center; gap: .6rem; }
.ep-label {
    width: 180px;
    font-size: .78rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.ep-bar-wrap { flex: 1; height: 14px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.ep-bar-fill { height: 100%; background: #ef4444; border-radius: 4px; transition: width .4s; }
.ep-count { font-size: .78rem; font-weight: 700; color: #ef4444; width: 28px; text-align: right; flex-shrink: 0; }

.resumen-section-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin-bottom: .6rem;
}
.resumen-services {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    overflow: hidden;
}
.kpi-card--blue    { border-left: 3px solid #3b82f6; }
.kpi-card--blue .kpi-card__value { color: #3b82f6; }
.kpi-card--success { border-left: 3px solid #22c55e; }
.kpi-card--success .kpi-card__value { color: #22c55e; }
.kpi-card--warning { border-left: 3px solid #f59e0b; }
.kpi-card--warning .kpi-card__value { color: #f59e0b; }
.kpi-card--danger  { border-left: 3px solid #ef4444; }
.kpi-card--danger .kpi-card__value  { color: #ef4444; }

/* Sparkline */
.resumen-sparkline-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    padding: 1.25rem 1.5rem 1rem;
}
.spark-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    margin-bottom: .4rem;
}
.spark-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    cursor: default;
}
.spark-bar-pct {
    font-size: .58rem;
    color: #ef4444;
    font-weight: 600;
    height: 14px;
    line-height: 14px;
    text-align: center;
}
.spark-bar-bg {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}
.spark-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    transition: opacity .15s;
}
.spark-bar-wrap:hover .spark-bar { opacity: .75; }
.spark-bar--ok      { background: #22c55e; }
.spark-bar--warning { background: #f59e0b; }
.spark-bar--danger  { background: #ef4444; }
.spark-bar-label {
    font-size: .62rem;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1;
}
.spark-legend {
    font-size: .75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}
.spark-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.spark-dot--ok      { background: #22c55e; }
.spark-dot--warning { background: #f59e0b; }
.spark-dot--danger  { background: #ef4444; }

/* ── Coming Soon ─────────────────────────────── */
.coming-soon-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
}
.coming-soon-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2.5rem;
    max-width: 540px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.coming-soon-icon {
    font-size: 3.5rem;
    color: #dc3545;
    margin-bottom: 1rem;
    line-height: 1;
}
.coming-soon-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .75rem;
}
.coming-soon-desc {
    color: #64748b;
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}
.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.75rem;
    text-align: left;
}
.cs-feature {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    color: #475569;
    background: #f8fafc;
    border-radius: .5rem;
    padding: .55rem .9rem;
    border: 1px solid #e2e8f0;
}
.cs-feature i { font-size: 1rem; flex-shrink: 0; }
.coming-soon-badge { margin-top: .5rem; }

/* ── Columna Error / Mensaje ─────────────────── */
.cell-msg {
    max-width: 320px;
    word-break: break-word;
    white-space: normal;
}
.msg-error-tipo {
    font-size: .82rem;
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 2px;
}
.msg-detalle {
    font-size: .80rem;
    color: #495057;
    line-height: 1.35;
}
.msg-detalle.msg-info {
    color: #6c757d;    /* gris si no hay error encima */
}
.msg-stack {
    font-size: .73rem;
    color: #adb5bd;
    margin-top: 2px;
    font-style: italic;
    line-height: 1.3;
}
