﻿.quickgrid-container {
    background: white !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
    max-width: 100%;
    width: 100%;
    min-height: calc(100vh - 220px);
}

.quickgrid {
    width: 100% !important;
}

    /* encabezado */
    .quickgrid thead th {
        background: #f8f9fa !important;
        font-weight: 600 !important;
    }

    /* zebra */
    .quickgrid tbody tr:nth-child(even) {
        background: #f9f9f9 !important;
    }

    /* hover */
    .quickgrid tbody tr:hover {
        background: #eef5ff !important;
    }

/* buscadores (global + columnas) */
.quickgrid-search input,
.quickgrid-global-search input {
    padding: .5rem !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
}

/* filtros de columnas */
.quickgrid-search input {
    width: 220px !important;
}


/* Caja con registros por pagina, filtro, y columnas dinamicas */

/* ambos bloques alineados igual */
.quickgrid-page-size,
.quickgrid-global-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
}

/* inputs y selects IGUAL ALTURA REAL */
.quickgrid-top-bar select,
.quickgrid-top-bar input {
    height: 34px !important;
    padding: 4px 10px !important;
    font-size: 0.85rem;
    line-height: 1.2;
    box-sizing: border-box;
}

/* elimina el desajuste del search */
.quickgrid-global-search input {
    transform: none !important;
    margin: 0;
}

/* dropdowns */
::deep .col-options select {
    width: 150px;
    padding: .4rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Ajustes Filtros moneda y Estados*/
.quickgrid-filtro-estados label {
    display: block;
    margin-bottom: .35rem;
    white-space: nowrap;
}

.quickgrid-filtro-estados input {
    margin-right: .4rem;
}

/* Ajustes campo registros por pagina*/
.quickgrid-page-size {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}
    .quickgrid-page-size span {
        font-weight: 500;
        white-space: nowrap;
    }

    .quickgrid-page-size select {
        width: 70px;
        padding: .25rem .4rem;
        border: 1px solid #ccc;
        border-radius: 6px;
    }

/* alineación reutilizable */
td.col-justify-right,
th.col-justify-right,
td.col-justify-end,
th.col-justify-end {
    text-align: right !important;
    padding-right: 1rem !important;
}

/* botón lupa */
.col-options-button {
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor' stroke-width='2'>\
<path stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/>\
</svg>") !important;
    background-size: 16px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* encabezado listado */
.listado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #fff;
    margin-bottom: 1rem;
    min-height: 80px;
    flex-wrap: wrap;
}

.listado-header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
}

.listado-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

/* loading */
.listado-loading {
    width: 100%;
    position: relative;
}

.listado-loading-text {
    position: absolute;
    top: -22px;
    right: 0;
    font-size: .85rem;
}

.listado-loading .progress {
    width: 100%;
}

/* responsive */
@media (max-width: 768px) {
    .listado-header {
        flex-direction: column;
        align-items: stretch;
    }

    .listado-header-right {
        width: 100%;
    }

    .listado-loading-text {
        position: static;
        display: block;
        margin-bottom: .25rem;
        text-align: left;
    }

    .listado-header-right button {
        width: 100%;
    }

    .quickgrid-global-search {
        width: 100%;
        max-width: 100%;
    }
}

/* anchos columnas */
.col-tomador {
    width: 250px;
    min-width: 250px;
    white-space: nowrap;
}

.col-poliza {
    width: 180px;
    min-width: 180px;
    white-space: nowrap;
}

.col-agente {
    width: 250px;
    min-width: 250px;
    white-space: nowrap;
}

.col-monto,
.col-prima {
    width: 1%;
    white-space: nowrap;
}

.col-fecha {
    width: 1%;
    white-space: nowrap;
    padding-left: .25rem !important;
    padding-right: .25rem !important;
}

/*Ajusts para columnas dinamicas*/
.quickgrid-top-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* bloque izquierdo fijo */
.quickgrid-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* CONTENEDOR COLUMNAS DINAMICAS */
.quickgrid-column-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1; /* ocupa el espacio restante */
    width: 100%;
}

    /* compacto otra vez */
    .quickgrid-column-toggle label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 2px 8px;
        border: 1px solid #d0d7de;
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        font-size: 0.78rem;
        line-height: 1;
        height: 28px;
        transition: all 0.15s ease-in-out;
        user-select: none;
    }

        /* hover */
        .quickgrid-column-toggle label:hover {
            background: #f3f6fa;
            border-color: #b6c2cf;
        }

    /* checkbox compacto */
    .quickgrid-column-toggle input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin: 0;
        cursor: pointer;
    }

/* NO romper los filtros dentro de ColumnOptions */
.quickgrid thead th {
    overflow: visible !important;
    white-space: normal !important;
}

/* el contenido del filtro no debe cortarse */
.quickgrid th .quickgrid-search,
.quickgrid th input,
.quickgrid th label {
    overflow: visible !important;
}

/* evita que el header "corte" el contenido del filtro */
.quickgrid thead th {
    vertical-align: bottom;
}

/* SOLO filas de datos, NO headers */
.quickgrid-table tbody td {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: max-content;
}

    .quickgrid-container .quickgrid-table {
        display: block;
        overflow-x: auto;
    }

/*.card.p-3 {
    min-height: calc(100vh - 160px);
}*/