.table-container { 
   background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border-light); 
   width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
table { width: 100%; min-width: 600px; border-collapse: collapse; }
th { background-color: #f8fafc; padding: 14px 18px; text-align: left; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border-light); }
td { padding: 14px 18px; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.actions-col { width: 120px; text-align: center; }

/* Сортування */
th.sortable { cursor: pointer; transition: background-color 0.2s; white-space: nowrap; }
th.sortable:hover { background-color: #e2e8f0; }
.sort-icon { font-size: 10px; margin-left: 5px; opacity: 0.5; }
th.sortable.active .sort-icon { opacity: 1; color: var(--primary); }

/* Підсвітка рядків */
.row-no-inv { background-color: #fee2e2 !important; border-left: 4px solid #dc2626 !important; }
.row-no-inv td { color: #991b1b !important; }
.row-no-inv b { color: #7f1d1d !important; }
.warning-badge { background: #dc2626; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; margin-left: 5px; text-transform: uppercase; }

.row-auto-inv { background-color: #faf5ff !important; border-left: 4px solid #9333ea !important; }
.row-auto-inv td { color: #581c87 !important; }
.row-auto-inv b { color: #4c1d95 !important; }
.auto-badge { background: #9333ea; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; margin-left: 5px; text-transform: uppercase; }

/* Пагінація */
.pagination-controls {
   display: flex; justify-content: space-between; align-items: center; 
   padding: 15px 20px; background: #f8fafc; 
   border: 1px solid var(--border-light); border-top: none; 
   border-radius: 0 0 8px 8px; flex-wrap: wrap; gap: 10px;
}
.pagination-controls select { padding: 6px 12px; height: auto; display: inline-block; width: auto; margin-left: 10px; }
.pagination-controls .page-info { font-weight: 600; font-size: 14px; color: var(--text-dark); }
.pagination-controls button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Темна тема Таблиць */
body.dark-mode table { border-color: #334155 !important; background-color: #1e293b !important; }
body.dark-mode th { background-color: #0f172a !important; color: #94a3b8 !important; border-bottom: 2px solid #334155 !important; }
body.dark-mode td { border-bottom: 1px solid #334155 !important; color: #cbd5e1 !important; }
body.dark-mode tbody tr:hover { background-color: #334155 !important; }
body.dark-mode th.sortable:hover { background-color: #334155; }

body.dark-mode .row-no-inv { background-color: #450a0a !important; border-left-color: #ef4444 !important; }
body.dark-mode .row-no-inv td, body.dark-mode .row-no-inv b { color: #fca5a5 !important; }
body.dark-mode .row-auto-inv { background-color: #2e1065 !important; border-left-color: #a855f7 !important; }
body.dark-mode .row-auto-inv td, body.dark-mode .row-auto-inv b { color: #e9d5ff !important; }
body.dark-mode .warning-badge { color: #ffffff !important; }

body.dark-mode .pagination-controls { background-color: #1e293b; border-color: #334155; }
body.dark-mode .pagination-controls .page-info { color: #f8fafc; }