:root {
  color-scheme: dark;
  --bg: #07101f;
  --panel: rgba(15, 23, 42, .94);
  --panel-soft: rgba(30, 41, 59, .64);
  --border: rgba(148, 163, 184, .18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-2: #3b82f6;
  --danger: #fca5a5;
  --success: #86efac;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(99, 102, 241, .28), transparent 36%),
    radial-gradient(circle at 90% 90%, rgba(14, 165, 233, .18), transparent 40%),
    var(--bg);
}

.signup-shell {
  width: min(100% - 28px, 920px);
  margin: 34px auto;
}

.signup-card {
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 25px 80px rgba(0, 0, 0, .38);
  backdrop-filter: blur(12px);
}

.signup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(25px, 5vw, 36px);
}

.signup-header p,
.field-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.back-link {
  flex: none;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
}

.back-link:hover { border-color: #818cf8; color: #fff; }

.security-note {
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(59, 130, 246, .28);
  border-radius: 12px;
  background: rgba(59, 130, 246, .10);
  color: #bfdbfe;
  font-size: 14px;
}

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

fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
}

legend {
  padding: 0 9px;
  color: #dbeafe;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 10px;
  background: rgba(2, 6, 23, .62);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}

small { color: var(--muted); font-weight: 400; }

.submit-button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(59, 130, 246, .25);
}

.submit-button:hover:not(:disabled) { transform: translateY(-1px); }
.submit-button:disabled { cursor: wait; opacity: .65; }

.message {
  min-height: 20px;
  font-size: 14px;
  font-weight: 600;
}

.message.error { color: var(--danger); }
.message.success { color: var(--success); }
.hidden { display: none !important; }

@media (max-width: 680px) {
  .signup-shell { margin: 14px auto; }
  .signup-card { border-radius: 16px; }
  .signup-header { flex-direction: column; }
  .form-grid.two { grid-template-columns: 1fr; }
  fieldset { padding: 16px; }
}
