:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  background: #0b1120;
  color: #f3f5fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top right, #1b2c4a 0, #0b1120 38rem);
}

.shell {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.header, .editor-heading, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header { justify-content: flex-start; margin-bottom: 28px; }
.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: #ff7747;
  color: #101727;
  font-size: 28px;
  font-weight: 800;
}

.eyebrow { margin: 0 0 3px; color: #aab6ca; font-size: 11px; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; }
h2 { margin-bottom: 8px; font-size: 19px; }
.card {
  padding: 26px;
  border: 1px solid #283650;
  border-radius: 18px;
  background: rgb(19 29 49 / 94%);
  box-shadow: 0 18px 48px rgb(0 0 0 / 24%);
}

.muted, footer { color: #aab6ca; font-size: 14px; line-height: 1.5; }
label { display: block; margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
input, textarea {
  width: 100%;
  border: 1px solid #34445f;
  border-radius: 10px;
  background: #0e1728;
  color: #f3f5fa;
  font: inherit;
}
input { min-height: 46px; padding: 10px 12px; }
textarea {
  min-height: 390px;
  padding: 14px;
  resize: vertical;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 13px;
  line-height: 1.55;
}
.discovery-settings {
  margin: 22px 0 20px;
  padding: 18px;
  border: 1px solid #34445f;
  border-radius: 12px;
  background: #111b2d;
}
.discovery-settings h3 { margin: 0 0 8px; font-size: 16px; }
.discovery-settings .muted { margin-bottom: 10px; }
.field-help { margin: 8px 0 14px; color: #aab6ca; font-size: 12px; line-height: 1.5; }
input:focus, textarea:focus { outline: 2px solid #ff956d; outline-offset: 1px; }
button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary { background: #ff7747; color: #101727; }
.secondary { border: 1px solid #34445f; background: #19253a; color: #f3f5fa; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
#login-form .primary { width: 100%; margin-top: 16px; }
.actions { justify-content: flex-end; margin-top: 16px; }
.status { min-height: 20px; margin: 0 auto 0 0; color: #c4d2e6; font-size: 13px; }
.status[data-state="error"] { color: #ff9d91; }
.license-card { margin-top: 18px; }
.license-card h2 { margin-bottom: 8px; }
.license-list-heading, .license-item-heading, .license-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.license-list-heading { margin-top: 28px; }
.license-list-heading h3 { margin: 0; font-size: 16px; }
.license-list { display: grid; gap: 12px; margin-top: 14px; }
.license-item {
  padding: 16px;
  border: 1px solid #34445f;
  border-radius: 12px;
  background: #111b2d;
}
.license-item-heading strong { overflow-wrap: anywhere; }
.license-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.license-badge.is-active { background: #173b34; color: #9be2c2; }
.license-badge.is-revoked { background: #46282f; color: #ffaaa8; }
.license-fingerprint { margin: 10px 0 4px; font-family: Consolas, monospace; font-size: 13px; }
.license-meta, .empty-state { margin: 0; color: #aab6ca; font-size: 13px; }
.expiration-label { margin-top: 14px; }
.license-actions { justify-content: flex-start; margin-top: 12px; flex-wrap: wrap; }
.license-actions button { min-height: 38px; }
footer { padding: 18px 4px; text-align: center; }

@media (max-width: 600px) {
  .shell { padding-top: 24px; }
  .card { padding: 20px; }
  .editor-heading { align-items: flex-start; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions .primary { width: 100%; }
  .license-list-heading { align-items: flex-start; flex-direction: column; }
  .license-list-heading button { width: 100%; }
  .license-item-heading { align-items: flex-start; }
  .license-actions { align-items: stretch; flex-direction: column; }
  .license-actions button { width: 100%; }
  textarea { min-height: 300px; }
}
