:root {
  color-scheme: dark;
  --bg: #0f1420;
  --fg: #e6e9ef;
  --muted: #8892a6;
  --accent: #4f8cff;
  --border: #232a3b;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 1.25rem;
}

main#view {
  padding: 2rem;
  height: calc(100vh - 5rem);
  overflow: auto;
}

.status {
  color: var(--muted);
  font-size: 1.25rem;
  text-align: center;
  margin-top: 4rem;
}

.status.error {
  color: #ff6b6b;
}

.issue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.issue-table th,
.issue-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.issue-table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.issue-key {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--border);
  font-size: 0.85rem;
}

.no-issues {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.issue-highlight {
  background: rgba(255, 82, 82, 0.14);
  box-shadow: inset 3px 0 0 0 #ff5252;
}

.issue-highlight td {
  color: var(--fg);
}

.monitor-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.monitor-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.monitor-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.monitor-up {
  background: #3ecf8e;
}

.monitor-down {
  background: #ff6b6b;
}

.monitor-pending {
  background: #f5c451;
}

.monitor-maintenance {
  background: var(--muted);
}

.monitor-group {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 8rem;
}

.monitor-name {
  flex: 1;
  font-weight: 600;
}

.monitor-uptime {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.monitor-checked {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.hint {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.6rem 1rem;
  background: var(--border);
  color: var(--fg);
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hint.hidden {
  opacity: 0;
}

.hint kbd {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--muted);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.85rem;
}

.alert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.alert-table th,
.alert-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.alert-table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.alert-row.alert-critical {
  border-left: 3px solid #ff5252;
}

.alert-row.alert-warning {
  border-left: 3px solid #f5c451;
}

.severity-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.severity-badge.severity-critical {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
}

.severity-badge.severity-warning {
  background: rgba(245, 196, 81, 0.15);
  color: #f5c451;
}

.alert-name {
  display: block;
  font-weight: 600;
}

.alert-summary {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.alert-age {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.alert-detail {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
