*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --purple: #5b4ef8;
  --purple-dark: #4338e0;
  --purple-bg: #eeeefe;
  --gray-light: #eef0f9;
  --gray-text: #6b7280;
  --border: #e5e7eb;
  --dark: #111827;
  --white: #fff;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-light);
  color: var(--dark);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}


/* ── PAGE WRAPPER ────────────────────────── */
.page {
  padding-top: 64px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 40px;
}

/* ── CARD ────────────────────────────────── */
.signup-card {
  background: white;
  border-radius: 22px;
  padding: 44px 42px 38px;
  width: 100%;
  max-width: 510px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, .1);
  margin: 24px 20px;
}

/* Icon */
.card-icon {
  width: 58px;
  height: 58px;
  background: var(--purple);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
  color: white;
}

.signup-card h1 {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.signup-card .subtitle {
  display: block;
  text-align: center;
  font-size: .875rem;
  color: var(--gray-text);
  margin: 0 auto 28px;
  max-width: 420px;
  line-height: 1.5;
}

/* Role toggle */
.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}

.role-btn {
  height: 46px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: white;
  color: #374151;
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color .2s, background .2s, color .2s;
}

.role-btn svg {
  width: 16px;
  height: 16px;
}

.role-btn.active {
  border-color: var(--purple);
  background: var(--purple-bg);
  color: var(--purple);
}

.role-btn:hover:not(.active) {
  border-color: #9ca3af;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 22px;
}

/* Form fields */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.required-star {
  color: #ef4444;
  margin-left: 2px;
}

.form-group input {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 16px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--dark);
  background: white;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 78, 248, .1);
}

.form-group input::placeholder {
  color: #adb5bd;
}

.form-group input.error {
  border-color: #ef4444;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 50px;
}

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  display: grid;
  place-items: center;
  transition: color .2s;
}

.toggle-pw:hover {
  color: var(--purple);
}

.toggle-pw svg {
  width: 18px;
  height: 18px;
}

.err-msg {
  font-size: .78rem;
  color: #ef4444;
  margin-top: 5px;
  display: none;
}

.has-error .err-msg {
  display: block;
}

/* Employer-only field */
.employer-only {
  display: none;
}

/* Terms */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  font-size: .83rem;
  color: #374151;
}

.terms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--purple);
  flex-shrink: 0;
  cursor: pointer;
}

.terms-row a {
  color: var(--purple);
  font-weight: 600;
}

/* Submit */
.btn-create {
  width: 100%;
  height: 52px;
  background: var(--purple);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  transition: background .2s, transform .15s;
  margin-bottom: 18px;
}

.btn-create:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.signin-prompt {
  text-align: center;
  font-size: .875rem;
  color: var(--gray-text);
}

.signin-prompt a {
  color: var(--purple);
  font-weight: 700;
}

.error-banner {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: .84rem;
  line-height: 1.55;
}

.error-banner ul {
  margin-left: 18px;
}

/* Success state */
.success-state {
  display: none;
  text-align: center;
  padding: 16px 0 8px;
}

.check-circle {
  width: 68px;
  height: 68px;
  background: #ecfdf5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  color: #10b981;
}

.check-circle svg {
  width: 28px;
  height: 28px;
}

.success-state h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.success-state p {
  font-size: .9rem;
  color: var(--gray-text);
  line-height: 1.65;
  margin-bottom: 24px;
}

.btn-goto-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  font-size: .95rem;
  font-weight: 700;
  transition: background .2s;
}

.btn-goto-signin:hover {
  background: var(--purple-dark);
}