html,
body {
  background: #f3f6f9;
  color: #17212f;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  margin: 0;
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

button,
input,
select {
  font: inherit;
}

.boot-card {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  margin: 48px auto;
  max-width: 960px;
  padding: 24px;
}

#boot-error {
  color: #b42318;
  margin: 24px auto;
  max-width: 960px;
  white-space: pre-wrap;
}

.page {
  margin: 0 auto;
  max-width: 1480px;
  padding: 16px;
}

.hero {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(28, 48, 74, 0.06);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.hero-copy {
  color: #486178;
  font-size: 13px;
  margin: 6px 0 0;
  max-width: 720px;
}

.eyebrow {
  color: #486178;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.version-pill {
  background: #f5f7fb;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #28445e;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  white-space: nowrap;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stackblitz-link {
  background: #ffffff;
  border: 1px solid #0c73b8;
  border-radius: 999px;
  color: #0c5e95;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.stackblitz-link:hover,
.stackblitz-link:focus {
  background: #e8f3fb;
  outline: none;
}

.layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.nav {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 6px;
  position: sticky;
  top: 16px;
}

.nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #334e68;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 8px;
  min-height: 32px;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.nav button span {
  color: #7890a6;
  font-size: 10px;
  font-weight: 700;
  min-width: 22px;
}

.nav button.active {
  background: #e8f3fb;
  color: #0c73b8;
  font-weight: 700;
}

.content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.example-card {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(28, 48, 74, 0.05);
  min-width: 0;
  padding: 14px;
}

.example-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.example-title p {
  color: #566f86;
  font-size: 13px;
  margin: 4px 0 0;
}

.preview {
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  min-width: 0;
  overflow: hidden;
}

.feature-demo {
  background: #ffffff;
}

.filter-toolbar {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #dbe4ef;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(130px, 0.8fr)) auto;
  padding: 10px;
}

.control-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.control-wide {
  grid-column: span 2;
}

.control-field span,
.check-field span {
  color: #486178;
  font-size: 11px;
  font-weight: 700;
}

.control-field input,
.control-field select {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 4px;
  color: #17324d;
  font-size: 13px;
  min-height: 32px;
  min-width: 0;
  padding: 5px 8px;
  width: 100%;
}

.ghost-button {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 4px;
  color: #25445f;
  cursor: pointer;
  font-size: 13px;
  min-height: 32px;
  padding: 5px 10px;
}

.check-grid {
  align-items: center;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
}

.check-field {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-height: 32px;
}

.check-field input {
  accent-color: #0c73b8;
  height: 15px;
  margin: 0;
  width: 15px;
}

.inline-check {
  align-self: end;
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 4px;
  padding: 7px 9px;
}

.large-data-toolbar {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.metric-tile {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 4px;
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
}

.metric-tile span {
  color: #486178;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-tile strong {
  color: #123759;
  font-size: 18px;
  line-height: 1.15;
}

.code-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.code-panel {
  min-width: 0;
}

.code-panel h3 {
  color: #486178;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

pre {
  background: #102033;
  border-radius: 4px;
  color: #dcecff;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  max-height: 240px;
  min-height: 126px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.event-log {
  align-items: start;
  background: #f6f9fc;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  color: #334e68;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  padding: 10px;
}

.event-log h3 {
  font-size: 13px;
  margin-bottom: 4px;
}

.event-log p {
  color: #56718a;
  font-size: 12px;
  margin: 0;
}

.event-log button {
  background: #ffffff;
  border: 1px solid #d4dfeb;
  border-radius: 4px;
  color: #25445f;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
}

.event-log pre {
  grid-column: 1 / -1;
  max-height: 120px;
  min-height: 64px;
}

.status-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
}

.status-paid {
  background: #e8f7ee;
  color: #1f6f35;
}

.status-review {
  background: #fff3d6;
  color: #8a5a00;
}

.status-pending {
  background: #eef3ff;
  color: #3255a4;
}

.customer-cell {
  display: grid;
  gap: 2px;
}

.customer-cell small {
  color: #637d94;
  font-size: 11px;
}

.money-cell {
  color: #0f5f97;
  font-weight: 700;
}

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

.detail-grid div {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  padding: 10px;
}

.detail-grid strong,
.detail-grid span {
  display: block;
}

.detail-grid strong {
  color: #486178;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  margin-bottom: 4px;
}

.status-pill {
  background: #edf7ed;
  border: 1px solid #b7dfb7;
  border-radius: 999px;
  color: #1f6f35;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 9px;
}

.row-warning td {
  background: #fff7ed !important;
}

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

.product-cell img {
  background: #f8fafc;
  border: 1px solid #d7e3ef;
  border-radius: 6px;
  flex: 0 0 auto;
  height: 38px;
  object-fit: cover;
  width: 48px;
}

.product-cell span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-cell strong {
  color: #102a43;
  font-size: 13px;
  line-height: 1.25;
}

.product-cell small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
}

.stock-pill {
  background: #e8f3fb;
  border: 1px solid #c9e2f5;
  border-radius: 999px;
  color: #0c4a6e;
  display: inline-flex;
  font-weight: 700;
  padding: 4px 8px;
}

.stock-pill.stock-low {
  background: #fff4e6;
  border-color: #ffd8a8;
  color: #9a3412;
}

.headless-board {
  background: #f8fbff;
  border: 1px solid #d6e3ef;
  border-radius: 6px;
  padding: 12px;
}

.headless-toolbar {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.5fr) auto;
  margin-bottom: 10px;
}

.headless-meta {
  align-items: center;
  color: #486178;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin: 0 0 8px;
}

.headless-sortbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.headless-sortbar button,
.headless-pager button {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 4px;
  color: #17324d;
  cursor: pointer;
  min-height: 32px;
  padding: 6px 10px;
}

.headless-sortbar button[aria-sort="ascending"],
.headless-sortbar button[aria-sort="descending"] {
  border-color: #0c73b8;
  color: #0c73b8;
  font-weight: 700;
}

.headless-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.headless-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d6e3ef;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(100px, 0.8fr) 42px;
  min-height: 64px;
  padding: 10px;
}

.headless-card.selected {
  border-color: #0c73b8;
  box-shadow: inset 3px 0 0 #0c73b8;
}

.headless-card:focus {
  outline: 2px solid rgba(12, 115, 184, 0.35);
  outline-offset: 2px;
}

.headless-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.headless-card strong {
  color: #102a43;
  font-size: 13px;
}

.headless-card small {
  color: #64748b;
  font-size: 11px;
}

.headless-card meter {
  width: 100%;
}

.headless-pager {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.headless-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-wide {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .hero,
  .example-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .nav {
    max-height: 220px;
    position: static;
  }

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

  .filter-toolbar,
  .check-grid {
    grid-template-columns: 1fr;
  }

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

  .headless-toolbar {
    grid-template-columns: 1fr;
  }

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

  .headless-card {
    align-items: start;
    grid-template-columns: 1fr;
  }
}
