/* =========================================================
   COMPRASAPP — GLOBAL TABLES COMPONENT
   ========================================================= */

/* Card contenedora de tabla */
.table-card,
.card.table-card{
    overflow:hidden!important;
    border-radius:18px!important;
    background:#fff!important;
    border:1px solid rgba(0,0,0,.07)!important;
    box-shadow:0 8px 22px rgba(0,0,0,.045)!important;
}

/* Scroll seguro en móvil/anchos pequeños */
.table-card{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
}

/* Tabla base */
.table-card table,
table.app-table,
table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}

/* Cabeceras */
.table-card thead th,
table.app-table thead th{
    position:relative;
    background:rgba(250,250,248,.96)!important;
    color:#6f6f6f!important;
    font-size:12px!important;
    line-height:1.1!important;
    font-weight:850!important;
    letter-spacing:.04em!important;
    text-transform:uppercase!important;
    padding:12px 14px!important;
    border-bottom:1px solid rgba(0,0,0,.075)!important;
    white-space:nowrap;
}

/* Celdas */
.table-card tbody td,
table.app-table tbody td{
    padding:13px 14px!important;
    border-bottom:1px solid rgba(0,0,0,.055)!important;
    color:#171717!important;
    font-size:14px!important;
    line-height:1.25!important;
    vertical-align:middle!important;
}

/* Última fila */
.table-card tbody tr:last-child td,
table.app-table tbody tr:last-child td{
    border-bottom:0!important;
}

/* Hover tipo Square */
.table-card tbody tr,
table.app-table tbody tr{
    transition:background .14s ease;
}

.table-card tbody tr:hover,
table.app-table tbody tr:hover{
    background:rgba(0,0,0,.018)!important;
}

/* Links dentro de tabla */
.table-card td a,
table.app-table td a{
    color:#1b1b1b!important;
    font-weight:800!important;
    text-decoration:none!important;
}

.table-card td a:hover,
table.app-table td a:hover{
    text-decoration:underline!important;
    text-underline-offset:3px;
}

/* Acciones dentro de tabla */
.table-card .actions,
table.app-table .actions,
.table-actions{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    flex-wrap:wrap!important;
}

.table-card .actions form,
table.app-table .actions form,
.table-actions form{
    margin:0!important;
}

/* Botones en tabla: más densos */
.table-card .actions .button,
.table-card .actions button,
table.app-table .actions .button,
table.app-table .actions button,
.table-actions .button,
.table-actions button{
    min-height:36px!important;
    padding:0 12px!important;
    border-radius:12px!important;
    font-size:13px!important;
    font-weight:800!important;
    white-space:nowrap!important;
}

/* Celda vacía */
.table-empty,
.table-card td[colspan]{
    color:#777!important;
    font-weight:750!important;
    text-align:center!important;
    padding:24px 16px!important;
}

/* Paginación */
.table-card + nav,
.table-pagination,
.pagination{
    margin-top:16px!important;
}

/* Variante compacta futura */
.table-compact thead th{
    padding:9px 11px!important;
    font-size:11px!important;
}

.table-compact tbody td{
    padding:10px 11px!important;
    font-size:13px!important;
}

/* Responsive defensivo */
@media(max-width:820px){

    .table-card,
    .card.table-card{
        border-radius:18px!important;
    }

    .table-card thead th,
    table.app-table thead th{
        font-size:11px!important;
        padding:10px 12px!important;
    }

    .table-card tbody td,
    table.app-table tbody td{
        font-size:13px!important;
        padding:11px 12px!important;
    }

    .table-card .actions,
    table.app-table .actions,
    .table-actions{
        gap:7px!important;
    }

    .table-card .actions .button,
    .table-card .actions button,
    table.app-table .actions .button,
    table.app-table .actions button,
    .table-actions .button,
    .table-actions button{
        min-height:34px!important;
        padding:0 10px!important;
        font-size:12.5px!important;
    }
}

/* SQUARE_PHASE3_TABLES_NEUTRALIZATION_START */
table,
.table,
.table-card,
.table-wrapper,
.table-responsive{
    box-shadow:none;
}
/* SQUARE_PHASE3_TABLES_NEUTRALIZATION_END */
