/* =========================================================
   COINFLOW — REGISTER PAGE
   File: /assets/css/register.css
   ========================================================= */

/* =========================
   1. DESIGN TOKENS
========================= */

:root {
  --register-bg: #071525;
  --register-white: #ffffff;

  --register-navy: #071525;
  --register-navy-light: #10243b;

  --register-blue: #2f80ed;
  --register-blue-dark: #236fd5;
  --register-blue-soft: #edf5ff;

  --register-text: #101b2d;
  --register-muted: #7b8798;

  --register-border: #e4eaf2;
  --register-border-hover: #c9d7e9;

  --register-green: #20a779;
  --register-red: #e45656;

  --register-shadow:
    0 24px 70px rgba(0, 0, 0, 0.24);

  --register-radius: 18px;
  --register-input-radius: 10px;

  --register-transition: 0.22s ease;
}


/* =========================
   2. RESET
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: var(--register-text);
  background: var(--register-bg);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  font-size: 14px;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select {
  max-width: 100%;
}

::selection {
  color: #ffffff;
  background: var(--register-blue);
}


/* =========================
   3. DARK NAVY BACKGROUND
========================= */

.register-page {
  position: relative;
  isolation: isolate;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  min-height: 100vh;
  padding: 42px 24px 64px;

  overflow: hidden;

  background:
    radial-gradient(
      ellipse at 15% 15%,
      rgba(47, 128, 237, 0.18),
      transparent 38%
    ),
    radial-gradient(
      ellipse at 85% 85%,
      rgba(35, 111, 213, 0.13),
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #071525 0%,
      #0a1b30 50%,
      #071525 100%
    );
}

.register-page::before,
.register-page::after {
  position: absolute;
  z-index: -1;

  content: "";
  pointer-events: none;

  border: 1px solid rgba(100, 165, 255, 0.09);
  border-radius: 50%;
}

.register-page::before {
  top: -230px;
  left: -170px;

  width: 360px;
  height: 360px;

  box-shadow:
    0 0 100px rgba(47, 128, 237, 0.07);
}

.register-page::after {
  right: -220px;
  bottom: -220px;

  width: 460px;
  height: 460px;

  box-shadow:
    0 0 120px rgba(47, 128, 237, 0.08);
}


/* =========================
   4. MAIN CONTAINER
========================= */

.register-container {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  max-width: 510px;

  margin: 0 auto;
}


/* =========================
   5. COINFLOW LOGO
========================= */

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  margin-bottom: 25px;

  color: #ffffff;

  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.1px;

  transition:
    opacity var(--register-transition),
    transform var(--register-transition);
}

.auth-logo:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.auth-logo > span:last-child {
  display: inline-flex;
  align-items: center;
}

.auth-logo > span:last-child > span {
  color: var(--register-blue);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 39px;
  height: 39px;

  color: #ffffff;

  background:
    linear-gradient(
      145deg,
      #438ff4,
      #236fd5
    );

  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;

  box-shadow:
    0 7px 20px rgba(47, 128, 237, 0.3);

  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
}


/* =========================
   6. REGISTER CARD
========================= */

.register-card {
  width: 100%;
  padding: 36px 36px 30px;

  background: var(--register-white);

  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--register-radius);

  box-shadow: var(--register-shadow);

  animation: registerCardEnter 0.55s ease both;
}

@keyframes registerCardEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================
   7. REGISTER HEADER
========================= */

.register-header {
  margin-bottom: 27px;
  text-align: center;
}

.register-header h1 {
  margin: 0 0 8px;

  color: var(--register-navy);

  font-size: clamp(25px, 4vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1.1px;
}

.register-header p {
  margin: 0;

  color: var(--register-muted);

  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}


/* =========================
   8. FORM LAYOUT
========================= */

.register-form {
  display: flex;
  flex-direction: column;
  gap: 19px;

  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 100%;
  min-width: 0;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;

  color: #26364b;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.form-group label > span {
  color: var(--register-muted);

  font-size: 11px;
  font-weight: 500;
}


/* =========================
   9. INPUTS AND SELECTS
========================= */

.form-group input,
.form-group select {
  display: block;

  width: 100%;
  height: 49px;

  margin: 0;
  padding: 0 14px;

  color: var(--register-text);
  background-color: #ffffff;

  border: 1px solid var(--register-border);
  border-radius: var(--register-input-radius);

  outline: none;

  font-size: 13px;
  font-weight: 500;
  line-height: normal;

  transition:
    border-color var(--register-transition),
    box-shadow var(--register-transition),
    background-color var(--register-transition);
}

.form-group input::placeholder {
  color: #a0aabb;
  opacity: 1;
  font-weight: 400;
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--register-border-hover);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--register-blue);

  background-color: #ffffff;

  box-shadow:
    0 0 0 3px rgba(47, 128, 237, 0.11);
}

