/* Table Styles for LifeTracerB2B - Dark Theme */

/* Base Table Styles */
.table {
    color: var(--text-primary, #f1f5f9);
    background-color: transparent !important;
    --bs-table-bg: transparent;
    border-collapse: collapse;
    width: 100%;
}

/* Force dark theme on table cells (Bootstrap override) */
.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: var(--text-primary, #f1f5f9);
    border-color: var(--border-color, #334155);
}

/* Table Header */
.table thead tr {
    background-color: rgba(30, 40, 60, 0.5) !important;
    border-bottom: 2px solid var(--border-color, #334155);
}

.table thead th {
    color: var(--text-primary, #f1f5f9);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
}

/* Table Body */
.table tbody tr {
    border-bottom: 1px solid var(--border-color, #334155);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Striped Tables */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: transparent;
}

/* Table Responsive */
.table-responsive {
    background: transparent !important;
    border-radius: 8px;
    overflow-x: auto;
}

/* Bordered Tables */
.table-bordered {
    border: 1px solid var(--border-color, #334155);
}

.table-bordered > :not(caption) > * {
    border-width: 1px 0;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 1px;
}

/* Borderless Tables */
.table-borderless > :not(caption) > * > * {
    border-bottom-width: 0;
}

/* Table Variants */
.table-primary {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(59, 130, 246, 0.2);
    --bs-table-border-color: rgba(59, 130, 246, 0.3);
}

.table-secondary {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(100, 116, 139, 0.2);
    --bs-table-border-color: rgba(100, 116, 139, 0.3);
}

.table-success {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(16, 185, 129, 0.2);
    --bs-table-border-color: rgba(16, 185, 129, 0.3);
}

.table-danger {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(239, 68, 68, 0.2);
    --bs-table-border-color: rgba(239, 68, 68, 0.3);
}

.table-warning {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(245, 158, 11, 0.2);
    --bs-table-border-color: rgba(245, 158, 11, 0.3);
}

.table-info {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(59, 130, 246, 0.2);
    --bs-table-border-color: rgba(59, 130, 246, 0.3);
}

.table-dark {
    --bs-table-color: #fff;
    --bs-table-bg: rgba(15, 23, 42, 0.8);
    --bs-table-border-color: rgba(51, 65, 85, 0.5);
}

/* Active Row */
.table tbody tr.active,
.table tbody tr.table-active {
    background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Small Tables */
.table-sm > :not(caption) > * > * {
    padding: 0.5rem;
}

/* Empty State in Tables */
.table tbody tr.empty-state-row td {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #94a3b8);
    font-style: italic;
}

/* Sortable Table Headers */
.table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

.table th.sortable:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 0.5rem;
    opacity: 0.5;
    font-size: 0.75rem;
}

.table th.sortable.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.table th.sortable.sort-desc::after {
    content: '↓';
    opacity: 1;
}

