/* ── TableFlow CSS – Bootstrap clásico ──────────────────────── */

.tf-wrapper {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

/* Toolbar */
.tf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tf-perpage-label {
    font-size: 13px;
    color: #6c757d;
}

.tf-perpage-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tf-select-wrap {
    display: flex;
}

.tf-select {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #212529;
}

/* Search */
.tf-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.tf-search-wrap svg {
    position: absolute;
    left: 8px;
    color: #6c757d;
    pointer-events: none;
}

.tf-search {
    font-size: 13px;
    padding: 5px 10px 5px 28px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    outline: none;
}

.tf-search:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Info */
.tf-info {
    font-size: 13px;
    color: #6c757d;
}

.tf-info span {
    font-weight: 600;
    color: #212529;
}

/* Scroll + tabla */
.tf-table-scroll {
    overflow-x: auto;
}

.tf-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tf-wrapper thead th {
    background: #0d6efd;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.tf-wrapper thead th:hover {
    background: #0b5ed7;
}

.tf-wrapper thead th.sort-asc .tf-sort-icon::after {
    content: " ▲";
    font-size: 11px;
}

.tf-wrapper thead th.sort-desc .tf-sort-icon::after {
    content: " ▼";
    font-size: 11px;
}

.tf-sort-icon {
    font-size: 11px;
    opacity: 0.7;
}

.tf-wrapper tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.tf-wrapper tbody tr:hover {
    background: #e9ecef;
}

.tf-wrapper tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

/* Empty */
.tf-empty {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
}

/* Highlight */
mark.tf-highlight {
    background: #fff3cd;
    color: #212529;
    padding: 0 2px;
    border-radius: 2px;
}

/* Pagination */
.tf-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.tf-page-btn {
    font-size: 13px;
    padding: 4px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    color: #0d6efd;
    cursor: pointer;
    transition: background 0.15s;
}

.tf-page-btn:hover:not(:disabled) {
    background: #e9ecef;
}

.tf-page-btn.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.tf-page-btn:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.tf-page-ellipsis {
    font-size: 13px;
    padding: 4px 6px;
    color: #6c757d;
}