/* Registration Modal */
.reg-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.reg-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.reg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.reg-modal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.reg-modal.is-open .reg-modal-panel {
  transform: translateY(0) scale(1);
}

.reg-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e8ecf1;
  background: linear-gradient(90deg, #1c2430 0%, #36404d 100%);
  color: #fff;
}

.reg-modal-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.reg-modal-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}

.reg-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.reg-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
}

.reg-modal-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.reg-field {
  margin-bottom: 18px;
}

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

.reg-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1c2430;
}

.reg-required {
  color: #dc3545;
}

.reg-input,
.reg-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7dce2;
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-input:focus,
.reg-select:focus {
  outline: none;
  border-color: #1c2430;
  box-shadow: 0 0 0 3px rgba(28, 36, 48, 0.12);
}

.reg-input.is-invalid,
.reg-select.is-invalid {
  border-color: #dc3545;
}

.reg-error {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #dc3545;
  min-height: 0;
}

.reg-error:not(:empty) {
  min-height: 1.1em;
}

.reg-conditional {
  padding: 16px;
  border: 1px dashed #d7dce2;
  border-radius: 14px;
  background: #f8f9fb;
}

.reg-file-wrap {
  position: relative;
}

.reg-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.reg-file-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed #b8c0ca;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: #4b5563;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reg-file-label:hover {
  border-color: #1c2430;
  background: #f8f9fb;
}

.reg-file-label i {
  font-size: 1.2rem;
  color: #1c2430;
}

.reg-alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.reg-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

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

.reg-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
}

.reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
}

.reg-btn-primary {
  background: #1c2430;
  border-color: #1c2430;
  color: #fff;
}

.reg-btn-primary:hover:not(:disabled) {
  background: #fff;
  color: #1c2430;
}

.reg-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.reg-btn-secondary {
  background: #fff;
  border-color: #d7dce2;
  color: #4b5563;
}

.reg-btn-secondary:hover {
  border-color: #1c2430;
  color: #1c2430;
}

.reg-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: reg-spin 0.7s linear infinite;
}

.reg-btn-primary:disabled .reg-btn-spinner {
  border-color: rgba(28, 36, 48, 0.25);
  border-top-color: #1c2430;
}

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

body.reg-modal-open {
  overflow: hidden;
}

/* Mobile: bottom sheet */
@media (max-width: 767.98px) {
  .reg-modal {
    align-items: flex-end;
    padding: 0;
  }

  .reg-modal-panel {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .reg-modal.is-open .reg-modal-panel {
    transform: translateY(0);
  }

  .reg-modal-header {
    padding: 20px 20px 16px;
  }

  .reg-modal-body {
    padding: 20px;
  }

  .reg-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .reg-modal-footer {
    flex-direction: column-reverse;
  }

  .reg-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .reg-modal-title {
    font-size: 1.15rem;
  }
}
