/* Table Components - Advanced Single Reference */

.app-table {
  --row-height: 46px;
  --head-bg: rgba(255,255,255,.04);
  --row-hover: rgba(255,255,255,.06);
  --divider: var(--border-color);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-1);
}

.app-table table {
  margin: 0;
  width: 100%;
}

.app-table thead th {
  background: var(--head-bg);
  color: var(--text-body);
  font-weight: 600;
  height: var(--row-height);
  vertical-align: middle;
  border-bottom: 1px solid var(--divider) !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

.app-table tbody tr {
  height: var(--row-height);
}

.app-table tbody tr:hover {
  background: var(--row-hover);
}

.app-table .cell-tight {
  white-space: nowrap;
}

.app-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: var(--fs-14);
  border: 1px solid var(--border-color);
}

.app-table .status-ok {
  background: rgba(40,167,69,.12);
  color: #7ee0a0;
}

.app-table .status-err {
  background: rgba(220,53,69,.12);
  color: #ff8c98;
}

.app-table .status-pend {
  background: rgba(196,154,51,.16);
  color: #f2d08b;
}

/* Horizontal scroll wrapper */
.table-scroll {
  overflow: auto;
  max-width: 100%;
  scrollbar-width: thin;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.15);
}
