/* =========================================================
   NEXENG Duct Pressure Dark Polish v2
   Ajuste fino visual después de Core Shell v1.
   Corrige barra de acciones clara y bloque gráfico gris del hero.
   No toca cálculos, fórmulas, exportaciones, .NXG ni JS principal.
   ========================================================= */

/* Barra superior de acciones: quitar banda blanca/gris en dark mode */
body.nx-theme-dark .nx-action-dock,
body.nx-theme-dark .nx-pressure-actions,
body.nx-theme-dark .nx-toolbar,
body.nx-theme-dark .nx-actions-bar,
body.nx-theme-dark .nx-sticky-actions,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-action-dock,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-actions,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-toolbar,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-actions-bar,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-sticky-actions {
    background:
        radial-gradient(circle at 10% 0%, rgba(0,174,239,.09), transparent 34%),
        linear-gradient(180deg, rgba(8,28,48,.98), rgba(5,20,36,.98)) !important;
    border-color: rgba(125,211,252,.18) !important;
    box-shadow: 0 14px 38px rgba(0,0,0,.24) !important;
}

/* Si la barra está en un contenedor directo después del header */
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-topbar + *,
body.nx-theme-dark .nx-topbar + * {
    border-color: rgba(125,211,252,.14) !important;
}

/* Texto "ACCIONES" */
body.nx-theme-dark .nx-action-label,
body.nx-theme-dark .nx-toolbar-label,
body.nx-theme-dark .nx-pressure-actions-label,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-action-label,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-toolbar-label,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-actions-label {
    color: #118cff !important;
    -webkit-text-fill-color: #118cff !important;
    letter-spacing: .14em !important;
}

/* Botones dentro de barra */
body.nx-theme-dark .nx-action-dock .nx-btn,
body.nx-theme-dark .nx-pressure-actions .nx-btn,
body.nx-theme-dark .nx-toolbar .nx-btn,
body.nx-theme-dark .nx-actions-bar .nx-btn,
body.nx-theme-dark .nx-sticky-actions .nx-btn,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-action-dock .nx-btn,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-actions .nx-btn,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-toolbar .nx-btn,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-actions-bar .nx-btn,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-sticky-actions .nx-btn {
    background: rgba(13,34,55,.96) !important;
    border-color: rgba(125,211,252,.24) !important;
    color: #eaf6ff !important;
    -webkit-text-fill-color: #eaf6ff !important;
}

body.nx-theme-dark .nx-action-dock .nx-btn-primary,
body.nx-theme-dark .nx-pressure-actions .nx-btn-primary,
body.nx-theme-dark .nx-toolbar .nx-btn-primary,
body.nx-theme-dark .nx-actions-bar .nx-btn-primary,
body.nx-theme-dark .nx-sticky-actions .nx-btn-primary,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-action-dock .nx-btn-primary,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-actions .nx-btn-primary,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-toolbar .nx-btn-primary,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-actions-bar .nx-btn-primary,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-sticky-actions .nx-btn-primary {
    background: linear-gradient(135deg, #0877e8, #00a6df) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Hero: quitar bloque gris central/derecho y hacerlo ingenieril */
body.nx-theme-dark .nx-pressure-hero-main,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-main {
    background:
        radial-gradient(circle at 16% 0%, rgba(0,174,239,.10), transparent 34%),
        linear-gradient(90deg, rgba(11,31,51,.98) 0%, rgba(10,30,50,.98) 52%, rgba(8,27,45,.94) 100%) !important;
    overflow: hidden !important;
}

/* Si el gráfico/ilustración del hero está como elemento interno, bajarlo de intensidad */
body.nx-theme-dark .nx-pressure-hero-visual,
body.nx-theme-dark .nx-hero-visual,
body.nx-theme-dark .nx-pressure-illustration,
body.nx-theme-dark .nx-hero-illustration,
body.nx-theme-dark .nx-pressure-hero-main svg,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-visual,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-hero-visual,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-illustration,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-hero-illustration,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-main svg {
    opacity: .22 !important;
    filter: saturate(1.2) brightness(.85) !important;
}

/* Capa encima para evitar el bloque gris opaco */
body.nx-theme-dark .nx-pressure-hero-main::after,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-main::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    background:
        linear-gradient(90deg, rgba(11,31,51,0) 0%, rgba(11,31,51,.08) 48%, rgba(8,24,40,.52) 100%),
        radial-gradient(circle at 70% 44%, rgba(0,174,239,.13), transparent 30%) !important;
    z-index: 0 !important;
}

body.nx-theme-dark .nx-pressure-hero-main > *,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-main > * {
    position: relative !important;
    z-index: 1 !important;
}

/* Tarjeta total del hero */
body.nx-theme-dark .nx-pressure-hero-total,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-hero-total {
    background:
        radial-gradient(circle at 20% 0%, rgba(0,174,239,.10), transparent 36%),
        linear-gradient(180deg, rgba(12,35,58,.98), rgba(8,24,40,.98)) !important;
    border-color: rgba(125,211,252,.20) !important;
}

/* KPIs: quitar contenedor blanco si aparece detrás */
body.nx-theme-dark .nx-summary-grid,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-summary-grid {
    background: transparent !important;
    border-color: transparent !important;
}

/* Tabla: texto fuerte en cálculos */
body.nx-theme-dark .nx-pressure-sheet tbody td,
body.nx-theme-dark .nx-pressure-sheet tbody td *,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-sheet tbody td,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-sheet tbody td * {
    font-weight: 850 !important;
}

/* Totales */
body.nx-theme-dark .nx-pressure-sheet tfoot td,
body.nx-theme-dark .nx-pressure-sheet tfoot td *,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-sheet tfoot td,
body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-sheet tfoot td * {
    color: #0f2238 !important;
    -webkit-text-fill-color: #0f2238 !important;
    font-weight: 950 !important;
}

/* Mobile */
@media (max-width: 920px) {
    body.nx-theme-dark .nx-action-dock,
    body.nx-theme-dark .nx-pressure-actions,
    body.nx-theme-dark .nx-toolbar,
    body.nx-theme-dark .nx-actions-bar,
    body.nx-theme-dark .nx-sticky-actions,
    body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-action-dock,
    body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-pressure-actions,
    body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-toolbar,
    body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-actions-bar,
    body.nx-duct-pressure-core-shell-v1.nx-theme-dark .nx-sticky-actions {
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }

    body.nx-theme-dark .nx-action-dock::-webkit-scrollbar,
    body.nx-theme-dark .nx-pressure-actions::-webkit-scrollbar,
    body.nx-theme-dark .nx-toolbar::-webkit-scrollbar,
    body.nx-theme-dark .nx-actions-bar::-webkit-scrollbar,
    body.nx-theme-dark .nx-sticky-actions::-webkit-scrollbar {
        display: none !important;
    }
}