.form-group input:focus-visible,
.form-group select:focus-visible {
  outline: none;
}


/* Country selector */

.form-group select {
  padding-right: 40px;

  cursor: pointer;

  appearance: none;
  -webkit-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='%237b8798' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.form-group select:invalid {
  color: #a0aabb;
}

.form-group select option {
  color: var(--register-text);
  background: #ffffff;
}

.form-group select option:disabled {
  color: #a0aabb;
}


/* Browser autofill */

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--register-text);

  box-shadow: 0 0 0 1000px #ffffff inset;

  transition: background-color 5000s ease-in-out 0s;
}


/* =========================
   10. PASSWORD INPUT
========================= */

.password-input {
  position: relative;

  display: flex;
  align-items: center;

  width: 100%;
}

.password-input input {
  width: 100%;
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 42px;
  min-height: 34px;

  padding: 5px 6px;

  color: var(--register-blue);
  background: transparent;

  border: none;
  border-radius: 6px;

  font-size: 12px;
  font-weight: 700;

  transform: translateY(-50%);

  transition:
    color var(--register-transition),
    background-color var(--register-transition);
}

.password-toggle:hover {
  color: var(--register-blue-dark);
  background: var(--register-blue-soft);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--register-blue);
  outline-offset: 2px;
}


/* =========================
   11. FIELD HINT
========================= */

.field-hint {
  display: block;

  margin-top: -2px;

  color: var(--register-muted);

  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}


/* =========================
   12. VALIDATION ERRORS
========================= */

.field-error {
  display: block;

  min-height: 0;
  margin: -2px 0 0;

  color: var(--register-red);

  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

.field-error:empty {
  display: none;
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid .password-input input {
  border-color: var(--register-red);

  background-color: #fffafa;

  box-shadow:
    0 0 0 3px rgba(228, 86, 86, 0.075);
}

.form-group.invalid input:focus,
.form-group.invalid select:focus {
  border-color: var(--register-red);

  box-shadow:
    0 0 0 3px rgba(228, 86, 86, 0.11);
}


/* =========================
   13. TERMS AND CONDITIONS
========================= */

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  margin-top: 1px;

  color: #657286;

  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;

  cursor: pointer;
}

.terms input[type="checkbox"] {
  flex: 0 0 16px;

  width: 16px;
  height: 16px;

  margin: 3px 0 0;

  accent-color: var(--register-blue);

  cursor: pointer;
}

.terms > span {
  min-width: 0;
}

.terms a {
  color: var(--register-blue);

  font-weight: 700;

  transition: color var(--register-transition);
}

.terms a:hover {
  color: var(--register-blue-dark);
  text-decoration: underline;
}

.terms input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--register-blue);
  outline-offset: 3px;
}

#termsError {
  margin-top: -13px;
}


/* =========================
   14. CREATE ACCOUNT BUTTON
========================= */

.register-button {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  min-height: 51px;

  margin-top: 2px;
  padding: 13px 20px;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #3788f4 0%,
      #2f80ed 50%,
      #236fd5 100%
    );

  border: 1px solid transparent;
  border-radius: 10px;

  box-shadow:
    0 7px 16px rgba(47, 128, 237, 0.19);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;

  overflow: hidden;

  transition:
    background var(--register-transition),
    box-shadow var(--register-transition),
    transform var(--register-transition),
    opacity var(--register-transition);
}

.register-button::before {
  position: absolute;
  top: 0;
  left: -120%;

  width: 70%;
  height: 100%;

  content: "";

  background:
    linear-gradient(
      110deg,
      transparent,
      rgba(255, 255, 255, 0.17),
      transparent
    );

  transform: skewX(-20deg);

  transition: left 0.65s ease;

  pointer-events: none;
}

.register-button:hover:not(:disabled) {
  background:
    linear-gradient(
      135deg,
      #2f80ed,
      #236fd5
    );

  box-shadow:
    0 10px 23px rgba(47, 128, 237, 0.27);

  transform: translateY(-1px);
}

