/* 
   TABLAS Y VISTAS DE DETALLE
*/

/* Íconos de ordenamiento en GridView */
a.asc:after,
a.desc:after {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    padding-left: 5px;
}

a.asc:after {
    content: "\e151";
}

a.desc:after {
    content: "\e152";
}

.sort-numerical a.asc:after {
    content: "\e153";
}

.sort-numerical a.desc:after {
    content: "\e154";
}

.sort-ordinal a.asc:after {
    content: "\e155";
}

.sort-ordinal a.desc:after {
    content: "\e156";
}

.grid-view th {
    white-space: nowrap;
}

/* Contenedor tipo tarjeta */
.grid-view .table,
.wrap .detail-view {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* Celdas: solo bordes horizontales suaves */
.grid-view .table>thead>tr>th,
.grid-view .table>tbody>tr>td,
.grid-view .table>thead>tr>td,
.wrap .detail-view>tbody>tr>th,
.wrap .detail-view>tbody>tr>td {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #eef1f5;
    padding: 12px 14px;
    vertical-align: middle;
}

/* Encabezados */
.grid-view .table>thead>tr:first-child>th,
.wrap .detail-view>tbody>tr>th {
    background-color: #f0f4f8;
    border-bottom: 2px solid #dce4ec;
}

.grid-view .table>thead>tr>th a {
    color: inherit;
    text-decoration: none;
}

.grid-view .table>thead>tr>th a:hover {
    color: #337ab7;
}

/* Filas y hover */
.grid-view .table>tbody>tr {
    transition: background-color 0.15s ease;
}

.grid-view .table-striped>tbody>tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.grid-view .table-striped>tbody>tr:nth-of-type(even) {
    background-color: #fafbfd;
}

.grid-view .table>tbody>tr:hover>td {
    background-color: #eef5fc;
}

/* Última fila sin borde inferior */
.grid-view .table>tbody>tr:last-child>td,
.wrap .detail-view>tbody>tr:last-child>th,
.wrap .detail-view>tbody>tr:last-child>td {
    border-bottom: none;
}

/* Fila de filtros */
.grid-view .table>thead>tr.filters>td {
    background-color: #f8fafc;
    padding: 8px 10px;
}

.grid-view .filters .form-control {
    height: 34px;
    border-radius: 6px;
    border: 1px solid #cfd8e3;
    box-shadow: none;
}

.grid-view .filters .form-control:focus {
    border-color: #337ab7;
    box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.15);
}


/* Íconos de acciones */
.grid-view tbody td:last-child {
    white-space: nowrap;
    /* evita que un ícono salte de línea */
}

.grid-view tbody td:last-child a {
    display: inline-block;
    text-decoration: none;
    margin-right: 5px;
    /* ajustá este valor para dar más o menos separación */
}

.grid-view tbody td:last-child a:last-child {
    margin-right: 0;
}

/* Resumen y paginación */
.grid-view .summary {
    margin-bottom: 10px;
}

.grid-view .pagination {
    margin: 16px 0;
}

.grid-view .pagination>li>a,
.grid-view .pagination>li>span {
    margin: 0 2px;
    border-radius: 6px;
    border-color: #e2e8f0;
}

/* Vista de detalle */
.wrap .detail-view>tbody>tr>th {
    width: 25%;
}

.wrap .detail-view>tbody>tr>td {
    background-color: #ffffff;
}

@media (max-width: 768px) {

    .grid-view .table>thead>tr>th,
    .grid-view .table>tbody>tr>td,
    .wrap .detail-view>tbody>tr>th,
    .wrap .detail-view>tbody>tr>td {
        padding: 10px 11px;
    }
}