:root {
  color-scheme: dark;
  --bg: #111417;
  --panel: #1b2025;
  --panel-strong: #242a31;
  --text: #f4f1ea;
  --muted: #a8b0b8;
  --line: #343b43;
  --accent: #4ecdc4;
  --accent-2: #ffb000;
  --danger: #ff6678;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(78, 205, 196, 0.12), transparent 35%),
    linear-gradient(315deg, rgba(255, 176, 0, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 18px;
  font-size: 22px;
}

.lede {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.status {
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 32, 37, 0.8);
  text-align: center;
  color: var(--muted);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status.ok {
  color: var(--accent);
  border-color: rgba(78, 205, 196, 0.45);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 32, 37, 0.92);
  padding: 20px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.18);
}

.auth-panel {
  max-width: 520px;
  margin-bottom: 16px;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 32, 37, 0.92);
  padding: 18px;
  cursor: pointer;
}

.plan-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(78, 205, 196, 0.45);
}

.plan-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.plan-card strong {
  display: block;
  margin: 12px 0;
  font-size: 28px;
}

.plan-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161b;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #08201f;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--line);
}

form {
  display: grid;
  gap: 14px;
}

output {
  display: block;
  min-height: 24px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

output.success {
  color: var(--accent);
}

output.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#licenseCount {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--accent-2);
  font-weight: 800;
}

#hostStatusBadge {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--accent);
  font-weight: 800;
}

.host-status {
  display: grid;
  gap: 12px;
}

.host-status pre {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161b;
  color: var(--muted);
  overflow: auto;
  white-space: pre-wrap;
}

.licenses {
  display: grid;
  gap: 10px;
}

.license-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14191e;
}

.license-meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(78, 205, 196, 0.14);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.badge.suspended,
.badge.revoked {
  background: rgba(255, 102, 120, 0.14);
  color: var(--danger);
}

@media (max-width: 760px) {
  .hero,
  .auth-panel,
  .grid,
  .plans,
  .row,
  .license-item {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
    align-items: start;
  }
}
