/* ── Registration shell (matches login theme) ── */
.register-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  font-family: 'IBM Plex Sans', sans-serif;
  overflow: hidden;
}

.register-layout {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}

.register-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.35rem, 4vw, 2rem);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 12px 40px rgba(0, 0, 0, 0.08);
}

.register-card-wide {
  max-width: 760px;
}

.register-card-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.register-card-brand .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}

.register-wizard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.register-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--bg2, #f7f8fa);
  border: 1px solid var(--border, #e2e5eb);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2, #4a5060);
}

.register-brand-chip .logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.register-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text3, #8892a0);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  transition: color 0.15s;
}

.register-back:hover {
  color: var(--brand-primary, #ff0c0c);
}

.register-wizard-head {
  margin-bottom: 1.5rem;
}

.register-title {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--text, #1a1d23);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.register-sub {
  font-size: 0.9rem;
  color: var(--text3, #8892a0);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.register-sub strong {
  color: var(--text, #1a1d23);
  font-weight: 600;
}

/* ── Step indicator ── */
.register-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 1.75rem;
  padding: 0 2px;
}

.register-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  min-width: 0;
}

.register-step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 17px);
  width: calc(100% - 34px);
  height: 2px;
  background: var(--border, #e2e5eb);
  z-index: 0;
  transition: background 0.2s;
}

.register-step:last-child::after {
  display: none;
}

