/* Column chooser + per-column blur, shared by both dashboards.
   Custom properties resolve from v2's theme variables and fall back to
   literals for v1, which has no theme layer. */

:root {
  --tb-panel:  var(--bg-surface, #fff);
  --tb-border: var(--border, #d8dee6);
  --tb-fg:     var(--fg-primary, #1c2430);
  --tb-fg-dim: var(--fg-secondary, #5b6673);
  --tb-hover:  var(--bg-hover, #f5f7fa);
}

/* Keeps the label, sort arrow and blur toggle on one line inside the th. */
.tb-th {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.tb-sort { opacity: .55; }

.tb-blur-btn {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .35;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 2px;
  border-radius: 3px;
}
.tb-blur-btn:hover { opacity: 1; background: rgba(255, 255, 255, .18); }
.tb-blur-btn.on { opacity: 1; color: #ffd76a; }

/* Presentation only — the value is still in the DOM. Salary confidentiality
   is enforced by the API, not by this. */
td.tb-blur {
  filter: blur(5px);
  user-select: none;
}
td.tb-blur:hover { filter: blur(5px); }

.ta-center { text-align: center; }
.ta-right  { text-align: right; }

.tb-cols-wrap { position: relative; display: inline-block; }
.tb-cols-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
  min-width: 210px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  background: var(--tb-panel);
  color: var(--tb-fg);
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.tb-cols-menu[hidden] { display: none; }

.tb-col-group {
  padding: 8px 7px 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tb-fg-dim);
}
.tb-col-group:first-child { padding-top: 2px; }

.tb-col-actions {
  display: flex;
  gap: 6px;
  position: sticky;
  bottom: -6px;
  margin-top: 6px;
  padding-top: 6px;
  background: var(--tb-panel);
  border-top: 1px solid var(--tb-border);
}

.tb-col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}
.tb-col-item:hover { background: var(--tb-hover); }
/* The menu sits inside `.filters`, whose `input { min-width: 200px }` would
   otherwise stretch these checkboxes across the row. */
.tb-col-item input {
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  margin: 0;
}
.tb-col-item span { flex: 1 1 auto; }

.tb-col-reset {
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--tb-fg-dim);
  background: transparent;
  border: 1px solid var(--tb-border);
  border-radius: 5px;
}
.tb-col-reset:hover { background: var(--tb-hover); color: var(--tb-fg); }

/* Shown while any column is masked, so nobody forgets it is on. */
.tb-blur-note {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tb-fg-dim);
}
.tb-blur-note.on { display: inline-flex; }
.tb-blur-note button {
  border: 0;
  background: transparent;
  color: var(--tb-fg-dim);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

/* Divider between the registry fields and the plan fields in the edit modal. */
.em-section {
  margin: 10px 0 -2px;
  padding-top: 10px;
  border-top: 1px solid var(--tb-border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tb-fg-dim);
}
.em-section .em-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
