/* ============================================
   SANKEY PILOTO — REDESIGN EDITORIAL INSTITUCIONAL
   Dirección: tipográfico, plano + glassmorphism minimalista
   Glass solo en elementos que flotan sobre contenido.
   Sobreescribe estilos de cel-sankey.css solo para
   esta página. No toca IDs ni lógica JS.
   ============================================ */

/* --------------------------------------------------
   CUERPO Y FONDO
   Textura muy sutil: necesaria para que el glass
   tenga algo visible detrás.
   -------------------------------------------------- */

body.cel-pilot-body {
    background: #F7F6F3;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(155, 34, 71, 0.055) 0%, transparent 42%),
        radial-gradient(circle at 88% 72%, rgba(30, 91, 79, 0.045) 0%, transparent 40%),
        radial-gradient(circle at 55% 50%, rgba(165, 127, 44, 0.025) 0%, transparent 55%);
}


/* --------------------------------------------------
   HEADER
   -------------------------------------------------- */

.cel-pilot-header {
    background: #FFFFFF;
    border-top: 4px solid var(--color-gobmx-guinda);
    border-bottom: 1px solid #E4E0DA;
    box-shadow: none;
}

/* Eliminar blobs decorativos */
.cel-pilot-header::before,
.cel-pilot-header::after {
    display: none;
}

.cel-pilot-header-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    max-width: 1720px;
    margin: 0 auto;
    padding: 40px 40px 36px;
}

/* Breadcrumb: solo texto, sin pill flotante */
.cel-pilot-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    color: var(--color-gobmx-verde);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cel-pilot-title {
    max-width: 860px;
}

.cel-pilot-title h1 {
    margin: 0 0 14px;
    color: var(--color-gobmx-guinda);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
}

/* Parte secundaria del título: más liviana */
.cel-pilot-title h1 .cel-h1-accent {
    font-style: italic;
    font-weight: 400;
    color: #4d4242;
    letter-spacing: -0.01em;
}

.cel-pilot-title p {
    margin: 0;
    max-width: 760px;
    color: #6B7280;
    font-size: 0.975rem;
    line-height: 1.75;
}

/* Badges: glass muy sutil */
.cel-pilot-meta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cel-pilot-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: none;
    font-size: 0.775rem;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: 0;
}

.cel-pilot-badge i {
    color: var(--color-gobmx-guinda);
    font-size: 0.85rem;
}

.cel-pilot-badge {
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.cel-pilot-badge:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(155, 34, 71, 0.20);
    transform: translateY(-1px);
}

/* Logo: sin tarjeta flotante */
.cel-pilot-logo-card {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.cel-pilot-logo-card img {
    width: auto;
    height: 62px;
    opacity: 0.85;
}


/* --------------------------------------------------
   CONTENEDOR PRINCIPAL
   -------------------------------------------------- */

.cel-pilot-main {
    max-width: 1720px;
    margin: 0 auto;
    padding: 40px 40px 72px;
}


/* --------------------------------------------------
   SECCIÓN: LÓGICA DEL FLUJO
   Sin card contenedora — separada por espacio y regla
   -------------------------------------------------- */

.cel-pilot-story {
    position: static;
    overflow: visible;
    margin-bottom: 36px;
    border-radius: 0;
    padding: 0 0 36px;
    background: none;
    border: none;
    border-bottom: 1px solid #E4E0DA;
    box-shadow: none;
}

.cel-pilot-story::before {
    display: none;
}

/* Encabezado de sección */
.cel-pilot-section-head {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 28px;
}

.cel-pilot-section-head h2 {
    margin: 0 0 6px;
    color: #1F2937;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-family-body);
    padding-bottom: 10px;
    position: relative;
}

.cel-pilot-section-head h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--color-gobmx-guinda);
}

.cel-pilot-section-head > div:first-child > p {
    margin: 6px 0 0;
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Chips laterales: mínimos */
.cel-pilot-chipline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.cel-pilot-chipline span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 3px;
    background: none;
    border: 1px solid #E0DDD8;
    box-shadow: none;
    color: #7A8692;
    font-size: 0.75rem;
    font-weight: 600;
}

