*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, sans-serif, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: #f3f4f6;
  background: #0c0d14;
  line-height: 1.5;
}

a {
  color: #c4b5fd;
  text-decoration: none;
}

a:hover {
  color: #e9d5ff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(12, 13, 20, 0.92);
  backdrop-filter: blur(8px);
}

.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f9fafb;
}

.brand span {
  color: #a78bfa;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: #a1a1aa;
}

.site-nav a:hover {
  color: #f3f4f6;
}

.site-nav .btn-link {
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #e9d5ff;
  font-weight: 600;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.card {
  width: min(100%, 28rem);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.card.card-wide {
  width: min(100%, 36rem);
}

.card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card .lead {
  margin: 0 0 1.5rem;
  color: #a1a1aa;
  font-size: 0.9375rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d4d4d8;
}

.field label .required {
  color: #f87171;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="url"],
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.625rem;
  background: rgba(12, 13, 20, 0.85);
  color: #f3f4f6;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #a1a1aa 50%),
    linear-gradient(135deg, #a1a1aa 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) calc(50% - 0.15rem), calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.shop-panel {
  margin: 0.5rem 0 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.shop-panel h2 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3f4f6;
}

.shop-panel .shop-lead {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: #71717a;
}

.logo-preview {
  display: block;
  margin: 0.5rem 0;
  max-height: 4rem;
  max-width: 12rem;
  object-fit: contain;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.btn-secondary-inline {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #e4e4e7;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary-inline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field input::placeholder {
  color: #71717a;
}

.field input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #71717a;
}

.field-hint.ok {
  color: #86efac;
}

.field-hint.bad {
  color: #fca5a5;
}

.checkbox-field {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.8125rem;
  color: #a1a1aa;
}

.checkbox-field input {
  margin-top: 0.2rem;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-info {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #ddd6fe;
}

.submit-row {
  margin-top: 1.25rem;
}

.submit-row button {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.submit-row button:hover:not(:disabled) {
  filter: brightness(1.06);
}

.submit-row button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.submit-row button:active:not(:disabled) {
  transform: translateY(1px);
}

.turnstile-field {
  margin: 1rem 0 0;
}

.turnstile-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d4d4d8;
}

.turnstile-frame {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.625rem;
  background: rgba(12, 13, 20, 0.85);
  padding: 0.75rem;
  min-height: 65px;
}

.turnstile-hint,
.turnstile-note {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #a1a1aa;
}

.turnstile-note {
  color: #fcd34d;
}

.footer-links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: #71717a;
}

.site-footer {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  color: #52525b;
  font-size: 0.8125rem;
}

.site-footer a {
  color: #a1a1aa;
}

.verify-card {
  width: min(100%, 28rem);
}

.verify-email {
  color: #f3f4f6;
  font-weight: 600;
}

.code-input {
  letter-spacing: 0.35em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-align: center;
}

.verify-resend-status {
  margin-top: 1rem;
  min-height: 1.125rem;
}

.verify-resend-row {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.btn-secondary {
  padding: 0.65rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e4e4e7;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dev-code-box {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 0.875rem;
}

.dev-code-label {
  margin: 0;
  font-weight: 600;
}

.dev-code-value {
  margin: 0.35rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.35em;
}

@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}
