
.history-toolbar {
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.04);
  padding: 16px;
  margin: 14px 0 20px;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
}

.history-filters .custom-select-wrap {
  width: auto;
}

.history-filters .custom-select-trigger {
  width: auto;
  min-width: 130px;
}

.history-search-field input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.2);
  background: linear-gradient(180deg, rgba(20,28,45,0.95), rgba(12,18,32,0.98));
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
}

.history-search-field input:focus {
  border-color: var(--neon-cyan);
}

.history-filters .sel {
  margin-left: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.history-search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  flex: 0 1 auto;
  min-width: 220px;
}

.history-search-field span {
  white-space: nowrap;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-search-field input {
  min-width: 220px;
}

.history-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 92, 255, 0.12);
}

.history-toggle-all-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform .15s ease;
}

#historyToggleAllBtn.is-all-expanded .history-toggle-all-icon {
  transform: rotate(90deg);
}

.history-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-group {
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.history-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(124, 92, 255, 0.08);
  flex-wrap: wrap;
}

.history-group-title strong {
  color: var(--neon-green);
  margin-right: 8px;
}

.history-group-meta {
  color: var(--neon-blue);
  font-size: 12px;
}

.history-group-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.history-group-actions button {
  background: transparent;
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

.history-group-actions button:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.history-group-delete:hover {
  color: var(--neon-red) !important;
  border-color: var(--neon-red) !important;
}

.history-group-rows {
  display: flex;
  flex-direction: column;
}

.history-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(124, 92, 255, 0.1);
}

.history-row-toggle {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-top: -2px;
  font-size: 18px;
  line-height: 1;
}

.history-row-toggle:hover:not(:disabled) {
  color: var(--neon-cyan);
}

.history-row-toggle:disabled {
  opacity: 0.25;
  cursor: default;
}

.history-row-toggle-icon {
  display: inline-block;
  transition: transform .15s ease;
}

.history-row.is-expanded .history-row-toggle-icon {
  transform: rotate(90deg);
}

.history-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.history-row-main {
  flex: 1 1 auto;
  min-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row-main strong {
  color: var(--neon-green);
}

.history-row-meta {
  flex-shrink: 0;
  color: var(--neon-blue);
  opacity: 0.85;
  white-space: nowrap;
}

.history-row-details {
  display: none;
  flex-basis: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(124, 92, 255, 0.1);
  flex-direction: column;
  gap: 6px;
  white-space: normal;
  color: var(--text-muted);
}

.history-row.is-expanded .history-row-details {
  display: flex;
}

.history-row-detail-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon-blue);
  margin-bottom: 2px;
}

.history-row-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
}

.history-row-delete:hover {
  opacity: 1;
  color: var(--neon-red);
}