.cel-pilot-chipline i {
    color: var(--color-gobmx-dorado);
    font-size: 0.8rem;
}

/* Method steps: pasos numerados, sin cards individuales */
.cel-pilot-story .method-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 0;
    counter-reset: method-step-counter;
    position: relative;
}

/* Línea horizontal conectora */
.cel-pilot-story .method-grid::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-gobmx-guinda), #D5A04A);
    opacity: 0.25;
    z-index: 0;
}

.cel-pilot-story .method-step {
    counter-increment: method-step-counter;
    position: relative;
    z-index: 1;
    min-height: auto;
    overflow: visible;
    border-radius: 0;
    padding: 0 24px 0 0;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: opacity 200ms ease;
}

.cel-pilot-story .method-step:hover {
    opacity: 0.75;
}

.cel-pilot-story .method-step:hover::after {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(155, 34, 71, 0.28);
}

.cel-pilot-story .method-step::after {
    transition: transform 200ms ease, box-shadow 200ms ease;
}

/* Eliminar borde lateral anterior */
.cel-pilot-story .method-step::before {
    display: none;
}

/* Número circular encima del título */
.cel-pilot-story .method-step::after {
    content: counter(method-step-counter);
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-gobmx-guinda);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-family-body);
    line-height: 1;
    /* El número queda arriba; el texto se indenta */
}

.cel-pilot-story .method-step strong {
    display: block;
    margin-bottom: 8px;
    padding-top: 36px; /* espacio para el círculo ::after */
    color: #1F2937;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

/* El texto de descripción hereda el estilo del step */
.cel-pilot-story .method-step {
    font-size: 0.83rem;
    color: #6B7280;
    line-height: 1.55;
}


/* --------------------------------------------------
   TOOLBAR DE FILTROS
   Banda plana sin sub-cards por campo
   -------------------------------------------------- */

.cel-pilot-toolbar {
    margin-bottom: 28px;
    border-radius: 16px;
    padding: 24px 28px 20px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow:
        0 20px 50px -12px rgba(107, 15, 26, 0.07),
        0 8px 12px -4px rgba(0, 0, 0, 0.02);
}

/* Grid de controles sin cards individuales por campo */
.cel-pilot-toolbar .cel-sankey-control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr 1.2fr auto;
    gap: 20px;
    margin-bottom: 0;
    align-items: end;
}

