:root {
  color-scheme: light;
  --ink: #202537;
  --muted: #737b8d;
  --brand: #6750db;
  --line: #e8eaf0;
  --canvas: #f7f8fc;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    15px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #ae9dfa;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -1.2px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.7px;
  margin-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand);
  color: white;
  font-size: 22px;
}
.primary,
.secondary,
.danger {
  min-height: 42px;
  border-radius: 9px;
  padding: 9px 17px;
  font-weight: 650;
  border: 1px solid transparent;
}
.primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 3px 8px #6750db18;
}
.primary:hover {
  background: #5640c6;
}
.secondary {
  background: white;
  border-color: #dfe2eb;
  color: #4e5669;
}
.secondary:hover {
  background: #f2f1fa;
}
.danger {
  background: #bd334a;
  color: white;
}
.full {
  width: 100%;
}
.text-button {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 0;
  font-weight: 650;
}
label {
  display: block;
  margin: 17px 0 6px;
  font-size: 13px;
  font-weight: 650;
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe2eb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
textarea {
  resize: vertical;
}
.error,
.notice {
  padding: 12px 16px;
  border-radius: 9px;
  margin: 15px 0;
  overflow-wrap: anywhere;
}
.error {
  background: #fff0f2;
  border: 1px solid #f4d0d6;
  color: #a4263d;
}
.notice {
  background: #ecf8f2;
  border: 1px solid #ccebdc;
  color: #217650;
}
.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--brand);
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-story {
  padding: 55px clamp(30px, 6vw, 100px);
  background: radial-gradient(ellipse at 20% 90%, #e3dffc, transparent 70%), #f0edfc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-story .brand {
  margin-bottom: 65px;
}
.auth-story h1 {
  font-size: clamp(36px, 4vw, 57px);
  line-height: 1.15;
  letter-spacing: -2px;
}
.auth-story > p {
  margin-top: 22px;
  max-width: 470px;
  color: #666080;
  font-size: 16px;
}
.architecture-preview {
  margin-top: 35px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  max-width: 480px;
}
.architecture-preview > div {
  background: #ffffffb3;
  padding: 17px;
  border: 1px solid white;
  border-radius: 12px;
}
.architecture-preview span {
  display: block;
  color: #9686ce;
  font-size: 11px;
  letter-spacing: 1px;
}
.architecture-preview strong,
.architecture-preview small {
  display: block;
}
.architecture-preview small {
  color: #78718e;
  margin-top: 4px;
}
.auth-story .story-footnote {
  font-size: 12px;
  margin-top: 30px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px 30px;
  background: white;
}
.auth-card {
  width: min(100%, 390px);
}
.auth-card h2 {
  font-size: 30px;
  margin-bottom: 8px;
}
.auth-card form {
  margin-top: 28px;
}
.auth-card .full {
  margin-top: 25px;
}
.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}
.privacy-note {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.topbar {
  min-height: 78px;
  background: white;
  padding: 15px max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.sample-badge {
  background: #f0edfc;
  color: var(--brand);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 9px;
  letter-spacing: 1px;
  margin-left: 8px;
}
.user-menu {
  display: flex;
  gap: 18px;
  align-items: center;
}
#user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-content {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin: 40px 0 27px;
}
.page-heading p {
  margin-top: 9px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.summary-card {
  background: white;
  padding: 22px 25px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.summary-card > span {
  color: #626a7d;
  font-size: 13px;
  font-weight: 600;
}
.summary-card strong {
  display: block;
  font-size: 33px;
  letter-spacing: -1px;
  margin: 4px 0;
}
.summary-card small {
  color: var(--muted);
}
.done-card {
  background: #f0f9f5;
  border-color: #d7ede3;
}
.done-card strong {
  color: #27835b;
}
.tabs {
  display: flex;
  gap: 24px;
  margin: 25px 0 20px;
  border-bottom: 1px solid var(--line);
}
.tab {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 12px 3px;
  color: var(--muted);
  font-weight: 600;
}
.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.panel-heading {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.panel-heading p {
  font-size: 13px;
  margin-top: 3px;
}
.filters {
  display: flex;
  gap: 12px;
  padding: 0 24px 22px;
}
.filters > div:first-child {
  flex: 1;
}
.filters > div:nth-child(2) {
  width: 175px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
thead {
  background: #fafbfe;
}
th {
  color: var(--muted);
  font-weight: 650;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 24px;
  border-block: 1px solid var(--line);
}
td {
  padding: 17px 24px;
  border-bottom: 1px solid #eff0f5;
  vertical-align: middle;
}
td:first-child {
  min-width: 240px;
  width: 46%;
}
td strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
td .description {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 500px;
  max-height: 65px;
  overflow: auto;
  margin-top: 3px;
}
td time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.pill {
  display: inline-block;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.pill.todo,
.pill.neutral {
  background: #eff1f7;
  color: #656d82;
}
.pill.in_progress {
  background: #f0ecff;
  color: #7552cd;
}
.pill.done,
.pill.connected {
  background: #e6f5ed;
  color: #247951;
}
.pill.unavailable {
  background: #fff0f2;
  color: #b1354a;
}
.row-actions {
  display: flex;
  gap: 13px;
  align-items: center;
}
.row-actions button {
  font-size: 12px;
  white-space: nowrap;
}
.row-actions .delete {
  color: #a65a68;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 45px 20px;
}
.empty > span {
  display: block;
  font-size: 38px;
  color: #ab9bdc;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 5px;
}
.empty p {
  font-size: 13px;
}
.pagination {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  align-items: center;
}
.pagination button {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 12px;
  margin-left: 7px;
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0 26px 20px;
}
.activity-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.activity-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0edfc;
  color: var(--brand);
  flex-shrink: 0;
}
.activity-list p {
  overflow-wrap: anywhere;
}
.activity-list time {
  color: var(--muted);
  font-size: 12px;
}
#activity-error {
  margin: 0 24px 20px;
}
.service-grid {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.service-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcff;
}
.service-type {
  color: var(--brand);
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.service-grid h3 {
  margin: 9px 0;
}
.service-grid p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 15px;
}
.flow {
  background: #f7f5ff;
  margin: 0 24px 20px;
  padding: 20px;
  border-radius: 9px;
}
.flow p {
  margin: 8px 0;
  color: #5c478e;
}
.flow small {
  color: var(--muted);
}
#health-time {
  margin: 0 24px 20px;
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0;
  color: #9299a9;
  font-size: 11px;
}
dialog {
  border: 0;
  border-radius: 15px;
  width: min(530px, calc(100% - 32px));
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 25px 100px #22233d30;
}
dialog::backdrop {
  background: #24203660;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-button {
  border: 0;
  background: #f3f3f8;
  border-radius: 7px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  color: var(--muted);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
#delete-dialog p {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: absolute;
  padding: 10px;
  background: white;
  z-index: 10;
}
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    display: none;
  }
  .auth-panel {
    min-height: 100vh;
  }
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .summary-grid {
    gap: 10px;
  }
  .summary-card {
    padding: 18px;
  }
}
@media (max-width: 600px) {
  .workspace-content {
    width: calc(100% - 28px);
  }
  .topbar {
    padding: 13px 15px;
  }
  .sample-badge,
  #user-name {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 25px;
    gap: 17px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .summary-card small {
    font-size: 10px;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .panel-heading {
    padding: 18px;
    align-items: flex-start;
  }
  .filters {
    padding: 0 18px 18px;
    flex-wrap: wrap;
  }
  .filters > div:first-child {
    flex-basis: 100%;
  }
  .filters > div:nth-child(2) {
    flex: 1;
  }
  th,
  td {
    padding: 13px 18px;
  }
  .tabs {
    gap: 20px;
  }
  footer {
    flex-direction: column;
    gap: 5px;
  }
  .pagination {
    padding: 15px;
  }
}

.simulation-form {
  flex-wrap: wrap;
  align-items: flex-end;
}
.simulation-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.simulation-form > div:first-child {
  flex: 1;
  min-width: 240px;
}
.simulation-form > div:nth-child(2) {
  width: 110px;
}
.simulation-actions {
  display: flex;
  gap: 8px;
}
.simulation-explain {
  padding: 0 24px 16px;
  font-size: 13px;
}
.console {
  margin: 0;
  padding: 18px 24px;
  min-height: 160px;
  max-height: 420px;
  overflow: auto;
  background: #16161d;
  color: #d6d6e0;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.console .ok {
  color: #7ee2a8;
}
.console .warn {
  color: #f6c86b;
}
.console .bad {
  color: #ff8a8a;
}
.console .dim {
  color: #8b8b9a;
}

.faults-heading {
  border-top: 1px solid var(--line);
  padding-bottom: 8px;
}
.faults-heading h3 {
  font-size: 17px;
}
.fault-list {
  list-style: none;
  margin: 0;
  padding: 0 24px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.fault-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fault-card.active {
  border-color: #e05a5a;
  background: #fff6f6;
}
.fault-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.fault-card h4 {
  font-size: 15px;
  margin: 0;
}
.fault-card p {
  font-size: 13px;
  margin: 0;
}
.fault-card .watch {
  color: var(--muted);
}
.fault-card .actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.fault-card .actions button {
  font-size: 13px;
  padding: 7px 12px;
}
