
/*NUMERACION DE TITULOS Y PARRAFOS*/

body{counter-reset: capitulo 12 seccion;}  /*inicia la numeracion del tema*/
/* version: 20260331a */
/* Elementos solo visibles al imprimir — ocultos en pantalla */
.print_cabecera { display: none; }

/********************* CONFIGURACION DE LA IMPRESION DEL TEMA ******************************/

@media print {

    @page {
        size: 8.27in 11.69in;
        margin: 0.6cm 2cm 2cm 2cm;

        @top-left   { content: ""; }
        @top-center { content: ""; }
        @top-right  { content: ""; }

        @bottom-center {
            content: "webadministrativa.es";
            font-size: 11pt;
            color: #444;
        }
        @bottom-right {
            content: "Pagina " counter(page) " de " counter(pages);
            font-size: 8pt;
            color: #666;
        }
    }

    .print_cabecera { display: block; margin-top: 0; margin-bottom: 10px; }
    .print_seccion { font-size: 13pt; font-weight: normal; color: #555; text-transform: uppercase; letter-spacing: 1px; text-align: center; }
    .print_titulo_tema { font-size: 18pt; font-weight: bold; color: black; margin-top: 4px; text-align: center; }

    #botonsubiralmenu  { display: none; }
    header             { display: none; }
    footer             { display: none; }
    #modal_overlay     { display: none; }
    .contenedor        { display: none; }
    #boton_ts          { padding-top: 0; }
    .ts_1_wrapper      { display: none; }
    .ts_1              { display: none !important; }

    .boton_ts h2 { visibility: hidden; height: 0; margin: 0; padding: 0; overflow: hidden; }

    h3 { page-break-before: auto; }
    p, li, h3, h4, h5 { page-break-inside: avoid; }
    h3, h4 { page-break-after: avoid; }

    .p { widows: 3; orphans: 3; }
    .lih3, .lih3cp, .lih3cpcl, .lih3cpclcp, .lih3cpclcpcl { widows: 3; orphans: 3; }
    .lih4, .lih4cp, .lih4cpcl, .lih4cpclcp                { widows: 3; orphans: 3; }
    .lih5, .lih5cp                                         { widows: 3; orphans: 3; }
    .img, .container, .ph3ej { break-inside: avoid-page; }
}

/********************* FIN IMPRESION DEL TEMA ******************************/

/*************** INICIO TRANSPARENCIAS — MODAL *********************/

#modal_overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
#modal_overlay.overlay_visible { opacity: 1; pointer-events: all; }

.contenedor { position: fixed; z-index: 1000; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.85); width: 96%; max-width: 1500px; height: 54vw; max-height: 90vh; opacity: 0; pointer-events: none; border-radius: 15px; overflow: hidden; box-shadow: 0px 16px 48px 0px rgba(0,0,0,0.8); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease; }
.contenedor_visible { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: all; }

.carruseles { height: 100%; width: 700%; display: flex; }
.transparencias { width: calc(100% / 7); height: 100%; }
.transparencias img { width: 100%; height: 100%; object-fit: contain; border-radius: 15px; padding: 2px; }

.btn-left { display: flex; position: absolute; top: 50%; left: 1%; background-color: transparent; border-radius: 50%; padding: 18px; cursor: pointer; transform: translate(0,-50%); transition: .5s ease; user-select: none; z-index: 1; background-repeat: no-repeat; background-position: center; background-size: 100%; -webkit-user-drag: none; background-image: url(../Imagenes/btn_left_azul.png); }
.btn-right { display: flex; position: absolute; top: 50%; right: 1%; background-color: transparent; border-radius: 50%; padding: 18px; cursor: pointer; transform: translate(0,-50%); transition: .5s ease; user-select: none; z-index: 1; background-repeat: no-repeat; background-position: center; background-size: 100%; -webkit-user-drag: none; background-image: url(../Imagenes/btn_right_azul.png); }
.btn-right:hover { background-image: url(../Imagenes/btn_right_seleccionado.png); }
.btn-left:hover  { background-image: url(../Imagenes/btn_left_seleccionado.png); }

