.history-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
}

.history-block .result-table {
  overflow: visible;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-card {
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
}

.history-card__icon {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
}

.history-th-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.history-cols6,
.history-cols5 {
  width: 100%;
}

/* 上组：ASN + 企业，6 列 */
.history-cols6 .history-row {
  display: grid;
  grid-template-columns: 120px 130px 1fr 110px 168px 168px;
}

.history-cols6 .c-left3 {
  grid-column: 1 / 4;
}

/* 下组：注册地 + 位置，5 列 */
.history-cols5 .history-row {
  display: grid;
  grid-template-columns: 130px 1fr minmax(110px, 1.2fr) 168px 168px;
}

.history-cols5 .c-country,
.history-cols5 .c-center {
  grid-column: 3;
}

.history-cols5 .c-time {
  grid-column: 5;
}

.history-cell.c-mid,
.history-cols5 .c-country,
.history-cols5 .c-center,
.history-cols5 .c-time {
  text-align: center;
}

.history-cell.c-mid .history-country,
.history-cell.c-mid .history-date,
.history-cols5 .c-country .history-country,
.history-cols5 .c-center .history-country {
  display: inline-flex;
  justify-content: center;
}

.history-cell.c-mid .history-date {
  display: inline-flex;
}

.history-row--inactive .history-cell {
  background: #fafafa;
}

.history-cols6 .history-row:not(.history-head):not(.history-row--msg):not(.history-row--inactive) .history-cell {
  background: #fff;
}

.history-asn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.history-asn-status {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.history-cell {
  padding: 0.85rem 1rem;
  border-top: 1px solid #f1f5f9;
  color: #334155;
  line-height: 1.55;
  min-width: 0;
}

.history-head {
  background: linear-gradient(180deg, #eef4ff 0%, #e8f0fe 100%);
  border-bottom: 1px solid #dbeafe;
}

.history-head .history-cell {
  background: transparent;
  color: #64748b;
  font-weight: 500;
  font-size: 13px;
  padding: 0.7rem 1rem;
  border-top: none;
  border-bottom: none;
  white-space: nowrap;
}

.history-head:first-child .history-cell {
  border-top: none;
}

.history-row--msg .history-cell {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
}

.history-card a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.history-card a:hover {
  text-decoration: underline;
}

.history-cidr,
.history-date {
  white-space: nowrap;
}

.history-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-variant-numeric: tabular-nums;
}

.history-inline-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: #94a3b8;
}

.history-country {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
}

.history-country__flag {
  height: 1em;
  width: 1.333em;
  border-radius: 2px;
  object-fit: contain;
}

.history-type-badge {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 500;
}

.history-registry {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.history-skeleton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
}

.history-skeleton__dot {
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #3794f8;
  border-radius: 50%;
  animation: history-spin 0.7s linear infinite;
}

@keyframes history-spin {
  to { transform: rotate(360deg); }
}

.history-empty {
  color: #94a3b8;
  font-size: 13px;
}

.history-fold {
  overflow-anchor: none;
}

.history-fold-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  padding: 0;
  border: none;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}

.history-fold.has-fold .history-fold-btn {
  display: flex;
}

.history-fold-btn:hover {
  background: #f8fafc;
}

.history-fold-btn .history-inline-icon {
  transition: transform 0.3s ease;
}

.history-fold.is-expanded .history-fold-btn .history-inline-icon {
  transform: rotate(180deg);
}

.history-fold.has-fold:not(.is-expanded) .history-row--extra {
  display: none;
}
