/* ==========================================
   TABLAS GENERALES CRM
========================================== */

.table {
    width: 100%;
    margin-bottom: 0;
    font-size: var(--crm-table-font-size);
    color: var(--crm-text);
    table-layout: fixed;
}

.table thead th {
    background-color: var(--crm-surface-soft);
    font-weight: 600;
    font-size: var(--crm-table-head-font-size);
    color: var(--crm-text-strong);
    border-bottom: 1px solid var(--crm-border-soft);
    vertical-align: middle;
    white-space: nowrap;
}

.table td,
.table th {
    padding: var(--crm-table-cell-padding-y) var(--crm-table-cell-padding-x);
    vertical-align: middle;
    border-top: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================
   LEADS
========================================== */

.table-leads td,
.table-leads th,
.table-leads strong,
.table-leads .badge {
    font-size: 12px !important;
}

.table-leads tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.table-leads tbody tr:nth-child(even) {
    background-color: #f7f9fc;
}

.table-leads tbody tr {
    border-bottom: 1px solid #edf1f5;
    transition: background-color 0.15s ease-in-out;
}

.table-leads tbody tr:hover {
    background-color: #eef3f8 !important;
    cursor: pointer;
}

.table-leads td:nth-child(5),
.table-leads td:nth-child(6),
.table-leads td:nth-child(7) {
    white-space: normal;
    word-break: break-word;
}

.lead-note-preview,
.table-leads .border-top {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lead-tags-cell {
    text-align: left;
}

.lead-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
    min-height: 100%;
}

.lead-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.lead-actions .btn {
    width: var(--crm-action-size);
    height: var(--crm-action-size);
    min-width: var(--crm-action-size);
    padding: 0 !important;
    line-height: 1;
    border-radius: var(--crm-action-radius) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lead-actions .btn i {
    font-size: 12px;
}

/* ==========================================
   FILTROS DE TABLA
========================================== */

.table-filter-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.table-filter-btn:hover {
    color: var(--crm-primary);
}

.modal-filter-list {
    max-height: 420px;
    overflow-y: auto;
}

.modal-filter-list .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-filter-list .form-check-label {
    cursor: pointer;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 992px) {
    .table-leads {
        min-width: 1000px;
    }

    .table-leads td {
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .table,
    .table td,
    .table th,
    .table thead th {
        font-size: 12px !important;
    }

    .table-leads td,
    .table-leads th {
        white-space: nowrap;
    }
}