.boton_ts { display: flex; align-items: center; }
.boton_ts_visible { padding-top: 50%; transition: .2s all linear; }

.ts_1_wrapper { display: none; } /* SIN DIAPOSITIVAS — cambiar a inline-block cuando esten listas */
.ts_1 { cursor: pointer; margin-left: 16px; -webkit-user-drag: none; height: 31px; width: 69px; margin-top: 10px; transition: transform 0.2s ease, filter 0.2s ease; }
.ts_1:hover { background-repeat: no-repeat; background-position: center; background-size: 69px; -webkit-user-drag: none; background-image: url(../Imagenes/botonproyectorwing2.png); transform: scale(1.07) translateY(-3px); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }

/****************** FIN TRANSPARENCIAS ********************/


.ulh3{padding-left: 19px;}
.lih4{padding-left: 19px;}

.cuenta-ref {
    color: #1abc9c;
    font-weight: bold;
    font-size: 0.88em;
    margin-left: 5px;
    white-space: nowrap;
}

/* ================= TABLAS DE BALANCE (heredadas de t12) ================= */

.balance-table {
    border-collapse: collapse;
    margin: 20px auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.95rem;
    min-width: 320px;
    max-width: 700px;
    width: 80%;
    border: 2px solid #222;
    table-layout: fixed;
}

.balance-table thead tr:first-child th {
    background-color: #d4e6f1;
    color: #1a252f;
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 2px solid #222;
}

.balance-table thead tr:nth-child(2) th {
    background-color: #eaf2f8;
    color: #2c3e50;
    padding: 4px 14px;
    text-align: center;
    font-weight: normal;
    font-size: 0.82rem;
    font-style: italic;
    border: 1px solid #999;
    border-bottom: 2px solid #222;
}

/* Borde grueso vertical entre bloque ACTIVO y PASIVO */
/* Por defecto: tablas de 6 columnas (Cod/Titulo/Importe | Cod/Titulo/Importe) — borde en columna 3 */
.balance-table thead tr:first-child th:first-child {
    border-right: 2px solid #222;
}
.balance-table thead tr:nth-child(2) th:nth-child(3) {
    border-right: 2px solid #222;
}
.balance-table tbody td:nth-child(3) {
    border-right: 2px solid #222;
}

/* Variante 4 columnas (Titulo/Importe | Titulo/Importe) — borde en columna 2 */
.balance-table--4col thead tr:nth-child(2) th:nth-child(2) {
    border-right: 2px solid #222;
}
.balance-table--4col thead tr:nth-child(2) th:nth-child(3) {
    border-right: 1px solid #999;
}
.balance-table--4col tbody td:nth-child(2) {
    border-right: 2px solid #222;
}
.balance-table--4col tbody td:nth-child(3) {
    border-right: 1px solid #999;
}

.balance-table tbody td {
    padding: 5px 14px;
    border: 1px solid #999;
    background-color: #fff;
    vertical-align: middle;
}

