:root {
  --demo-bg: #f6f8fb;
  --demo-card: #ffffff;
  --demo-line: #dbe4ef;
  --demo-text: #0b1b34;
  --demo-muted: #60708a;
  --demo-navy: #0c1d38;
  --demo-blue: #2457d6;
  --demo-soft: #eef4ff;
  --demo-green: #dff8e8;
  --demo-green-text: #0a6a38;
  --demo-warn: #fff4dc;
  --demo-warn-text: #8b5b00;
  --demo-red: #ffe7e7;
  --demo-red-text: #9a2626;
}

.live-demo-page {
  margin: 0;
  background: var(--demo-bg);
  color: var(--demo-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.live-demo-shell {
  min-height: 100vh;
}

.live-demo-topbar {
  min-height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--demo-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.live-demo-topbar a {
  color: var(--demo-text);
  font-weight: 800;
  text-decoration: none;
}

.live-demo-topbar .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--demo-muted);
  font-size: 13px;
}

.live-demo-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: calc(100vh - 65px);
}

.live-demo-sidebar {
  background: var(--demo-navy);
  color: #fff;
  padding: 24px 16px;
}

.live-demo-sidebar h2 {
  margin: 0 10px 22px;
  font-size: 19px;
}

.live-demo-sidebar button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #dce7fb;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  margin-bottom: 5px;
  font: inherit;
  cursor: pointer;
}

.live-demo-sidebar button:hover,
.live-demo-sidebar button.active {
  background: #203e71;
  color: #fff;
}

.live-demo-sidebar .sidebar-note {
  margin: 26px 10px 0;
  color: #91a7cb;
  font-size: 12px;
  line-height: 1.5;
}

.live-demo-main {
  padding: 30px;
  min-width: 0;
}

.live-demo-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.live-demo-heading h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.live-demo-heading p {
  color: var(--demo-muted);
  margin: 8px 0 0;
  font-size: 17px;
}

.live-demo-status {
  padding: 10px 13px;
  background: var(--demo-green);
  color: var(--demo-green-text);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
}

.live-demo-status.offline {
  background: var(--demo-warn);
  color: var(--demo-warn-text);
}

.live-demo-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.live-demo-metric,
.live-demo-card {
  background: var(--demo-card);
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(12, 29, 56, 0.03);
}

.live-demo-metric {
  padding: 18px;
}

.live-demo-metric span {
  display: block;
  color: var(--demo-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.live-demo-metric strong {
  font-size: 24px;
}

.live-demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: start;
}

.live-demo-card {
  padding: 20px;
}

.live-demo-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.live-demo-card p.helper {
  color: var(--demo-muted);
  margin-top: -8px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.live-demo-form {
  display: grid;
  gap: 12px;
}

.live-demo-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #34445f;
}

.live-demo-form input,
.live-demo-form select,
.live-demo-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd9e7;
  border-radius: 9px;
  padding: 10px 11px;
  background: #fff;
  color: var(--demo-text);
  font: inherit;
}

.live-demo-form textarea {
  min-height: 84px;
  resize: vertical;
}

.live-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--demo-navy);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.live-demo-button.secondary {
  background: var(--demo-soft);
  color: #173b7a;
}

.live-demo-button.danger {
  background: #fff0f0;
  color: #9a2626;
}

.live-demo-button.small {
  padding: 7px 10px;
  font-size: 12px;
}

.live-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-demo-table-wrap {
  overflow-x: auto;
}

.live-demo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

