/* Login page split-screen UI inspired by the provided reference.
   Existing form IDs/names and inline JS logic are intentionally preserved. */

:root {
  --auth-pink: #ff0054;
  --auth-pink-dark: #e6004c;
  --auth-ink: #101014;
  --auth-muted: #6f7078;
  --auth-line: #d7d7dc;
  --auth-soft: #f4f4f8;
  --auth-error: #a6282b;
  --auth-success: #087442;
}

* { box-sizing: border-box; }

html, body { margin: 0; width: 100%; min-height: 100%; }

body {
  font-family: "Inter", Arial, sans-serif;
  color: var(--auth-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.secure-entry {
  -webkit-text-security: disc;
  text-security: disc;
}

.auth-layout {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 41.7% 58.3%;
  overflow: hidden;
  background: #fff;
}

.auth-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffe7f1;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  object-position: center 45%;
}

.auth-panel {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 104px 56px 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
}

.auth-language {
  position: absolute;
  top: 48px;
  right: 72px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #1d1d21;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.auth-language svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.auth-language-chevron {
  margin-left: 2px;
  font-size: 17px;
  transform: translateY(-1px);
}

.auth-mobile-logo {
  display: none;
}

.auth-form-shell {
  width: min(100%, 450px);
  margin-top: -10px;
}

.auth-form-shell--register {
  width: min(100%, 470px);
}

.auth-form-heading {
  margin-bottom: 28px;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--auth-pink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.auth-form-heading h1 {
  margin: 0;
  color: #111115;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 700;
}

.auth-form-heading p:last-child {
  margin: 10px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-form, .register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.input-group label, .label-row label {
  color: #16161a;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.phone-field, .input-wrap {
  position: relative;
}

.phone-field {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.phone-field:focus-within, .input-wrap:focus-within input {
  border-color: var(--auth-pink);
  box-shadow: 0 0 0 3px rgba(255,0,84,.08);
}

.country-picker {
  height: 100%;
  min-width: 125px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #e1e1e5;
  border-radius: 9px 0 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #26262b;
  cursor: pointer;
  flex: 0 0 auto;
}

.country-picker:hover { background: #fafafa; }

.country-flag-wrap, .opt-flag-wrap {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f0f0f2;
}

.country-flag-img, .opt-flag-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.country-code, .country-dial {
  color: #26262b;
  font-size: 11px;
  font-weight: 600;
}

.country-chevron {
  margin-left: auto;
  color: #77777f;
  font-size: 12px;
}

.phone-field > input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1d1d21;
  font-size: 14px;
}

.phone-field > input::placeholder, .input-wrap input::placeholder {
  color: #b1b1b8;
}

.country-dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #e1e1e5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(18,18,22,.12);
}

.country-dropdown.show { display: block; }

.country-option {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #1f1f24;
  text-align: left;
  cursor: pointer;
}

.country-option:hover, .country-option.active { background: #fff0f5; }
.opt-name, .opt-dial { font-size: 12px; }
.opt-name { font-weight: 600; }
.opt-dial { color: #76767e; font-weight: 600; }

.input-wrap { display: flex; align-items: center; }

.input-icon {
  position: absolute;
  z-index: 2;
  left: 14px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: #777980;
  pointer-events: none;
}

.input-icon svg { width: 100%; height: 100%; display: block; }

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 43px;
  border: 1px solid var(--auth-line);
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #1d1d21;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.status-message {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.45;
}
.status-error { color: var(--auth-error); background: #fff1f2; border: 1px solid #f3cfd5; }
.status-success { color: var(--auth-success); background: #effbf4; border: 1px solid #cdebd9; }

.turnstile-wrap {
  padding: 12px;
  border: 1px solid #e7e7ea;
  border-radius: 10px;
  background: #fafafa;
}
.turnstile-status { margin-top: 7px; color: #777980; font-size: 11px; line-height: 1.4; }
.turnstile-status.success { color: #087442; }
.turnstile-status.error { color: #a6282b; }

.login-submit-btn, .register-submit-btn {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--auth-pink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background .16s ease, transform .16s ease, opacity .16s ease;
}

.login-submit-btn:hover, .register-submit-btn:hover {
  background: var(--auth-pink-dark);
  transform: translateY(-1px);
}
.login-submit-btn:disabled, .register-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn-arrow { display: none; }
.success-btn { background: #169c5b !important; }

.register-link, .login-link {
  margin: -2px 0 0;
  text-align: center;
  color: #6f7078;
  font-size: 13px;
  line-height: 1.5;
}
.register-link a, .login-link a {
  color: var(--auth-pink);
  font-weight: 600;
  text-decoration: none;
}
.register-link a:hover, .login-link a:hover { text-decoration: underline; }

.auth-app-link {
  width: 100%;
  min-height: 52px;
  margin-top: 50px;
  padding: 0 22px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  background: #f3f3f7;
  color: #16161a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.auth-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--auth-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* Old shared footer is intentionally not shown on the split-screen auth pages. */
.login-page .site-footer, .register-page .site-footer { display: none !important; }


@media (min-width: 901px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
}

@media (min-width: 901px) and (min-aspect-ratio: 3 / 2) {
  .auth-visual {
    background: #fde8f4;
  }

  .auth-visual img {
    object-fit: contain;
    object-position: center;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .auth-panel { align-items: flex-start; overflow-y: auto; padding-top: 86px; }
  .auth-form-shell { margin-top: 0; padding-bottom: 40px; }
  .auth-app-link { margin-top: 28px; }
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-layout {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .auth-visual { display: none; }

  .auth-panel {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 116px 24px 50px;
    align-items: flex-start;
    overflow: visible;
  }
  .auth-language { top: 34px; right: 24px; }
  .auth-mobile-logo {
    position: absolute;
    top: 29px;
    left: 24px;
    display: inline-flex;
    align-items: center;
  }
  .auth-mobile-logo img { width: auto; height: 27px; max-width: 150px; }
  .auth-form-shell, .auth-form-shell--register { width: min(100%, 520px); margin: 0 auto; }
}

@media (max-width: 520px) {
  .auth-panel { padding: 102px 18px 36px; }
  .auth-language { top: 31px; right: 18px; font-size: 12px; gap: 6px; }
  .auth-language svg { width: 16px; height: 16px; }
  .auth-language-chevron { display: none; }
  .auth-mobile-logo { top: 27px; left: 18px; }
  .auth-mobile-logo img { height: 25px; max-width: 126px; }
  .auth-form-heading { margin-bottom: 24px; }
  .auth-form-heading h1 { font-size: 28px; }
  .login-form, .register-form { gap: 17px; }
  .phone-field, .input-wrap input { height: 50px; }
  .country-picker { min-width: 116px; padding-inline: 8px; gap: 5px; }
  .country-code, .country-dial { font-size: 10.5px; }
  .phone-field > input, .input-wrap input { font-size: 16px; }
  .auth-app-link { margin-top: 34px; }
}

@media (max-width: 360px) {
  .auth-panel { padding-inline: 13px; }
  .auth-language { right: 13px; }
  .auth-mobile-logo { left: 13px; }
  .country-picker { min-width: 108px; }
}