.balance-table tbody td.importe {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.balance-table .fila-total td {
    font-weight: bold;
    border-top: 2px solid #222;
    border-left: none;
    border-right: none;
    background-color: #eaf2f8;
}

.balance-table .fila-total td:first-child {
    border-left: 1px solid #ccc;
}

.balance-table .fila-total td:last-child {
    border-right: 1px solid #ccc;
}

/* Variante formal (dentro de balance-card) */
.balance-card {
    margin: 30px auto;
    max-width: 750px;
    width: 85%;
    background: #fff;
    border: 2px solid #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.balance-card-titulo {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    text-align: center;
    padding: 14px 20px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-bottom: 3px solid #1abc9c;
}

.balance-table--formal {
    border: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}

.balance-table--formal thead tr:first-child th {
    background-color: #eaf2f8;
    color: #2c3e50;
    border-top: none;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    letter-spacing: 2px;
    padding: 12px 14px;
}

.balance-table--formal thead tr:nth-child(2) th {
    background-color: #f7fafc;
    color: #5a6c7d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.8rem;
    font-style: italic;
    letter-spacing: 0.5px;
}

.balance-table--formal tbody td {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-color: #dce4ec;
}

.balance-table--formal .fila-total td {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    border-top: 3px double #2c3e50;
    border-bottom: none;
    background-color: #f0f4f8;
    padding: 10px 16px;
}

/* Anotaciones con flechas debajo de cada tabla */
.balance-anotacion {
    margin: 10px auto 25px auto;
    max-width: 700px;
    width: 80%;
    padding: 12px 20px;
    background-color: #eaf2f8;
    border-left: 5px solid #1abc9c;
    border-radius: 0 8px 8px 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 2;
    text-align: center;
}

.balance-anotacion p {
    margin: 2px 0;
}

.balance-anotacion .balance-explicacion {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 6px;
}

.flecha-up { color: #27ae60; font-weight: bold; }
.flecha-down { color: #e74c3c; font-weight: bold; }

i.val-up { color: #27ae60; }
i.val-down { color: #e74c3c; }

.balance-formula {
    text-align: center;
    font-size: 1.1rem;
    padding: 10px 20px;
    margin: 15px auto;
    max-width: 600px;
    border: 2px solid #2c3e50;
    background-color: #fff;
    border-radius: 6px;
}

/* ================= FIN TABLAS DE BALANCE ================= */

/* ================= DESGLOSE CÓDIGO PGC ================= */

.pgc-desglose {
    margin: 10px auto 25px auto;
    max-width: 600px;
    width: 75%;
    padding: 12px 20px;
    background-color: #eaf2f8;
    border-left: 5px solid #1abc9c;
    border-radius: 0 8px 8px 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 1.05rem;
}

.pgc-desglose-titulo {
    font-weight: bold;
    font-family: monospace;
    margin: 0 0 8px 0;
}

.pgc-desglose-fila {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 3px 0;
    line-height: 1.7;
    padding-left: 2ch;
}

.pgc-desglose-cod {
    font-weight: bold;
    min-width: 6ch;
    text-align: left;
    font-family: monospace;
    letter-spacing: 1ch;
    flex-shrink: 0;
}

/* ================= TABLA PGC (7 grupos) ================= */

.tabla-pgc {
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.88rem;
    width: 100%;
    border: 2px solid #bbb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    table-layout: fixed;
}

.tabla-pgc th {
    background-color: #1abc9c;
    color: #fff;
    padding: 12px 6px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: 2px solid #17a589;
    border-right: 1px solid #17a589;
}

.tabla-pgc th:last-child {
    border-right: none;
}

.tabla-pgc td {
    padding: 10px 8px;
    border-right: 1px solid #ddd;
    background-color: #fff;
    vertical-align: top;
    text-align: center;
    font-weight: bold;
    font-size: 0.82rem;
}

.tabla-pgc td:last-child {
    border-right: none;
}

.tabla-pgc .pgc-desc {
    display: block;
    font-weight: normal;
    font-size: 0.76rem;
    color: #555;
    margin-top: 5px;
}

/* ================= TABLA CUENTAS (Num, Descripcion, Definicion) ================= */

.tabla-cuentas-bloque {
    margin: 0 auto 18px auto;
    max-width: 900px;
    width: 95%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #bbb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.tabla-cuentas {
    border-collapse: collapse;
    width: 100%;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.88rem;
}

.tabla-cuentas th {
    background-color: #2c3e50;
    color: #fff;
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #34495e;
    letter-spacing: 0.04em;
}

.tabla-cuentas td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    vertical-align: middle;
    line-height: 1.45;
}

.tabla-cuentas td:first-child {
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    vertical-align: middle;
}

.tabla-cuentas td:nth-child(2) {
    white-space: nowrap;
}

.tabla-cuentas tbody .grupo-header td {
    background-color: #1abc9c;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    letter-spacing: 0.05em;
    border: 1px solid #17a589;
    padding: 7px 14px;
}

.tabla-cuentas tbody .subgrupo-header td {
    background-color: #eaf2f8;
    color: #2c3e50;
    font-weight: bold;
    font-size: 0.78rem;
    text-align: center;
    border: 1px solid #d0e4f0;
    padding: 4px 12px;
    letter-spacing: 0.03em;
}

/* ================= DIAGRAMAS DE FLUJO (cajas + flechas CSS) ================= */

.diagrama-flujo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 25px auto;
    max-width: 900px;
    width: 95%;
}

.diagrama-caja {
    border: 2px solid #2c3e50;
    border-radius: 10px;
    padding: 15px 18px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 280px;
    min-width: 200px;
    flex: 1;
}

.diagrama-caja-titulo {
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    color: #2c3e50;
    padding: 8px 12px;
    background-color: #d4e6f1;
    border-radius: 6px;
    margin-bottom: 10px;
}

.diagrama-caja p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 6px 0;
    text-align: justify;
}

.diagrama-caja p.diagrama-caja-etiqueta {
    text-align: center;
    font-style: italic;
    font-size: 0.82rem;
    color: #666;
    margin-top: 8px;
}

.diagrama-centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    max-width: 220px;
    flex: 0.7;
}

.diagrama-centro-caja {
    border: 2px solid #1abc9c;
    border-radius: 10px;
    padding: 12px 16px;
    background-color: #eaf2f8;
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
    color: #2c3e50;
}

.diagrama-centro p {
    font-size: 0.82rem;
    font-weight: normal;
    margin: 4px 0;
    font-style: italic;
}

/* Flechas horizontales entre cajas */
.diagrama-flecha {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2c3e50;
    min-width: 40px;
    flex: 0;
}

.diagrama-flecha-texto {
    font-size: 0.75rem;
    text-align: center;
    max-width: 160px;
    margin: 0 auto;
    font-style: italic;
    color: #555;
}

/* Layout de dos columnas para diagramas */
.diagrama-columnas {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 25px auto;
    max-width: 900px;
    width: 95%;
    flex-wrap: wrap;
}

.diagrama-columna {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
}

.diagrama-columna-titulo {
    text-align: center;
    font-weight: bold;
    font-size: 1.05rem;
    color: #2c3e50;
    text-decoration: underline;
    margin-bottom: 15px;
}

/* Tabla de prestamos/creditos */
.tabla-prestamos {
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    margin: 20px auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.90rem;
    max-width: 600px;
    width: 80%;
}

/* Celda vacía esquina: limpia */
.tabla-prestamos th:empty {
    background: transparent;
    border: none;
}

/* Cabeceras de datos */
.tabla-prestamos th:not(:empty) {
    background-color: #2c3e50;
    color: #fff;
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.03em;
    border: 1px solid #2c3e50;
    border-left: none;
}

.tabla-prestamos thead th:nth-child(2) {
    border-left: 1px solid #2c3e50;
    border-radius: 8px 0 0 0;
}

.tabla-prestamos thead th:last-child {
    border-radius: 0 8px 0 0;
}

.tabla-prestamos tbody tr:first-child td[rowspan] {
    border-radius: 8px 0 0 0;
}

.tabla-prestamos tbody tr:nth-child(3) td[rowspan] {
    border-radius: 0 0 0 8px;
}

.tabla-prestamos tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* Celdas de datos */
.tabla-prestamos td {
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid #bbb;
    border-right: 1px solid #bbb;
    background-color: #fff;
    text-align: center;
}

/* Primera columna (Prestamo/Credito) — solo celdas con rowspan */
.tabla-prestamos td[rowspan] {
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
    color: #fff;
    background-color: #4a6274;
    border-top: 1px solid #4a6274;
    border-left: 1px solid #4a6274;
    border-right: 1px solid #bbb;
}

/* Primera fila de cada grupo (Bancario): fondo claro */
.tabla-prestamos tbody tr:first-child td:not([rowspan]),
.tabla-prestamos tbody tr:nth-child(3) td:not([rowspan]) {
    background-color: #eaf0f4;
}

/* Última columna */
.tabla-prestamos td:last-child {
    border-right: 1px solid #bbb;
}

/* Última fila */
.tabla-prestamos tbody tr:last-child td {
    border-bottom: 1px solid #bbb;
}

/* Tabla corto/largo plazo */
.tabla-plazos {
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    table-layout: fixed;
    margin: 20px auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.88rem;
    max-width: 750px;
    width: 95%;
}

.tabla-plazos th {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 10px 14px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #2c3e50;
}

.tabla-plazos th:first-child {
    width: 90px;
    background: transparent;
    border: none;
}

.tabla-plazos thead th:nth-child(2) { border-radius: 8px 0 0 0; }
.tabla-plazos thead th:last-child  { border-radius: 0 8px 0 0; }

.tabla-plazos td {
    padding: 6px 12px;
    border-bottom: 1px solid #bbb;
    border-right: 1px solid #bbb;
    background-color: #fff;
    vertical-align: middle;
    font-size: 0.86rem;
}

.tabla-plazos td[rowspan] {
    width: 90px;
    text-align: left;
    font-weight: bold;
    background-color: #eaf2f8;
    border-left: 1px solid #bbb;
    border-top: 1px solid #bbb;
}

.tabla-plazos tbody tr:last-child td[rowspan] { border-radius: 0 0 0 8px; }
.tabla-plazos tbody tr:last-child td:last-child { border-radius: 0 0 8px 0; }

/* ================= FIN DIAGRAMAS ================= */


.objeto_oculto{display: none;}
.objeto_visible {display: block;}

@media (max-width: 768px) {
    .diagrama-flujo {
        flex-direction: column;
        align-items: center;
    }
    .diagrama-caja {
        max-width: 100%;
        width: 100%;
    }
    .diagrama-flecha {
        transform: rotate(90deg);
    }
    .diagrama-columnas {
        flex-direction: column;
        align-items: center;
    }
    .diagrama-columna {
        max-width: 100%;
        width: 100%;
    }
}

/* ================= TABLA OPERACIONES HABITUALES ================= */

.tabla-op-habituales {
    border-collapse: collapse;
    margin: 20px auto;
    width: auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 0.92rem;
}

.tabla-op-habituales td {
    padding: 10px 18px;
    border: 1px solid #bbb;
    vertical-align: middle;
    background-color: #fff;
}

.tabla-op-habituales td[rowspan] {
    font-weight: bold;
    text-align: center;
    background-color: #eaf2f8;
    border-right: 2px solid #2c3e50;
    white-space: nowrap;
}

.tabla-op-habituales td.col-desc {
    font-weight: bold;
    background-color: #f7fafc;
    border-right: 1px solid #bbb;
}

/* ================= FIN TABLA OPERACIONES HABITUALES ================= */

/* ================= DIAGRAMA GRID 3×5 ================= */

.diagrama-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 16px;
    margin: 25px auto;
    max-width: 900px;
    width: 95%;
    align-items: start;
}

