/* === Contenedor === */
.afiliados-search-container {
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* === Filtros (checkboxes estilo pill) === */
.afiliados-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.afiliados-filters label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    background: #f9fafb;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.afiliados-filters label:hover {
    background: #e8f5e9;
    border-color: #009f43;
}

.afiliados-filters input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #009f43; /* Verde moderno */
}

/* === Input búsqueda === */
#afiliados-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#afiliados-search-input:focus {
    border-color: #009f43;
    box-shadow: 0 0 5px rgba(0, 159, 67, 0.3);
    outline: none;
}

/* === Tabla === */
.afiliados-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Encabezado */
.afiliados-table thead {
    background: #009f4378;
}

.afiliados-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #444;
    border-bottom: 2px solid #eee;
    cursor: pointer;
}

/* Filas */
.afiliados-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s ease;
}

.afiliados-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.afiliados-table tbody tr:hover {
    background: #f0f0ff;
}

/* Celdas */
.afiliados-table td {
    padding: 12px;
    font-size: 14px;
    color: #333;
}

/* === Footer de tabla (contador de filas) === */
.afiliados-table-footer {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    text-align: right;
}

/* Responsive */
@media (max-width: 700px) {
    .afiliados-filters {
        flex-direction: column;
        gap: 10px;
    }

    .afiliados-table, 
    .afiliados-table thead, 
    .afiliados-table tbody, 
    .afiliados-table th, 
    .afiliados-table td, 
    .afiliados-table tr {
        display: block;
        width: 100%;
    }

    .afiliados-table thead {
        display: none;
    }

    .afiliados-table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        padding: 10px;
    }

    .afiliados-table td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 8px 5px;
        font-size: 14px;
    }

    .afiliados-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #4b5563;
    }
}
