:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-raised: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --border: #d8dee8;
  --brand: #0041f2;
  --brand-soft: #e8eefc;
  --green: #137333;
  --green-soft: #e6f4ea;
  --amber: #a16207;
  --amber-soft: #fef3c7;
  --red: #b42318;
  --red-soft: #fee4e2;
  --gray-soft: #eef2f7;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0, 65, 242, 0.08), rgba(0, 65, 242, 0) 360px),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  width: 112px;
  height: 48px;
}

.brand img {
  width: 100%;
  height: auto;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.environment {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 12px;
  color: var(--muted);
  text-transform: capitalize;
  font-size: 14px;
}

.icon-button {
  min-height: 36px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: white;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.overall-pill {
  min-width: 168px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 700;
  text-transform: capitalize;
  box-shadow: var(--shadow);
}

.overall-pill.operational,
.status-dot.operational {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(19, 115, 51, 0.22);
}

.overall-pill.degraded,
.status-dot.degraded {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(161, 98, 7, 0.25);
}

.overall-pill.outage,
.status-dot.outage {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(180, 35, 24, 0.25);
}

.overall-pill.unknown,
.status-dot.unknown {
  background: var(--gray-soft);
  color: #475467;
  border-color: var(--border);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.panel-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.component-list {
  display: grid;
}

.component {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.component:last-child {
  border-bottom: 0;
}

.component h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.component p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.component-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.history {
  padding: 24px;
}

.history-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(4px, 1fr));
  gap: 3px;
  margin-bottom: 16px;
}

.history-bar {
  height: 76px;
  border-radius: 4px;
  background: var(--gray-soft);
}

.history-bar.operational {
  background: #34a853;
}

.history-bar.degraded {
  background: #fbbc04;
}

.history-bar.outage {
  background: #ea4335;
}

.history-caption {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.incidents {
  padding: 18px 24px 24px;
}

.empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.incident {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.incident:first-child {
  border-top: 0;
}

.incident strong {
  display: block;
  margin-bottom: 4px;
}

.incident p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
  }

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

  .summary {
    align-items: stretch;
    gap: 18px;
  }

  .overall-pill {
    width: 100%;
  }

  .grid {
    display: grid;
  }

  .component {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }
}