.diagrama-grid .diagrama-caja {
    max-width: none;
    min-width: 0;
    flex: none;
    width: 100%;
}

.diagrama-grid .diagrama-centro-caja {
    max-width: none;
    min-width: 0;
    width: 100%;
}

.diagrama-texto {
    border: 1px dashed #888;
    padding: 8px 10px;
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
    background: #fff;
    align-self: center;
}

.diagrama-texto--flechas {
    border: none;
    font-size: 1.6rem;
    color: #2c3e50;
    letter-spacing: 12px;
    background: transparent;
}

.flecha-curva {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.flecha-curva__linea {
    position: relative;
}

/* Curva: baja por la izquierda y gira a la derecha → arrowhead hacia la derecha */
.flecha-curva__linea--abajo-der {
    width: 50px;
    height: 50px;
    border-left: 3px solid #444;
    border-bottom: 3px solid #444;
    border-radius: 0 0 0 20px;
}

.flecha-curva__linea--abajo-der::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -13px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #444;
}

/* baja por la derecha y gira a la izquierda */
.flecha-curva__linea--abajo-izq {
    width: 50px;
    height: 50px;
    border-right: 3px solid #444;
    border-bottom: 3px solid #444;
    border-radius: 0 0 20px 0;
}
.flecha-curva__linea--abajo-izq::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -13px;
    width: 0; height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 13px solid #444;
}

