﻿:root {
    --fcx-navy-950: #071a33;
    --fcx-navy-900: #0b2b50;
    --fcx-blue-800: #075a9c;
    --fcx-blue-700: #0a76bf;
    --fcx-blue-500: #2aa8dd;
    --fcx-orange: #f28c18;
    --fcx-orange-100: #fff3df;
    --fcx-cyan-100: #e9f8ff;
    --fcx-bg: #f5f8fc;
    --fcx-surface: #ffffff;
    --fcx-surface-soft: #f8fbff;
    --fcx-border: #dce7f1;
    --fcx-border-strong: #c6d6e5;
    --fcx-text: #172a42;
    --fcx-muted: #64758a;
    --fcx-green: #167a4c;
    --fcx-green-bg: #e3f6ec;
    --fcx-yellow: #805f00;
    --fcx-yellow-bg: #fff2b6;
    --fcx-red: #a12c3c;
    --fcx-red-bg: #ffe1e6;
    --fcx-shadow: 0 16px 42px rgba(16, 55, 92, .10);
    --fcx-shadow-soft: 0 10px 26px rgba(16, 55, 92, .08);
    --fcx-radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 4% 2%, rgba(42, 168, 221, .12), transparent 24rem), radial-gradient(circle at 95% 1%, rgba(242, 140, 24, .10), transparent 25rem), linear-gradient(145deg, #f7fafe, #ffffff 54%, #fffaf3) !important;
}

.fcx-page,
.fcx-modal {
    color: var(--fcx-text);
    font-family: inherit;
}

    .fcx-page *,
    .fcx-page *::before,
    .fcx-page *::after,
    .fcx-modal *,
    .fcx-modal *::before,
    .fcx-modal *::after {
        box-sizing: border-box;
    }

.fcx-page {
    width: 100%;
    max-width: 1920px;
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 22px;
}

/* ============================================================
   ENCABEZADO
   ============================================================ */

.fcx-hero {
    position: relative;
    min-height: 230px;
    margin-bottom: 16px;
    padding: 30px 32px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 26px;
    overflow: hidden;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 30px;
    background: radial-gradient(circle at 93% 6%, rgba(255, 195, 81, .34), transparent 23rem), radial-gradient(circle at 4% 118%, rgba(38, 202, 218, .28), transparent 25rem), linear-gradient(116deg, #071a33 0%, #075a9c 68%, #f28c18 100%);
    box-shadow: 0 24px 68px rgba(7, 70, 121, .22);
}

    .fcx-hero::before {
        content: "";
        position: absolute;
        width: 330px;
        height: 330px;
        right: -120px;
        bottom: -200px;
        border: 31px solid rgba(255, 255, 255, .08);
        border-radius: 50%;
        pointer-events: none;
    }

.fcx-hero-copy,
.fcx-hero-actions {
    position: relative;
    z-index: 2;
}

.fcx-hero-copy {
    max-width: 1100px;
}

.fcx-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #ffe2b9;
    font-size: .69rem;
    font-weight: 950;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.fcx-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.5rem, 4.8vw, 4.6rem);
    font-weight: 950;
    line-height: .96;
    letter-spacing: -.055em;
}

.fcx-hero p {
    max-width: 900px;
    margin: 16px 0 0;
    color: #e6f2ff;
    font-size: .97rem;
    font-weight: 650;
    line-height: 1.6;
}

.fcx-period {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

    .fcx-period span {
        min-height: 34px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #f2f7ff;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 999px;
        background: rgba(255, 255, 255, .10);
        font-size: .65rem;
        font-weight: 820;
        backdrop-filter: blur(10px);
    }

.fcx-hero-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 9px;
}

/* ============================================================
   BOTONES
   ============================================================ */

.fcx-btn {
    min-height: 46px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: inherit;
    border: 1px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

    .fcx-btn:hover {
        transform: translateY(-1px);
        text-decoration: none;
    }

.fcx-btn-primary {
    color: #372100;
    background: linear-gradient(135deg, var(--fcx-orange), #ffc05a);
    box-shadow: 0 13px 30px rgba(242, 140, 24, .27);
}

    .fcx-btn-primary:hover {
        color: #372100;
        box-shadow: 0 17px 36px rgba(242, 140, 24, .34);
    }

.fcx-btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(10px);
}

    .fcx-btn-ghost:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, .19);
    }

.fcx-btn-light {
    color: var(--fcx-blue-800);
    border-color: var(--fcx-border);
    background: #ffffff;
    box-shadow: var(--fcx-shadow-soft);
}

    .fcx-btn-light:hover {
        color: var(--fcx-blue-700);
        border-color: rgba(7, 90, 156, .30);
    }

.fcx-filter-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: .59rem;
}

    .fcx-filter-count.has-filters {
        color: #3d2600;
        background: #ffd18b;
    }

/* ============================================================
   ALERTAS Y CARGA
   ============================================================ */

.fcx-alert {
    margin-bottom: 16px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #8d2a37;
    border: 1px solid rgba(161, 44, 60, .22);
    border-radius: 16px;
    background: #fff6f7;
    box-shadow: var(--fcx-shadow-soft);
    font-size: .75rem;
    font-weight: 800;
}

.fcx-page.is-loading::after {
    content: "Actualizando información...";
    position: fixed;
    z-index: 11000;
    right: 22px;
    bottom: 22px;
    min-height: 44px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: rgba(7, 26, 51, .94);
    box-shadow: 0 20px 48px rgba(7, 26, 51, .26);
    font-size: .72rem;
    font-weight: 900;
}

/* ============================================================
   FILTROS
   ============================================================ */

.fcx-filter-panel {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--fcx-border);
    border-radius: var(--fcx-radius);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--fcx-shadow);
}

    .fcx-filter-panel.is-collapsed {
        display: none;
    }

.fcx-filter-head {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

    .fcx-filter-head > div:first-child > span,
    .fcx-section-head > div:first-child > span,
    .fcx-modal-section-head > div:first-child > span {
        display: block;
        margin-bottom: 4px;
        color: var(--fcx-blue-700);
        font-size: .62rem;
        font-weight: 950;
        letter-spacing: .13em;
        text-transform: uppercase;
    }

    .fcx-filter-head h2,
    .fcx-section-head h2,
    .fcx-modal-section-head h3 {
        margin: 0;
        color: var(--fcx-navy-950);
        font-weight: 950;
        letter-spacing: -.025em;
    }

    .fcx-filter-head h2,
    .fcx-section-head h2 {
        font-size: 1.22rem;
    }

.fcx-modal-section-head h3 {
    font-size: 1rem;
}

.fcx-auto-state {
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--fcx-blue-800);
    border: 1px solid var(--fcx-border);
    border-radius: 999px;
    background: var(--fcx-surface-soft);
    font-size: .64rem;
    font-weight: 900;
}

#cashAutoStatus.is-loading {
    color: #9a5c00;
}

#cashAutoStatus.is-error {
    color: #9e2e3e;
}

#cashAutoStatus.is-ready {
    color: #13724a;
}

.fcx-filter-group {
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--fcx-border);
    border-radius: 16px;
    background: var(--fcx-surface-soft);
}

    .fcx-filter-group summary {
        min-height: 52px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: var(--fcx-navy-950);
        cursor: pointer;
        list-style: none;
    }

        .fcx-filter-group summary::-webkit-details-marker {
            display: none;
        }

        .fcx-filter-group summary span {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: .74rem;
            font-weight: 950;
        }

            .fcx-filter-group summary span i {
                color: var(--fcx-orange);
            }

        .fcx-filter-group summary small {
            color: var(--fcx-muted);
            font-size: .62rem;
            font-weight: 750;
        }

    .fcx-filter-group[open] summary {
        border-bottom: 1px solid var(--fcx-border);
        background: #ffffff;
    }

.fcx-filter-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    align-items: end;
    gap: 12px;
}

.fcx-filter-grid-period {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.fcx-filter-grid label:not(.fcx-check) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fcx-filter-grid label > span {
    color: var(--fcx-blue-800);
    font-size: .61rem;
    font-weight: 950;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.fcx-filter-grid input,
.fcx-filter-grid select,
.fcx-month-select select,
.fcx-modal-section-head input,
.fcx-movement-tools select {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    color: var(--fcx-text) !important;
    border: 1px solid var(--fcx-border-strong);
    border-radius: 12px;
    outline: none;
    background: #ffffff !important;
    color-scheme: light !important;
    font-family: inherit;
    font-size: .73rem;
    transition: border-color .16s ease, box-shadow .16s ease;
}

    .fcx-filter-grid input:focus,
    .fcx-filter-grid select:focus,
    .fcx-month-select select:focus,
    .fcx-modal-section-head input:focus,
    .fcx-movement-tools select:focus {
        border-color: var(--fcx-orange);
        box-shadow: 0 0 0 4px rgba(242, 140, 24, .12);
    }

.fcx-span-2 {
    grid-column: span 2;
}

.fcx-check {
    position: relative;
    min-height: 58px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--fcx-border);
    border-radius: 13px;
    background: #ffffff;
    cursor: pointer;
}

    .fcx-check > input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    .fcx-check > span {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        display: grid;
        place-items: center;
        color: transparent;
        border: 1px solid #c6d4e2;
        border-radius: 7px;
        background: #ffffff;
    }

    .fcx-check > input:checked + span {
        color: #ffffff;
        border-color: var(--fcx-blue-700);
        background: linear-gradient(135deg, var(--fcx-blue-800), var(--fcx-blue-500));
    }

    .fcx-check strong,
    .fcx-check small {
        display: block;
    }

    .fcx-check strong {
        color: var(--fcx-navy-950);
        font-size: .68rem;
    }

    .fcx-check small {
        margin-top: 2px;
        color: var(--fcx-muted);
        font-size: .56rem;
    }

.fcx-filter-actions {
    margin-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .fcx-filter-actions small {
        color: var(--fcx-muted);
        font-size: .62rem;
    }

/* ============================================================
   SELECTOR DE MONEDA
   ============================================================ */

.fcx-command-bar {
    margin-bottom: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--fcx-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--fcx-shadow-soft);
}

.fcx-mode-switch {
    display: inline-grid;
    grid-template-columns: repeat(4, minmax(125px, 1fr));
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: #edf4fa;
}

    .fcx-mode-switch button {
        min-height: 38px;
        padding: 0 13px;
        color: var(--fcx-blue-800);
        border: 0;
        border-radius: 10px;
        background: transparent;
        font-family: inherit;
        font-size: .64rem;
        font-weight: 950;
        cursor: pointer;
    }

        .fcx-mode-switch button.is-active {
            color: #ffffff;
            background: linear-gradient(135deg, var(--fcx-blue-800), var(--fcx-blue-500));
            box-shadow: 0 9px 20px rgba(7, 90, 156, .22);
        }

.fcx-mode-note {
    min-width: 0;
    display: grid;
    justify-items: end;
    gap: 2px;
    text-align: right;
}

    .fcx-mode-note strong {
        color: var(--fcx-navy-950);
        font-size: .72rem;
    }

    .fcx-mode-note span,
    .fcx-mode-note small {
        color: var(--fcx-muted);
        font-size: .58rem;
        line-height: 1.4;
    }

/* ============================================================
   KPIS
   ============================================================ */

.fcx-kpis {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(190px, 1fr));
    gap: 11px;
}

.fcx-kpi {
    position: relative;
    min-width: 0;
    min-height: 132px;
    padding: 16px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    color: var(--fcx-text);
    border: 1px solid var(--fcx-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--fcx-shadow-soft);
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .fcx-kpi::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 4px;
        background: linear-gradient(90deg, var(--fcx-blue-800), var(--fcx-orange));
    }

    .fcx-kpi:hover {
        transform: translateY(-2px);
        border-color: rgba(7, 90, 156, .28);
        box-shadow: var(--fcx-shadow);
    }

.fcx-kpi-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--fcx-blue-700);
    border-radius: 13px;
    background: #e9f4ff;
    font-size: 1.02rem;
}

.fcx-kpi-copy {
    min-width: 0;
}

    .fcx-kpi-copy small,
    .fcx-kpi-copy strong,
    .fcx-kpi-copy em {
        display: block;
    }

    .fcx-kpi-copy small {
        color: var(--fcx-muted);
        font-size: .58rem;
        font-weight: 900;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .fcx-kpi-copy strong {
        margin-top: 6px;
        color: var(--fcx-navy-950);
        font-size: clamp(.96rem, 1.28vw, 1.28rem);
        font-weight: 950;
        letter-spacing: -.025em;
        overflow-wrap: anywhere;
    }

    .fcx-kpi-copy em {
        margin-top: 5px;
        color: var(--fcx-muted);
        font-size: .56rem;
        font-style: normal;
        font-weight: 720;
        line-height: 1.35;
    }

.fcx-kpi-arrow {
    color: #9aabba;
}

.fcx-kpi.fcx-accumulated-verde {
    border-color: rgba(22, 122, 76, .32);
    background: linear-gradient(145deg, #ffffff, var(--fcx-green-bg));
}

.fcx-kpi.fcx-accumulated-amarillo {
    border-color: rgba(128, 95, 0, .34);
    background: linear-gradient(145deg, #ffffff, var(--fcx-yellow-bg));
}

.fcx-kpi.fcx-accumulated-rojo {
    border-color: rgba(161, 44, 60, .32);
    background: linear-gradient(145deg, #ffffff, var(--fcx-red-bg));
}

/* ============================================================
   CLAVES DE DIRECCION
   ============================================================ */

.fcx-director-strip {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 10px;
}

.fcx-insight,
.fcx-insight-loading {
    min-height: 94px;
    padding: 13px 14px;
    border: 1px solid var(--fcx-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--fcx-shadow-soft);
}

.fcx-insight {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: var(--fcx-text);
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease;
}

    .fcx-insight:hover {
        transform: translateY(-2px);
        border-color: rgba(242, 140, 24, .34);
    }

    .fcx-insight > i {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        color: var(--fcx-orange);
        border-radius: 11px;
        background: var(--fcx-orange-100);
        font-size: .95rem;
    }

    .fcx-insight small,
    .fcx-insight strong,
    .fcx-insight em {
        display: block;
    }

    .fcx-insight small {
        color: var(--fcx-muted);
        font-size: .55rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .fcx-insight strong {
        margin-top: 4px;
        color: var(--fcx-navy-950);
        font-size: .74rem;
        font-weight: 950;
        line-height: 1.25;
    }

    .fcx-insight em {
        margin-top: 3px;
        color: var(--fcx-muted);
        font-size: .55rem;
        font-style: normal;
        line-height: 1.3;
    }

.fcx-insight-loading {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    color: var(--fcx-muted);
    font-size: .68rem;
    font-weight: 800;
}

/* ============================================================
   PANELES Y TITULOS
   ============================================================ */

.fcx-panel {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--fcx-border);
    border-radius: var(--fcx-radius);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--fcx-shadow);
}

.fcx-section-head {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.fcx-section-head-inline {
    align-items: center;
}

.fcx-section-head p {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--fcx-muted);
    font-size: .68rem;
    line-height: 1.5;
}

/* ============================================================
   TABLA PRINCIPAL
   ============================================================ */

.fcx-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--fcx-border);
    border-radius: 15px;
    background: #ffffff;
}

.fcx-matrix-wrap {
    max-height: 640px;
}

.fcx-flow-table {
    width: 100%;
    min-width: 1700px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

    .fcx-flow-table th,
    .fcx-flow-table td {
        height: 58px;
        padding: 7px 9px;
        border-right: 1px solid #edf2f7;
        border-bottom: 1px solid #edf2f7;
        vertical-align: middle;
    }

    .fcx-flow-table thead th {
        position: sticky;
        top: 0;
        z-index: 4;
        color: #ffffff;
        background: #17324f;
        font-size: .62rem;
        font-weight: 950;
        text-align: center;
        white-space: nowrap;
    }

        .fcx-flow-table thead th:first-child {
            left: 0;
            z-index: 6;
            width: 230px;
            text-align: left;
        }

        .fcx-flow-table thead th:last-child {
            right: 0;
            z-index: 7;
            width: 155px;
        }

    .fcx-flow-table thead button {
        padding: 0;
        color: inherit;
        border: 0;
        background: transparent;
        font: inherit;
        font-weight: inherit;
        cursor: pointer;
    }

        .fcx-flow-table thead button:hover {
            color: #ffd49a;
        }

    .fcx-flow-table tbody th {
        position: sticky;
        left: 0;
        z-index: 3;
        width: 230px;
        color: var(--fcx-navy-950);
        background: #f3f7fb;
        font-size: .68rem;
        font-weight: 950;
        text-align: left;
        box-shadow: 8px 0 18px rgba(17, 52, 84, .05);
    }

.fcx-row-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .fcx-row-label i {
        width: 29px;
        height: 29px;
        display: grid;
        place-items: center;
        color: var(--fcx-blue-700);
        border-radius: 9px;
        background: #e7f3fd;
    }

.fcx-flow-table tbody td {
    color: #30465d;
    background: #ffffff;
    font-size: .64rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fcx-flow-table tbody tr:hover td:not([class*="fcx-semaphore-"]) {
    background: #f8fbff;
}

.fcx-amount-link {
    width: 100%;
    min-height: 38px;
    padding: 5px 7px;
    color: inherit;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
}

    .fcx-amount-link:hover:not(:disabled) {
        color: var(--fcx-blue-800);
        background: #eaf5ff;
    }

    .fcx-amount-link:disabled {
        opacity: .45;
        cursor: default;
    }

.fcx-total-col {
    position: sticky;
    right: 0;
    z-index: 3;
    color: #ffffff !important;
    background: #17324f !important;
    font-weight: 950;
}

    .fcx-total-col .fcx-amount-link {
        color: inherit;
    }

.fcx-accumulated-row th {
    color: var(--fcx-blue-800) !important;
}

.fcx-semaphore-verde {
    color: var(--fcx-green) !important;
    background: var(--fcx-green-bg) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 122, 76, .15);
}

.fcx-semaphore-amarillo {
    color: var(--fcx-yellow) !important;
    background: var(--fcx-yellow-bg) !important;
    box-shadow: inset 0 0 0 1px rgba(128, 95, 0, .16);
}

.fcx-semaphore-rojo {
    color: var(--fcx-red) !important;
    background: var(--fcx-red-bg) !important;
    box-shadow: inset 0 0 0 1px rgba(161, 44, 60, .16);
}

    .fcx-semaphore-verde .fcx-amount-link,
    .fcx-semaphore-amarillo .fcx-amount-link,
    .fcx-semaphore-rojo .fcx-amount-link {
        color: inherit;
    }

.fcx-semaphore-note {
    margin-top: 11px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--fcx-muted);
    font-size: .58rem;
}

    .fcx-semaphore-note strong {
        margin-left: 4px;
        color: var(--fcx-navy-950);
    }

.fcx-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.fcx-dot-green {
    background: #2ea96e;
}

.fcx-dot-yellow {
    background: #e8b52f;
}

.fcx-dot-red {
    background: #d85768;
}

/* ============================================================
   ANALISIS
   ============================================================ */

.fcx-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 11px;
}

