body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  padding: 1em;
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 0.2em;
}

h2 {
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-size: 1.4em;
}

p {
  margin-bottom: 0.8em;
}

.self-service-links {
  display: flex;
  justify-content: center;
  margin: 1em 0;
  padding: 0.5em;
  font-size: 0.9em;
}

.section {
  margin-bottom: 2em;
}

.error {
  color: #8b0000;
  background-color: #eedddd;
  padding: 0.8em;
  border-radius: 4px;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

.greeting:empty {
  display: none;
}

.greeting :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

input[type="text"] {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  margin-bottom: 10px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 12px;
  font-size: 0.9em;
}

.remember-row input {
  margin: 0;
}

button {
  padding: 8px 12px;
}

table.striped tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

td, th {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.6em;
  vertical-align: top;
  font-size: 0.92em;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill.enabled { border-color: #45b94666; background: #45b94622; color: #45b946; }
.status-pill.disabled { border-color: #cf4d4d66; background: #cf4d4d22; color: #cf4d4d; }

.table-wrap {
  overflow-x: auto;
}

.subtitle {
  color: #666;
  font-size: 0.92em;
  margin-bottom: 0.8em;
}

.group-label td {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.45;
  padding-top: 14px;
  padding-bottom: 4px;
  border-bottom: none;
}

.usage-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
}

.usage-cell span {
  font-size: 0.88em;
  white-space: nowrap;
}

progress {
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.08);
  appearance: none;
}

progress::-webkit-progress-bar {
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.08);
}

progress::-webkit-progress-value {
  border-radius: 2px;
  background: #45b946;
}

progress::-moz-progress-bar {
  border-radius: 2px;
  background: #45b946;
}

progress.warn::-webkit-progress-value {
  background: #e5a00d;
}

progress.warn::-moz-progress-bar {
  background: #e5a00d;
}

progress.danger::-webkit-progress-value {
  background: #cf4d4d;
}

progress.danger::-moz-progress-bar {
  background: #cf4d4d;
}

.event-cards {
  display: none;
}

.event-table-wrap {
  overflow-x: auto;
}

.event-table-wrap table {
  min-width: 880px;
}

.event-table-wrap th,
.event-table-wrap td {
  white-space: nowrap;
}

.event-table-wrap code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

.event-model {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-card {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.88em;
}

.event-card + .event-card {
  margin-top: 8px;
}

.event-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.event-card-row + .event-card-row {
  margin-top: 3px;
}

.event-card-muted {
  opacity: 0.55;
  font-size: 0.92em;
}

.event-card-status {
  font-weight: 700;
  font-size: 0.85em;
}

.event-card-status.ok { color: #45b946; }
.event-card-status.fail { color: #cf4d4d; }

@media (max-width: 700px) {
  .event-table-wrap { display: none; }
  .event-cards { display: block; }
}

@media (prefers-color-scheme: dark) {
  .error {
    color: #fecaca;
    background-color: #7f1d1d66;
  }

  table.striped tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
  }

  td, th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .subtitle {
    color: #b0b0b0;
  }

  progress,
  progress::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.08);
  }

  .event-card {
    border-color: rgba(255, 255, 255, 0.12);
  }
}
