/* ================================================================
   TABLE TOOLBAR, ROW DETAIL & INTERACTIONS
   ================================================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  margin-bottom: 8px;
}

.table-search {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  flex: 1;
  max-width: 260px;
  transition: border-color 0.15s;
}

.table-search:focus { border-color: var(--accent); }

.table-search::placeholder { color: var(--text-muted); }

/* Column type badges */
.type-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: var(--mono);
  vertical-align: middle;
  line-height: 15px;
  letter-spacing: 0.3px;
}

/* Export button */
.export-btn {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.export-btn:hover {
  background: var(--bg-header);
  color: var(--text);
}

/* Row detail panel */
.row-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 150;
  animation: fadeOverlay 0.15s ease;
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.row-detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(480px, 90vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 16px rgba(0,0,0,0.12);
  z-index: 151;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.row-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.row-detail-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.row-detail-close:hover {
  color: var(--text);
  background: var(--bg-header);
}

.row-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.row-detail-body .kv-list {
  grid-template-columns: minmax(80px, auto) 1fr;
  gap: 6px 16px;
}

.table-wrapper tr { cursor: pointer; }
