/* Register page — role selection + per-role form */

.register-page {
  padding: 56px 0 90px;
  min-height: calc(100vh - var(--header-h));
}

.register-container {
  max-width: 560px;
  margin: 0 auto;
}

.register-title {
  margin: 0 0 32px;
  text-align: center;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.register-continuation-note {
  margin: -16px 0 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Role selection cards */
.role-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.role-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.role-card--active {
  border-color: var(--purple);
  background: var(--brand-gradient-soft);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.role-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(6, 182, 212, 0.12));
  color: var(--brand-blue);
}

.role-card__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* Per-role form, revealed under the selected card */
.register-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.register-form[hidden] {
  display: none;
}

.register-submit {
  width: 100%;
  margin-top: 4px;
}

.form-field__error {
  margin: -2px 0 0;
  font-size: 13px;
  color: #dc2626;
}

.form-field__input--error {
  border-color: #dc2626;
}

.form-field__input--error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.register-legal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.register-legal input {
  margin-top: 3px;
  flex-shrink: 0;
}

.register-legal a {
  color: var(--purple, #6d28d9);
}

select.form-field__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* This page has no hamburger nav (nothing to reveal it), so the header's
   default mobile behavior of hiding .header__actions would leave "Log in"
   with no way to appear — keep it visible at every width. */
@media (max-width: 900px) {
  .header__actions {
    display: flex;
  }
}

@media (max-width: 560px) {
  .role-select {
    grid-template-columns: 1fr;
  }

  .register-page {
    padding: 40px 0 56px;
  }
}
