body.system-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background: #f6f5f0;
  color: #17202a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.system-panel {
  box-sizing: border-box;
  width: min(520px, calc(100% - 32px));
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 32px;
  background: #fff;
}

.system-panel .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #276c5b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.system-panel .brand img {
  width: 28px;
  height: 28px;
}

.system-panel h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.1;
}

.system-panel p {
  margin: 0 0 20px;
  color: #5e6b78;
}

.system-panel .button {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  cursor: pointer;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  background: #276c5b;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.system-panel .button + .button {
  margin-left: 8px;
}

.system-panel .session-details {
  display: inline-block;
  margin-left: 8px;
  max-width: 100%;
  vertical-align: top;
}

.system-panel .session-details summary {
  cursor: pointer;
  list-style: none;
}

.system-panel .session-details summary::-webkit-details-marker {
  display: none;
}

.system-panel .session-details code {
  display: block;
  max-width: 100%;
  margin-top: 12px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: #f6f5f0;
  color: #17202a;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  user-select: all;
}

.system-panel .session-details[open] {
  display: block;
  margin: 12px 0 0;
}

.system-panel .token-panel {
  margin: 20px 0;
  border-top: 1px solid #d8dee6;
  border-bottom: 1px solid #d8dee6;
  padding: 18px 0;
}

.system-panel .token-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
}

.system-panel .token-panel form {
  margin: 0;
}

.system-panel .token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.system-panel .token-created {
  margin-top: 12px;
}

.system-panel .token-created span,
.system-panel .token-meta {
  display: block;
  margin-bottom: 6px;
  color: #5e6b78;
  font-size: 13px;
  font-weight: 700;
}

.system-panel .token-created code,
.system-panel .token-list code {
  display: block;
  max-width: 100%;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: #f6f5f0;
  color: #17202a;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  user-select: all;
}

.system-panel .token-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.system-panel .token-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.system-panel .token-empty {
  margin: 12px 0 0;
}

.system-panel .button.secondary {
  border: 1px solid #d8dee6;
  background: #fff;
  color: #17202a;
}

.system-panel .inline-form {
  display: inline;
}

.system-panel .inline-form .button {
  font: inherit;
}

.system-panel .muted {
  color: #5e6b78;
  font-size: 14px;
}

@media (max-width: 600px) {
  body.system-page {
    align-items: start;
    padding: 32px 16px;
  }

  .system-panel {
    width: 100%;
    padding: 24px 20px;
  }

  .system-panel h1 {
    font-size: 30px;
  }

  .system-panel .button,
  .system-panel .session-details,
  .system-panel .inline-form,
  .system-panel .inline-form .button {
    width: 100%;
  }

  .system-panel .session-details {
    margin: 8px 0 0;
  }

  .system-panel .inline-form .button {
    margin-top: 8px;
  }

  .system-panel .token-list li {
    grid-template-columns: 1fr;
  }

  .system-panel .token-actions {
    display: grid;
  }
}
