@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #141414;
  --panel: #1b1b1b;
  --panel-2: #232323;
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #b3b3b3;
  --quiet: #808080;
  --green: #46d369;
  --green-bg: rgba(70, 211, 105, 0.14);
  --amber: #e8b13a;
  --amber-bg: rgba(232, 177, 58, 0.14);
  --red: #e50914;
  --red-bg: rgba(229, 9, 20, 0.16);
  --blue: #808080;
  --blue-bg: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 20, 0) 280px),
    var(--bg);
  color: var(--text);
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.status-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  margin-bottom: 32px;
}

.status-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 700;
  font-size: 1rem;
}

.status-brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

.status-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-nav a,
.refresh-button,
.filter-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.status-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
}

.refresh-button {
  padding: 0 13px;
}

.status-nav a:hover,
.refresh-button:hover,
.filter-tab:hover,
.filter-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.refresh-button:disabled {
  cursor: wait;
  color: var(--quiet);
}

.summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.summary-panel.status-operational {
  border-left-color: var(--green);
}

.summary-panel.status-degraded {
  border-left-color: var(--amber);
}

.summary-panel.status-down {
  border-left-color: var(--red);
}

.summary-panel.status-unknown {
  border-left-color: var(--blue);
}

.summary-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

#statusMeta,
.section-heading p,
.component-description,
.component-meta,
.incident-time {
  color: var(--muted);
}

#statusMeta {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 0.96rem;
  line-height: 1.55;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.metric {
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.incident-panel,
.components-panel {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.components-heading {
  align-items: flex-start;
}

.section-heading p {
  margin: 6px 0 0;
  font-size: 0.86rem;
}

#incidentCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
}

.incident-list {
  display: grid;
  gap: 10px;
}

.incident-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 9, 20, 0.25);
  border-radius: 8px;
  background: rgba(229, 9, 20, 0.08);
}

.incident-name {
  font-weight: 700;
}

.incident-message {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.filter-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.filter-tab {
  min-width: 78px;
  padding: 0 12px;
  color: var(--muted);
}

.filter-tab.active {
  color: var(--text);
}

.component-list {
  display: grid;
  gap: 10px;
}

.component-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(190px, 0.7fr) minmax(180px, 0.6fr) minmax(180px, 0.7fr);
  gap: 16px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.component-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-bg);
}

.component-row[data-status="operational"] .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-bg);
}

.component-row[data-status="degraded"] .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-bg);
}

.component-row[data-status="down"] .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-bg);
}

.component-name {
  display: block;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-description {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.status-pill,
.method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill {
  color: var(--blue);
  background: var(--blue-bg);
}

.component-row[data-status="operational"] .status-pill {
  color: var(--green);
  background: var(--green-bg);
}

.component-row[data-status="degraded"] .status-pill {
  color: var(--amber);
  background: var(--amber-bg);
}

.component-row[data-status="down"] .status-pill {
  color: var(--red);
  background: var(--red-bg);
}

.component-meta {
  margin-top: 8px;
  font-size: 0.8rem;
}

.method-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.method-pill {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.uptime-value {
  display: block;
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.uptime-history {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
}

.history-bar {
  width: 100%;
  min-width: 10px;
  height: 28px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.history-bar.status-operational {
  background: var(--green);
}

.history-bar.status-degraded {
  background: var(--amber);
}

.history-bar.status-down {
  background: var(--red);
}

.history-bar.status-unknown {
  background: rgba(255, 255, 255, 0.1);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 920px) {
  .summary-panel,
  .component-row {
    grid-template-columns: 1fr;
  }

  .summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .incident-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .status-shell {
    width: min(100% - 24px, 1160px);
    padding-top: 14px;
  }

  .status-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-nav,
  .filter-tabs {
    width: 100%;
  }

  .status-nav a,
  .refresh-button,
  .filter-tab {
    flex: 1 1 0;
  }

  .summary-panel {
    padding: 20px;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 88px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .component-row {
    min-height: 0;
  }
}
