.activity-panel {
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none !important;
  margin-top: 16px;
}
.activity-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.activity-heading h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}
.activity-heading p {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.activity-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.activity-live i {
  font-size: 13px;
}
.activity-toolbar {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) 160px;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}
.activity-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
}
.activity-tabs button {
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
  padding: 6px 9px;
  min-height: 32px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
}
.activity-tabs [aria-selected="true"] {
  color: var(--brand);
  background: var(--brand-soft);
}
.activity-tabs button span {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
}
.activity-toolbar :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  font-size: 11px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 5px 9px;
}
.activity-list {
  max-height: 410px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 16px;
  scrollbar-gutter: stable;
}
.activity-day {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 12px 0 5px;
}
.activity-event {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.activity-event > summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 38px 12px;
  align-items: center;
  gap: 9px;
  padding: 10px 0 !important;
  min-height: 64px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  list-style: none;
  cursor: pointer;
  font-weight: 400;
  font-size: 12px;
}
.activity-event > summary::-webkit-details-marker {
  display: none;
}
.activity-event > summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-radius: 5px;
}
.activity-event > summary > .control-glyph {
  font-size: 11px;
  color: var(--text-secondary);
  transition: transform 0.15s;
}
.activity-event[open] > summary > .control-glyph {
  transform: rotate(180deg);
}
.activity-event-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--surface-soft);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 15px;
}
.activity-event.error .activity-event-icon {
  background: var(--danger-bg, #fff1f2);
  color: var(--danger);
}
.activity-event.warning .activity-event-icon {
  background: var(--warning-bg, #fff7ed);
  color: var(--warning, #b87911);
}
.activity-event-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.activity-event-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.activity-event-meta .activity-level {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
}
.activity-level.error {
  color: var(--danger);
  background: var(--danger-bg, #fff1f2);
}
.activity-level.warning {
  color: var(--warning, #a56a00);
  background: var(--warning-bg, #fff7ed);
}
.activity-level.success {
  color: var(--success);
  background: var(--success-bg);
}
.activity-repeat {
  font-size: 9px;
  color: var(--text-secondary);
}
.activity-event-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.activity-event time {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: right;
  align-self: start;
  margin-top: 3px;
  white-space: nowrap;
}
.activity-event-detail {
  padding: 10px 12px 12px 37px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.activity-event-detail p {
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.activity-event-detail small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.activity-event-detail button {
  font-size: 11px;
  min-height: 28px;
  padding: 4px 0;
  margin: 7px 0 0;
  background: transparent;
  border: 0;
  color: var(--brand);
}
.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-secondary);
  min-height: 40px;
  box-sizing: border-box;
}
.activity-footer button {
  font-size: 11px;
  min-height: 28px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--brand);
}
.activity-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-height: 170px;
  padding: 24px 16px;
  box-sizing: border-box;
}
.activity-empty > i {
  font-size: 24px;
  color: var(--text-secondary);
}
.activity-empty strong {
  font-size: 13px;
  font-weight: 600;
}
.activity-empty p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  max-width: 300px;
}
@media (max-width: 720px) {
  .activity-toolbar {
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 8px;
  }
  .activity-tabs {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .activity-heading {
    padding: 12px;
  }
  .activity-heading h2 {
    font-size: 13px;
  }
  .activity-heading p {
    font-size: 10px;
  }
  .activity-live {
    font-size: 9px;
  }
  .activity-toolbar {
    padding: 0 12px 10px;
    grid-template-columns: minmax(0, 1fr) 125px;
  }
  .activity-list {
    padding: 0 12px;
    max-height: 420px;
  }
  .activity-event > summary {
    grid-template-columns: 26px minmax(0, 1fr) 33px 10px;
    gap: 7px;
    padding: 10px 0 !important;
  }
  .activity-event-icon {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .activity-event-text {
    font-size: 12px;
  }
  .activity-event-meta {
    gap: 5px;
    font-size: 9px;
  }
  .activity-event time {
    font-size: 9px;
  }
  .activity-event-detail {
    padding-left: 33px;
  }
  .activity-footer {
    padding: 8px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .activity-event > summary > .control-glyph {
    transition: none;
  }
}
.activity-event.error .activity-event-icon,.activity-event-meta .activity-level.error{background:color-mix(in srgb,var(--danger,#e34858) 12%,var(--surface));color:var(--danger,#e34858)}
