/* ══════════════════ REGISTRATION MODAL ══════════════════ */

body.is-locked { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 11, .75);
  backdrop-filter: blur(3px);
  animation: modal-fade .18s ease-out;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 28px 24px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 7, 11, .45);
  animation: modal-rise .2s ease-out;
}

@keyframes modal-fade { from { opacity: 0 } }
@keyframes modal-rise { from { opacity: 0; translate: 0 12px } }

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  transition: background .15s, color .15s;
}

.modal__close:hover { background: var(--surface); color: var(--ink); }

.modal__head { text-align: center; }
.modal__logo { width: 140px; height: auto; margin: 0 auto 14px; }

.modal__title {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 26px;
  font-weight: 700;
  color: var(--ink);
}

.modal__sub {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 17px;
  color: var(--muted);
}

.modal__sub b { color: var(--pink); }

/* ── form ── */

.rform { display: flex; flex-direction: column; gap: 12px; }

.rform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.rform__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.rform__field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.rform__field input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #d8d8e4;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.rform__field input::placeholder { color: #b3b4c4; }

.rform__field input:focus-visible {
  outline: 0;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(93, 97, 146, .18);
}

.rform__field input.is-invalid { border-color: var(--pink); }
.rform__field input.is-invalid:focus-visible { box-shadow: 0 0 0 3px rgba(224, 0, 95, .16); }

.rform__pass { position: relative; }
.rform__pass input { padding-right: 62px; }

.rform__reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--indigo);
}

.rform__reveal:hover { background: var(--surface); }

.rform__error {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
  color: var(--pink);
}

.rform__error:empty { display: none; }

.rform__check {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 11.5px;
  line-height: 15px;
  color: var(--ink);
  cursor: pointer;
}

.rform__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pink);
}

.rform__check a { color: var(--pink); text-decoration: underline; }

.rform__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 4px;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--pink);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: filter .15s;
}

.rform__submit:hover { filter: brightness(1.1); }
a.rform__submit { text-decoration: none; }

.rform__legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 13px;
  text-align: center;
  color: var(--muted);
}

.rform__legal img { width: 34px; height: auto; }

/* ── success panel ── */

.modal__done { text-align: center; }

.modal__done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--pink);
  font-size: 28px;
  color: #fff;
}

.modal__done h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--ink); }
.modal__done p  { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.modal__done .rform__submit { width: 100%; }

@media (max-width: 480px) {
  .modal { padding: 0; place-items: end stretch; }

  .modal__dialog {
    max-width: none;
    max-height: 92vh;
    padding: 22px 18px 20px;
    border-radius: 14px 14px 0 0;
    animation: modal-sheet .22s ease-out;
  }

  @keyframes modal-sheet { from { translate: 0 40px; opacity: 0 } }

  .rform__row { grid-template-columns: 1fr; }
}