/* Campos: sin card wrapper */
.cel-pilot-toolbar .cel-sankey-field {
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Acciones: sin card wrapper */
.cel-pilot-toolbar .cel-sankey-actions {
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

/* Labels — estilo ejecutivo: font-black + tracking extremo */
.cel-pilot-toolbar .cel-sankey-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: rgba(122, 27, 56, 0.60);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Inputs y selects: limpios con borde completo suave */
.cel-pilot-toolbar .cel-sankey-input,
.cel-pilot-toolbar .cel-sankey-select {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #CEC9C2;
    background: #FFFFFF;
    box-shadow: none;
    font-size: 0.875rem;
    color: #1F2937;
    padding: 0 12px;
    transition: border-color 200ms ease;
}

.cel-pilot-toolbar .cel-sankey-input:focus,
.cel-pilot-toolbar .cel-sankey-select:focus {
    outline: none;
    border-color: var(--color-gobmx-guinda);
    box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.08);
}

/* Toggle */
.cel-pilot-toolbar .cel-sankey-toggle {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #CEC9C2;
    background: #FFFFFF;
    box-shadow: none;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    cursor: pointer;
}

/* Botones */
.cel-pilot-toolbar .cel-sankey-btn {
    min-height: 42px;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: none;
    transition: all 200ms ease;
    white-space: nowrap;
}

.cel-pilot-toolbar .cel-sankey-btn.primary {
    background: var(--color-gobmx-guinda);
    color: #fff;
    border: none;
}

.cel-pilot-toolbar .cel-sankey-btn.primary:hover {
    background: var(--color-gobmx-guinda-dark);
}

.cel-pilot-toolbar .cel-sankey-btn.secondary {
    background: #FFFFFF;
    color: #374151;
    border: 1px solid #CEC9C2;
}

.cel-pilot-toolbar .cel-sankey-btn.secondary:hover {
    border-color: var(--color-gobmx-guinda);
    color: var(--color-gobmx-guinda);
}

/* Nota inline: texto plano, sin caja */
.cel-pilot-toolbar .cel-sankey-inline-note,
.cel-sankey-inline-note {
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 4px;
    background: rgba(155, 34, 71, 0.04);
    border: 1px solid rgba(155, 34, 71, 0.10);
    font-size: 0.825rem;
    color: #6B7280;
}

/* Tech chips */
.cel-pilot-toolbar .cel-sankey-techbar {
    margin: 14px 0 0;
}

.cel-sankey-chip {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.775rem;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: none;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    cursor: pointer;
}

.cel-sankey-chip:hover {
    background: rgba(155, 34, 71, 0.07);
    border-color: rgba(155, 34, 71, 0.25);
    color: var(--color-gobmx-guinda);
    transform: translateY(-1px);
}

.cel-sankey-chip.active {
    background: var(--color-gobmx-guinda);
    border-color: var(--color-gobmx-guinda);
    color: #fff;
}

.cel-sankey-chip.active:hover {
    background: var(--color-gobmx-guinda-dark);
    transform: translateY(-1px);
}


/* --------------------------------------------------
   KPIs
   Números grandes en columnas, sin cards individuales
   -------------------------------------------------- */

.cel-pilot-kpis {
    margin-bottom: 28px;
}

/* También aplica cuando cel-pilot-kpis es el padre directo de cel-sankey-summary
   (historicos envuelve la section en un div) */
.cel-pilot-kpis > .cel-sankey-summary,
.cel-pilot-kpis .cel-sankey-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 20px 50px -12px rgba(107, 15, 26, 0.07),
        0 6px 10px -4px rgba(0, 0, 0, 0.02);
}

.cel-pilot-kpis .cel-sankey-stat {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    padding: 28px 28px 26px;
    border: none;
    border-right: 1px solid rgba(228, 224, 218, 0.7);
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cel-pilot-kpis .cel-sankey-stat:last-child {
    border-right: none;
}

/* Línea superior en todas, acento en la primera */
.cel-pilot-kpis .cel-sankey-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-gobmx-guinda);
    opacity: 0.12;
}

.cel-pilot-kpis .cel-sankey-stat:first-child::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--color-gobmx-guinda), var(--color-gobmx-dorado));
}

/* Hover en KPI stat */
.cel-pilot-kpis .cel-sankey-stat {
    transition: background 250ms ease, box-shadow 250ms ease;
}

.cel-pilot-kpis .cel-sankey-stat:hover {
    background: rgba(155, 34, 71, 0.03);
    box-shadow: inset 0 0 0 1px rgba(155, 34, 71, 0.08);
}

.cel-pilot-kpis .cel-sankey-stat:hover .cel-stat-icon {
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(155, 34, 71, 0.30);
}

.cel-stat-icon {
    transition: transform 220ms ease, box-shadow 220ms ease;
}

/* --- Cabecera icon + badge --- */
.cel-stat-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.cel-stat-icon {
    width: 40px;
    height: 40px;
    background: var(--color-gobmx-guinda);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(155, 34, 71, 0.22);
}

.cel-stat-badge {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.cel-stat-badge-label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(155, 34, 71, 0.45);
    display: block;
}

.cel-stat-badge-unit {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-gobmx-guinda);
    display: block;
}

/* --- Label, value, note --- */
.cel-pilot-kpis .cel-sankey-stat-label {
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(156, 163, 175, 0.75);
    margin-bottom: 4px;
}

.cel-pilot-kpis .cel-sankey-stat-value {
    font-size: clamp(1.9rem, 2.5vw, 2.7rem);
    font-weight: 800;
    color: #1a1313;
    line-height: 1;
    font-family: var(--font-family-headings);
    letter-spacing: -0.03em;
}

