:root {
  color-scheme: light;
  --bg: #eef3fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-border: rgba(255, 255, 255, 0.9);
  --text: #18212f;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --danger: #d92d20;
  --success: #0f9f6e;
  --warning: #b96a08;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 28%),
    linear-gradient(180deg, #f7f9fd 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell,
.page {
  width: min(1200px, calc(100vw - 40px));
  margin: 0 auto;
}

.login-card,
.panel,
.stat-card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(460px, 100%);
  padding: 32px;
}

.topbar {
  width: min(1200px, calc(100vw - 40px));
  margin: 28px auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.page {
  padding-bottom: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

h3 {
  font-size: 17px;
}

.muted {
  color: var(--muted);
}

.stats-grid,
.grid-two {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.stat-card {
  padding: 20px 22px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.conditional-field.hidden-field {
  display: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea,
.token-output {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}

textarea,
.token-output {
  resize: vertical;
  min-height: 92px;
}

.token-output {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button[disabled] {
  cursor: default;
  opacity: 0.65;
}

.button-primary {
  background: var(--accent);
  color: white;
}

.button-secondary {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text);
}

.button-danger {
  background: rgba(217, 45, 32, 0.12);
  color: var(--danger);
}

.button-large {
  min-height: 52px;
  padding: 14px 20px;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 600;
}

.flash-success {
  background: rgba(15, 159, 110, 0.12);
  color: var(--success);
}

.flash-error {
  background: rgba(217, 45, 32, 0.12);
  color: var(--danger);
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.license-list {
  display: grid;
  gap: 16px;
}

.license-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.license-top,
.license-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.license-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.license-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

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

.license-meta dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.license-meta dd {
  margin: 0;
  font-size: 13px;
  word-break: break-word;
}

.license-notes {
  margin-bottom: 12px;
  color: var(--muted);
}

.badge {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: rgba(15, 159, 110, 0.12);
  color: var(--success);
}

.badge-warning {
  background: rgba(185, 106, 8, 0.12);
  color: var(--warning);
}

.badge-muted {
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted);
}

.badge-info {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
}

.download-body {
  min-height: 100vh;
}

.download-page {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
}

.download-copy,
.download-card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.download-copy {
  padding: 40px;
}

.download-card {
  padding: 28px;
}

.download-lead {
  margin-top: 18px;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.meta-pill {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.download-note,
.download-footnote {
  color: var(--muted);
}

.download-note {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.6;
}

.download-footnote {
  margin-top: 10px;
  font-size: 13px;
}

.install-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.install-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.install-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.install-note span {
  color: var(--text);
  font-weight: 700;
}

.terminal-install {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(24, 33, 47, 0.94);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.terminal-install strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.terminal-install p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.terminal-install pre {
  margin: 12px 0 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.terminal-install code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.product-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 16px 24px rgba(37, 99, 235, 0.24);
}

.feature-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 12px;
  line-height: 1.55;
}

@media (max-width: 920px) {
  .stats-grid,
  .grid-two,
  .license-meta {
    grid-template-columns: 1fr;
  }

  .download-hero {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header,
  .license-top,
  .license-actions,
  .download-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-copy,
  .download-card {
    padding: 28px;
  }
}