/* sube por la izquierda y gira a la derecha */
.flecha-curva__linea--arriba-der {
    width: 50px;
    height: 50px;
    border-left: 3px solid #444;
    border-top: 3px solid #444;
    border-radius: 20px 0 0 0;
}
.flecha-curva__linea--arriba-der::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -13px;
    width: 0; height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #444;
}

/* sube por la derecha y gira a la izquierda */
.flecha-curva__linea--arriba-izq {
    width: 50px;
    height: 50px;
    border-right: 3px solid #444;
    border-top: 3px solid #444;
    border-radius: 0 20px 0 0;
}
.flecha-curva__linea--arriba-izq::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -13px;
    width: 0; height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 13px solid #444;
}

/* viene por la izquierda, gira y sube por lado izquierdo — arrowhead arriba-izq */
.flecha-curva__linea--izq-arriba {
    width: 50px;
    height: 50px;
    border-left: 3px solid #444;
    border-bottom: 3px solid #444;
    border-radius: 0 0 0 20px;
}
.flecha-curva__linea--izq-arriba::after {
    content: '';
    position: absolute;
    top: -13px;
    left: -10px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 13px solid #444;
}

/* viene desde la derecha (abajo-der), sube por lado derecho — arrowhead arriba-der */
.flecha-curva__linea--der-arriba {
    width: 50px;
    height: 50px;
    border-right: 3px solid #444;
    border-bottom: 3px solid #444;
    border-radius: 0 0 20px 0;
}
.flecha-curva__linea--der-arriba::after {
    content: '';
    position: absolute;
    top: -13px;
    right: -10px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 13px solid #444;
}

