.signup *, .signup *::before, .signup *::after { box-sizing: border-box; }
.signup br { display: none; }

.form-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  z-index: 10;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e5e7eb;
  border-top-color: #D30505;
  border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
}

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

.signup-wrapper {
  padding-bottom: 32px;
}

.signup {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  font-family: 'Futura Light Otf', Helvetica, Arial, Lucida, sans-serif;
  color: #1f2937;
  line-height: 1.45;
}

.signup h1 {
  margin: 0 0 24px;
  font-size: 1.6rem;
  font-weight: 600;
}

.signup-form fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 22px 22px;
  margin: 0 0 22px;
}

.signup-form legend {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 8px;
  color: #374151;
}

.row {
  display: block;
  margin-bottom: 14px;
}

.row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.row.inline {
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .row.two-cols { grid-template-columns: 1fr; }
  .signup { margin: 0; border-radius: 0; padding: 20px; }
}

.field {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.field > span {
  margin-bottom: 6px;
  color: #374151;
  font-weight: 500;
}

.field em {
  color: #dc2626;
  font-style: normal;
  margin-left: 2px;
}

.field input,
.field select {
  width: 100%;
  padding: 9px 11px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field input.invalid,
.field select.invalid {
  border-color: #dc2626;
}

.field .error-text {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #dc2626;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}

.tos {
  margin-top: 8px;
}

.tos-content {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  font-size: 0.85rem;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.dynamic-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dynamic-fields:empty { display: none; }

.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
}

#submitBtn {
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #D30505;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}


#submitBtn:disabled {
  background: #dd6d6d;
  cursor: not-allowed;
}

.form-message {
  padding: 0;
  font-size: 0.9rem;
}

.form-message:not(:empty) {
  padding: 10px 12px;
  border-radius: 6px;
}

.form-message.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-message.info {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}