:root {
  --bg: #0a0e1a;
  --bg-soft: #0d1424;
  --surface: #f8fafc;
  --surface-muted: #eef3f9;
  --accent: #2e6cff;
  --accent-hover: #1f58df;
  --text: #101827;
  --text-muted: #5b6678;
  --text-on-dark: #eef4ff;
  --border: #d8e0ec;
  --border-strong: #aebbd0;
  --success-bg: #e7f7ee;
  --success-text: #126536;
  --error-bg: #fdecec;
  --error-text: #9f1d2e;
  --warning-bg: #fff6db;
  --warning-text: #77540b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(160deg, rgba(46, 108, 255, 0.18), transparent 34%),
    linear-gradient(20deg, rgba(39, 178, 119, 0.10), transparent 28%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 18px;
}

.license-panel {
  width: min(100%, 760px);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.48em;
  text-align: center;
  text-indent: 0.48em;
}

.tagline {
  margin: 8px 0 28px;
  color: var(--text-muted);
  font-size: 0.98rem;
  text-align: center;
}

.panel-header {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);

  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.2;
}

.intro {
  max-width: 56ch;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

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

.form-step {
  display: grid;
  gap: 18px;
}

.is-hidden {
  display: none !important;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: #ffffff;
  padding: 0 13px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 108, 255, 0.15);
}

input[aria-invalid="true"] {
  border-color: var(--error-text);
  background: #fff8f8;
}

.field-error {
  min-height: 1.1em;
  margin: 0;
  color: var(--error-text);
  font-size: 0.88rem;
}

.bot-check {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.consent-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.consent-row label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.48;
}

.submit-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms ease, opacity 140ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--accent-hover);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
}

.submit-button.is-loading .button-loader {
  display: inline-block;
  animation: spin 800ms linear infinite;
}

.status-message {
  display: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-message.is-visible {
  display: block;
}

.status-message.success {
  color: var(--success-text);
  background: var(--success-bg);
}

.status-message.error {
  color: var(--error-text);
  background: var(--error-bg);
}

.status-message.warning {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.confirm-summary {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

.confirm-summary p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.confirm-summary strong {
  color: var(--text);
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 620px) {
  .page-shell {
    align-items: start;
    padding: 18px 12px;
  }

  .license-panel {
    padding: 22px 16px;
    border-radius: 14px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-indent: 0.32em;
  }
}