.register-button:hover:not(:disabled)::before {
  left: 150%;
}

.register-button:active:not(:disabled) {
  transform: translateY(0);

  box-shadow:
    0 4px 10px rgba(47, 128, 237, 0.18);
}

.register-button:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.28);
  outline-offset: 3px;
}

.register-button:disabled {
  opacity: 0.75;
  box-shadow: none;
}


/* =========================
   15. BUTTON LOADER
========================= */

.button-loader {
  display: none;

  width: 17px;
  height: 17px;

  flex: 0 0 17px;

  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
}

.register-button.loading .button-loader {
  display: inline-block;

  animation: registerSpinner 0.7s linear infinite;
}

.register-button.loading .button-text {
  opacity: 0.95;
}

.register-button.loading::before {
  display: none;
}

@keyframes registerSpinner {
  to {
    transform: rotate(360deg);
  }
}


/* =========================
   16. LOGIN LINK
========================= */

.login-link {
  margin-top: 25px;

  color: var(--register-muted);

  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;

  text-align: center;
}

.login-link a {
  margin-left: 3px;

  color: var(--register-blue);

  font-weight: 700;

  transition: color var(--register-transition);
}

.login-link a:hover {
  color: var(--register-blue-dark);
  text-decoration: underline;
}


/* =========================
   17. KEYBOARD ACCESSIBILITY
========================= */

a:focus-visible {
  outline: 2px solid var(--register-blue);
  outline-offset: 4px;
  border-radius: 4px;
}


/* =========================
   18. TABLET
========================= */

@media (max-width: 600px) {
  .register-page {
    padding: 30px 18px 42px;
  }

  .register-container {
    max-width: 470px;
  }

  .auth-logo {
    margin-bottom: 22px;
    font-size: 24px;
  }

  .logo-mark {
    width: 37px;
    height: 37px;

    font-size: 21px;
  }

  .register-card {
    padding: 30px 25px 26px;

    border-radius: 16px;
  }

  .register-header {
    margin-bottom: 25px;
  }

  .register-header h1 {
    font-size: 27px;
  }

  .register-form {
    gap: 18px;
  }

  .form-group input,
  .form-group select {
    height: 48px;
  }

  .register-button {
    min-height: 49px;
  }
}


/* =========================
   19. MOBILE
========================= */

@media (max-width: 420px) {
  .register-page {
    padding: 22px 13px 30px;
  }

  .register-container {
    max-width: 100%;
  }

  .auth-logo {
    gap: 8px;

    margin-bottom: 19px;

    font-size: 23px;
  }

  .logo-mark {
    width: 35px;
    height: 35px;

    border-radius: 10px;

    font-size: 20px;
  }

  .register-card {
    padding: 26px 19px 23px;

    border-radius: 14px;

    box-shadow:
      0 12px 36px rgba(0, 0, 0, 0.2);
  }

  .register-header {
    margin-bottom: 23px;
  }

  .register-header h1 {
    font-size: 25px;
    letter-spacing: -0.8px;
  }

  .register-header p {
    font-size: 12px;
  }

  .register-form {
    gap: 17px;
  }

  .form-group {
    gap: 7px;
  }

  .form-group label {
    font-size: 12px;
  }

  .form-group input,
  .form-group select {
    height: 47px;
    padding-right: 12px;
    padding-left: 12px;

    font-size: 12px;
  }

  .form-group select {
    padding-right: 35px;

    background-position: right 11px center;
  }

  .password-input input {
    padding-right: 65px;
  }

  .password-toggle {
    right: 8px;
    font-size: 11px;
  }

  .terms {
    gap: 8px;

    font-size: 11px;
    line-height: 1.8;
  }

  .terms input[type="checkbox"] {
    flex-basis: 15px;

    width: 15px;
    height: 15px;
  }

  .register-button {
    min-height: 48px;
    padding: 12px 15px;

    font-size: 12px;
  }

  .login-link {
    margin-top: 22px;
    font-size: 11px;
  }
}


/* =========================
   20. VERY SMALL SCREENS
========================= */

@media (max-width: 350px) {
  .register-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .register-card {
    padding: 23px 15px 20px;
  }

  .register-header h1 {
    font-size: 23px;
  }

  .register-header p {
    font-size: 11px;
  }

  .form-group input,
  .form-group select {
    font-size: 11px;
  }

  .terms {
    font-size: 10px;
  }
}


/* =========================
   21. REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }
}