/* Table View — плоская таблица клиентов */
.table-view-wrapper {
    overflow: auto;
    height: 100%;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

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

.tv-th {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 11px;
    white-space: nowrap;
    user-select: none;
}

.tv-th.sortable {
    cursor: pointer;
}

.tv-th.sortable:hover {
    color: #1565c0;
}

.tv-th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    margin-left: 4px;
}

.tv-th.sort-asc::after {
    content: ' \25B2';
    font-size: 8px;
    color: #1565c0;
}

.tv-th.sort-desc::after {
    content: ' \25BC';
    font-size: 8px;
    color: #1565c0;
}

/* Rows */
.tv-row {
    cursor: pointer;
    transition: background 0.1s;
}

.tv-row:hover {
    background: #f0f4ff;
}

.tv-cell {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths */
.col-name { min-width: 160px; max-width: 260px; }
.col-tariff { width: 60px; text-align: center; }
.col-type { width: 50px; }
.col-inn { width: 120px; font-family: monospace; font-size: 11px; }
.col-num { width: 50px; text-align: center; }
.col-date { width: 100px; }

/* Tariff badges in table */
.tv-tariff-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tv-tariff-badge.tariff-free { background: #f5f5f5; color: #757575; }
.tv-tariff-badge.tariff-plus { background: #e3f2fd; color: #1565c0; }
.tv-tariff-badge.tariff-pro { background: #e8f5e9; color: #2e7d32; }
.tv-tariff-badge.tariff-basic { background: #fff3e0; color: #e65100; }
.tv-tariff-badge.tariff-premium { background: #f3e5f5; color: #7b1fa2; }
