:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #16202a;
  --muted: #647184;
  --line: #dbe2ea;
  --cyan: #00a7c7;
  --magenta: #d93682;
  --green: #1b9a59;
  --yellow: #d89a00;
  --blue: #315fd6;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 11px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 15px;
}

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

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--cyan);
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-width: max-content;
}

.tab.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

main {
  padding: 20px 24px 32px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  min-height: 108px;
  padding: 14px;
}

.metric-card span,
.metric-card small,
.muted {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 25px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.layout-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stack-top {
  margin-top: 16px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 12px;
}

.large-readout {
  font-size: 22px;
  line-height: 1.25;
  margin: 4px 0 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f7;
  color: var(--muted);
  text-transform: lowercase;
  overflow-wrap: anywhere;
}

.status.is-ok {
  background: #e8f6ee;
  color: var(--green);
}

.status.is-warn {
  background: #fff5db;
  color: #906100;
}

.status.is-danger {
  background: #fde7e7;
  color: var(--danger);
}

.clean-list {
  margin: 0;
  padding-left: 18px;
}

.clean-list li {
  margin: 6px 0;
}

.bars {
  display: grid;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 46px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 12px;
  background: #eef2f7;
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
}

.fill-0 { background: var(--cyan); }
.fill-1 { background: var(--magenta); }
.fill-2 { background: var(--green); }
.fill-3 { background: var(--yellow); }
.fill-4 { background: var(--blue); }

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

td {
  border-top: 1px solid var(--line);
  padding: 9px 8px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

td:first-child {
  color: var(--muted);
  width: 34%;
}

.provider-block + .provider-block {
  margin-top: 16px;
}

.provider-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.code-box {
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  background: #111820;
  color: #d9f4f6;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .layout-two,
  .layout-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  main,
  .tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .bar-row {
    grid-template-columns: 1fr;
  }
}
