
.table thead th { white-space: nowrap; }
.cell-truncate { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

:root {
  --app-max-width: 1760px;
  --table-min-width: 960px;
  --resize-handle-width: 10px;
}

body { min-width: 320px; }
.app-shell { width: min(100%, var(--app-max-width)); }
.app-card { border: 0; border-radius: 1rem; }
.table-toolbar .btn,
.table-toolbar .form-select,
.table-toolbar .form-control { min-height: 42px; }
.data-table-wrap {
  overflow: auto;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .85rem;
  background: #fff;
}
.data-table { min-width: var(--table-min-width); margin-bottom: 0; table-layout: fixed; }
.data-table th, .data-table td { position: relative; }
.data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bs-dark); vertical-align: middle; }
.th-inner { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.th-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.resize-handle {
  position: absolute; top: 0; right: calc(var(--resize-handle-width) / -2);
  width: var(--resize-handle-width); height: 100%; cursor: col-resize;
  user-select: none; touch-action: none; z-index: 4;
}
.resize-handle::after {
  content: ''; position: absolute; top: 20%; bottom: 20%; left: 50%; width: 2px;
  transform: translateX(-50%); background: rgba(255,255,255,.35); border-radius: 2px;
}
.resize-handle:hover::after, th.resizing .resize-handle::after { background: rgba(13,110,253,.9); }
.resizable-ready th:last-child .resize-handle { display: none; }
.mobile-meta { display: none; }
@media (max-width: 991.98px) {
  :root { --app-max-width: 100%; --table-min-width: 760px; }
  .app-shell { padding-left: .75rem; padding-right: .75rem; }
  .app-card { border-radius: .8rem; }
  .table-toolbar .btn { width: 100%; }
  .mobile-meta { display: block; }
  .desktop-meta { display: none; }
  .data-table-wrap { margin-left: -.25rem; margin-right: -.25rem; border-radius: .75rem; }
  .data-table { font-size: .875rem; }
  .cell-truncate { max-width: 240px; }
}


/* Sticky first column */
.data-table.sticky-first-col th.sticky-col,
.data-table.sticky-first-col td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 rgba(0,0,0,.08);
}
.data-table.sticky-first-col thead th.sticky-col {
  z-index: 5;
  background: var(--bs-dark);
}
.data-table.sticky-first-col tbody tr:nth-child(even) td.sticky-col {
  background: var(--bs-table-striped-bg, #f8f9fa);
}
.data-table.sticky-first-col.table-hover tbody tr:hover td.sticky-col {
  background: var(--bs-table-hover-bg, #f1f3f5);
}
.sticky-col-toggle {
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .data-table.sticky-first-col th.sticky-col,
  .data-table.sticky-first-col td.sticky-col {
    left: 0;
  }
}
