/* ============================================================
   Veltar — tables.css
   ============================================================ */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead {
  background: var(--color-bg-elevated);
  position: sticky;
  top: 0;
  z-index: 1;
}

thead th {
  padding: var(--space-2) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border-soft);
  user-select: none;
}

thead th.sortable {
  cursor: pointer;
  transition: color var(--transition-fast);
}

thead th.sortable:hover {
  color: var(--color-text-primary);
}

thead th.sort-asc::after  { content: ' ↑'; color: var(--color-accent); }
thead th.sort-desc::after { content: ' ↓'; color: var(--color-accent); }

thead th.text-right { text-align: right; }

tbody tr {
  border-bottom: 1px solid var(--color-border-soft);
  transition: background var(--transition-fast);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover {
  background: var(--color-bg-hover);
}

tbody td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

tbody td.text-right  { text-align: right; }
tbody td.text-muted  { color: var(--color-text-muted); }
tbody td.mono        { font-family: var(--font-mono); }

/* Positive / Negative Farb-Rows */
tbody tr.row-positive td { color: var(--color-positive); }
tbody tr.row-negative td { color: var(--color-negative); }

/* Inline-Delta in Zelle */
.td-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.td-delta.positive { color: var(--color-positive); }
.td-delta.negative { color: var(--color-negative); }

/* Instrument-Zelle: Ticker + Name */
.td-instrument {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.td-instrument__ticker {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.td-instrument__name {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cumulative Bar (Liquidationsplan) */
.cumbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cumbar__track {
  flex: 1;
  height: 4px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cumbar__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.cumbar__label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  min-width: 40px;
  text-align: right;
}

/* Filter-Bar über Tabellen */
.table-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-bg-surface);
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  font-size: 13px;
}

.search-input-wrap .input {
  padding-left: 32px;
}