.cel-pilot-kpis .cel-sankey-stat-note {
    font-size: 0.72rem;
    font-weight: 500;
    color: #9CA3AF;
    margin-top: 5px;
    letter-spacing: 0.01em;
}


/* --------------------------------------------------
   LAYOUT: PANEL PRINCIPAL + SIDEBAR
   -------------------------------------------------- */

.cel-pilot-layout {
    gap: 24px;
}

/* Hover en panels */
.cel-pilot-layout .cel-sankey-panel,
.cel-pilot-layout .cel-sankey-sidepanel {
    transition: box-shadow 280ms ease, transform 280ms ease;
}

.cel-pilot-layout .cel-sankey-panel:hover,
.cel-pilot-layout .cel-sankey-sidepanel:hover {
    transform: translateY(-2px);
    box-shadow:
        0 28px 60px -12px rgba(107, 15, 26, 0.12),
        0 14px 20px -6px rgba(0, 0, 0, 0.04);
}

/* Panel Sankey principal — shadow premium guinda-tinted */
.cel-pilot-layout .cel-sankey-panel {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-left: 3px solid var(--color-gobmx-guinda);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 20px 50px -12px rgba(107, 15, 26, 0.08),
        0 10px 15px -5px rgba(0, 0, 0, 0.02);
}

/* Sidebar */
.cel-pilot-layout .cel-sankey-sidepanel {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 20px 50px -12px rgba(107, 15, 26, 0.06),
        0 8px 12px -4px rgba(0, 0, 0, 0.02);
}

/* Headers de panel: tipográficos, sin línea decorativa centrada */
.cel-pilot-layout .cel-sankey-panel-header,
.cel-pilot-layout .cel-sankey-side-header {
    position: relative;
    padding: 20px 24px 18px;
    border-bottom: 1px solid #EEEBE6;
}

/* Quitar la línea corta decorativa del ::after anterior */
.cel-pilot-layout .cel-sankey-panel-header::after,
.cel-pilot-layout .cel-sankey-side-header::after {
    display: none;
}

.cel-pilot-layout .cel-sankey-panel-header h3,
.cel-pilot-layout .cel-sankey-side-header h3 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #374151;
    font-family: var(--font-family-body);
    margin: 0;
}

/* Cuerpos de panel */
.cel-pilot-layout .cel-sankey-panel-body,
.cel-pilot-layout .cel-sankey-side-body {
    padding: 24px;
}

/* Chart container — grid sutil de referencia */
.cel-pilot-layout .cel-sankey-chart {
    height: 860px;
    border-radius: 4px;
    background-color: #FAFAF8;
    background-image:
        linear-gradient(to right, rgba(155, 34, 71, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(155, 34, 71, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    border: 1px solid #EEEBE6;
}

/* Nota bajo el chart */
.cel-pilot-layout .cel-sankey-note {
    margin-top: 14px;
    border-radius: 0;
    padding: 10px 0;
    background: none;
    border-top: 1px solid #EEEBE6;
    color: #9CA3AF;
    font-size: 0.78rem;
    line-height: 1.55;
}

/* Leyenda */
.cel-pilot-layout .cel-sankey-legend {
    margin-top: 14px;
}

/* Swatch: cuadrado redondeado en lugar de círculo */
.cel-pilot-layout .cel-sankey-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px !important;
    flex-shrink: 0;
}

.cel-pilot-layout .cel-sankey-legend-item {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    transition: transform 180ms ease, background 180ms ease;
}

.cel-pilot-layout .cel-sankey-legend-item:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
}

/* Sidebar: read cards — sin card anidada, solo separación */
.cel-sankey-read-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cel-pilot-layout .cel-sankey-read-card {
    border-radius: 0;
    padding: 0 0 20px;
    background: none;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid #EEEBE6;
    margin-bottom: 20px;
}

.cel-pilot-layout .cel-sankey-read-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cel-sankey-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9CA3AF;
    margin-bottom: 14px;
}

