.activity-feed-page {
  min-height: 100vh;
  background: #eef3f8;
}

.activity-feed-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.activity-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 6px 6px 0 0;
}

.activity-feed-header h1 {
  margin: 0;
  color: #10233b;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  letter-spacing: 0;
}

.activity-feed-eyebrow {
  margin: 0 0 2px;
  color: #5c6f84;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.activity-feed-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.activity-feed-live-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd6e2;
  border-radius: 4px;
  background: #f7f9fc;
  color: #5c6f84;
  font-size: 12px;
  font-weight: 700;
}

.activity-feed-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8998a8;
}

.activity-feed-live-state.is-live {
  border-color: #a9d9c0;
  background: #edf9f2;
  color: #1f7a47;
}

.activity-feed-live-state.is-live .activity-feed-live-dot {
  background: #1f9d5a;
}

.activity-feed-live-state.is-error {
  border-color: #ebbbb5;
  background: #fff2f0;
  color: #a32920;
}

.activity-feed-live-state.is-error .activity-feed-live-dot {
  background: #b42318;
}

.activity-feed-status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 7px 14px;
  background: #f8fafc;
  border-right: 1px solid #d7e0ea;
  border-bottom: 1px solid #d7e0ea;
  border-left: 1px solid #d7e0ea;
  color: #5c6f84;
  font-size: 12px;
}

.activity-feed-status-band.is-error {
  background: #fff5f3;
  color: #a32920;
}

.activity-feed-console {
  min-height: 360px;
  background: #ffffff;
  border-right: 1px solid #d7e0ea;
  border-bottom: 1px solid #d7e0ea;
  border-left: 1px solid #d7e0ea;
}

.activity-feed-columns,
.activity-feed-item {
  display: grid;
  grid-template-columns: 150px 92px minmax(220px, 0.9fr) minmax(300px, 1.7fr);
  gap: 14px;
  align-items: center;
}

.activity-feed-columns {
  min-height: 34px;
  padding: 7px 14px;
  background: #f0f4f8;
  border-bottom: 1px solid #d7e0ea;
  color: #53677d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-feed-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-feed-item {
  position: relative;
  min-height: 58px;
  padding: 8px 14px 8px 18px;
  border-bottom: 1px solid #e3e9f0;
  color: #20354d;
  font-size: 13px;
}

.activity-feed-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  content: "";
  background: #168a88;
}

.activity-feed-item:last-child {
  border-bottom: 0;
}

.activity-feed-item.severity-success::before {
  background: #24945a;
}

.activity-feed-item.severity-info::before {
  background: #168a88;
}

.activity-feed-item.severity-warning::before {
  background: #d28a00;
}

.activity-feed-item.severity-critical::before {
  background: #c93228;
}

.activity-feed-time {
  color: #53677d;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-feed-severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  min-height: 24px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.severity-success .activity-feed-severity {
  background: #e7f7ee;
  color: #1f7a47;
}

.severity-info .activity-feed-severity {
  background: #e5f5f5;
  color: #0b7472;
}

.severity-warning .activity-feed-severity {
  background: #fff3d6;
  color: #8b5c00;
}

.severity-critical .activity-feed-severity {
  background: #ffe7e4;
  color: #ad241b;
}

.activity-feed-device {
  min-width: 0;
}

.activity-feed-device-link {
  display: block;
  overflow: hidden;
  color: #0c5f95;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-feed-device-link:hover {
  text-decoration: underline;
}

.activity-feed-device-meta,
.activity-feed-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 2px;
  color: #66788b;
  font-size: 10px;
}

.activity-feed-event-message {
  font-weight: 800;
}

.severity-success .activity-feed-event-message {
  color: #1f7a47;
}

.severity-info .activity-feed-event-message {
  color: #0b7472;
}

.severity-warning .activity-feed-event-message {
  color: #8b5c00;
}

.severity-critical .activity-feed-event-message {
  color: #b42318;
}

.activity-feed-empty {
  padding: 80px 16px;
  color: #66788b;
  text-align: center;
}

.activity-feed-footer {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.activity-feed-footer button {
  min-width: 140px;
}

@media (max-width: 900px) {
  .activity-feed-shell {
    width: min(100% - 16px, 1480px);
    padding-top: 8px;
  }

  .activity-feed-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-feed-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .activity-feed-columns {
    display: none;
  }

  .activity-feed-item {
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    align-items: start;
  }

  .activity-feed-time {
    grid-column: 1;
    grid-row: 1;
  }

  .activity-feed-severity {
    grid-column: 2;
    grid-row: 1;
  }

  .activity-feed-device {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .activity-feed-event {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}