.fcx-analysis-card {
    min-height: 145px;
    padding: 16px;
    display: grid;
    align-content: start;
    justify-items: start;
    color: var(--fcx-text);
    border: 1px solid var(--fcx-border);
    border-radius: 17px;
    background: linear-gradient(145deg, #ffffff, #f8fbff);
    box-shadow: var(--fcx-shadow-soft);
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .fcx-analysis-card:hover {
        transform: translateY(-2px);
        border-color: rgba(242, 140, 24, .34);
        box-shadow: var(--fcx-shadow);
    }

    .fcx-analysis-card > i {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        color: var(--fcx-blue-700);
        border-radius: 12px;
        background: #e8f4ff;
        font-size: .98rem;
    }

    .fcx-analysis-card span,
    .fcx-analysis-card strong,
    .fcx-analysis-card small {
        display: block;
    }

    .fcx-analysis-card span {
        margin-top: 12px;
        color: var(--fcx-muted);
        font-size: .6rem;
        font-weight: 950;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .fcx-analysis-card strong {
        margin-top: 6px;
        color: var(--fcx-navy-950);
        font-size: .82rem;
        font-weight: 950;
        line-height: 1.3;
    }

    .fcx-analysis-card small {
        margin-top: 5px;
        color: var(--fcx-muted);
        font-size: .57rem;
        line-height: 1.4;
    }

/* ============================================================
   ACUMULADO DIARIO
   ============================================================ */

.fcx-daily-actions {
    display: flex;
    align-items: end;
    gap: 9px;
}

.fcx-month-select {
    min-width: 210px;
    display: grid;
    gap: 5px;
}

    .fcx-month-select span {
        color: var(--fcx-blue-800);
        font-size: .6rem;
        font-weight: 950;
        text-transform: uppercase;
    }

.fcx-daily-summary {
    margin-bottom: 11px;
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 8px;
}

    .fcx-daily-summary span {
        min-height: 72px;
        padding: 11px 12px;
        display: grid;
        align-content: center;
        border: 1px solid var(--fcx-border);
        border-radius: 13px;
        background: var(--fcx-surface-soft);
    }

    .fcx-daily-summary small,
    .fcx-daily-summary strong {
        display: block;
    }

    .fcx-daily-summary small {
        color: var(--fcx-muted);
        font-size: .56rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .fcx-daily-summary strong {
        margin-top: 5px;
        color: var(--fcx-navy-950);
        font-size: .8rem;
        font-weight: 950;
    }

.fcx-daily-table,
.fcx-detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.fcx-daily-table {
    min-width: 1100px;
}

    .fcx-daily-table th,
    .fcx-detail-table th {
        padding: 11px 12px;
        color: var(--fcx-blue-800);
        border-bottom: 2px solid #d3e3f0;
        background: #ebf5fd;
        font-size: .57rem;
        font-weight: 950;
        letter-spacing: .04em;
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .fcx-daily-table td,
    .fcx-detail-table td {
        padding: 11px 12px;
        color: #40556d;
        border-bottom: 1px solid #edf2f6;
        font-size: .65rem;
        vertical-align: middle;
    }

    .fcx-daily-table .num,
    .fcx-detail-table .num {
        text-align: right;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

.fcx-clickable-row {
    cursor: pointer;
}

    .fcx-clickable-row:hover td:not([class*="fcx-semaphore-"]) {
        background: #f8fbff;
    }

    .fcx-clickable-row td:first-child button,
    .fcx-row-open {
        padding: 0;
        color: var(--fcx-blue-700);
        border: 0;
        background: transparent;
        font-family: inherit;
        font-size: inherit;
        font-weight: 950;
        cursor: pointer;
    }

.fcx-row-open {
    min-height: 31px;
    padding: 0 9px;
    border: 1px solid rgba(7, 90, 156, .22);
    border-radius: 9px;
    background: #eaf5ff;
}

.fcx-income-text {
    color: #0c6e55 !important;
}

.fcx-expense-text {
    color: #a65c00 !important;
}

.fcx-empty {
    padding: 30px 18px !important;
    color: var(--fcx-muted) !important;
    text-align: center !important;
}

    .fcx-empty.is-error,
    .fcx-modal-loading.is-error {
        color: var(--fcx-red) !important;
    }

.is-hidden {
    display: none !important;
}

/* ============================================================
   MODALES
   ============================================================ */

.fcx-modal {
    display: none;
    position: fixed;
    z-index: 10050;
    inset: 0;
}

    .fcx-modal.is-open {
        display: grid;
        place-items: center;
    }

.fcx-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 20, 40, .70);
    backdrop-filter: blur(7px);
}

.fcx-modal-card {
    position: relative;
    width: min(1540px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 34px 110px rgba(0, 0, 0, .34);
}

.fcx-modal-head {
    min-height: 105px;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    color: #ffffff;
    background: radial-gradient(circle at 92% 0%, rgba(242, 140, 24, .42), transparent 35%), linear-gradient(135deg, var(--fcx-navy-950), var(--fcx-blue-800));
}

    .fcx-modal-head span,
    .fcx-modal-head h2,
    .fcx-modal-head p {
        display: block;
    }

    .fcx-modal-head > div:first-child > span {
        margin-bottom: 4px;
        color: #ffd79e;
        font-size: .6rem;
        font-weight: 950;
        letter-spacing: .13em;
        text-transform: uppercase;
    }

    .fcx-modal-head h2 {
        margin: 0;
        color: #ffffff;
        font-size: 1.35rem;
        font-weight: 950;
        letter-spacing: -.025em;
    }

    .fcx-modal-head p {
        margin: 6px 0 0;
        color: #dcecff;
        font-size: .67rem;
    }

.fcx-modal-head-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.fcx-modal-mode {
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex !important;
    align-items: center;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    font-size: .61rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.fcx-modal-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 11px;
    background: rgba(255, 255, 255, .10);
    font-family: inherit;
    font-size: 1.35rem;
    cursor: pointer;
}

.fcx-modal-content {
    max-height: calc(100vh - 133px);
    padding: 18px;
    overflow-y: auto;
    background: #f6f9fc;
}

.fcx-modal-summary {
    margin-bottom: 13px;
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 8px;
}

    .fcx-modal-summary article {
        min-height: 84px;
        padding: 12px;
        border: 1px solid var(--fcx-border);
        border-radius: 13px;
        background: #ffffff;
    }

    .fcx-modal-summary small,
    .fcx-modal-summary strong,
    .fcx-modal-summary span {
        display: block;
    }

    .fcx-modal-summary small {
        color: var(--fcx-muted);
        font-size: .55rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .fcx-modal-summary strong {
        margin-top: 5px;
        color: var(--fcx-navy-950);
        font-size: .86rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

    .fcx-modal-summary span {
        margin-top: 3px;
        color: var(--fcx-muted);
        font-size: .54rem;
    }

.fcx-modal-tabs {
    margin-bottom: 12px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    border: 1px solid var(--fcx-border);
    border-radius: 14px;
    background: #ffffff;
}

    .fcx-modal-tabs button {
        min-height: 36px;
        padding: 0 12px;
        flex: 0 0 auto;
        color: var(--fcx-blue-800);
        border: 1px solid transparent;
        border-radius: 10px;
        background: transparent;
        font-family: inherit;
        font-size: .61rem;
        font-weight: 950;
        cursor: pointer;
    }

        .fcx-modal-tabs button.is-active,
        .fcx-modal-tabs button:hover {
            color: #ffffff;
            background: linear-gradient(135deg, var(--fcx-blue-800), var(--fcx-blue-500));
        }

.fcx-modal-chart-section,
#cashModalGroupsSection,
#cashModalMovementsSection {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--fcx-border);
    border-radius: 16px;
    background: #ffffff;
}

.fcx-modal-section-head {
    margin-bottom: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .fcx-modal-section-head input {
        max-width: 330px;
    }

#cashModalChart {
    width: 100%;
    height: 390px;
    display: block;
}

.fcx-group-table {
    min-width: 1780px;
}

.fcx-movement-table {
    min-width: 1900px;
}

.fcx-detail-table strong,
.fcx-detail-table small {
    display: block;
}

.fcx-detail-table strong {
    color: var(--fcx-navy-950);
    font-weight: 900;
}

.fcx-detail-table small {
    margin-top: 3px;
    color: var(--fcx-muted);
    font-size: .55rem;
}

.fcx-detail-table tbody tr:hover {
    background: #f8fbff;
}

.fcx-detail-btn {
    min-height: 31px;
    padding: 0 10px;
    color: var(--fcx-blue-800);
    border: 1px solid rgba(7, 90, 156, .22);
    border-radius: 9px;
    background: #eaf5ff;
    font-family: inherit;
    font-size: .57rem;
    font-weight: 950;
    cursor: pointer;
}

    .fcx-detail-btn:hover {
        color: #ffffff;
        border-color: var(--fcx-blue-800);
        background: var(--fcx-blue-800);
    }

.fcx-quality {
    max-width: 230px;
    min-height: 25px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 900;
    line-height: 1.25;
    white-space: normal;
}

    .fcx-quality.is-ok {
        color: #235c49;
        background: #e7f4ef;
    }

    .fcx-quality.is-review {
        color: #875a00;
        background: #fff2d2;
    }

.fcx-movement-tools {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .fcx-movement-tools > span {
        color: var(--fcx-muted);
        font-size: .6rem;
        font-weight: 850;
    }

    .fcx-movement-tools select {
        width: 125px;
        min-height: 35px;
    }

    .fcx-movement-tools button {
        min-height: 35px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--fcx-blue-800);
        border: 1px solid var(--fcx-border);
        border-radius: 10px;
        background: #ffffff;
        font-family: inherit;
        font-size: .58rem;
        font-weight: 900;
        cursor: pointer;
    }

.fcx-pagination {
    margin-top: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

    .fcx-pagination button {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        color: var(--fcx-blue-800);
        border: 1px solid var(--fcx-border);
        border-radius: 9px;
        background: #ffffff;
        font-family: inherit;
        font-size: .61rem;
        font-weight: 950;
        cursor: pointer;
    }

        .fcx-pagination button.is-active,
        .fcx-pagination button:hover:not(:disabled) {
            color: #ffffff;
            border-color: var(--fcx-blue-800);
            background: var(--fcx-blue-800);
        }

        .fcx-pagination button:disabled {
            opacity: .42;
            cursor: not-allowed;
        }

.fcx-modal-loading {
    grid-column: 1 / -1;
    min-height: 120px;
    padding: 20px;
    display: grid;
    place-items: center;
    color: var(--fcx-muted);
    border: 1px dashed var(--fcx-border-strong);
    border-radius: 13px;
    background: var(--fcx-surface-soft);
    font-size: .67rem;
    font-weight: 850;
    text-align: center;
}

body.fcx-modal-open {
    overflow: hidden;
}

/* ============================================================
   DETALLE DE MOVIMIENTO
   ============================================================ */

.fcx-movement-card {
    width: min(1260px, calc(100vw - 28px));
}

.fcx-movement-detail {
    max-height: calc(100vh - 133px);
    padding: 17px;
    display: grid;
    gap: 12px;
    overflow-y: auto;
    background: #f6f9fc;
}

.fcx-detail-section {
    padding: 14px;
    border: 1px solid var(--fcx-border);
    border-radius: 16px;
    background: #ffffff;
}

    .fcx-detail-section h3 {
        margin: 0 0 11px;
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--fcx-navy-950);
        font-size: .78rem;
        font-weight: 950;
    }

        .fcx-detail-section h3 i {
            width: 29px;
            height: 29px;
            display: grid;
            place-items: center;
            color: var(--fcx-blue-700);
            border-radius: 9px;
            background: #e9f4ff;
        }

.fcx-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.fcx-movement-field {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e8eef4;
    border-radius: 11px;
    background: var(--fcx-surface-soft);
}

    .fcx-movement-field.is-wide {
        grid-column: span 2;
    }

    .fcx-movement-field span,
    .fcx-movement-field strong {
        display: block;
    }

    .fcx-movement-field span {
        color: var(--fcx-muted);
        font-size: .52rem;
        font-weight: 900;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .fcx-movement-field strong {
        margin-top: 4px;
        color: var(--fcx-navy-950);
        font-size: .66rem;
        font-weight: 850;
        line-height: 1.42;
        overflow-wrap: anywhere;
    }

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

.fcx-btn:focus-visible,
.fcx-mode-switch button:focus-visible,
.fcx-kpi:focus-visible,
.fcx-insight:focus-visible,
.fcx-analysis-card:focus-visible,
.fcx-amount-link:focus-visible,
.fcx-detail-btn:focus-visible,
.fcx-pagination button:focus-visible,
.fcx-modal-tabs button:focus-visible,
.fcx-row-open:focus-visible {
    outline: 3px solid rgba(242, 140, 24, .42);
    outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1700px) {
    .fcx-filter-grid {
        grid-template-columns: repeat(5, minmax(145px, 1fr));
    }

    .fcx-kpis {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }

    .fcx-director-strip,
    .fcx-analysis-grid {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
    }
}

@media (max-width: 1320px) {
    .fcx-filter-grid {
        grid-template-columns: repeat(4, minmax(145px, 1fr));
    }

    .fcx-director-strip,
    .fcx-analysis-grid {
        grid-template-columns: repeat(2, minmax(230px, 1fr));
    }

    .fcx-daily-summary,
    .fcx-modal-summary {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .fcx-detail-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .fcx-page {
        padding: 13px;
    }

    .fcx-hero {
        min-height: auto;
        padding: 24px;
        flex-direction: column;
    }

    .fcx-hero-actions {
        width: 100%;
    }

        .fcx-hero-actions .fcx-btn {
            flex: 1;
        }

    .fcx-command-bar,
    .fcx-section-head,
    .fcx-filter-head {
        align-items: stretch;
        flex-direction: column;
    }

    .fcx-mode-switch {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcx-mode-note {
        justify-items: start;
        text-align: left;
    }

    .fcx-filter-grid,
    .fcx-filter-grid-period {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcx-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcx-daily-actions {
        align-items: stretch;
        width: 100%;
    }

    .fcx-month-select {
        flex: 1;
    }

    .fcx-modal-card {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 18px;
    }

    .fcx-modal-content,
    .fcx-movement-detail {
        max-height: calc(100vh - 122px);
        padding: 12px;
    }

    .fcx-modal-section-head {
        align-items: stretch;
        flex-direction: column;
    }

        .fcx-modal-section-head input {
            max-width: none;
        }

    .fcx-movement-tools {
        flex-wrap: wrap;
    }

    .fcx-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 660px) {
    .fcx-page {
        padding: 8px;
    }

    .fcx-hero {
        padding: 20px;
        border-radius: 21px;
    }

        .fcx-hero h1 {
            font-size: 2.35rem;
        }

    .fcx-hero-actions,
    .fcx-filter-actions,
    .fcx-daily-actions {
        flex-direction: column;
    }

        .fcx-hero-actions .fcx-btn,
        .fcx-filter-actions .fcx-btn,
        .fcx-daily-actions .fcx-btn,
        .fcx-month-select {
            width: 100%;
        }

    .fcx-panel,
    .fcx-filter-panel {
        padding: 14px;
        border-radius: 17px;
    }

    .fcx-filter-grid,
    .fcx-filter-grid-period,
    .fcx-kpis,
    .fcx-director-strip,
    .fcx-analysis-grid,
    .fcx-daily-summary,
    .fcx-modal-summary,
    .fcx-detail-grid {
        grid-template-columns: 1fr;
    }

    .fcx-span-2,
    .fcx-movement-field.is-wide {
        grid-column: span 1;
    }

    .fcx-kpi {
        min-height: 112px;
    }

    .fcx-filter-group summary {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 10px 13px;
    }

    .fcx-modal-head {
        padding: 17px;
    }

    .fcx-modal-mode {
        display: none !important;
    }

    #cashModalChart {
        height: 340px;
    }
}


/* ============================================================
   DIRECCION V3 · LOGICA, TARJETAS Y VALIDACION
   ============================================================ */

.fcx-balance-logic {
    margin-bottom: 14px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 28px minmax(220px, 1fr) 28px minmax(280px, 1.25fr);
    align-items: center;
    gap: 10px;
    border: 1px solid #dce8f2;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 251, 255, .98), rgba(255, 252, 247, .98));
    box-shadow: 0 10px 28px rgba(24, 63, 98, .06);
}

    .fcx-balance-logic article {
        min-width: 0;
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

        .fcx-balance-logic article > span {
            width: 32px;
            height: 32px;
            display: grid;
            place-items: center;
            color: #ffffff;
            border-radius: 10px;
            background: linear-gradient(135deg, #0c4f87, #1d8fd1);
            font-size: .68rem;
            font-weight: 950;
            box-shadow: 0 7px 16px rgba(12, 79, 135, .20);
        }

    .fcx-balance-logic strong,
    .fcx-balance-logic small {
        display: block;
    }

    .fcx-balance-logic strong {
        color: #102c47;
        font-size: .72rem;
        font-weight: 950;
    }

    .fcx-balance-logic small {
        margin-top: 3px;
        color: #6b7e91;
        font-size: .58rem;
        line-height: 1.35;
    }

    .fcx-balance-logic > i {
        color: #a6b7c7;
        text-align: center;
    }

.fcx-kpis {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 14px;
}

.fcx-kpi {
    min-height: 220px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(19, 57, 91, .09);
}

    .fcx-kpi::before {
        inset: 0 auto 0 0;
        width: 5px;
        height: auto;
        border-radius: 22px 0 0 22px;
        background: #79a8c9;
    }

    .fcx-kpi:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 48px rgba(19, 57, 91, .15);
    }

.fcx-kpi-initial::before {
    background: #3579ae;
}

.fcx-kpi-income::before {
    background: #1986b9;
}

.fcx-kpi-expense::before {
    background: #e58d29;
}

.fcx-kpi-result-positive::before {
    background: #6c78a8;
}

.fcx-kpi-result-negative::before {
    background: #c75c68;
}

.fcx-kpi-accumulated::before {
    background: #243d5a;
}

.fcx-kpi-top {
    min-height: 42px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.fcx-kpi-status {
    grid-column: 1 / -1;
    width: max-content;
    max-width: 100%;
    min-height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 950;
    text-transform: uppercase;
}

.fcx-status-verde {
    color: #176743;
    background: #e7f6ee;
}

.fcx-status-amarillo {
    color: #775900;
    background: #fff5cc;
}

.fcx-status-rojo {
    color: #9e3141;
    background: #ffe9ec;
}

.fcx-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #176b9f;
    background: #edf6fc;
}

.fcx-kpi-label {
    color: #38516a;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.fcx-kpi-value {
    margin-top: 18px;
    color: #102c47;
    font-size: clamp(1.2rem, 1.55vw, 1.65rem);
    font-weight: 950;
    letter-spacing: -.035em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.fcx-kpi-formula {
    margin-top: 10px;
    width: max-content;
    max-width: 100%;
    padding: 5px 8px;
    color: #245a80;
    border-radius: 8px;
    background: #f0f6fb;
    font-size: .57rem;
    font-weight: 900;
}

.fcx-kpi-detail {
    min-height: 34px;
    margin-top: 9px;
    color: #718296;
    font-size: .58rem;
    font-weight: 720;
    line-height: 1.45;
}

.fcx-kpi-open {
    margin-top: auto;
    padding-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0c639d;
    border-top: 1px solid #edf2f6;
    font-size: .57rem;
    font-weight: 950;
}

.fcx-kpi.fcx-accumulated-verde,
.fcx-kpi.fcx-accumulated-amarillo,
.fcx-kpi.fcx-accumulated-rojo {
    border-color: #d7e2eb;
    background: #ffffff;
}

    .fcx-kpi.fcx-accumulated-verde .fcx-kpi-value {
        color: #176743;
    }

    .fcx-kpi.fcx-accumulated-amarillo .fcx-kpi-value {
        color: #775900;
    }

    .fcx-kpi.fcx-accumulated-rojo .fcx-kpi-value {
        color: #9e3141;
    }

.fcx-row-label > span {
    min-width: 0;
}

.fcx-row-label b,
.fcx-row-label small {
    display: block;
}

.fcx-row-label b {
    font-size: .66rem;
}

.fcx-row-label small {
    margin-top: 3px;
    color: #7a8b9c;
    font-size: .51rem;
    font-weight: 750;
}

.fcx-fx-validation {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5edf4;
}

.fcx-fx-head {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

    .fcx-fx-head span:first-child {
        display: block;
        color: #0a6aa7;
        font-size: .58rem;
        font-weight: 950;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    .fcx-fx-head h3 {
        margin: 4px 0 0;
        color: #102c47;
        font-size: .94rem;
        font-weight: 950;
    }

    .fcx-fx-head p {
        margin: 4px 0 0;
        color: #718296;
        font-size: .59rem;
    }

.fcx-fx-formula {
    padding: 7px 10px;
    color: #845100 !important;
    border-radius: 10px;
    background: #fff4de;
    font-size: .57rem !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.fcx-fx-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(108px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.fcx-fx-card {
    min-width: 108px;
    min-height: 120px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #1a3853;
    border: 1px solid #dbe6ef;
    border-radius: 14px;
    background: #fbfdff;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .fcx-fx-card:hover:not(:disabled) {
        transform: translateY(-2px);
        border-color: #7db3d6;
        box-shadow: 0 12px 25px rgba(22, 76, 118, .12);
    }

    .fcx-fx-card > span {
        color: #0b6097;
        font-size: .56rem;
        font-weight: 950;
    }

    .fcx-fx-card strong {
        margin-top: 7px;
        color: #102c47;
        font-size: .92rem;
        font-weight: 950;
    }

    .fcx-fx-card small,
    .fcx-fx-card em {
        display: block;
        margin-top: 5px;
        color: #718296;
        font-size: .50rem;
        font-style: normal;
        line-height: 1.35;
    }

    .fcx-fx-card em {
        margin-top: auto;
        padding-top: 7px;
        font-weight: 900;
    }

    .fcx-fx-card.is-valid em {
        color: #1d7350;
    }

    .fcx-fx-card.has-warning {
        border-color: #edc56e;
        background: #fffaf0;
    }

        .fcx-fx-card.has-warning em {
            color: #9a5a00;
        }

    .fcx-fx-card.is-empty {
        opacity: .48;
        cursor: default;
    }

.fcx-foldable-panel {
    padding-bottom: 18px;
}

.fcx-detail-month-select {
    min-width: 220px;
}

.fcx-foldable-list {
    display: grid;
    gap: 10px;
}

.fcx-foldable {
    overflow: hidden;
    border: 1px solid #dce7f0;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(20, 60, 94, .06);
}

    .fcx-foldable summary {
        min-height: 72px;
        padding: 13px 16px;
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 20px;
        align-items: center;
        gap: 12px;
        list-style: none;
        cursor: pointer;
    }

        .fcx-foldable summary::-webkit-details-marker {
            display: none;
        }

    .fcx-foldable[open] summary {
        background: linear-gradient(135deg, #f5faff, #fffaf3);
        border-bottom: 1px solid #e4edf4;
    }

    .fcx-foldable summary > i:last-child {
        color: #8295a7;
        transition: transform .16s ease;
    }

    .fcx-foldable[open] summary > i:last-child {
        transform: rotate(180deg);
    }

.fcx-fold-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #0d6ca6;
    border-radius: 12px;
    background: #eaf5fc;
}

.fcx-foldable summary strong,
.fcx-foldable summary small {
    display: block;
}

.fcx-foldable summary strong {
    color: #102c47;
    font-size: .74rem;
    font-weight: 950;
}

.fcx-foldable summary small {
    margin-top: 4px;
    color: #708295;
    font-size: .57rem;
    line-height: 1.4;
}

.fcx-fold-body {
    padding: 14px;
}

.fcx-validation-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.fcx-lines-table {
    min-width: 1900px;
}

.fcx-validation-table th {
    padding: 11px 12px;
    color: #24516f;
    border-bottom: 2px solid #d4e5f1;
    background: #edf6fc;
    font-size: .55rem;
    font-weight: 950;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.fcx-validation-table td {
    padding: 11px 12px;
    color: #425a70;
    border-bottom: 1px solid #edf2f6;
    font-size: .61rem;
    vertical-align: middle;
}

    .fcx-validation-table td strong,
    .fcx-validation-table td small {
        display: block;
    }

    .fcx-validation-table td strong {
        color: #17324f;
        font-weight: 900;
    }

    .fcx-validation-table td small {
        margin-top: 3px;
        color: #7a8c9e;
        font-size: .52rem;
    }

.fcx-validation-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fcx-validation-row:hover {
    background: #f9fcff;
}

.fcx-quality-pill {
    max-width: 190px;
    min-height: 24px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .49rem;
    font-weight: 900;
    line-height: 1.25;
}

    .fcx-quality-pill.is-ok {
        color: #1c6b4a;
        background: #e8f7ef;
    }

    .fcx-quality-pill.is-review {
        color: #8b5900;
        background: #fff4d3;
    }

.fcx-no-id {
    color: #8998a7;
    font-size: .52rem;
    font-weight: 800;
}

@media (max-width: 1500px) {
    .fcx-kpis {
        grid-template-columns: repeat(3, minmax(230px, 1fr));
    }

    .fcx-fx-grid {
        grid-template-columns: repeat(12, 112px);
    }
}

@media (max-width: 980px) {
    .fcx-balance-logic {
        grid-template-columns: 1fr;
    }

        .fcx-balance-logic > i {
            transform: rotate(90deg);
        }

    .fcx-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcx-fx-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .fcx-kpis {
        grid-template-columns: 1fr;
    }

    .fcx-kpi {
        min-height: 190px;
    }

    .fcx-detail-month-select {
        width: 100%;
        min-width: 0;
    }

    .fcx-foldable summary {
        grid-template-columns: 38px minmax(0, 1fr) 18px;
        padding: 12px;
    }
}

@media print {
    body {
        background: #ffffff !important;
    }

    .fcx-page {
        max-width: none;
        padding: 0;
    }

    .fcx-hero {
        min-height: auto;
        color: #000000;
        border: 1px solid #cccccc;
        background: #ffffff;
        box-shadow: none;
    }

        .fcx-hero h1,
        .fcx-hero p,
        .fcx-eyebrow,
        .fcx-period span {
            color: #000000;
        }

    .fcx-hero-actions,
    .fcx-filter-panel,
    .fcx-command-bar,
    .fcx-modal,
    .fcx-daily-actions {
        display: none !important;
    }

    .fcx-panel,
    .fcx-kpi,
    .fcx-insight,
    .fcx-analysis-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .fcx-table-wrap {
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcx-page *,
    .fcx-modal * {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   CONCILIACION V4 · DIRECCION FINANCIERA
   ============================================================ */

.fcx-reconciliation-logic {
    grid-template-columns: minmax(190px, 1fr) 22px minmax(220px, 1.15fr) 22px minmax(220px, 1.15fr) 22px minmax(220px, 1.15fr);
    padding: 14px 18px;
    border-color: #d7e5ef;
    background: linear-gradient(135deg, rgba(239, 247, 253, .96), rgba(255, 255, 255, .98) 55%, rgba(255, 246, 234, .80));
}

    .fcx-reconciliation-logic article:last-of-type > span {
        background: linear-gradient(135deg, #f08b24, #efaa45);
    }

.fcx-kpis-reconciled {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 16px;
}

    .fcx-kpis-reconciled .fcx-kpi {
        min-height: 214px;
        border: 1px solid #dce7f0;
        border-radius: 20px;
        box-shadow: 0 14px 34px rgba(21, 61, 96, .08);
    }

.fcx-kpi-calculated::before {
    background: #576f9a;
}

.fcx-kpi-reconciled::before {
    background: #176fa5;
}

.fcx-kpi-difference::before {
    background: #ed922f;
}

.fcx-kpi-calculated .fcx-kpi-icon,
.fcx-kpi-reconciled .fcx-kpi-icon {
    color: #28527d;
    background: #edf3fa;
}

.fcx-kpi-difference .fcx-kpi-icon {
    color: #96510c;
    background: #fff2df;
}

.fcx-kpi-reconciled .fcx-kpi-value {
    color: #176fa5;
}

.fcx-kpi-difference .fcx-kpi-value {
    color: #a65b12;
}

.fcx-reconciliation-board {
    margin: 0 0 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(0, 2.15fr);
    gap: 14px;
    border: 1px solid #d9e5ee;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(17, 58, 92, .07);
}

.fcx-reconciliation-status {
    min-height: 132px;
    padding: 18px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #dce8f1;
    border-radius: 17px;
    background: linear-gradient(135deg, #f4f9fd, #ffffff);
}

    .fcx-reconciliation-status.has-difference {
        border-color: #f3d4ae;
        background: linear-gradient(135deg, #fff8ef, #ffffff);
    }

    .fcx-reconciliation-status.is-reconciled {
        border-color: #bfd9e9;
        background: linear-gradient(135deg, #eef8fd, #ffffff);
    }

.fcx-reconciliation-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #0b5f96, #2795cf);
    font-size: 1.35rem;
    box-shadow: 0 10px 22px rgba(11, 95, 150, .22);
}

.fcx-reconciliation-status.has-difference .fcx-reconciliation-icon {
    background: linear-gradient(135deg, #d87516, #f0a33e);
    box-shadow: 0 10px 22px rgba(216, 117, 22, .22);
}

.fcx-reconciliation-status span,
.fcx-reconciliation-status strong,
.fcx-reconciliation-status small {
    display: block;
}

.fcx-reconciliation-status div > span {
    color: #5c748b;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fcx-reconciliation-status strong {
    margin-top: 5px;
    color: #15344f;
    font-size: 1rem;
    font-weight: 950;
}

.fcx-reconciliation-status small {
    margin-top: 6px;
    color: #6c7f91;
    font-size: .65rem;
    line-height: 1.5;
}

.fcx-reconciliation-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
}

    .fcx-reconciliation-metrics article {
        min-height: 132px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 1px solid #e2eaf1;
        border-radius: 16px;
        background: #fbfdff;
    }

    .fcx-reconciliation-metrics span,
    .fcx-reconciliation-metrics strong,
    .fcx-reconciliation-metrics small {
        display: block;
    }

    .fcx-reconciliation-metrics span {
        color: #6c8092;
        font-size: .57rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .fcx-reconciliation-metrics strong {
        margin-top: 8px;
        color: #163b5c;
        font-size: 1.02rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

    .fcx-reconciliation-metrics small {
        margin-top: 6px;
        color: #82909e;
        font-size: .56rem;
        line-height: 1.4;
    }

.fcx-difference-row th,
.fcx-difference-row td {
    background: #f8fbfe;
    border-top: 1px dashed #c7d7e4;
    border-bottom: 1px dashed #c7d7e4;
}

.fcx-difference-row .fcx-row-label i {
    color: #8b5a22;
    background: #fff0dc;
}

.fcx-is-reconciled .fcx-amount-link {
    color: #176fa5;
    font-weight: 950;
}

.fcx-has-difference .fcx-amount-link {
    color: #a85c10;
    font-weight: 950;
}

.fcx-bank-breakdown {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #dce7ef;
    border-radius: 18px;
    background: #ffffff;
}

    .fcx-bank-breakdown summary {
        min-height: 72px;
        padding: 14px 18px;
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 28px;
        align-items: center;
        gap: 12px;
        list-style: none;
        cursor: pointer;
        background: linear-gradient(135deg, #f2f8fc, #ffffff 62%, #fff6e9);
    }

        .fcx-bank-breakdown summary::-webkit-details-marker {
            display: none;
        }

        .fcx-bank-breakdown summary > span:nth-child(2) strong,
        .fcx-bank-breakdown summary > span:nth-child(2) small {
            display: block;
        }

        .fcx-bank-breakdown summary strong {
            color: #143b5c;
            font-size: .82rem;
            font-weight: 950;
        }

        .fcx-bank-breakdown summary small {
            margin-top: 4px;
            color: #718396;
            font-size: .59rem;
        }

        .fcx-bank-breakdown summary > i:last-child {
            color: #6d8296;
            transition: transform .2s ease;
        }

    .fcx-bank-breakdown[open] summary > i:last-child {
        transform: rotate(180deg);
    }

.fcx-bank-breakdown-body {
    padding: 16px;
    border-top: 1px solid #e5edf3;
}

.fcx-bank-equation {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 28px minmax(220px, 1fr) 28px minmax(220px, 1fr);
    align-items: stretch;
    gap: 10px;
}

    .fcx-bank-equation article {
        padding: 15px;
        border: 1px solid #dfe9f1;
        border-radius: 15px;
        background: #fbfdff;
    }

        .fcx-bank-equation article span,
        .fcx-bank-equation article strong,
        .fcx-bank-equation article small {
            display: block;
        }

        .fcx-bank-equation article span {
            color: #60788d;
            font-size: .57rem;
            font-weight: 950;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .fcx-bank-equation article strong {
            margin-top: 6px;
            color: #133c5e;
            font-size: 1rem;
            font-weight: 950;
        }

        .fcx-bank-equation article small {
            margin-top: 6px;
            color: #718397;
            font-size: .55rem;
            line-height: 1.45;
        }

    .fcx-bank-equation .fcx-equation-result {
        border-color: #bcd7e8;
        background: #f0f8fd;
    }

.fcx-equation-sign {
    display: grid;
    place-items: center;
    color: #7890a4;
    font-size: 1.25rem;
    font-weight: 950;
}

.fcx-bank-breakdown-table {
    width: 100%;
    min-width: 1380px;
    border-collapse: separate;
    border-spacing: 0;
}

    .fcx-bank-breakdown-table th,
    .fcx-bank-breakdown-table td {
        padding: 10px;
        border-bottom: 1px solid #e6edf3;
        text-align: right;
        white-space: nowrap;
    }

    .fcx-bank-breakdown-table thead th {
        color: #ffffff;
        background: #174f79;
        font-size: .57rem;
        font-weight: 950;
        letter-spacing: .05em;
    }

        .fcx-bank-breakdown-table thead th:first-child,
        .fcx-bank-breakdown-table tbody th {
            position: sticky;
            left: 0;
            z-index: 2;
            text-align: left;
        }

    .fcx-bank-breakdown-table tbody th {
        min-width: 250px;
        background: #f9fcfe;
    }

.fcx-bank-net-row th,
.fcx-bank-net-row td {
    border-top: 2px solid #9bbcd3;
    background: #f3f8fc;
    font-weight: 950;
}

.fcx-bank-breakdown-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    color: #6f8090;
    border-radius: 11px;
    background: #f8fafc;
    font-size: .56rem;
    line-height: 1.5;
}

@media (max-width: 1320px) {
    .fcx-reconciliation-logic {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }

        .fcx-reconciliation-logic > i {
            display: none;
        }

    .fcx-reconciliation-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1050px) {
    .fcx-kpis-reconciled {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }

    .fcx-reconciliation-metrics {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .fcx-bank-equation {
        grid-template-columns: 1fr;
    }

    .fcx-equation-sign {
        min-height: 22px;
    }
}

@media (max-width: 680px) {
    .fcx-reconciliation-logic,
    .fcx-kpis-reconciled,
    .fcx-reconciliation-metrics {
        grid-template-columns: 1fr;
    }

    .fcx-reconciliation-board {
        padding: 10px;
    }

    .fcx-reconciliation-status {
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 14px;
    }

    .fcx-reconciliation-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .fcx-bank-breakdown summary {
        grid-template-columns: 36px minmax(0, 1fr) 22px;
        padding: 12px;
    }
}

/* ==========================================================
   TRANSFERENCIAS INTERNAS REALES · ORIGEN -> DESTINO
   ========================================================== */
.fcx-transfer-panel {
    position: relative;
    overflow: hidden;
}

    .fcx-transfer-panel::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 4px;
        background: linear-gradient(90deg, #0b4a7f, #1593d0, #f59e0b);
    }

.fcx-transfer-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.fcx-transfer-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

    .fcx-transfer-summary article,
    .fcx-transfer-loading {
        min-height: 116px;
        padding: 16px;
        border: 1px solid #dce8f3;
        border-radius: 20px;
        background: linear-gradient(145deg, #ffffff, #f7fbff);
        box-shadow: 0 10px 28px rgba(13, 56, 94, .07);
    }

    .fcx-transfer-summary article {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 11px;
        align-items: start;
    }

        .fcx-transfer-summary article > i {
            width: 38px;
            height: 38px;
            border-radius: 13px;
            display: grid;
            place-items: center;
            color: #075a9c;
            background: #e7f4ff;
            font-size: 1.05rem;
        }

        .fcx-transfer-summary article span,
        .fcx-transfer-summary article strong,
        .fcx-transfer-summary article small {
            display: block;
        }

        .fcx-transfer-summary article span {
            color: #51677d;
            font-size: .72rem;
            font-weight: 900;
            letter-spacing: .045em;
            text-transform: uppercase;
        }

        .fcx-transfer-summary article strong {
            margin-top: 5px;
            color: #102a43;
            font-size: 1.04rem;
            font-weight: 950;
            line-height: 1.2;
        }

        .fcx-transfer-summary article small {
            margin-top: 5px;
            color: #698095;
            font-size: .72rem;
            font-weight: 750;
            line-height: 1.35;
        }

        .fcx-transfer-summary article.is-ok {
            border-color: #a7dcc5;
            background: linear-gradient(145deg, #ffffff, #eefbf5);
        }

            .fcx-transfer-summary article.is-ok > i {
                color: #087047;
                background: #dcf7e9;
            }

        .fcx-transfer-summary article.is-review {
            border-color: #f1ce92;
            background: linear-gradient(145deg, #ffffff, #fff9ec);
        }

            .fcx-transfer-summary article.is-review > i {
                color: #9a5b05;
                background: #fff0c9;
            }

.fcx-transfer-fold {
    border: 1px solid #d7e6f2;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
}

    .fcx-transfer-fold > summary {
        padding: 16px 18px;
        background: linear-gradient(90deg, #edf7ff, #ffffff);
    }

.fcx-transfer-explanation {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) 38px minmax(210px, 1fr) minmax(260px, 1.2fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

    .fcx-transfer-explanation > div {
        min-height: 76px;
        padding: 13px 15px;
        border: 1px solid #d8e7f2;
        border-radius: 16px;
        background: #f8fbfe;
    }

    .fcx-transfer-explanation > i {
        color: #1682bd;
        text-align: center;
        font-size: 1.25rem;
    }

    .fcx-transfer-explanation strong,
    .fcx-transfer-explanation span {
        display: block;
    }

    .fcx-transfer-explanation strong {
        color: #123b5c;
        font-weight: 950;
    }

    .fcx-transfer-explanation span {
        margin-top: 4px;
        color: #647b90;
        font-size: .78rem;
        font-weight: 750;
    }

    .fcx-transfer-explanation .fcx-transfer-rule {
        border-color: #f1d59c;
        background: #fffaf0;
    }

.fcx-transfer-table-wrap {
    max-height: 620px;
    border: 1px solid #dbe7f0;
    border-radius: 18px;
}

.fcx-transfer-table {
    width: 100%;
    min-width: 1740px;
    border-collapse: separate;
    border-spacing: 0;
    color: #172f47;
}

    .fcx-transfer-table th {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 13px 12px;
        color: #fff;
        background: #173b5c;
        border-right: 1px solid rgba(255,255,255,.15);
        font-size: .72rem;
        font-weight: 950;
        letter-spacing: .045em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .fcx-transfer-table td {
        padding: 13px 12px;
        border-right: 1px solid #e4edf4;
        border-bottom: 1px solid #e4edf4;
        vertical-align: top;
        background: #fff;
    }

    .fcx-transfer-table tr:nth-child(even) td {
        background: #f9fcfe;
    }

    .fcx-transfer-table tr.is-review td {
        background: #fffaf0;
    }

    .fcx-transfer-table tr.is-danger td {
        background: #fff3f3;
    }

    .fcx-transfer-table td strong,
    .fcx-transfer-table td small {
        display: block;
    }

    .fcx-transfer-table td strong {
        color: #142f49;
        font-weight: 950;
    }

    .fcx-transfer-table td small {
        margin-top: 4px;
        color: #6c8194;
        font-size: .72rem;
        line-height: 1.35;
    }

    .fcx-transfer-table td.num {
        text-align: right;
        white-space: nowrap;
    }

.fcx-transfer-bank-state,
.fcx-transfer-status {
    display: inline-flex;
    align-items: center;
    margin-top: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
}

    .fcx-transfer-bank-state.is-linked,
    .fcx-transfer-status.is-ok {
        color: #086a44;
        background: #ddf7e9;
    }

    .fcx-transfer-bank-state.is-unlinked,
    .fcx-transfer-status.is-review {
        color: #8e5705;
        background: #fff0ca;
    }

    .fcx-transfer-status.is-danger {
        color: #9a2828;
        background: #ffe0e0;
    }

.fcx-transfer-comments {
    max-width: 220px;
    white-space: normal;
}

.fcx-transfer-movement-actions {
    display: grid;
    gap: 7px;
    min-width: 105px;
}

.fcx-transfer-movement {
    border: 1px solid #bed9ec;
    border-radius: 10px;
    padding: 7px 9px;
    color: #075a9c;
    background: #eef8ff;
    font-size: .72rem;
    font-weight: 900;
    cursor: pointer;
}

    .fcx-transfer-movement:hover {
        border-color: #1682bd;
        background: #dff2ff;
    }

.fcx-transfer-no-line {
    color: #9a5b05;
    font-size: .7rem;
    font-weight: 850;
}

.fcx-transfer-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0 4px;
}

    .fcx-transfer-pagination button {
        border: 1px solid #cbddeb;
        border-radius: 12px;
        padding: 9px 13px;
        color: #0b568e;
        background: #fff;
        font-weight: 900;
        cursor: pointer;
    }

        .fcx-transfer-pagination button:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

    .fcx-transfer-pagination span {
        color: #61788d;
        font-size: .78rem;
        font-weight: 800;
    }

.fcx-transfer-source-note {
    margin: 13px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #1682bd;
    border-radius: 12px;
    color: #4f687e;
    background: #f1f8fd;
    font-size: .78rem;
    font-weight: 750;
}

@media (max-width: 1450px) {
    .fcx-transfer-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fcx-transfer-explanation {
        grid-template-columns: 1fr 32px 1fr;
    }

        .fcx-transfer-explanation .fcx-transfer-rule {
            grid-column: 1 / -1;
        }
}

@media (max-width: 900px) {
    .fcx-transfer-actions {
        width: 100%;
        justify-content: stretch;
    }

        .fcx-transfer-actions > * {
            flex: 1 1 220px;
        }

    .fcx-transfer-summary {
        grid-template-columns: 1fr 1fr;
    }

    .fcx-transfer-explanation {
        grid-template-columns: 1fr;
    }

        .fcx-transfer-explanation > i {
            transform: rotate(90deg);
        }
}

@media (max-width: 560px) {
    .fcx-transfer-summary {
        grid-template-columns: 1fr;
    }

    .fcx-transfer-pagination {
        flex-wrap: wrap;
    }
}

/* ==============================================================
   INFOTARJETAS EJECUTIVAS · CATEGORIAS REALES
   ============================================================== */
.fcx-category-panel {
    position: relative;
    isolation: isolate;
    margin: 22px 0;
    overflow: hidden;
    border: 1px solid rgba(18, 77, 122, .13);
    border-radius: 30px;
    background: radial-gradient(circle at 5% 0%, rgba(25, 118, 181, .10), transparent 34%), radial-gradient(circle at 95% 15%, rgba(239, 138, 23, .10), transparent 30%), linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 22px 60px rgba(24, 56, 87, .10);
}

    .fcx-category-panel::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 5px;
        z-index: -1;
        background: linear-gradient(90deg, #0d5c94 0 35%, #13a46b 35% 55%, #ef8a17 55% 78%, #6b5bd2 78% 100%);
    }

.fcx-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px 18px;
}

.fcx-category-title {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.fcx-category-orbit {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    font-size: 1.35rem;
    background: linear-gradient(145deg, #0d5c94, #1b83c3 62%, #ef8a17);
    box-shadow: 0 14px 30px rgba(13, 92, 148, .24);
}

.fcx-category-title > div > span {
    display: block;
    margin-bottom: 4px;
    color: #0d6d9f;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.fcx-category-title h2 {
    margin: 0;
    color: #17324e;
    font-size: clamp(1.2rem, 1.8vw, 1.75rem);
    line-height: 1.2;
}

.fcx-category-title p {
    max-width: 780px;
    margin: 7px 0 0;
    color: #637487;
    font-size: .92rem;
    line-height: 1.55;
}

.fcx-category-head-summary {
    flex: 0 0 auto;
    min-width: 185px;
    padding: 13px 17px;
    border: 1px solid rgba(13, 92, 148, .12);
    border-radius: 18px;
    text-align: right;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 24px rgba(24, 56, 87, .07);
}

    .fcx-category-head-summary strong,
    .fcx-category-head-summary span,
    .fcx-category-head-summary small {
        display: block;
    }

    .fcx-category-head-summary strong {
        color: #0d5c94;
        font-size: 1.5rem;
        line-height: 1;
    }

    .fcx-category-head-summary span {
        margin-top: 4px;
        color: #263f59;
        font-weight: 850;
    }

    .fcx-category-head-summary small {
        margin-top: 3px;
        color: #718196;
        font-size: .72rem;
    }

.fcx-category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px 18px;
    overflow-x: auto;
    scrollbar-width: thin;
}

    .fcx-category-tabs button {
        flex: 0 0 auto;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0 14px;
        border: 1px solid #d9e6f2;
        border-radius: 999px;
        color: #456078;
        background: rgba(255, 255, 255, .86);
        font-size: .78rem;
        font-weight: 850;
        cursor: pointer;
        transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
    }

        .fcx-category-tabs button:hover {
            transform: translateY(-1px);
            border-color: #8ab8d7;
            color: #0d5c94;
        }

        .fcx-category-tabs button.is-active {
            color: #fff;
            border-color: transparent;
            background: linear-gradient(135deg, #124d7a, #1676b9);
            box-shadow: 0 10px 22px rgba(22, 118, 185, .22);
        }

.fcx-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0 28px 26px;
}

.fcx-category-card {
    --cat-accent: #1676b9;
    --cat-soft: #e9f5fd;
    --cat-dark: #0d4e7b;
    position: relative;
    min-height: 238px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid rgba(18, 77, 122, .10);
    border-radius: 23px;
    text-align: left;
    color: #1a3047;
    background: linear-gradient(165deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
    box-shadow: 0 12px 30px rgba(34, 68, 99, .08);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .fcx-category-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 4px;
        background: linear-gradient(90deg, var(--cat-accent), color-mix(in srgb, var(--cat-accent) 58%, #ffffff));
    }

    .fcx-category-card:hover,
    .fcx-category-card:focus-visible {
        transform: translateY(-5px);
        border-color: color-mix(in srgb, var(--cat-accent) 42%, #d8e4ee);
        box-shadow: 0 22px 44px color-mix(in srgb, var(--cat-accent) 16%, transparent);
        outline: none;
    }

    .fcx-category-card.is-empty {
        opacity: .64;
        filter: saturate(.68);
    }

        .fcx-category-card.is-empty:hover {
            opacity: .86;
        }

.fcx-category-glow {
    position: absolute;
    top: -62px;
    right: -58px;
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--cat-accent) 16%, transparent), transparent 70%);
    pointer-events: none;
}

.fcx-category-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}

.fcx-category-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--cat-dark);
    font-size: 1.13rem;
    background: var(--cat-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cat-accent) 13%, transparent);
}

.fcx-category-group-badge {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--cat-dark);
    background: var(--cat-soft);
    font-size: .63rem;
    font-weight: 950;
    letter-spacing: .09em;
}

.fcx-category-arrow {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #7a8b9e;
    background: #f1f5f9;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.fcx-category-card:hover .fcx-category-arrow {
    color: #fff;
    background: var(--cat-accent);
    transform: rotate(8deg);
}

.fcx-category-card-copy {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 15px;
}

    .fcx-category-card-copy strong,
    .fcx-category-card-copy small {
        display: block;
    }

    .fcx-category-card-copy strong {
        color: #17324e;
        font-size: .96rem;
        font-weight: 950;
        line-height: 1.22;
    }

    .fcx-category-card-copy small {
        min-height: 34px;
        margin-top: 5px;
        color: #718196;
        font-size: .74rem;
        line-height: 1.45;
    }

.fcx-category-card-value {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 14px;
    color: var(--cat-dark);
    font-size: clamp(1.14rem, 1.4vw, 1.52rem);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.fcx-category-card-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: #6c7e91;
    font-size: .68rem;
    font-weight: 780;
}

    .fcx-category-card-meta b {
        color: var(--cat-dark);
    }

.fcx-category-card-rule {
    position: relative;
    z-index: 1;
    margin-top: 13px;
    padding: 9px 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    border-radius: 12px;
    color: #607286;
    background: rgba(241, 246, 250, .88);
    font-size: .66rem;
    line-height: 1.42;
}

    .fcx-category-card-rule i {
        margin-right: 4px;
        color: var(--cat-accent);
    }

.fcx-category-card-open {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--cat-dark);
    font-size: .72rem;
    font-weight: 900;
}

.fcx-category-income {
    --cat-accent: #0a9f68;
    --cat-soft: #e8f8f1;
    --cat-dark: #08734e;
}

.fcx-category-income-soft {
    --cat-accent: #16a085;
    --cat-soft: #eaf8f6;
    --cat-dark: #0e7665;
}

.fcx-category-expense {
    --cat-accent: #e76f28;
    --cat-soft: #fff2e8;
    --cat-dark: #a84b17;
}

.fcx-category-expense-soft {
    --cat-accent: #ef8a17;
    --cat-soft: #fff5e8;
    --cat-dark: #a85c08;
}

.fcx-category-payroll {
    --cat-accent: #8b5bd8;
    --cat-soft: #f3edfd;
    --cat-dark: #5f38a5;
}

.fcx-category-transfer {
    --cat-accent: #1676b9;
    --cat-soft: #e8f4fc;
    --cat-dark: #0d5689;
}

.fcx-category-sivale {
    --cat-accent: #00a6a6;
    --cat-soft: #e7fafa;
    --cat-dark: #047878;
}

.fcx-category-loan {
    --cat-accent: #5064d8;
    --cat-soft: #edf0ff;
    --cat-dark: #3447ad;
}

.fcx-category-adjustment {
    --cat-accent: #94703a;
    --cat-soft: #f8f1e8;
    --cat-dark: #65491f;
}

.fcx-category-warning {
    --cat-accent: #d89a12;
    --cat-soft: #fff7df;
    --cat-dark: #8c6207;
}

.fcx-category-danger {
    --cat-accent: #d94d55;
    --cat-soft: #fff0f1;
    --cat-dark: #9e2931;
}

.fcx-category-neutral {
    --cat-accent: #64748b;
    --cat-soft: #eef2f6;
    --cat-dark: #405065;
}

.fcx-category-loading,
.fcx-category-empty {
    grid-column: 1 / -1;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed #cbdbea;
    border-radius: 22px;
    color: #6b7d91;
    background: rgba(255,255,255,.72);
}

    .fcx-category-loading i,
    .fcx-category-empty i {
        color: #1676b9;
        font-size: 1.5rem;
    }

    .fcx-category-loading i {
        animation: fcx-category-spin 1s linear infinite;
    }

@keyframes fcx-category-spin {
    to {
        transform: rotate(360deg);
    }
}

.fcx-category-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px 18px;
    border-top: 1px solid rgba(18, 77, 122, .08);
    color: #6f8194;
    font-size: .7rem;
    font-weight: 760;
    background: rgba(244, 249, 253, .72);
}

    .fcx-category-foot span {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    .fcx-category-foot i {
        color: #1676b9;
    }

@media (max-width: 1320px) {
    .fcx-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .fcx-category-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .fcx-category-head-summary {
        width: 100%;
        text-align: left;
    }

    .fcx-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcx-category-foot {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .fcx-category-panel {
        border-radius: 22px;
    }

    .fcx-category-head,
    .fcx-category-tabs,
    .fcx-category-grid,
    .fcx-category-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fcx-category-title {
        gap: 11px;
    }

    .fcx-category-orbit {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .fcx-category-grid {
        grid-template-columns: 1fr;
    }

    .fcx-category-card {
        min-height: 220px;
    }
}


/* ========================================================================== 
   V4 DIRECTIVO AGRUPADO
   Reduce la carga visual y convierte categorías/análisis en tablas plegables.
   ========================================================================== */

.fcx-page {
    --fcx-navy: #173a5e;
    --fcx-blue: #0b72b9;
    --fcx-sky: #eaf5fc;
    --fcx-ink: #172b42;
    --fcx-muted: #65778a;
    --fcx-line: #d9e5ef;
    --fcx-soft: #f7fafc;
    --fcx-green: #0a8f55;
    --fcx-amber: #b66a00;
    --fcx-red: #c43d3d;
}

.fcx-hero {
    padding: 22px 26px;
    border-radius: 22px;
    min-height: auto;
}

    .fcx-hero h1 {
        font-size: clamp(1.75rem, 3vw, 2.45rem);
    }

.fcx-hero-copy > p {
    max-width: 760px;
}

.fcx-command-bar {
    padding: 10px 14px;
    border-radius: 16px;
}

.fcx-method-fold,
.fcx-category-group {
    border: 1px solid var(--fcx-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 58, 94, .06);
    overflow: hidden;
}

.fcx-method-fold {
    margin: 14px 0;
}

    .fcx-method-fold > summary,
    .fcx-category-group > summary {
        list-style: none;
        cursor: pointer;
        display: grid;
        align-items: center;
        gap: 12px;
    }

        .fcx-method-fold > summary::-webkit-details-marker,
        .fcx-category-group > summary::-webkit-details-marker {
            display: none;
        }

    .fcx-method-fold > summary {
        grid-template-columns: 38px minmax(0, 1fr) 22px;
        padding: 13px 16px;
    }

        .fcx-method-fold > summary > span:nth-child(2) strong,
        .fcx-method-fold > summary > span:nth-child(2) small {
            display: block;
        }

        .fcx-method-fold > summary small {
            color: var(--fcx-muted);
            margin-top: 2px;
        }

    .fcx-method-fold[open] > summary > .bi-chevron-down,
    .fcx-category-group[open] > summary > .bi-chevron-down {
        transform: rotate(180deg);
    }

    .fcx-method-fold > summary > .bi-chevron-down,
    .fcx-category-group > summary > .bi-chevron-down {
        transition: transform .18s ease;
    }

.fcx-method-steps {
    padding: 0 16px 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

    .fcx-method-steps article {
        display: flex;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
        background: var(--fcx-soft);
        border: 1px solid var(--fcx-line);
    }

        .fcx-method-steps article b {
            width: 28px;
            height: 28px;
            flex: 0 0 28px;
            display: grid;
            place-items: center;
            border-radius: 9px;
            background: var(--fcx-navy);
            color: #fff;
        }

        .fcx-method-steps article strong,
        .fcx-method-steps article small {
            display: block;
        }

        .fcx-method-steps article small {
            margin-top: 3px;
            color: var(--fcx-muted);
        }

.fcx-kpis-reconciled {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.fcx-kpi {
    min-height: 148px;
    padding: 16px;
    border-radius: 18px;
    border-width: 1px;
    box-shadow: 0 8px 22px rgba(23, 58, 94, .07);
}

    .fcx-kpi::before {
        height: 4px;
    }

.fcx-kpi-value {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    margin-top: 12px;
}

.fcx-kpi-detail {
    margin-top: 5px;
    min-height: 0;
}

.fcx-kpi-formula {
    display: none;
}

.fcx-kpi-open {
    margin-top: auto;
    font-size: .76rem;
}

.fcx-panel {
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(23, 58, 94, .07);
}

.fcx-section-head {
    padding: 18px 20px;
}

    .fcx-section-head h2 {
        font-size: 1.2rem;
    }

.fcx-classification-panel {
    overflow: hidden;
}

.fcx-grouped-category-tables {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}

.fcx-category-head-summary {
    min-width: 180px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--fcx-sky);
    border: 1px solid #c9e4f5;
    text-align: right;
}

    .fcx-category-head-summary strong,
    .fcx-category-head-summary span,
    .fcx-category-head-summary small {
        display: block;
    }

    .fcx-category-head-summary strong {
        color: var(--fcx-navy);
        font-size: 1.15rem;
    }

    .fcx-category-head-summary span,
    .fcx-category-head-summary small {
        color: var(--fcx-muted);
    }

.fcx-category-group > summary {
    grid-template-columns: 40px minmax(0, 1fr) auto 20px;
    padding: 13px 15px;
    background: #fff;
}

.fcx-category-group[open] > summary {
    background: var(--fcx-soft);
    border-bottom: 1px solid var(--fcx-line);
}

.fcx-category-group-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--fcx-sky);
    color: var(--fcx-blue);
}

.fcx-category-group-ingresos .fcx-category-group-icon {
    background: #e7f8ef;
    color: var(--fcx-green);
}

.fcx-category-group-egresos .fcx-category-group-icon {
    background: #fff1e8;
    color: #d55b00;
}

.fcx-category-group-transferencias .fcx-category-group-icon {
    background: #edf1ff;
    color: #4e63c7;
}

.fcx-category-group-control .fcx-category-group-icon {
    background: #fff7df;
    color: var(--fcx-amber);
}

.fcx-category-group-copy strong,
.fcx-category-group-copy small {
    display: block;
}

.fcx-category-group-copy strong {
    color: var(--fcx-ink);
}

.fcx-category-group-copy small {
    color: var(--fcx-muted);
    margin-top: 2px;
}

.fcx-category-group-total {
    color: var(--fcx-navy);
    font-weight: 850;
    white-space: nowrap;
}

.fcx-category-table-wrap {
    overflow-x: auto;
}

.fcx-category-table,
.fcx-directive-table,
.fcx-transfer-summary-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--fcx-ink);
}

    .fcx-category-table th,
    .fcx-directive-table th,
    .fcx-transfer-summary-table th {
        padding: 10px 12px;
        background: #f3f7fa;
        border-bottom: 1px solid var(--fcx-line);
        color: var(--fcx-muted);
        font-size: .72rem;
        letter-spacing: .04em;
        text-transform: uppercase;
        text-align: left;
    }

    .fcx-category-table td,
    .fcx-directive-table td,
    .fcx-transfer-summary-table td {
        padding: 11px 12px;
        border-bottom: 1px solid #e8eef3;
        vertical-align: middle;
    }

    .fcx-category-table tbody tr:last-child td,
    .fcx-directive-table tbody tr:last-child td,
    .fcx-transfer-summary-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .fcx-category-table tr.is-empty {
        opacity: .55;
    }

.fcx-category-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

    .fcx-category-row-title > i {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 9px;
        background: var(--fcx-sky);
        color: var(--fcx-blue);
    }

    .fcx-category-row-title strong,
    .fcx-category-row-title small {
        display: block;
    }

    .fcx-category-row-title small {
        margin-top: 2px;
        color: var(--fcx-muted);
        font-size: .75rem;
    }

.fcx-row-action,
.fcx-directive-table button {
    border: 1px solid #c4d9e8;
    border-radius: 9px;
    padding: 7px 10px;
    color: var(--fcx-navy);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

    .fcx-row-action:hover,
    .fcx-directive-table button:hover {
        background: var(--fcx-navy);
        color: #fff;
        border-color: var(--fcx-navy);
    }

.fcx-category-foot-compact {
    padding: 10px 16px 15px;
    gap: 12px;
}

.fcx-reconciliation-board {
    padding: 14px 16px;
    border-radius: 18px;
}

.fcx-reconciliation-metrics {
    gap: 8px;
}

.fcx-director-fold {
    padding: 0;
    overflow: hidden;
}

    .fcx-director-fold > summary,
    .fcx-fx-fold > summary,
    .fcx-analysis-group > summary {
        background: #fff;
    }

.fcx-director-strip {
    margin: 0;
    box-shadow: none;
    border: 0;
    padding: 0;
}

.fcx-matrix-panel .fcx-section-head {
    border-bottom: 1px solid var(--fcx-line);
}

.fcx-flow-table th,
.fcx-flow-table td {
    padding: 11px 10px;
}

    .fcx-flow-table td:first-child {
        min-width: 240px;
    }

.fcx-fx-fold {
    margin: 14px 16px 0;
}

.fcx-fx-head-compact {
    padding: 0 0 12px;
    justify-content: flex-end;
}

.fcx-bank-breakdown {
    margin: 10px 16px 16px;
}

.fcx-transfer-panel .fcx-section-head {
    border-bottom: 1px solid var(--fcx-line);
}

.fcx-transfer-summary {
    padding: 14px 16px;
}

.fcx-transfer-summary-table tr.is-ok td {
    background: #edf9f2;
}

.fcx-transfer-summary-table tr.is-review td {
    background: #fff7e8;
}

.fcx-transfer-fold {
    margin: 0 16px 16px;
}

.fcx-transfer-table {
    min-width: 1320px;
}

    .fcx-transfer-table th,
    .fcx-transfer-table td {
        padding: 11px 10px;
    }

        .fcx-transfer-table td:nth-child(2),
        .fcx-transfer-table td:nth-child(4) {
            min-width: 230px;
        }

        .fcx-transfer-table td:nth-child(6),
        .fcx-transfer-table td:nth-child(7) {
            min-width: 175px;
        }

.fcx-analysis-groups {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}

.fcx-analysis-group {
    margin: 0;
}

.fcx-fold-body-table {
    padding: 0;
    overflow-x: auto;
}

.fcx-directive-table td:first-child {
    min-width: 240px;
}

    .fcx-directive-table td:first-child i {
        color: var(--fcx-blue);
        margin-right: 9px;
    }

.fcx-directive-table td:nth-child(2) {
    color: var(--fcx-navy);
    font-weight: 850;
}

.fcx-directive-table td:nth-child(3) {
    color: var(--fcx-muted);
}

.fcx-fold-income {
    background: #e7f8ef;
    color: var(--fcx-green);
}

.fcx-fold-expense {
    background: #fff1e8;
    color: #d55b00;
}

.fcx-daily-panel,
.fcx-detail-zone {
    margin-top: 14px;
}

@media (max-width: 1180px) {
    .fcx-kpis-reconciled {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fcx-method-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .fcx-kpis-reconciled {
        grid-template-columns: 1fr;
    }

    .fcx-kpi {
        min-height: 128px;
    }

    .fcx-method-steps {
        grid-template-columns: 1fr;
    }

    .fcx-category-group > summary {
        grid-template-columns: 38px minmax(0, 1fr) 20px;
    }

    .fcx-category-group-total {
        grid-column: 2;
        white-space: normal;
        font-size: .8rem;
    }

    .fcx-category-table {
        min-width: 820px;
    }

    .fcx-directive-table {
        min-width: 760px;
    }

    .fcx-category-head-summary {
        width: 100%;
        text-align: left;
    }
}

/* ========================================================================
   VISTA DIRECTIVA PREMIUM · TABLA PRIMERO · MODALES CLAROS
   Estas reglas finales sustituyen visualmente las versiones anteriores sin
   modificar la lógica de datos ni las rutas existentes.
   ======================================================================== */

:root {
    --fcx-premium-navy: #0b3155;
    --fcx-premium-blue: #0867a8;
    --fcx-premium-cyan: #3db4d8;
    --fcx-premium-orange: #f49a24;
    --fcx-premium-ink: #152b43;
    --fcx-premium-muted: #667b91;
    --fcx-premium-line: #dbe6ef;
    --fcx-premium-soft: #f6f9fc;
    --fcx-premium-success: #14815a;
    --fcx-premium-warning: #a86b08;
    --fcx-premium-danger: #b33d4d;
    --fcx-premium-shadow: 0 12px 34px rgba(13, 51, 85, .09);
}

body {
    background: #f4f7fb !important;
}

.fcx-page {
    max-width: 1880px;
    padding: 18px 20px 36px;
}

/* Encabezado compacto, del mismo lenguaje visual que los otros tableros. */
.fcx-hero {
    min-height: 0;
    margin-bottom: 12px;
    padding: 21px 24px;
    align-items: center;
    border-radius: 22px;
    background: radial-gradient(circle at 92% 15%, rgba(255, 189, 78, .28), transparent 18rem), linear-gradient(115deg, #0a2c4c 0%, #075d99 72%, #ed8b16 100%);
    box-shadow: 0 14px 36px rgba(7, 70, 121, .17);
}

    .fcx-hero h1 {
        font-size: clamp(1.9rem, 3.2vw, 2.85rem);
        line-height: 1;
        letter-spacing: -.035em;
    }

.fcx-hero-copy > p {
    max-width: 820px;
    margin-top: 10px;
    font-size: .86rem;
    line-height: 1.45;
}

.fcx-eyebrow {
    margin-bottom: 8px;
    font-size: .62rem;
}

.fcx-period {
    margin-top: 12px;
}

    .fcx-period span {
        min-height: 29px;
        padding: 0 10px;
        font-size: .61rem;
    }

.fcx-hero-actions .fcx-btn {
    min-height: 40px;
}

/* Selector monetario con una sola lectura visual. */
.fcx-command-bar {
    margin-bottom: 12px;
    padding: 9px 11px;
    align-items: center;
    border: 1px solid var(--fcx-premium-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(13, 51, 85, .05);
}

.fcx-mode-switch {
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
    background: #edf3f8;
}

    .fcx-mode-switch button {
        min-height: 34px;
        padding: 0 12px;
        border-radius: 9px;
        font-size: .67rem;
    }

        .fcx-mode-switch button.is-active {
            background: linear-gradient(135deg, var(--fcx-premium-navy), var(--fcx-premium-blue));
            box-shadow: 0 7px 16px rgba(8, 103, 168, .19);
        }

.fcx-mode-note {
    min-width: 280px;
    padding: 0 4px;
}

    .fcx-mode-note strong,
    .fcx-mode-note span,
    .fcx-mode-note small {
        line-height: 1.25;
    }

/* Bloque ejecutivo colocado justo antes de la tabla. */
.fcx-overview {
    margin-bottom: 12px;
    padding: 15px;
    border: 1px solid var(--fcx-premium-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--fcx-premium-shadow);
}

.fcx-overview-head {
    margin-bottom: 12px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

    .fcx-overview-head > div > span,
    .fcx-secondary-heading span {
        color: var(--fcx-premium-blue);
        font-size: .62rem;
        font-weight: 950;
        letter-spacing: .11em;
        text-transform: uppercase;
    }

    .fcx-overview-head h2,
    .fcx-secondary-heading h2 {
        margin: 3px 0 0;
        color: var(--fcx-premium-ink);
        font-size: 1.02rem;
        font-weight: 950;
    }

    .fcx-overview-head > small,
    .fcx-secondary-heading > small {
        color: var(--fcx-premium-muted);
        font-size: .72rem;
        font-weight: 700;
    }

.fcx-kpis-reconciled {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.fcx-kpi {
    min-height: 142px;
    padding: 15px;
    border: 1px solid #dfe8f0;
    border-radius: 17px;
    background: linear-gradient(155deg, #ffffff, #f8fbfd);
    box-shadow: 0 7px 20px rgba(13, 51, 85, .055);
}

    .fcx-kpi::before {
        height: 4px;
        border-radius: 17px 17px 0 0;
    }

    .fcx-kpi:hover {
        transform: translateY(-2px);
        border-color: #b9d5e8;
        box-shadow: 0 12px 25px rgba(13, 51, 85, .11);
    }

.fcx-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

.fcx-kpi-label {
    font-size: .66rem;
    line-height: 1.2;
}

.fcx-kpi-value {
    margin-top: 13px;
    color: var(--fcx-premium-ink);
    font-size: clamp(1.16rem, 1.65vw, 1.58rem);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.fcx-kpi-detail {
    min-height: 27px;
    margin-top: 5px;
    color: var(--fcx-premium-muted);
    font-size: .66rem;
    line-height: 1.3;
}

.fcx-kpi-open {
    margin-top: auto;
    color: var(--fcx-premium-blue);
    font-size: .62rem;
}

/* La matriz es la primera gran pieza de información. */
.fcx-matrix-panel {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    border-radius: 21px;
    box-shadow: var(--fcx-premium-shadow);
}

    .fcx-matrix-panel > .fcx-section-head {
        padding: 16px 18px 13px;
        border-bottom: 1px solid var(--fcx-premium-line);
        background: #fff;
    }

.fcx-section-head h2 {
    font-size: 1.02rem;
}

.fcx-section-head p {
    max-width: 900px;
    font-size: .72rem;
}

.fcx-matrix-wrap {
    max-height: none;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.fcx-flow-table {
    min-width: 1420px;
    font-size: .76rem;
}

    .fcx-flow-table thead th {
        padding: 11px 10px;
        background: #163a5c;
        font-size: .65rem;
    }

    .fcx-flow-table tbody th,
    .fcx-flow-table tbody td {
        padding: 10px 10px;
    }

    .fcx-flow-table tbody th {
        min-width: 245px;
        background: #f7fafc;
    }

.fcx-semaphore-note {
    margin: 0;
    padding: 9px 16px;
    border-top: 1px solid var(--fcx-premium-line);
    background: #fbfcfe;
    font-size: .64rem;
}

.fcx-matrix-panel > .fcx-foldable,
.fcx-matrix-panel > .fcx-bank-breakdown {
    margin: 10px 14px 0;
}

.fcx-matrix-panel > .fcx-bank-breakdown {
    margin-bottom: 14px;
}

/* Conciliación como cinta ejecutiva, no como otro dashboard completo. */
.fcx-reconciliation-board {
    margin: 0 0 10px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 10px;
    border-radius: 17px;
    box-shadow: none;
}

.fcx-reconciliation-status {
    min-height: 74px;
    padding: 11px 13px;
    border-radius: 13px;
}

.fcx-reconciliation-icon {
    width: 39px;
    height: 39px;
}

.fcx-reconciliation-status strong {
    font-size: .9rem;
}

.fcx-reconciliation-metrics {
    gap: 7px;
}

    .fcx-reconciliation-metrics article {
        min-height: 70px;
        padding: 10px;
        border-radius: 12px;
    }

.fcx-method-fold,
.fcx-director-fold {
    margin: 0 0 10px;
    border-radius: 16px;
    box-shadow: none;
}

/* Encabezado de módulos secundarios. */
.fcx-secondary-heading {
    margin: 18px 2px 9px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

/* Todas las tablas secundarias viven en acordeones compactos. */
.fcx-module-fold {
    margin: 0 0 9px;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--fcx-premium-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(13, 51, 85, .045);
}

    .fcx-module-fold::before {
        display: none !important;
    }

    .fcx-module-fold > summary {
        min-height: 62px;
        padding: 11px 14px;
        grid-template-columns: 38px minmax(0, 1fr) 20px;
        background: #fff;
    }

    .fcx-module-fold[open] > summary {
        border-bottom: 1px solid var(--fcx-premium-line);
        background: linear-gradient(90deg, #f1f7fb, #ffffff);
    }

    .fcx-module-fold > summary .fcx-fold-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .fcx-module-fold > summary strong {
        color: var(--fcx-premium-ink);
        font-size: .82rem;
    }

    .fcx-module-fold > summary small {
        margin-top: 2px;
        font-size: .66rem;
    }

.fcx-module-body {
    padding: 0 14px 14px;
}

    .fcx-module-body > .fcx-section-head {
        margin: 0 -14px 12px;
        padding: 13px 14px;
        border-bottom: 1px solid var(--fcx-premium-line);
        background: #fbfcfe;
    }

        .fcx-module-body > .fcx-section-head h2 {
            font-size: .92rem;
        }

        .fcx-module-body > .fcx-section-head p {
            margin-top: 4px;
            font-size: .68rem;
        }

.fcx-grouped-category-tables {
    gap: 8px;
}

.fcx-category-group,
.fcx-analysis-group,
.fcx-transfer-fold,
.fcx-foldable-list > .fcx-foldable {
    border-radius: 13px;
}

.fcx-category-table th,
.fcx-category-table td,
.fcx-directive-table th,
.fcx-directive-table td,
.fcx-validation-table th,
.fcx-validation-table td,
.fcx-daily-table th,
.fcx-daily-table td {
    padding: 9px 10px;
}

/* Transferencias: resumen en tarjetas horizontales, no tabla estrecha. */
.fcx-transfer-actions {
    align-items: center;
}

.fcx-transfer-summary {
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.fcx-transfer-stat {
    min-width: 0;
    min-height: 92px;
    padding: 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    border: 1px solid var(--fcx-premium-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(13, 51, 85, .045);
}

    .fcx-transfer-stat > i {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        color: var(--fcx-premium-blue);
        background: #e8f4fc;
    }

    .fcx-transfer-stat span,
    .fcx-transfer-stat strong,
    .fcx-transfer-stat small {
        display: block;
        min-width: 0;
    }

    .fcx-transfer-stat span {
        color: var(--fcx-premium-muted);
        font-size: .58rem;
        font-weight: 950;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .fcx-transfer-stat strong {
        margin-top: 4px;
        color: var(--fcx-premium-ink);
        font-size: .98rem;
        font-weight: 950;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .fcx-transfer-stat small {
        margin-top: 4px;
        color: var(--fcx-premium-muted);
        font-size: .64rem;
        line-height: 1.3;
    }

    .fcx-transfer-stat.is-wide {
        grid-column: span 1;
    }

    .fcx-transfer-stat.is-ok {
        border-color: #bfe2d4;
        background: #f5fcf8;
    }

        .fcx-transfer-stat.is-ok > i {
            color: var(--fcx-premium-success);
            background: #e5f6ee;
        }

    .fcx-transfer-stat.is-review {
        border-color: #edd3a5;
        background: #fffaf0;
    }

        .fcx-transfer-stat.is-review > i {
            color: var(--fcx-premium-warning);
            background: #fff0d2;
        }

.fcx-transfer-fold {
    margin: 0;
}

.fcx-transfer-explanation {
    grid-template-columns: minmax(200px, 1fr) 28px minmax(200px, 1fr) minmax(240px, 1fr);
    gap: 9px;
}

    .fcx-transfer-explanation > div {
        min-height: 64px;
        padding: 10px 12px;
    }

.fcx-transfer-table-wrap {
    max-height: 520px;
    border-radius: 13px;
}

.fcx-transfer-table {
    min-width: 1460px;
}

    .fcx-transfer-table th,
    .fcx-transfer-table td {
        padding: 10px;
    }

    .fcx-transfer-table th {
        font-size: .64rem;
    }

    .fcx-transfer-table td {
        font-size: .72rem;
    }

/* Modales: amplios, separados, con encabezados y tablas que no se montan. */
body.fcx-modal-open {
    overflow: hidden;
}

.fcx-modal {
    padding: 16px;
    align-items: flex-start;
    overflow-y: auto;
}

.fcx-modal-card {
    width: min(1540px, calc(100vw - 32px));
    max-width: 1540px;
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(5, 28, 50, .32);
}

.fcx-modal-head {
    flex: 0 0 auto;
    padding: 17px 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.18);
    background: radial-gradient(circle at 90% 15%, rgba(244,154,36,.25), transparent 15rem), linear-gradient(115deg, #0b3155, #0867a8);
}

    .fcx-modal-head h2 {
        font-size: 1.25rem;
    }

    .fcx-modal-head p {
        max-width: 900px;
        margin-top: 4px;
        font-size: .72rem;
    }

.fcx-modal-content {
    min-height: 0;
    padding: 16px;
    overflow: auto;
    background: #f5f8fb;
}

.fcx-modal-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

    .fcx-modal-summary article {
        min-height: 82px;
        padding: 11px;
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 4px 13px rgba(13, 51, 85, .045);
    }

    .fcx-modal-summary small {
        font-size: .53rem;
    }

    .fcx-modal-summary strong {
        font-size: .85rem;
    }

.fcx-modal-tabs {
    position: sticky;
    top: -16px;
    z-index: 8;
    margin-bottom: 10px;
    padding: 7px;
    border-radius: 13px;
    box-shadow: 0 7px 17px rgba(13, 51, 85, .08);
}

.fcx-modal-chart-section,
#cashModalGroupsSection,
#cashModalMovementsSection {
    margin-top: 10px;
    padding: 13px;
    border-radius: 15px;
    box-shadow: 0 5px 16px rgba(13, 51, 85, .045);
}

.fcx-modal-chart-section {
    overflow: hidden;
}

.fcx-modal-section-head {
    margin-bottom: 9px;
    align-items: center;
}

    .fcx-modal-section-head h3 {
        font-size: .93rem;
    }

#cashModalChart {
    width: 100% !important;
    height: 350px !important;
    max-height: 350px !important;
    border: 1px solid #e3ebf2;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.fcx-modal .fcx-table-wrap {
    max-width: 100%;
    max-height: 430px;
    overflow: auto;
    border: 1px solid #e0e8ef;
    border-radius: 12px;
    background: #fff;
}

.fcx-modal .fcx-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.fcx-group-table {
    min-width: 1180px;
}

.fcx-movement-table {
    min-width: 1350px;
}

.fcx-modal .fcx-detail-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px;
    color: #fff;
    background: #173a5a;
    border-right: 1px solid rgba(255,255,255,.13);
    font-size: .61rem;
    white-space: nowrap;
}

.fcx-modal .fcx-detail-table tbody td {
    padding: 10px;
    border-right: 1px solid #e7edf2;
    border-bottom: 1px solid #e7edf2;
    font-size: .69rem;
    line-height: 1.35;
    vertical-align: top;
    white-space: normal;
}

.fcx-modal .fcx-detail-table tbody tr:nth-child(even) td {
    background: #f9fbfd;
}

.fcx-modal .fcx-detail-table tbody tr:hover td {
    background: #edf6fc;
}

.fcx-flow-direction {
    margin-bottom: 4px;
    padding: 3px 7px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

    .fcx-flow-direction.is-income {
        color: #126342;
        background: #e5f6ee;
    }

    .fcx-flow-direction.is-expense {
        color: #9a4c07;
        background: #fff0de;
    }

.fcx-movement-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

    .fcx-movement-tools select,
    .fcx-movement-tools button,
    .fcx-modal-section-head input {
        min-height: 36px;
        border-radius: 10px;
    }

.fcx-pagination {
    position: sticky;
    bottom: -16px;
    z-index: 6;
    margin: 0 -13px -13px;
    padding: 10px 13px;
    border-top: 1px solid var(--fcx-premium-line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
}

.fcx-movement-card {
    max-width: 1120px;
}

.fcx-movement-detail {
    min-height: 0;
    overflow: auto;
}

/* Estados de foco accesibles y consistentes. */
.fcx-kpi:focus-visible,
.fcx-module-fold > summary:focus-visible,
.fcx-detail-btn:focus-visible,
.fcx-transfer-movement:focus-visible,
.fcx-mode-switch button:focus-visible {
    outline: 3px solid rgba(61, 180, 216, .32);
    outline-offset: 2px;
}

@media (max-width: 1500px) {
    .fcx-kpis-reconciled {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fcx-kpi {
        min-height: 130px;
    }

    .fcx-transfer-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fcx-modal-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .fcx-page {
        padding: 12px;
    }

    .fcx-hero {
        align-items: flex-start;
    }

    .fcx-command-bar,
    .fcx-overview-head,
    .fcx-secondary-heading,
    .fcx-section-head-inline,
    .fcx-modal-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .fcx-reconciliation-board {
        grid-template-columns: 1fr;
    }

    .fcx-transfer-explanation {
        grid-template-columns: 1fr;
    }

        .fcx-transfer-explanation > i {
            transform: rotate(90deg);
        }
}

@media (max-width: 760px) {
    .fcx-page {
        padding: 8px;
    }

    .fcx-hero {
        padding: 18px;
        flex-direction: column;
        border-radius: 18px;
    }

    .fcx-hero-actions,
    .fcx-hero-actions .fcx-btn {
        width: 100%;
    }

    .fcx-kpis-reconciled,
    .fcx-transfer-summary,
    .fcx-modal-summary {
        grid-template-columns: 1fr;
    }

    .fcx-kpi {
        min-height: 118px;
    }

    .fcx-mode-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .fcx-mode-switch button {
            width: 100%;
        }

    .fcx-module-fold > summary {
        grid-template-columns: 34px minmax(0, 1fr) 18px;
    }

    .fcx-modal {
        padding: 6px;
    }

    .fcx-modal-card {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        border-radius: 17px;
    }

    .fcx-modal-head {
        padding: 14px;
    }

    .fcx-modal-content {
        padding: 10px;
    }

    #cashModalChart {
        height: 300px !important;
        max-height: 300px !important;
    }

    .fcx-modal-tabs {
        top: -10px;
    }
}


/* =========================================================
   VISTA PARA USUARIO FINAL - 2026
   ========================================================= */

.fcx-page {
    --user-blue: #0b4f8a;
    --user-blue-soft: #eaf4ff;
    --user-orange: #f59e0b;
    --user-green: #16a34a;
    --user-yellow: #f59e0b;
    --user-red: #dc2626;
    --user-ink: #17324d;
    --user-muted: #64748b;
    max-width: 1900px;
    margin: 0 auto;
}

.fcx-hero {
    border-radius: 24px;
    padding: 24px 28px;
    background: linear-gradient(125deg, #ffffff 0%, #f4f9ff 68%, #fff7ed 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 36px rgba(15, 68, 117, .08);
}

    .fcx-hero h1 {
        color: var(--user-ink);
    }

    .fcx-hero p {
        max-width: 780px;
        color: var(--user-muted);
    }

.fcx-eyebrow {
    color: var(--user-blue);
}

.fcx-overview {
    margin-top: 18px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fcx-overview-head {
    margin-bottom: 12px;
    padding: 0 4px;
}

.fcx-kpis-reconciled {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(190px, 1fr));
    gap: 14px;
}

.fcx-user-kpi {
    min-height: 178px;
    padding: 18px;
    border: 1px solid #d9e7f5 !important;
    border-top: 5px solid var(--card-light, #60a5fa) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 68, 117, .08) !important;
    text-align: left;
    position: relative;
    overflow: hidden;
}

    .fcx-user-kpi::after {
        content: "";
        position: absolute;
        width: 110px;
        height: 110px;
        right: -42px;
        bottom: -48px;
        border-radius: 50%;
        background: color-mix(in srgb, var(--card-light, #60a5fa) 10%, transparent);
    }

.fcx-card-semaphore-green {
    --card-light: var(--user-green);
}

.fcx-card-semaphore-yellow {
    --card-light: var(--user-yellow);
}

.fcx-card-semaphore-red {
    --card-light: var(--user-red);
}

.fcx-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fcx-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--card-light);
    background: color-mix(in srgb, var(--card-light) 12%, white);
}

.fcx-kpi-semaphore,
.fcx-mini-light {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--card-light);
    background: color-mix(in srgb, var(--card-light) 10%, white);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

    .fcx-kpi-semaphore i,
    .fcx-mini-light i {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--card-light);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--card-light) 16%, transparent);
    }

.fcx-user-kpi .fcx-kpi-label {
    margin-top: 14px;
    color: #16436b;
    font-size: .77rem;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fcx-user-kpi .fcx-kpi-value {
    margin-top: 7px;
    color: var(--user-ink);
    font-size: clamp(1.2rem, 1.5vw, 1.72rem);
    line-height: 1.15;
}

.fcx-user-kpi .fcx-kpi-detail {
    min-height: 36px;
    margin-top: 8px;
    color: var(--user-muted);
    line-height: 1.35;
}

.fcx-user-kpi .fcx-kpi-open {
    margin-top: 12px;
    color: var(--user-blue);
    font-weight: 850;
}

.fcx-panel,
.fcx-method-fold,
.fcx-director-fold,
.fcx-reconciliation-board,
.fcx-foldable {
    border-radius: 20px !important;
}

.fcx-matrix-panel {
    margin-top: 16px;
    border: 1px solid #d8e6f5;
    box-shadow: 0 14px 36px rgba(15, 68, 117, .08);
}

.fcx-section-head h2,
.fcx-secondary-heading h2,
.fcx-foldable summary strong {
    color: var(--user-ink);
}

.fcx-flow-table thead th {
    background: #173f63 !important;
}

.fcx-flow-table tbody tr,
.fcx-category-table tbody tr,
.fcx-directive-table tbody tr,
.fcx-validation-table tbody tr,
.fcx-daily-table tbody tr,
.fcx-transfer-table tbody tr,
.fcx-detail-table tbody tr,
.fcx-bank-breakdown-table tbody tr {
    cursor: pointer;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

    .fcx-flow-table tbody tr:hover > *,
    .fcx-category-table tbody tr:hover > *,
    .fcx-directive-table tbody tr:hover > *,
    .fcx-validation-table tbody tr:hover > *,
    .fcx-daily-table tbody tr:hover > *,
    .fcx-transfer-table tbody tr:hover > *,
    .fcx-detail-table tbody tr:hover > *,
    .fcx-bank-breakdown-table tbody tr:hover > * {
        background: #f1f8ff !important;
    }

    .fcx-flow-table tbody tr.is-selected > *,
    .fcx-category-table tbody tr.is-selected > *,
    .fcx-directive-table tbody tr.is-selected > *,
    .fcx-validation-table tbody tr.is-selected > *,
    .fcx-daily-table tbody tr.is-selected > *,
    .fcx-transfer-table tbody tr.is-selected > *,
    .fcx-detail-table tbody tr.is-selected > *,
    .fcx-bank-breakdown-table tbody tr.is-selected > * {
        background: #fff4db !important;
        box-shadow: inset 0 1px 0 #f6bd60, inset 0 -1px 0 #f6bd60;
    }

        .fcx-flow-table tbody tr.is-selected > *:first-child,
        .fcx-category-table tbody tr.is-selected > *:first-child,
        .fcx-directive-table tbody tr.is-selected > *:first-child,
        .fcx-validation-table tbody tr.is-selected > *:first-child,
        .fcx-daily-table tbody tr.is-selected > *:first-child,
        .fcx-transfer-table tbody tr.is-selected > *:first-child,
        .fcx-detail-table tbody tr.is-selected > *:first-child,
        .fcx-bank-breakdown-table tbody tr.is-selected > *:first-child {
            box-shadow: inset 5px 0 0 var(--user-orange), inset 0 1px 0 #f6bd60, inset 0 -1px 0 #f6bd60;
        }

.fcx-category-group,
.fcx-party-fold,
.fcx-analysis-group {
    border: 1px solid #dbe7f3 !important;
    background: #fff;
}

.fcx-client-fold {
    border-left: 5px solid #16a34a !important;
}

.fcx-supplier-fold {
    border-left: 5px solid #f97316 !important;
}

.fcx-other-party-fold {
    border-left: 5px solid #3b82f6 !important;
}

.fcx-party-table {
    min-width: 880px;
}

.fcx-lines-table {
    min-width: 1180px !important;
}

.fcx-category-table thead th,
.fcx-validation-table thead th,
.fcx-directive-table thead th,
.fcx-transfer-table thead th,
.fcx-detail-table thead th,
.fcx-daily-table thead th {
    background: #eef6ff !important;
    color: #17466f !important;
    border-bottom: 1px solid #cfe0f0 !important;
}

.fcx-transfer-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(230px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
}

.fcx-transfer-stat {
    min-width: 0 !important;
    min-height: 130px;
    padding: 17px !important;
    border: 1px solid #dbe7f3 !important;
    border-top: 4px solid var(--card-light) !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 68, 117, .07) !important;
    position: relative;
}

    .fcx-transfer-stat.is-wide {
        grid-column: span 1 !important;
    }

    .fcx-transfer-stat > i {
        color: var(--card-light) !important;
    }

    .fcx-transfer-stat .fcx-mini-light {
        position: absolute;
        right: 14px;
        top: 14px;
    }

.fcx-transfer-table {
    min-width: 1220px !important;
}

    .fcx-transfer-table th:nth-child(1) {
        min-width: 130px;
    }

    .fcx-transfer-table th:nth-child(2),
    .fcx-transfer-table th:nth-child(4) {
        min-width: 240px;
    }

    .fcx-transfer-table th:nth-child(7) {
        min-width: 190px;
    }

.fcx-transfer-support {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.fcx-transfer-movement,
.fcx-row-open,
.fcx-row-action,
.fcx-detail-btn {
    border-radius: 10px !important;
    padding: 8px 12px !important;
    white-space: nowrap;
}

.fcx-modal-card {
    width: min(1500px, 96vw) !important;
    height: min(92vh, 980px) !important;
    max-height: 92vh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border-radius: 24px !important;
}

.fcx-modal-head {
    padding: 20px 24px !important;
    background: linear-gradient(135deg, #153e61, #0b5f9d) !important;
}

.fcx-modal-content {
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px 22px 30px !important;
}

.fcx-modal-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 12px !important;
}

.fcx-modal-chart-section {
    min-height: 340px !important;
    max-height: 430px !important;
    overflow: hidden !important;
}

#cashModalChart {
    display: block;
    width: 100% !important;
    height: 310px !important;
    max-height: 310px !important;
}

.fcx-modal-section-head {
    position: relative !important;
    z-index: 2;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
}

.fcx-modal-content .fcx-table-wrap {
    max-height: 470px !important;
    overflow: auto !important;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
}

.fcx-modal-content table {
    min-width: 1080px !important;
}

.fcx-group-table {
    min-width: 900px !important;
}

.fcx-movement-table {
    min-width: 1250px !important;
}

.fcx-modal-content thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
}

.fcx-movement-card {
    width: min(1080px, 95vw) !important;
    height: min(90vh, 900px) !important;
}

.fcx-movement-detail {
    overflow-y: auto !important;
    padding: 22px !important;
}

.fcx-detail-section {
    border: 1px solid #dbe7f3 !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(15, 68, 117, .06);
}

.fcx-quality.is-ok,
.fcx-quality-pill.is-ok {
    color: #166534 !important;
    background: #dcfce7 !important;
}

.fcx-quality.is-review,
.fcx-quality-pill.is-review {
    color: #9a3412 !important;
    background: #ffedd5 !important;
}

.fcx-transfer-status.is-ok {
    color: #166534 !important;
    background: #dcfce7 !important;
}

.fcx-transfer-status.is-review {
    color: #92400e !important;
    background: #fef3c7 !important;
}

.fcx-transfer-status.is-danger {
    color: #991b1b !important;
    background: #fee2e2 !important;
}

@media (max-width: 1500px) {
    .fcx-kpis-reconciled {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 1100px) {
    .fcx-kpis-reconciled,
    .fcx-transfer-summary {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }

    .fcx-modal-summary {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .fcx-kpis-reconciled,
    .fcx-transfer-summary,
    .fcx-modal-summary {
        grid-template-columns: 1fr !important;
    }

    .fcx-user-kpi {
        min-height: 150px;
    }

    .fcx-hero {
        padding: 20px 16px;
    }

    .fcx-modal-card {
        width: 98vw !important;
        height: 94vh !important;
        max-height: 94vh !important;
        border-radius: 16px !important;
    }

    .fcx-modal-content {
        padding: 14px !important;
    }
}

/* ================================================================
   AJUSTES GUI USUARIO FINAL V2
   Tablas legibles, selección cruzada y modales centrados.
   ================================================================ */

.fcx-interactive-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

    .fcx-interactive-table th,
    .fcx-interactive-table td {
        transition: background-color .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease !important;
    }

    .fcx-interactive-table tbody td.is-row-hover,
    .fcx-interactive-table tbody th.is-row-hover {
        background-color: #eef7ff !important;
    }

    .fcx-interactive-table th.is-column-hover,
    .fcx-interactive-table td.is-column-hover {
        background-color: #e3f2ff !important;
        box-shadow: inset 1px 0 0 #b9daf5, inset -1px 0 0 #b9daf5 !important;
    }

    .fcx-interactive-table thead th.is-column-hover {
        color: #ffffff !important;
        background: #0c6eae !important;
        box-shadow: inset 0 -4px 0 #ff9f1c !important;
    }

    .fcx-interactive-table td.is-cell-hover,
    .fcx-interactive-table th.is-cell-hover {
        position: relative;
        z-index: 3;
        color: #082f51 !important;
        background: #fff0cf !important;
        box-shadow: inset 0 0 0 2px #f59e0b, 0 5px 16px rgba(245, 158, 11, .18) !important;
    }

    .fcx-interactive-table td.is-selected-column,
    .fcx-interactive-table th.is-selected-column {
        box-shadow: inset 1px 0 0 #8abde3, inset -1px 0 0 #8abde3 !important;
    }

    .fcx-interactive-table thead th.is-selected-column {
        color: #ffffff !important;
        background: #175786 !important;
        box-shadow: inset 0 -4px 0 #f59e0b !important;
    }

    .fcx-interactive-table tbody tr.is-selected > th,
    .fcx-interactive-table tbody tr.is-selected > td {
        color: #102f4a !important;
        background: #fff4d8 !important;
        box-shadow: inset 0 1px 0 #efb64b, inset 0 -1px 0 #efb64b !important;
    }

    .fcx-interactive-table tbody tr.is-selected > :first-child {
        box-shadow: inset 5px 0 0 #f28c18, inset 0 1px 0 #efb64b, inset 0 -1px 0 #efb64b !important;
    }

    .fcx-interactive-table .num.is-row-hover strong,
    .fcx-interactive-table .num.is-column-hover strong,
    .fcx-interactive-table .num.is-cell-hover strong,
    .fcx-interactive-table tr.is-selected .num,
    .fcx-interactive-table tr.is-selected .num strong,
    .fcx-interactive-table .fcx-amount-link:hover,
    .fcx-interactive-table .is-column-hover .fcx-amount-link,
    .fcx-interactive-table .is-cell-hover .fcx-amount-link {
        color: #005da4 !important;
        font-weight: 950 !important;
    }

    .fcx-interactive-table .is-cell-hover .fcx-amount-link {
        transform: scale(1.035);
    }

.fcx-client-fold > summary {
    background: linear-gradient(90deg, #effcf4, #ffffff) !important;
}

.fcx-supplier-fold > summary {
    background: linear-gradient(90deg, #fff6e9, #ffffff) !important;
}

.fcx-other-party-fold > summary {
    background: linear-gradient(90deg, #eef7ff, #ffffff) !important;
}

.fcx-party-table tbody td:first-child strong {
    color: #143c60;
}

.fcx-client-fold .fcx-party-table tbody td:nth-child(3),
.fcx-client-fold .fcx-party-table tbody td:nth-child(3) strong {
    color: #087443 !important;
}

.fcx-supplier-fold .fcx-party-table tbody td:nth-child(3),
.fcx-supplier-fold .fcx-party-table tbody td:nth-child(3) strong {
    color: #b45309 !important;
}

.fcx-empty {
    min-height: 76px;
    padding: 24px !important;
    color: #60778d !important;
    background: #f8fbfe !important;
    text-align: center !important;
    font-weight: 750 !important;
}

/* Modal principal: siempre centrado, sin secciones encimadas. */
body.fcx-modal-open {
    overflow: hidden !important;
}

.fcx-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 12000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: clamp(12px, 2vw, 28px) !important;
    overflow: hidden !important;
    overscroll-behavior: contain;
}

    .fcx-modal.is-open {
        display: flex !important;
    }

.fcx-movement-modal {
    z-index: 12030 !important;
}

.fcx-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    background: rgba(5, 25, 43, .66) !important;
    backdrop-filter: blur(5px) !important;
}

.fcx-modal-card {
    position: relative !important;
    z-index: 1 !important;
    width: min(1480px, calc(100vw - 36px)) !important;
    height: min(920px, calc(100vh - 36px)) !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .75) !important;
    border-radius: 24px !important;
    background: #f4f8fc !important;
    box-shadow: 0 32px 90px rgba(0, 24, 48, .36) !important;
    transform: none !important;
}

.fcx-modal-head {
    position: relative !important;
    z-index: 8 !important;
    min-height: 112px !important;
    padding: 20px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    color: #ffffff !important;
    background: linear-gradient(130deg, #123a5e 0%, #0c629e 70%, #0c74b8 100%) !important;
    box-shadow: 0 6px 18px rgba(10, 54, 88, .18) !important;
}

    .fcx-modal-head > div:first-child {
        min-width: 0;
    }

    .fcx-modal-head h2 {
        margin: 3px 0 0 !important;
        color: #ffffff !important;
        font-size: clamp(1.25rem, 2vw, 1.8rem) !important;
        line-height: 1.15 !important;
    }

    .fcx-modal-head p {
        max-width: 950px !important;
        margin: 7px 0 0 !important;
        color: rgba(255, 255, 255, .84) !important;
        line-height: 1.35 !important;
    }

.fcx-modal-head-actions {
    flex: 0 0 auto !important;
    align-self: flex-start !important;
}

.fcx-modal-close {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border: 1px solid rgba(255, 255, 255, .42) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, .14) !important;
    box-shadow: none !important;
}

    .fcx-modal-close:hover,
    .fcx-modal-close:focus-visible {
        background: #f28c18 !important;
        outline: 3px solid rgba(255, 255, 255, .4) !important;
    }

.fcx-modal-content {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 20px 22px 30px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.fcx-modal-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
}

    .fcx-modal-summary article {
        min-width: 0 !important;
        min-height: 108px !important;
        padding: 15px 16px !important;
        border: 1px solid #d7e5f1 !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        box-shadow: 0 7px 18px rgba(13, 69, 110, .06) !important;
    }

.fcx-modal-tabs {
    position: sticky !important;
    top: -20px !important;
    z-index: 7 !important;
    margin: 0 -4px 16px !important;
    padding: 10px 4px !important;
    overflow-x: auto !important;
    background: rgba(244, 248, 252, .96) !important;
    backdrop-filter: blur(8px) !important;
}

.fcx-modal-chart-section,
.fcx-modal-data-section {
    position: relative !important;
    min-width: 0 !important;
    margin-top: 16px !important;
    padding: 18px !important;
    border: 1px solid #d7e5f1 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 22px rgba(13, 69, 110, .06) !important;
    overflow: hidden !important;
}

.fcx-modal-chart-section {
    min-height: 360px !important;
    max-height: none !important;
}

#cashModalChart {
    display: block !important;
    width: 100% !important;
    height: 290px !important;
    max-height: 290px !important;
    margin-top: 8px !important;
}

.fcx-modal-section-head {
    position: relative !important;
    z-index: 2 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    background: transparent !important;
}

    .fcx-modal-section-head h3 {
        margin: 2px 0 0 !important;
        color: #143d60 !important;
    }

.fcx-modal-content .fcx-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 430px !important;
    margin: 0 !important;
    overflow: auto !important;
    border: 1px solid #d7e5f1 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

.fcx-modal-content .fcx-detail-table {
    width: 100% !important;
    min-width: 1060px !important;
    margin: 0 !important;
    table-layout: auto !important;
}

.fcx-modal-content .fcx-group-table {
    min-width: 880px !important;
}

.fcx-modal-content .fcx-movement-table {
    min-width: 1260px !important;
}

.fcx-modal-content .fcx-detail-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    color: #19496f !important;
    background: #eaf3fb !important;
    box-shadow: inset 0 -1px 0 #c9ddea !important;
}

.fcx-modal-content .fcx-detail-table tbody td {
    vertical-align: top !important;
    background: #ffffff;
}

.fcx-modal-content .fcx-detail-table tbody tr:nth-child(even) td {
    background: #f8fbfe;
}

.fcx-movement-card {
    width: min(1080px, calc(100vw - 36px)) !important;
    height: min(840px, calc(100vh - 36px)) !important;
}

.fcx-movement-detail {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 20px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #f4f8fc !important;
}

@media (max-width: 1050px) {
    .fcx-modal-summary {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    }

    .fcx-modal-head {
        align-items: flex-start !important;
    }
}

@media (max-width: 680px) {
    .fcx-modal {
        padding: 6px !important;
    }

    .fcx-modal-card,
    .fcx-movement-card {
        width: calc(100vw - 12px) !important;
        height: calc(100vh - 12px) !important;
        border-radius: 15px !important;
    }

    .fcx-modal-head {
        min-height: 104px !important;
        padding: 15px !important;
        gap: 10px !important;
    }

    .fcx-modal-head-actions {
        gap: 7px !important;
    }

    .fcx-modal-mode {
        display: none !important;
    }

    .fcx-modal-content,
    .fcx-movement-detail {
        padding: 12px !important;
    }

    .fcx-modal-summary {
        grid-template-columns: 1fr !important;
    }

    .fcx-modal-chart-section,
    .fcx-modal-data-section {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .fcx-modal-chart-section {
        min-height: 310px !important;
    }

    #cashModalChart {
        height: 245px !important;
        max-height: 245px !important;
    }
}

/* ============================================================
   CORRECCION INTEGRAL DE IMPORTES Y DETALLES
   - Nunca representa una operación real como $0.00 por estar en
     otra moneda o por faltar tipo de cambio.
   - Mejora lectura, selección y modales para usuario final.
   ============================================================ */

.fcx-amount-help,
.fcx-modal-help {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #b9d9f5;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef8ff 0%, #ffffff 72%);
    color: #183a59;
    box-shadow: 0 10px 28px rgba(18, 91, 149, .08);
}

.fcx-amount-help {
    margin: 12px 0 18px;
    padding: 13px 16px;
}

.fcx-modal-help {
    margin: 0;
    padding: 11px 14px;
}

    .fcx-amount-help > i,
    .fcx-modal-help > i {
        flex: 0 0 auto;
        margin-top: 1px;
        color: #0879c9;
        font-size: 1.15rem;
    }

    .fcx-amount-help div,
    .fcx-amount-help strong,
    .fcx-amount-help span,
    .fcx-modal-help span {
        min-width: 0;
    }

.fcx-amount-help strong,
.fcx-amount-help span {
    display: block;
}

.fcx-amount-help strong {
    margin-bottom: 2px;
    color: #0a4778;
    font-weight: 900;
}

.fcx-amount-help span,
.fcx-modal-help span {
    line-height: 1.45;
    font-size: .86rem;
    font-weight: 650;
}

.fcx-money-warning,
.fcx-money-note,
.fcx-money-empty {
    display: block;
    max-width: 220px;
    margin-left: auto;
    line-height: 1.25;
    white-space: normal;
}

.fcx-money-warning {
    color: #a45300 !important;
    font-weight: 900 !important;
}

.fcx-money-note {
    color: #37627f !important;
    font-weight: 750 !important;
}

.fcx-money-empty {
    color: #6d7f8d !important;
    font-weight: 800 !important;
}

#cashDashboard table .num > strong,
#cashDashboard table .num > small,
.fcx-modal table .num > strong,
.fcx-modal table .num > small {
    display: block;
}

#cashDashboard table .num > small,
.fcx-modal table .num > small {
    margin-top: 4px;
    font-size: .72rem;
    line-height: 1.25;
}

#cashDashboard table tbody tr.has-no-amount > *,
.fcx-modal table tbody tr.has-no-amount > * {
    background-image: repeating-linear-gradient( -45deg, rgba(107, 124, 139, .035) 0, rgba(107, 124, 139, .035) 6px, rgba(255, 255, 255, .18) 6px, rgba(255, 255, 255, .18) 12px ) !important;
    color: #627789;
}

.fcx-flow-direction.is-neutral {
    color: #5e7080;
    border-color: #d4dee7;
    background: #eef3f7;
}

.fcx-daily-summary em {
    display: block;
    margin-top: 4px;
    color: #a45300;
    font-size: .72rem;
    font-style: normal;
    font-weight: 900;
}

/* Lectura y selección: fila, columna y número exacto. */
.fcx-interactive-table tbody tr,
.fcx-interactive-table tbody td,
.fcx-interactive-table tbody th,
.fcx-interactive-table .num strong,
.fcx-interactive-table .fcx-amount-link {
    transition: background-color .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}

    .fcx-interactive-table tbody tr:hover > *,
    .fcx-interactive-table tbody td.is-row-hover,
    .fcx-interactive-table tbody th.is-row-hover {
        background-color: #edf7ff !important;
    }

.fcx-interactive-table th.is-column-hover,
.fcx-interactive-table td.is-column-hover {
    background-color: #e0f1ff !important;
}

.fcx-interactive-table td.is-cell-hover,
.fcx-interactive-table th.is-cell-hover {
    position: relative;
    z-index: 2;
    background-color: #fff3dc !important;
    box-shadow: inset 0 0 0 2px #f59f24, 0 6px 16px rgba(245, 159, 36, .12) !important;
}

.fcx-interactive-table tbody tr.is-selected > th,
.fcx-interactive-table tbody tr.is-selected > td {
    background-color: #dcefff !important;
    box-shadow: inset 0 1px 0 #8bc4ee, inset 0 -1px 0 #8bc4ee;
}

.fcx-interactive-table tbody tr.is-selected > :first-child {
    box-shadow: inset 4px 0 0 #0879c9, inset 0 1px 0 #8bc4ee, inset 0 -1px 0 #8bc4ee !important;
}

.fcx-interactive-table .num.is-row-hover strong,
.fcx-interactive-table .num.is-column-hover strong,
.fcx-interactive-table .num.is-cell-hover strong,
.fcx-interactive-table tr.is-selected .num strong,
.fcx-interactive-table .is-column-hover .fcx-amount-link,
.fcx-interactive-table .is-cell-hover .fcx-amount-link {
    color: #003f78 !important;
    font-size: 1.04em;
    font-weight: 950 !important;
    text-shadow: 0 1px 0 #fff;
}

.fcx-interactive-table td.is-cell-hover .num strong,
.fcx-interactive-table td.num.is-cell-hover strong,
.fcx-interactive-table th.num.is-cell-hover strong {
    transform: scale(1.025);
}

/* Modal amplio, ordenado y sin secciones encimadas. */
.fcx-modal {
    padding: 14px !important;
}

.fcx-modal-card {
    width: min(1480px, 97vw) !important;
    height: min(94vh, 980px) !important;
    max-height: 94vh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border-radius: 22px !important;
}

.fcx-modal-head {
    position: relative !important;
    z-index: 12 !important;
    min-height: 88px !important;
    padding: 17px 22px !important;
}

.fcx-modal-content {
    min-height: 0 !important;
    padding: 18px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scroll-padding-top: 16px;
}

.fcx-modal-summary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px !important;
}

.fcx-modal-chart-section,
.fcx-modal-data-section {
    position: relative;
    min-width: 0;
    margin-top: 16px !important;
    padding: 16px !important;
    overflow: hidden !important;
    border: 1px solid #d7e6f2 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(23, 74, 114, .07) !important;
}

.fcx-modal-chart-section {
    min-height: 390px !important;
}

#cashModalChart {
    display: block !important;
    width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    margin-top: 12px !important;
}

.fcx-modal-section-head {
    position: relative !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.fcx-modal-content .fcx-table-wrap {
    width: 100% !important;
    max-height: 520px !important;
    overflow: auto !important;
    border: 1px solid #dce8f1 !important;
    border-radius: 14px !important;
    background: #fff !important;
}

.fcx-modal-content .fcx-detail-table {
    width: 100% !important;
    min-width: 1120px !important;
    table-layout: auto !important;
}

.fcx-modal-content .fcx-group-table {
    min-width: 930px !important;
}

.fcx-modal-content .fcx-movement-table {
    min-width: 1320px !important;
}

.fcx-modal-content .fcx-detail-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 7 !important;
    background: #173b5d !important;
    color: #fff !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.16), 0 2px 8px rgba(17, 54, 87, .13);
}

.fcx-modal-content .fcx-detail-table tbody td {
    vertical-align: top !important;
}

.fcx-movement-card {
    width: min(1160px, 96vw) !important;
    height: min(900px, 94vh) !important;
}

@media (max-width: 900px) {
    .fcx-amount-help,
    .fcx-modal-help {
        align-items: flex-start;
    }

    .fcx-modal {
        padding: 6px !important;
    }

    .fcx-modal-card,
    .fcx-movement-card {
        width: calc(100vw - 12px) !important;
        height: calc(100vh - 12px) !important;
        max-height: calc(100vh - 12px) !important;
        border-radius: 15px !important;
    }

    .fcx-modal-head {
        min-height: 100px !important;
        padding: 14px !important;
    }

    .fcx-modal-content,
    .fcx-movement-detail {
        padding: 11px !important;
    }

    .fcx-modal-summary {
        grid-template-columns: 1fr !important;
    }

    .fcx-modal-section-head {
        align-items: stretch !important;
        flex-direction: column !important;
    }

        .fcx-modal-section-head input,
        .fcx-movement-tools {
            width: 100% !important;
        }

    .fcx-modal-chart-section {
        min-height: 310px !important;
    }

    #cashModalChart {
        height: 245px !important;
        max-height: 245px !important;
    }
}

/* =========================================================
   V5 · CABECERA, FILTROS VISIBLES Y NAVEGACIÓN COHERENTE
   ========================================================= */

/* Recupera una cabecera con identidad visual, sin perder legibilidad. */
.fcx-page .fcx-hero {
    color: #ffffff;
    border: 1px solid rgba(6, 74, 143, .18);
    background: radial-gradient(circle at 88% 22%, rgba(255, 177, 64, .36), transparent 20rem), radial-gradient(circle at 72% 110%, rgba(0, 212, 255, .30), transparent 26rem), linear-gradient(128deg, #07396b 0%, #075d9c 48%, #087fba 76%, #0b8fb0 100%);
    box-shadow: 0 18px 42px rgba(7, 57, 107, .20);
}

    .fcx-page .fcx-hero::before {
        opacity: .42;
    }

    .fcx-page .fcx-hero h1,
    .fcx-page .fcx-hero p,
    .fcx-page .fcx-eyebrow,
    .fcx-page .fcx-period,
    .fcx-page .fcx-period span,
    .fcx-page .fcx-period i {
        color: #ffffff;
    }

    .fcx-page .fcx-hero p {
        color: rgba(255, 255, 255, .88);
    }

.fcx-page .fcx-eyebrow {
    color: #aeeeff;
}

/* El botón de filtros ya no desaparece sobre la cabecera. */
.fcx-page .fcx-hero .fcx-btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, .48);
    background: rgba(255, 255, 255, .13);
    box-shadow: 0 10px 24px rgba(3, 27, 52, .16);
    backdrop-filter: blur(10px);
}

    .fcx-page .fcx-hero .fcx-btn-ghost:hover,
    .fcx-page .fcx-hero .fcx-btn-ghost:focus-visible {
        color: #07396b;
        border-color: #ffffff;
        background: #ffffff;
        box-shadow: 0 14px 30px rgba(3, 27, 52, .22);
    }

.fcx-page .fcx-filter-count {
    color: #07396b;
    background: #ffffff;
}

    .fcx-page .fcx-filter-count.has-filters {
        color: #5b3100;
        background: #ffd58b;
    }

/* Los filtros se muestran al entrar. El usuario puede plegarlos después. */
.fcx-page .fcx-filter-panel {
    margin-top: 16px;
    border: 1px solid #cfe0ef;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 15px 34px rgba(15, 68, 117, .09);
}

    .fcx-page .fcx-filter-panel:not(.is-collapsed) {
        display: block;
        animation: fcxFilterOpen .20s ease-out;
    }

    .fcx-page .fcx-filter-panel.is-collapsed {
        display: none !important;
    }

.fcx-page .fcx-filter-head {
    border-bottom: 1px solid #e2ebf4;
    background: linear-gradient(90deg, #eef7ff, #ffffff 66%, #fff7ed);
}

.fcx-page .fcx-filter-grid input,
.fcx-page .fcx-filter-grid select {
    min-height: 44px;
    color: #17324d;
    border-color: #cbdbea;
    background: #ffffff;
}

    .fcx-page .fcx-filter-grid input:focus,
    .fcx-page .fcx-filter-grid select:focus {
        border-color: #0b78bd;
        box-shadow: 0 0 0 4px rgba(11, 120, 189, .12);
    }

@keyframes fcxFilterOpen {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .fcx-page .fcx-hero {
        background: radial-gradient(circle at 95% 8%, rgba(255, 177, 64, .32), transparent 15rem), linear-gradient(145deg, #07396b, #087fba);
    }
}
