/* ===== FLUENT DATA GRID ===== */

.fdg-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 100%;
}

/* Header con titulo y conteo */
.fdg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(248, 249, 250, 0.85);
    border-bottom: 1px solid #E5E7EB;
}

.fdg-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1F2937;
}

.fdg-title i {
    color: #0078D4;
    font-size: 1rem;
}

.fdg-info {
    font-size: 0.8125rem;
    color: #6B7280;
}

/* Scroll del cuerpo */
.fdg-table-scroll {
    overflow: auto;
    flex: 1;
}

.fdg-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fdg-table-scroll::-webkit-scrollbar-track {
    background: #F3F2F1;
}

.fdg-table-scroll::-webkit-scrollbar-thumb {
    background: #C8C6C4;
    border-radius: 4px;
}

.fdg-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #A19F9D;
}

.fdg-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.875rem;
    color: #1F2937;
}

/* Encabezados sticky */
.fdg-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.fdg-table thead tr:first-child th {
    background: linear-gradient(180deg, #F8F8F8 0%, #F0F0F0 100%);
    padding: 8px 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    user-select: none;
    color: #4B5563;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #E5E7EB;
    transition: background 0.15s ease;
}

.fdg-table thead tr:first-child th:hover {
    background: linear-gradient(180deg, #E8E8E8 0%, #E1DFDD 100%);
}

.fdg-th-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fdg-sort-icon {
    font-size: 0.625rem;
    color: #0078D4;
}

/* Fila de filtros */
.fdg-filter-row th {
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 6px;
    border-bottom: 1px solid #E5E7EB;
    cursor: default;
}

.fdg-col-filter {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #D2D0CE;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: inherit;
    background: #FFFFFF;
    color: #1F2937;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fdg-col-filter::placeholder {
    color: #9CA3AF;
    font-style: italic;
}

.fdg-col-filter:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 1px rgba(0, 120, 212, 0.3);
}

/* Filas */
.fdg-table tbody tr {
    transition: background-color 0.1s ease;
}

.fdg-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.fdg-table tbody tr:hover {
    background: rgba(0, 120, 212, 0.06);
}

.fdg-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #F3F4F6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.fdg-no-results,
.fdg-empty {
    text-align: center;
    padding: 24px;
    color: #9CA3AF;
    font-style: italic;
    font-size: 0.875rem;
}

/* Paginacion */
.fdg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid #E5E7EB;
    background: rgba(248, 249, 250, 0.85);
}

.fdg-page-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #D2D0CE;
    border-radius: 6px;
    background: #FFFFFF;
    color: #4B5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s ease;
    padding: 0;
}

.fdg-page-btn:hover:not(:disabled) {
    background: #F3F2F1;
    border-color: #0078D4;
    color: #0078D4;
}

.fdg-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fdg-page-info {
    font-size: 0.8125rem;
    color: #4B5563;
    padding: 0 8px;
    user-select: none;
}