/* entra desde la izquierda (top), gira y baja por la derecha — arrowhead abajo */
.flecha-curva__linea--izq-abajo {
    width: 50px;
    height: 50px;
    border-top: 3px solid #444;
    border-right: 3px solid #444;
    border-radius: 0 20px 0 0;
}
.flecha-curva__linea--izq-abajo::after {
    content: '';
    position: absolute;
    bottom: -13px;
    right: -10px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 13px solid #444;
}

/* ================= FIN DIAGRAMA GRID ================= */

/* ================= DIAGRAMA DEUDAS / CRÉDITOS (5 cols) ================= */

.diagrama-nohabituales {
    display: grid;
    grid-template-columns: 1fr 42px 72px 42px 1fr;
    gap: 12px 6px;
    margin: 25px auto;
    max-width: 880px;
    width: 95%;
    align-items: center;
}

.diagrama-nohabituales__header {
    grid-row: 1;
    text-align: center;
    font-weight: bold;
    text-decoration: underline;
    font-size: 1rem;
    padding: 4px 0 8px;
}

.diagrama-nohabituales__centro {
    align-self: stretch;
    background: #fff;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;
    padding: 10px 6px;
}

.diagrama-nohabituales__flecha {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #444;
    font-weight: bold;
}

.diagrama-nohabituales .diagrama-caja {
    max-width: none;
    width: 100%;
    background-color: #eaf4fb;
}

@media (max-width: 500px) {
    .tabla-cuentas {
        font-size: 0.78rem;
    }
    .tabla-pgc {
        font-size: 0.82rem;
    }
}