/* Mini KPIs del sidebar */
.cel-pilot-layout .cel-sankey-side-kpi .mini {
    border-radius: 4px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.50);
    font-size: 0.8rem;
    color: #6B7280;
}

.cel-pilot-layout .cel-sankey-side-kpi .mini strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 2px;
}

/* Tabla ranking */
.cel-pilot-layout .cel-sankey-ranking th,
.cel-pilot-layout .cel-sankey-ranking td {
    padding: 10px 0;
    font-size: 0.8rem;
}

.cel-pilot-layout .cel-sankey-ranking tbody tr:last-child td {
    border-bottom: none;
}

.cel-pilot-layout .cel-sankey-ranking tbody tr:hover td {
    background: transparent;
    color: var(--color-gobmx-guinda);
}


/* --------------------------------------------------
   MODAL DE DETALLE
   -------------------------------------------------- */

.cel-pilot-modal .cel-modal-dialog {
    width: min(1260px, calc(100vw - 32px));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.20), 0 0 0 1px rgba(255,255,255,0.4) inset;
}

.cel-pilot-modal .cel-modal-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #E4E0DA;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.cel-pilot-modal .cel-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gobmx-guinda);
    margin: 0 0 4px;
}

.cel-pilot-modal .cel-modal-body {
    padding: 20px 24px 24px;
}

/* Mini stats del modal */
.cel-pilot-modal .cel-node-detail-meta .mini {
    border-radius: 4px;
    padding: 14px 16px;
    background: #F7F6F3;
    border: 1px solid #E4E0DA;
}

/* Sub-chart */
.cel-pilot-modal .cel-subchart {
    height: 560px;
    border-radius: 6px;
    background: #FAFAF8;
    border: 1px solid #EEEBE6;
}

/* Flow cards dentro del modal */
.cel-pilot-modal .cel-node-flow-card {
    border-radius: 6px;
    border: 1px solid #E4E0DA;
    overflow: hidden;
}

.cel-pilot-modal .cel-node-flow-card .cel-sankey-card-title {
    padding: 12px 16px;
    background: #F7F6F3;
    border-bottom: 1px solid #E4E0DA;
    margin-bottom: 0;
}

.cel-pilot-modal .cel-node-flow-card .cel-sankey-table-wrap {
    padding: 0 16px;
}


/* --------------------------------------------------
   RESPONSIVE
   -------------------------------------------------- */

@media (max-width: 1180px) {
    .cel-pilot-header-shell {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cel-pilot-logo-card {
        justify-self: start;
    }

    .cel-pilot-story .method-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }

    .cel-pilot-story .method-grid::before {
        display: none;
    }

    .cel-pilot-toolbar .cel-sankey-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cel-pilot-kpis .cel-sankey-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cel-pilot-kpis .cel-sankey-stat:nth-child(2) {
        border-right: none;
    }

    .cel-pilot-kpis .cel-sankey-stat:nth-child(3) {
        border-right: 1px solid #E4E0DA;
    }
}

@media (max-width: 760px) {
    .cel-pilot-header-shell {
        padding: 28px 20px 24px;
    }

    .cel-pilot-main {
        padding: 28px 16px 56px;
    }

    .cel-pilot-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cel-pilot-chipline {
        justify-content: flex-start;
    }

    .cel-pilot-story .method-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cel-pilot-toolbar {
        padding: 18px 16px;
    }

    .cel-pilot-toolbar .cel-sankey-control-grid {
        grid-template-columns: 1fr;
    }

    .cel-pilot-kpis .cel-sankey-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cel-pilot-kpis .cel-sankey-stat {
        padding: 20px 18px 18px;
    }

    .cel-pilot-layout .cel-sankey-panel-body,
    .cel-pilot-layout .cel-sankey-side-body {
        padding: 16px;
    }

    .cel-pilot-layout .cel-sankey-chart {
        height: 600px;
    }

    .cel-pilot-modal .cel-modal-dialog {
        width: calc(100vw - 16px);
        border-radius: 10px;
    }

    .cel-pilot-modal .cel-subchart {
        height: 360px;
    }
}
