.barBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: rgb(var(--fg-color));
  font-size: 11px;
  flex-shrink: 0;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s;
}
.barBtn span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.barBtn:hover {
  background: rgba(var(--border), 0.1);
}
.barBtn:active {
  background: rgba(var(--accent), 0.18);
}

.barAddBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 4px;
  color: rgba(var(--fg-dim), 0.8);
  border: 1px dashed rgba(var(--border), 0.18);
}
.barAddBtn:hover {
  color: rgb(var(--accent));
  border-color: rgba(var(--accent), 0.4);
}

.emptyBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: rgba(var(--fg-dim), 0.9);
  border: 1px dashed rgba(var(--border), 0.18);
  font-size: 11px;
}
.emptyBtn:hover {
  color: rgb(var(--accent));
  border-color: rgba(var(--accent), 0.4);
}

.panel {
  width: 100%;
  height: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}
.muted {
  color: rgba(var(--fg-dim), 0.8);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.addBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent), 0.18);
  color: rgb(var(--accent));
  font-size: 11px;
}
.addBtn:hover {
  background: rgba(var(--accent), 0.28);
}

.list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.empty {
  text-align: center;
  color: rgba(var(--fg-dim), 0.7);
  font-size: 11px;
  padding: 16px 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.row:hover {
  background: rgba(var(--border), 0.05);
}

.rowIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(var(--accent), 0.12);
  color: rgb(var(--accent));
  flex-shrink: 0;
}
.rowMain {
  flex: 1;
  min-width: 0;
}
.rowLabel {
  font-size: 12px;
  color: rgb(var(--fg-color));
}
.rowMeta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(var(--fg-dim), 0.85);
  margin-top: 2px;
}
.typeTag {
  background: rgba(var(--border), 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.target {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowActions {
  display: inline-flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}
.row:hover .rowActions {
  opacity: 1;
}

.iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: rgba(var(--fg-dim), 0.9);
}
.iconBtn:hover {
  background: rgba(var(--border), 0.1);
  color: rgb(var(--fg-color));
}
.danger:hover {
  background: rgba(var(--danger), 0.18);
  color: rgb(var(--danger));
}

/* Inline Editor */
.editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.editorHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(var(--border), 0.06);
}
.backBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: rgba(var(--fg-dim), 0.95);
}
.backBtn:hover {
  background: rgba(var(--border), 0.08);
  color: rgb(var(--fg-color));
}
.editorTitle {
  font-weight: 600;
  font-size: 13px;
}

.editorBody {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.field label {
  font-size: 10px;
  color: rgba(var(--fg-dim), 0.85);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input {
  height: 30px;
  font-size: 12px;
  width: 100%;
}

.typeRow {
  display: flex;
  gap: 4px;
}
.typeBtn {
  flex: 1;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(var(--border), 0.05);
  color: rgba(var(--fg-dim), 0.95);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.12s;
}
.typeBtn:hover {
  background: rgba(var(--border), 0.1);
}
.typeBtnActive {
  background: rgba(var(--accent), 0.2);
  color: rgb(var(--accent));
}

.iconGrid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  max-height: 84px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(var(--border), 0.04);
  border-radius: var(--radius-sm);
}
.iconCell {
  width: 100%;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: rgba(var(--fg-dim), 0.9);
  min-width: 24px;
}
.iconCell:hover {
  background: rgba(var(--border), 0.1);
  color: rgb(var(--fg-color));
}
.iconCellActive {
  background: rgba(var(--accent), 0.22);
  color: rgb(var(--accent));
}

.silentRow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(var(--border), 0.04);
  font-size: 12px;
  cursor: pointer;
  flex-wrap: wrap;
}
.silentRow input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: rgb(var(--accent));
  margin: 0;
}
.silentHint {
  width: 100%;
  font-size: 10px;
  color: rgba(var(--fg-dim), 0.7);
  padding-left: 22px;
}

.editorActions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(var(--border), 0.06);
}
.cancelBtn,
.saveBtn {
  padding: 6px 18px;
  height: 30px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.cancelBtn {
  color: rgba(var(--fg-dim), 0.95);
  background: rgba(var(--border), 0.05);
}
.cancelBtn:hover {
  background: rgba(var(--border), 0.1);
  color: rgb(var(--fg-color));
}
.saveBtn {
  background: rgb(var(--accent));
  color: white;
}
.saveBtn:hover {
  background: rgb(var(--accent-strong));
}
