
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f5f1;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

body[data-auth="loading"] .summaryGrid,
body[data-auth="loading"] .appTabs,
body[data-auth="loading"] .contentGrid,
body[data-auth="locked"] .summaryGrid,
body[data-auth="locked"] .appTabs,
body[data-auth="locked"] .contentGrid {
  display: none;
}

button,
input {
  font: inherit;
}

.consoleShell {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topBar,
.sectionTitleRow,
.headerMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #6b4e16;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  font-size: 18px;
}

.headerMeta {
  color: #5e6570;
  font-size: 13px;
}

.headerMeta button,
.appTabs button,
.loginPanel button {
  border: 1px solid #17202a;
  background: #17202a;
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.summaryGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 14px;
}

.metricPanel,
.panel,
.loginPanel {
  background: #fffefa;
  border: 1px solid #d8d2c6;
  border-radius: 8px;
}

.metricPanel {
  padding: 12px 14px;
}

.metricPanel span,
.sectionTitleRow p,
td span,
.sourceRow small {
  display: block;
  color: #69717d;
  font-size: 12px;
}

.metricPanel strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.appTabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.appTabs button {
  border-color: #b9c7c1;
  background: #ffffff;
  color: #17202a;
  white-space: nowrap;
}

.appTabs button.active {
  background: #0f6b5f;
  border-color: #0f6b5f;
  color: #ffffff;
}

.contentGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  margin-top: 12px;
}

.panel {
  padding: 14px 16px;
}

.widePanel {
  min-width: 0;
}

.tableWrap {
  overflow-x: auto;
  margin-top: 16px;
}

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

th,
td {
  border-bottom: 1px solid #ece6da;
  padding: 11px 9px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #5a5f68;
  font-size: 12px;
  text-transform: uppercase;
}

th:nth-child(1) {
  width: 106px;
}

th:nth-child(2) {
  width: 178px;
}

th:nth-child(3) {
  width: 172px;
}

th:nth-child(4),
th:nth-child(5) {
  width: 64px;
}

th:nth-child(6) {
  width: 86px;
}

th:nth-child(7) {
  width: 82px;
}

th:nth-child(8) {
  width: 92px;
}

.numberCell {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.paidBadge {
  border: 1px solid #cfd6d2;
  border-radius: 999px;
  color: #59616d;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
}

.paidBadge.paid {
  background: #edf8f1;
  border-color: #99d5af;
  color: #146c3b;
}

.paidBadge.notPaid {
  background: #fff3ed;
  border-color: #e7b59c;
  color: #8a3b17;
}

.heatCell {
  min-width: 0;
}

.heatStrip {
  display: flex;
  align-items: center;
  gap: 5px;
}

.heatTile {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 2px;
}

.heatTile[data-today="true"] {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(23,32,42,0.28);
}

.heatTile[data-level="0"] {
  background: rgba(23,32,42,0.06);
}

.heatTile[data-level="1"] {
  background: rgba(255,179,125,0.36);
}

.heatTile[data-level="2"] {
  background: rgba(255,150,92,0.58);
}

.heatTile[data-level="3"] {
  background: rgba(255,107,44,0.78);
}

.heatTile[data-level="4"] {
  background: #ff6b2c;
}

.sourceRows {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.sourceRow strong,
.sourceRow span,
.sourceRow small {
  display: block;
}

.sourceRow strong {
  margin-bottom: 2px;
}

.sourceRow {
  border-left: 4px solid #5d87c8;
  background: #f7f9fc;
  padding: 10px 12px;
}

.sourceRow.live {
  border-left-color: #0f8b5f;
}

.sourceRow.stale {
  border-left-color: #d58418;
}

.sourceRow.notConfigured,
.sourceRow.error {
  border-left-color: #b23a48;
}

.demoBadge {
  background: #ffe2a9;
  border: 1px solid #e2ad45;
  color: #583a00;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.loginPage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f6f5f1;
}

.loginShell {
  width: min(420px, calc(100vw - 32px));
}

.consoleShell > .loginShell {
  margin: 72px auto 0;
}

.loginPanel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.loginPanel small {
  color: #b23a48;
  min-height: 16px;
}

.loginPanel label {
  display: grid;
  gap: 8px;
  color: #4f5965;
  font-size: 13px;
  font-weight: 700;
}

.loginPanel input {
  border: 1px solid #b9c7c1;
  min-height: 42px;
  padding: 8px 10px;
}

@media (max-width: 860px) {
  .consoleShell {
    width: min(100vw - 24px, 720px);
    padding-top: 18px;
  }

  .topBar,
  .sectionTitleRow {
    align-items: flex-start;
    flex-direction: column;
  }

  .summaryGrid,
  .contentGrid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 100%;
  }

  th:nth-child(1),
  td:nth-child(1),
  th:nth-child(5),
  td:nth-child(5),
  th:nth-child(6),
  td:nth-child(6),
  th:nth-child(7),
  td:nth-child(7),
  th:nth-child(8),
  td:nth-child(8) {
    display: none;
  }

  th:nth-child(2) {
    width: 126px;
  }

  th:nth-child(3) {
    width: 146px;
  }

  th:nth-child(4) {
    width: 46px;
  }

  th,
  td {
    padding-left: 6px;
    padding-right: 6px;
  }

  .heatTile {
    width: 15px;
    height: 15px;
  }

  .heatStrip {
    gap: 3px;
  }

  h1 {
    font-size: 28px;
  }
}
