.laf-insights-widget--table {
    padding: var(--laf-space-5);
}

.laf-insights-widget--table .laf-insights-widget__header {
    align-items: center;
}

.laf-table__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.laf-table__search {
    min-width: 220px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--laf-color-border);
    border-radius: var(--laf-radius-pill);
    background: var(--laf-color-surface);
    color: var(--laf-color-text);
    font: inherit;
}

.laf-table__search:focus {
    outline: none;
    border-color: var(--laf-color-border-strong);
}

.laf-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.laf-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    table-layout: auto;
}

.laf-table th,
.laf-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--laf-color-border);
    vertical-align: middle;
    font-size: 13px;
    line-height: 1.3;
}

.laf-table th {
    color: var(--laf-color-text-soft);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.laf-table tr {
    height: auto;
}

.laf-table td {
    color: var(--laf-color-text);
}

.laf-table th[data-align="center"],
.laf-table td[data-align="center"] {
    text-align: center;
}

.laf-table th[data-align="right"],
.laf-table td[data-align="right"] {
    text-align: right;
}

.laf-table th[data-sortable="1"] {
    cursor: pointer;
    user-select: none;
}

.laf-table__th-label {
    display: inline-block;
}

.laf-table__sort {
    margin-left: 6px;
    color: var(--laf-color-text-muted);
    font-size: 0.9em;
}

.laf-table tbody tr:hover td {
    background: rgba(206, 17, 38, 0.04);
}

.laf-table.is-striped tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

.laf-table.is-striped tbody tr:nth-child(even):hover td {
    background: rgba(206, 17, 38, 0.04);
}

.laf-table.is-compact th,
.laf-table.is-compact td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.laf-table-empty {
    text-align: center;
    padding: 24px;
    color: var(--laf-color-text-muted);
}

.laf-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--laf-radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.laf-badge--neutral {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.laf-badge--success {
    background: rgba(21, 128, 61, 0.08);
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.18);
}

.laf-badge--warning {
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.18);
}

.laf-badge--danger {
    background: rgba(206, 17, 38, 0.08);
    color: var(--laf-color-brand);
    border-color: rgba(206, 17, 38, 0.18);
}


.laf-table-wrap.has-y-scroll {
    overflow-y: auto;
}

.laf-table-wrap.has-y-scroll .laf-table {
    min-width: 100%;
}

.laf-table-wrap.has-y-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--laf-color-surface);
}


.laf-score-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.laf-score-status__score {
    font-weight: 700;
    color: var(--laf-color-text);
    min-width: 36px;
    text-align: right;
}

.laf-table tbody tr[data-row-id] {
    cursor: pointer;
}

.laf-table tbody tr.is-selected {
    outline: 1px solid rgba(0,0,0,.14);
    background: rgba(0,0,0,.04);
}

.laf-insights-widget--table {
    min-width: 0;
    width: 100%;
}

.laf-insights-widget--table .laf-insights-widget__body {
    min-width: 0;
}


.laf-table__count {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--laf-color-surface-soft);
    color: var(--laf-color-text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    vertical-align: middle;
}

.laf-insights-widget--table .laf-insights-widget__body[hidden] {
    display: none !important;
}

@media (max-width: 767px) {
    .laf-table__tools {
        width: 100%;
    }

    .laf-table__search {
        width: 100%;
        min-width: 0;
    }
}