.live-demo-table th,
.live-demo-table td {
  border-bottom: 1px solid #e6ecf4;
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.live-demo-table th {
  color: var(--demo-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.live-demo-table tr:last-child td {
  border-bottom: 0;
}

.live-demo-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--demo-soft);
  color: #214c99;
}

.live-demo-pill.good {
  background: var(--demo-green);
  color: var(--demo-green-text);
}

.live-demo-pill.warn {
  background: var(--demo-warn);
  color: var(--demo-warn-text);
}

.live-demo-pill.bad {
  background: var(--demo-red);
  color: var(--demo-red-text);
}

.live-demo-empty,
.live-demo-error,
.live-demo-loading {
  background: #fff;
  border: 1px dashed #cad6e6;
  border-radius: 14px;
  padding: 28px;
  color: var(--demo-muted);
}

.live-demo-error {
  border-color: #efb8b8;
  color: #8f2424;
  background: #fff8f8;
}

.live-demo-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.live-demo-lane {
  min-width: 190px;
  background: #f7f9fc;
  border: 1px solid var(--demo-line);
  border-radius: 12px;
  padding: 12px;
}

.live-demo-lane h4 {
  margin: 0 0 10px;
}

.live-demo-ticket {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 9px;
}

.live-demo-ticket strong,
.live-demo-ticket span {
  display: block;
}

.live-demo-ticket span {
  color: var(--demo-muted);
  margin: 4px 0 10px;
  font-size: 13px;
}

.live-demo-event {
  display: grid;
  grid-template-columns: 100px 90px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #e6ecf4;
  font-size: 13px;
}

.live-demo-event:last-child {
  border-bottom: 0;
}

.live-demo-event time,
.live-demo-event b {
  color: var(--demo-muted);
}

.live-demo-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  background: var(--demo-navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(12,29,56,.25);
  z-index: 50;
}

.live-demo-toast.error {
  background: #8d2525;
}

@media (max-width: 980px) {
  .live-demo-layout {
    grid-template-columns: 1fr;
  }

  .live-demo-sidebar {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 12px;
  }

  .live-demo-sidebar h2,
  .live-demo-sidebar .sidebar-note {
    display: none;
  }

  .live-demo-sidebar button {
    width: auto;
    white-space: nowrap;
    margin: 0;
  }

  .live-demo-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .live-demo-main {
    padding: 18px 12px;
  }

  .live-demo-topbar {
    padding: 0 12px;
  }

  .live-demo-topbar .meta {
    display: none;
  }

  .live-demo-heading {
    display: block;
  }

  .live-demo-status {
    display: inline-flex;
    margin-top: 12px;
  }

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


/* Productized demo UX */
.live-demo-modal-open {
  overflow: hidden;
}

.live-demo-topbar {
  gap: 14px;
}

.live-demo-topbar-left,
.live-demo-topbar-right,
.live-demo-toolbar,
.live-demo-toolbar-group,
.live-demo-control-row,
.live-demo-summary-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-demo-topbar-left {
  min-width: 0;
}

.live-demo-topbar-right {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-demo-workspace {
  display: grid;
  gap: 3px;
  min-width: 190px;
}

.live-demo-workspace label,
.live-demo-control-label {
  color: var(--demo-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-demo-workspace select,
.live-demo-filter,
.live-demo-search {
  border: 1px solid #cfd9e7;
  background: #fff;
  color: var(--demo-text);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
}

.live-demo-workspace select {
  min-width: 190px;
  font-weight: 800;
}

.live-demo-search {
  min-width: 220px;
}

.live-demo-toolbar {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.live-demo-toolbar-group {
  flex-wrap: wrap;
}

.live-demo-toolbar-note {
  color: var(--demo-muted);
  font-size: 13px;
}

.live-demo-menu {
  position: relative;
}

.live-demo-menu > summary {
  list-style: none;
}

.live-demo-menu > summary::-webkit-details-marker {
  display: none;
}

.live-demo-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: min(360px, 90vw);
  padding: 8px;
  background: #fff;
  border: 1px solid var(--demo-line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(12,29,56,.18);
  z-index: 40;
}

.live-demo-menu-panel.left {
  right: auto;
  left: 0;
}

.live-demo-menu-panel button,
.live-demo-menu-panel a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  background: transparent;
  color: var(--demo-text);
  text-align: left;
  padding: 10px 11px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.live-demo-menu-panel button:hover,
.live-demo-menu-panel a:hover {
  background: var(--demo-soft);
}

.live-demo-menu-panel .danger {
  color: var(--demo-red-text);
}

.live-demo-menu-divider {
  height: 1px;
  background: #e9eef5;
  margin: 6px 2px;
}

.live-demo-menu-caption {
  color: var(--demo-muted);
  padding: 7px 10px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.live-demo-sidebar {
  position: relative;
}

.live-demo-sidebar-section {
  margin-top: 18px;
}

.live-demo-sidebar-section:first-of-type {
  margin-top: 0;
}

.live-demo-sidebar-label {
  display: block;
  margin: 0 11px 7px;
  color: #8298bc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.live-demo-sidebar button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-demo-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #dce7fb;
  font-size: 10px;
  font-weight: 900;
}

.live-demo-sidebar button.active .live-demo-nav-badge {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.live-demo-record-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--demo-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.live-demo-record-link:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.live-demo-kicker {
  display: block;
  color: var(--demo-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.live-demo-surface-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.live-demo-surface-title h3 {
  margin: 0;
}

.live-demo-card-subtle {
  background: #f9fbfe;
}

.live-demo-stat-list {
  display: grid;
  gap: 10px;
}

.live-demo-stat-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6ecf4;
}

.live-demo-stat-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.live-demo-stat-list span {
  color: var(--demo-muted);
}

.live-demo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 38, .56);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.live-demo-modal {
  width: min(720px, 96vw);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(7,19,38,.34);
  overflow: hidden;
}

.live-demo-modal-small {
  width: min(460px, 96vw);
}

.live-demo-modal-large {
  width: min(960px, 96vw);
}

.live-demo-modal-header,
.live-demo-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
}

.live-demo-modal-header {
  border-bottom: 1px solid #e6ecf4;
}

.live-demo-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid #e6ecf4;
}

.live-demo-modal-header h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.live-demo-modal-eyebrow {
  display: block;
  color: var(--demo-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.live-demo-modal-body {
  overflow: auto;
  padding: 20px;
}

.live-demo-modal-copy {
  color: var(--demo-muted);
  line-height: 1.6;
}

.live-demo-icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #fff;
  color: var(--demo-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.live-demo-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.live-demo-detail-item {
  padding: 13px;
  background: #f8fafd;
  border: 1px solid #e3eaf3;
  border-radius: 11px;
}

.live-demo-detail-item span {
  display: block;
  color: var(--demo-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}

.live-demo-detail-item strong {
  display: block;
  word-break: break-word;
}

.live-demo-modal-section {
  margin-top: 20px;
}

.live-demo-modal-section h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.live-demo-timeline {
  display: grid;
  gap: 12px;
}

.live-demo-timeline-item {
  display: grid;
  grid-template-columns: 12px minmax(0,1fr);
  gap: 10px;
  align-items: start;
}

.live-demo-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--demo-blue);
  box-shadow: 0 0 0 4px #e8f0ff;
}

.live-demo-timeline-item p {
  margin: 2px 0 0;
  color: var(--demo-muted);
  font-size: 13px;
}

.live-demo-progress {
  height: 8px;
  background: #edf1f6;
  border-radius: 999px;
  overflow: hidden;
}

.live-demo-progress > span {
  display: block;
  height: 100%;
  background: var(--demo-blue);
  border-radius: inherit;
}

.live-demo-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.live-demo-chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--demo-soft);
  color: #234a90;
  font-size: 12px;
  font-weight: 800;
}

.live-demo-button.danger-solid {
  background: #9a2626;
  color: #fff;
}

.live-demo-button:disabled,
.live-demo-menu-panel button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.live-demo-mini-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 82px;
  padding-top: 10px;
}

.live-demo-mini-chart span {
  flex: 1;
  min-width: 9px;
  background: linear-gradient(180deg, #2f70ed, #8fd2f2);
  border-radius: 5px 5px 2px 2px;
}

.live-demo-callout {
  padding: 13px 14px;
  border-radius: 11px;
  background: #f4f8ff;
  border: 1px solid #d9e7ff;
  color: #24416f;
  line-height: 1.5;
}

.live-demo-row-actions {
  position: relative;
  display: inline-flex;
}

.live-demo-row-actions .live-demo-menu-panel {
  min-width: 180px;
}

@media (max-width: 980px) {
  .live-demo-topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .live-demo-topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .live-demo-workspace {
    min-width: 0;
  }

  .live-demo-workspace select {
    min-width: 0;
  }

  .live-demo-search {
    min-width: 160px;
    flex: 1;
  }

  .live-demo-layout {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .live-demo-topbar-left {
    width: 100%;
  }

  .live-demo-topbar-right {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-demo-workspace,
  .live-demo-workspace select,
  .live-demo-search,
  .live-demo-filter {
    width: 100%;
  }

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

  .live-demo-modal-overlay {
    padding: 8px;
  }

  .live-demo-modal {
    max-height: 95vh;
  }
}
