/* ============ History view ============ */
.history-view { max-width: 880px; }

.history-privacy {
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 0 16px;
}

.history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  min-height: 28px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-loading {
  padding: 24px;
  text-align: center;
  font-size: 13px;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text-mute);
  text-align: center;
}
.history-empty p { margin: 0; font-size: 14px; }

.history-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.history-row.open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.history-row-head {
  display: grid;
  grid-template-columns: 100px 1fr auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}
.history-row-head:hover { background: var(--bg-soft); }
.history-row-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.history-tool {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.history-file {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-meta {
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.history-chevron {
  transition: transform .15s;
  color: var(--text-mute);
}
.history-row.open .history-chevron { transform: rotate(180deg); }

.history-row-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--border);
}

.history-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 14px;
  margin: 10px 0;
  font-size: 13px;
}
.history-detail dt {
  color: var(--text-soft);
  font-weight: 600;
}
.history-detail dd { margin: 0; color: var(--text); }

.history-hash {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  cursor: pointer;
  word-break: break-all;
}
.history-hash:hover { border-color: var(--border-strong); }

.history-cert {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.history-cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.history-cert-text {
  margin: 0;
  padding: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}

.history-row-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Sidebar divider above History */
.side-nav .side-nav-divided {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
