﻿.e-content,
.e-content .e-item,
.e-content .e-item > div {
    width: 100%;
}

/* ⚠️ Evitar flex en Syncfusion tabs si no es necesario */
.e-content {
    display: block;
}

.economico-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    grid-template-areas:
        "facturacion estadisticas"
        "compras     otrosdatos";
    gap: 0.5rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.4rem;
    box-sizing: border-box;
}

    .economico-wrapper .alert {
        grid-column: 1 / -1;
    }

/* GRID AREAS */
.group-box.economico {
    grid-area: facturacion;
}

.group-box.estadisticas {
    grid-area: estadisticas;
}

.group-box.compras {
    grid-area: compras;
}

.group-box.otrosdatos {
    grid-area: otrosdatos;
}

/* FIELDSET BASE */
.economico-wrapper fieldset.group-box {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    /* ⚠️ evita cortar dropdowns/focus */
    overflow: visible;
}

    .economico-wrapper fieldset.group-box legend {
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6c757d;
        padding: 0 0.25rem;
    }

    /* GRID INTERNO */
    .economico-wrapper fieldset.group-box .grid {
        display: grid;
        grid-template-columns: minmax(80px, auto) 1fr;
        align-items: center;
        gap: 0.2rem 0.5rem;
        width: 100%;
    }

        .economico-wrapper fieldset.group-box .grid.grid-two-col {
            grid-template-columns: minmax(80px, auto) 1fr minmax(80px, auto) 1fr;
        }

    /* LABEL */
    .economico-wrapper fieldset.group-box .label {
        font-size: 0.75rem;
        color: #495057;
        white-space: nowrap;
    }

    /* INPUT GENERAL */
    .economico-wrapper fieldset.group-box .input {
        width: 100%;
        min-width: 0;
        height: 2rem;
        padding: 0 0.4rem;
        font-size: 0.75rem;
        border: 1px solid #ced4da;
        border-radius: 3px;
        box-sizing: border-box;
        background: #fff;
        color: #212529;
    }

        .economico-wrapper fieldset.group-box .input:focus {
            outline: none;
            border-color: #86b7fe;
            box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
        }

        .economico-wrapper fieldset.group-box .input[readonly] {
            background-color: #f8f9fa;
            color: #6c757d;
        }

    /* CHECKBOX */
    .economico-wrapper fieldset.group-box input[type="checkbox"].input {
        width: auto;
        height: auto;
        padding: 0;
        cursor: pointer;
    }

/* ESTADÍSTICAS */
.economico-wrapper .group-box.estadisticas .input {
    background-color: #f0f4ff;
    color: #3d5a99;
    font-weight: 500;
    text-align: right;
}

/* SELECT */
.economico-wrapper fieldset.group-box select.input {
    cursor: pointer;
}

/* OCULTAR HELP SI NO SE USA */
.economico-wrapper fieldset.group-box .small {
    display: none;
}

/* RESPONSIVE */
@media (max-width: 1280px) {
    .economico-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas:
            "facturacion"
            "estadisticas"
            "compras"
            "otrosdatos";
    }
}
/* Detalles: ocupar toda la fila y mostrar ayudas + textarea usable */
.group-box.detalles {
    grid-column: 1 / -1; /* ocupa todo el ancho del grid */
}

.economico-wrapper .group-box.detalles .small {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

/* Permitir textarea más grande en Detalles */
.economico-wrapper fieldset.group-box textarea.input {
    height: auto;
    min-height: 6rem;
    resize: vertical;
}
