.aggregation-events-card { margin-top: 1rem; }
.aggregation-events-heading,
.aggregation-events-filters,
.aggregation-events-summary,
.aggregation-event-period {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}
.aggregation-events-heading { justify-content: space-between; }
.aggregation-events-summary {
  margin: .75rem 0;
  padding: .7rem;
  border-radius: .7rem;
  background: var(--surface-soft, #f4f7fb);
}
.aggregation-events-summary span {
  padding: .25rem .5rem;
  border-radius: 999px;
  background: var(--surface, #fff);
}
.aggregation-events-filters { margin-bottom: .7rem; }
.aggregation-events-filters input,
.aggregation-events-filters select { min-width: 9rem; }
.aggregation-event-importance {
  display: inline-block;
  padding: .2rem .45rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .72rem;
}
.aggregation-event-importance.critical { background: #fee2e2; color: #991b1b; }
.aggregation-event-importance.high { background: #ffedd5; color: #9a3412; }
.aggregation-event-importance.medium { background: #fef3c7; color: #92400e; }
.aggregation-event-importance.low { background: #e0f2fe; color: #075985; }
.aggregation-event-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 0;
  border-radius: 1rem;
  padding: 1rem;
  overflow: auto;
}
.aggregation-event-dialog::backdrop { background: rgb(15 23 42 / .55); }
.aggregation-event-dialog .dialog-header,
.aggregation-event-dialog .dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}
.aggregation-event-dialog .dialog-header {
  position: sticky;
  top: -1rem;
  z-index: 1;
  margin: -1rem -1rem .8rem;
  padding: 1rem;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #dbe3ee);
}
.aggregation-event-dialog label { display: grid; gap: .3rem; margin: .7rem 0; }
.aggregation-event-dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f7fb;
  padding: .75rem;
  border-radius: .65rem;
}
.event-detail-section {
  margin: 0 0 .85rem;
  padding: .85rem;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: .8rem;
  background: var(--surface, #fff);
}
.event-detail-section h3 {
  margin: 0 0 .65rem;
  font-size: 1rem;
}
.event-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 0;
}
.event-detail-row {
  min-width: 0;
  padding: .55rem .65rem;
  border-radius: .6rem;
  background: var(--surface-soft, #f4f7fb);
}
.event-detail-row-wide { grid-column: 1 / -1; }
.event-detail-row dt {
  margin-bottom: .18rem;
  color: var(--muted, #64748b);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.event-detail-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.event-date-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .25rem .75rem;
  margin: 0;
  padding-left: 1.1rem;
}
.event-technical-details {
  margin-top: .5rem;
  border-top: 1px solid var(--border, #dbe3ee);
  padding-top: .7rem;
}
.event-technical-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary, #1d4ed8);
  font-weight: 700;
}
.aggregation-event-period > label { flex: 1; min-width: 12rem; }
@media (max-width: 760px) {
  .aggregation-events-filters > * { width: 100%; }
  .aggregation-events-heading { align-items: stretch; }
  .aggregation-event-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: .75rem;
  }
  .aggregation-event-dialog .dialog-header {
    top: -.75rem;
    margin: -.75rem -.75rem .65rem;
    padding: .75rem;
  }
}
@media (max-width: 560px) {
  .event-detail-grid { grid-template-columns: 1fr; }
  .event-detail-row-wide { grid-column: auto; }
}
body.ui-compact .aggregation-events-card { margin-top: .5rem; }
body.ui-compact .aggregation-events-filters,
body.ui-compact .aggregation-events-heading { gap: .35rem; }
body.ui-compact .aggregation-events-summary { margin: .4rem 0; padding: .4rem; }
body.ui-compact .aggregation-event-dialog { padding: .65rem; }
body.ui-compact .aggregation-event-dialog .dialog-header {
  top: -.65rem;
  margin: -.65rem -.65rem .45rem;
  padding: .55rem .65rem;
}
body.ui-compact .event-detail-section {
  margin-bottom: .45rem;
  padding: .5rem;
}
body.ui-compact .event-detail-section h3 { margin-bottom: .35rem; }
body.ui-compact .event-detail-grid { gap: .35rem; }
body.ui-compact .event-detail-row { padding: .35rem .45rem; }