.register-step.done::after {
  background: var(--brand-primary, #ff0c0c);
}

.register-step-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  border: 2px solid var(--border, #e2e5eb);
  background: #fff;
  color: var(--text3, #8892a0);
  position: relative;
  z-index: 1;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.register-step-marker .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.register-step.active .register-step-marker {
  border-color: var(--brand-primary, #ff0c0c);
  background: var(--brand-primary, #ff0c0c);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 12, 12, 0.14);
}

.register-step.done .register-step-marker {
  border-color: var(--brand-primary, #ff0c0c);
  background: var(--brand-primary-bg, #fff5f5);
  color: var(--brand-primary, #ff0c0c);
}

.register-step-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text3, #8892a0);
  text-align: center;
  line-height: 1.25;
  max-width: 72px;
  letter-spacing: 0.01em;
}

.register-step.active .register-step-label {
  color: var(--text, #1a1d23);
}

.register-step.done .register-step-label {
  color: var(--brand-primary, #ff0c0c);
}

/* ── Step content panel ── */
.register-step-content {
  background: linear-gradient(180deg, var(--bg2, #f7f8fa) 0%, #fff 100%);
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.35rem);
  margin-bottom: 1.5rem;
}

.register-step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border, #e2e5eb);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3, #8892a0);
}

.register-step-eyebrow .bi {
  color: var(--brand-primary, #ff0c0c);
  font-size: 0.85rem;
}

/* ── Form fields ── */
.register-field {
  margin-bottom: 1rem;
}

.register-field:last-child {
  margin-bottom: 0;
}

.register-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2, #4a5060);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.register-field input,
.register-field select,
.register-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text, #1a1d23);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.register-field input:disabled {
  background: var(--bg2, #f7f8fa);
  color: var(--text3, #8892a0);
  cursor: not-allowed;
}

.register-field input::placeholder,
.register-field textarea::placeholder {
  color: var(--text3, #8892a0);
}

.register-field input:focus,
.register-field select:focus,
.register-field textarea:focus {
  border-color: var(--brand-primary, #ff0c0c);
  box-shadow: 0 0 0 3px rgba(255, 12, 12, 0.12);
}

.register-field textarea {
  resize: vertical;
  min-height: 96px;
}

.register-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238892a0' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.register-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.register-grid-2 .register-field--full {
  grid-column: 1 / -1;
}

/* ── Input group (serial + verify) ── */
.register-input-group {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.register-input-group input {
  flex: 1;
  min-width: 0;
}

.register-verify-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e5eb);
  background: #fff;
  color: var(--text, #1a1d23);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.register-verify-btn:hover:not(:disabled) {
  border-color: var(--brand-primary-border, #ffd4d4);
  background: var(--brand-primary-bg, #fff5f5);
  color: var(--brand-primary, #ff0c0c);
}

.register-verify-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Inverter type cards ── */
.register-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.register-type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.register-type-card:hover {
  border-color: var(--border2, #d0d4dc);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.register-type-card.selected {
  border-color: var(--brand-primary, #ff0c0c);
  background: linear-gradient(180deg, var(--brand-primary-bg, #fff5f5) 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(255, 12, 12, 0.1);
}

.register-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: var(--bg2, #f7f8fa);
  color: var(--text2, #4a5060);
  transition: background 0.2s, color 0.2s;
}

.register-type-card.selected .register-type-icon {
  background: #fff;
  color: var(--brand-primary, #ff0c0c);
}

.register-type-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #1a1d23);
}

.register-type-card span {
  font-size: 0.8rem;
  color: var(--text3, #8892a0);
  line-height: 1.45;
}

/* ── Terms ── */
.register-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border, #e2e5eb);
  background: #fff;
  font-size: 0.85rem;
  color: var(--text2, #4a5060);
  line-height: 1.5;
  cursor: pointer;
}

.register-terms input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-primary, #ff0c0c);
  flex-shrink: 0;
  cursor: pointer;
}

/* ── OTP ── */
.register-otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 1.5rem 0 1.25rem;
}

.register-otp-input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  border: 1px solid var(--border, #e2e5eb);
  border-radius: 12px;
  background: #fff;
  color: var(--text, #1a1d23);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.register-otp-input:focus {
  border-color: var(--brand-primary, #ff0c0c);
  box-shadow: 0 0 0 3px rgba(255, 12, 12, 0.12);
}

/* ── Actions ── */
.register-actions {
  display: flex;
  gap: 12px;
  margin-top: 0.25rem;
}

.register-actions .btn {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.register-actions .btn:not(.btn-primary) {
  background: #fff;
}

.register-shell .btn-primary.login-submit,
.register-shell .register-actions .btn-primary {
  background: var(--brand-primary, #ff0c0c);
  border-color: var(--brand-primary, #ff0c0c);
  color: #fff;
  min-height: 48px;
  border-radius: 12px;
}

.register-shell .register-actions .btn:not(.btn-primary) {
  border-radius: 12px;
  min-height: 48px;
}

.register-shell .btn-primary.login-submit:hover:not(:disabled),
.register-shell .register-actions .btn-primary:hover:not(:disabled) {
  background: #e00909;
  border-color: #e00909;
}

.register-actions--single .btn-primary {
  width: 100%;
}

.register-link-row {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text3, #8892a0);
}

.register-link-row a,
.register-link-row button.linkish {
  color: var(--brand-primary, #ff0c0c);
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-left: 4px;
}

.register-link-row button.linkish:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Success ── */
.register-card--success {
  text-align: center;
  max-width: 440px;
}

.register-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary-bg, #fff5f5) 0%, #fff 100%);
  color: var(--brand-primary, #ff0c0c);
  border: 2px solid var(--brand-primary-border, #ffd4d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(255, 12, 12, 0.12);
}

.register-card--success .register-sub {
  margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .register-step-label {
    display: none;
  }

  .register-step::after {
    top: 14px;
  }

  .register-step-marker {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .register-step::after {
    left: calc(50% + 15px);
    width: calc(100% - 30px);
  }
}

@media (max-width: 640px) {
  .register-grid-2,
  .register-type-grid {
    grid-template-columns: 1fr;
  }

  .register-input-group {
    flex-direction: column;
  }

  .register-verify-btn {
    width: 100%;
    min-height: 44px;
  }

  .register-otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.15rem;
  }

  .register-otp-row {
    gap: 8px;
  }

  .register-actions {
    flex-direction: column-reverse;
  }
}

@media (max-width: 400px) {
  .register-otp-input {
    width: 36px;
    height: 44px;
  }
}
