/* K9WIN Login page – from Figma node 234-102187 (LOG IN BY USERNAME) */
/* Design tokens */
:root {
  --login-main: #f9d94e;
  --login-main-dark: #c68308;
  --login-bg-dark: #1e1e1e;
  --login-bg-input: #3b3b3b;
  --login-border: rgba(255, 255, 255, 0.5);
  --login-text: #ffffff;
  --login-text-muted: rgba(255, 255, 255, 0.5);
  --login-font: 'Inter', -apple-system, sans-serif;
}

html[lang="km"] {
  --login-font: Arial, "Noto Sans", sans-serif, 'Kh-Content', Prompt, sans-serif;
}

html[lang="km"] body.login-page,
html[lang="km"] body.login-page button,
html[lang="km"] body.login-page select,
html[lang="km"] body.login-page textarea {
  font-family: Arial, "Noto Sans", sans-serif, 'Kh-Content', Prompt, sans-serif !important;
}

body.login-page {
  margin: 0;
  padding-top: 0;
  min-height: 100vh;
  background: #000;
  font-family: var(--login-font);
  color: var(--login-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login-page .page { display: none; }
.login-screen {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

/* Background */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.login-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.login-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 86%);
}

/* Container: constrains home, logo, panel */
.login-container {
  position: relative;
  max-width: 1370px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  z-index: 1;
}

/* Home icon */
.login-home {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--login-text);
  text-decoration: none;
}
.login-home:hover { color: var(--login-main); }
.login-home-icon {
  width: 24px;
  height: 24px;
}

/* Logo area (left) */
.login-logo-area {
  position: absolute;
  left: 260px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 450px;
  max-width: 40vw;
}
.login-logo-img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

/* Ambassador carousel (below login-header in panel) */
.login-carousel-wrap {
  position: relative;
  width: 100%;
  height: 170px;
  flex-shrink: 0;
  overflow: visible;
}
.login-carousel {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding-bottom: 0;
}
.login-carousel::-webkit-scrollbar { display: none; }
.login-ambassador-card {
  flex: 0 0 173px;
  width: 173px;
  height: 170px;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  scroll-snap-align: start;
  position: relative;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.login-ambassador-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.login-ambassador-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.login-ambassador-name {
  font-family: var(--login-font);
  font-weight: 700;
  font-size: 13px;
  color: var(--login-main);
  line-height: normal;
}
.login-ambassador-role {
  font-size: 9px;
  color: var(--login-text);
  line-height: normal;
}
.login-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 5px;
  background: var(--login-main);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  user-select: none;
}
.login-carousel-btn svg {
  width: 20px;
  height: 20px;
  max-width: none;
  max-height: none;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.login-carousel-prev { left: -16px; }
.login-carousel-next { right: -16px; }

/* iOS Safari: match Android carousel rendering and scroll behavior */
@supports (-webkit-touch-callout: none) {
  .login-carousel-wrap,
  .login-panel-inner {
    overflow: visible;
  }

  .login-ambassador-card,
  .login-ambassador-img {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  .login-carousel-btn {
    -webkit-transform: translateY(-50%) translateZ(0);
    transform: translateY(-50%) translateZ(0);
  }
}

/* Right panel */
.login-panel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  max-width: 100vw;
  z-index: 10;
  padding: 0 24px;
  box-sizing: border-box;
}
.login-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
}

/* Header: logo + tagline */
.login-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 75px;
  flex-shrink: 0;
}
.login-header-logo {
  height: 75px;
  width: auto;
  max-width: 128px;
  object-fit: contain;
}
.login-header-tagline {
  height: 53px;
  width: auto;
  max-width: 117px;
  object-fit: contain;
}

/* Tabs */
.login-tabs {
  display: flex;
  height: 50px;
  border-bottom: 1px solid #7c6c27;
  flex-shrink: 0;
}
.login-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  font-family: var(--login-font);
  font-size: 18px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: rgb(249 217 78);
  cursor: pointer;
  border-radius: 25px 25px 0 0;
  transition: background 0.2s, color 0.2s;
}
.login-tab--active {
  background: linear-gradient(180deg, var(--login-main) 0%, var(--login-main-dark) 100%);
  color: #000;
}
.login-tab:not(.login-tab--active):hover {
  color: var(--login-main);
}
.login-tab-icon {
  display: none;
}

/* Auth block: tabs + mode + form */
.login-auth {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Username / Phone bar */
.login-mode-bar {
  display: flex;
  height: 54px;
  background: var(--login-bg-dark);
  border-radius: 15px;
  padding: 6px;
  gap: 0;
}
.login-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  font-family: var(--login-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--login-text);
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.login-mode-btn--active {
  background: var(--login-bg-input);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-form:not(.is-visible) {
  display: none !important;
}
.login-form.is-visible {
  padding-bottom: 10px;
}
.register-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.register-form.is-visible {
  display: flex !important;
}
.login-fields,
.register-form .register-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-fields-phone,
.register-form .register-fields-phone {
  display: none;
}
.login-field,
.register-form .register-field {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--login-border);
  border-radius: 10px;
  background: transparent;
}
.login-field--phone,
.register-form .register-field--phone {
  padding: 0;
  border: none;
  height: auto;
  min-height: 50px;
}
.login-phone-inner,
.register-form .register-phone-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-radius: 8px;
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: -1px;
  background: transparent;
  min-height: 44px;
  box-sizing: border-box;
}
.login-phone-receiver,
.register-form .register-phone-receiver {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-phone-receiver-img,
.register-form .register-phone-receiver-img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}
.login-phone-country,
.register-form .register-phone-country {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.login-phone-flag,
.register-form .register-phone-flag {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.login-phone-chevron,
.register-form .register-phone-chevron {
  width: 10px;
  height: 10px;
  display: block;
  object-fit: contain;
}
.login-phone-code,
.register-form .register-phone-code {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-family: var(--login-font);
  font-weight: 400;
  line-height: 15px;
  flex-shrink: 0;
}
.login-phone-input,
.register-form .register-phone-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--login-text);
}
.login-phone-input::placeholder,
.register-form .register-phone-input::placeholder {
  color: var(--login-text-muted);
}
.login-phone-input:focus,
.register-form .register-phone-input:focus {
  outline: none;
}

/* Register phone validation alert (below register-field--phone) */
.register-form .register-phone-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 2px;
  font-family: var(--login-font);
  font-size: 14px;
  color: #ff3b3b;
}
.register-form .register-phone-alert[hidden] {
  display: none !important;
}
.register-form .register-phone-alert-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff3b3b;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.3);
}
.register-form .register-phone-alert-text {
  font-size: 0.8rem;
  color: #ff3b3b;
  font-weight: 500;
}

/* Register password validation alert (below register-field in phone section) */
.register-form .register-password-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 2px;
  font-family: var(--login-font);
  font-size: 14px;
  color: #ff3b3b;
}
.register-form .register-password-alert[hidden] {
  display: none !important;
}
.register-form .register-password-alert-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff3b3b;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.3);
}
.register-form .register-password-alert-text {
  font-size: 0.8rem;
  color: #ff3b3b;
  font-weight: 500;
}

.login-field-icon,
.register-form .register-field-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--login-text-muted);
}
.login-field-icon-img,
.register-form .register-field-icon-img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  opacity: 0.9;
}
.login-field-icon svg,
.register-form .register-field-icon svg {
  display: block;
}
.login-input,
.register-form .register-input {
  flex: 1;
  min-width: 0;
  font-family: var(--login-font);
  font-size: 14px;
  color: var(--login-text);
  background: none;
  border: none;
  outline: none;
}
.login-input::placeholder,
.register-form .register-input::placeholder {
  color: var(--login-text-muted);
}
.login-password-toggle,
.register-form .register-password-toggle,
.reset-newpw-toggle {
  flex-shrink: 0;
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  color: rgb(255 255 255);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.login-password-toggle:hover,
.register-form .register-password-toggle:hover,
.reset-newpw-toggle:hover { color: var(--login-text); }
.login-password-toggle .login-eye,
.register-form .register-password-toggle .register-eye,
.reset-newpw-toggle .reset-eye {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  pointer-events: none;
}
.login-password-toggle .login-eye--on,
.register-form .register-password-toggle .register-eye--on,
.reset-newpw-toggle .reset-eye--on {
  display: none;
}
.login-password-toggle.is-password-visible .login-eye--off,
.register-form .register-password-toggle.is-password-visible .register-eye--off,
.reset-newpw-toggle.is-password-visible .reset-eye--off {
  display: none;
}
.login-password-toggle.is-password-visible .login-eye--on,
.register-form .register-password-toggle.is-password-visible .register-eye--on,
.reset-newpw-toggle.is-password-visible .reset-eye--on {
  display: block;
}

/* Options row */
.login-options,
.register-form .register-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
}
.login-keep,
.register-form .register-keep {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-family: var(--login-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--login-text);
  -webkit-tap-highlight-color: transparent;
}
.login-keep-input,
.register-form .register-keep-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.login-keep-box,
.register-form .register-keep-box {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--login-border);
  border-radius: 4px;
  background: transparent;
  display: block;
  transition: background 0.2s, border-color 0.2s;
}
.login-keep-input:checked + .login-keep-box,
.register-form .register-keep-input:checked + .register-keep-box {
  background: #00CA07;
  border-color: #00CA07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.login-keep-text,
.register-form .register-keep-text {
  line-height: 18.693px;
}
.login-forgot,
.register-form .register-forgot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--login-font);
  font-size: 14px;
  color: var(--login-text);
  text-decoration: none;
}
.login-forgot-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.login-forgot:hover,
.register-form .register-forgot:hover { text-decoration: none; }

/* Submit */
.login-submit,
.register-form .register-submit {
  height: 50px;
  padding: 12px 16px;
  background: var(--login-main);
  color: #000;
  font-family: var(--login-font);
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.2s;
}
.login-submit:hover,
.register-form .register-submit:hover { filter: brightness(1.05); }
.login-submit.is-loading,
.register-form .register-submit.is-loading {
  opacity: 0.75;
  cursor: wait;
}
.login-screen.is-login-loading .login-fields,
.login-screen.is-login-loading .login-home {
  pointer-events: none;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}
.login-divider-line {
  flex: 1;
  height: 3px;
  background: var(--login-border);
}
.login-divider-line-left {
  background: linear-gradient(to right, rgb(249 217 78 / 0%) 0%, rgb(249 217 78 / 50%) 100%);
}
.login-divider-line-right {
  background: linear-gradient(to right, rgb(249 217 78 / 50%), rgb(249 217 78 / 0%) 100%);
}
.login-divider-text {
  font-family: var(--login-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--login-text);
  flex-shrink: 0;
}

/* Social */
.login-social-row {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
}
.login-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 12px 16px;
  background: var(--login-bg-input);
  border-radius: 10px;
  color: var(--login-text);
  font-family: var(--login-font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.login-social-btn:hover { background: #4a4a4a; }
.login-social-icon {
  display: block;
  flex-shrink: 0;
}

.login-register-extra[hidden] {
  display: none !important;
}

/* One-click register */
.login-oneclick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 12px 16px;
  background: var(--login-bg-input);
  border-radius: 10px;
  color: var(--login-text);
  font-family: var(--login-font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.login-oneclick:hover { background: #4a4a4a; }
.login-oneclick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #F76B1C;
}
.login-oneclick-icon-img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Responsive: stack and center on small screens */
@media (max-width: 1200px) {
  .login-logo-area { display: none; }
  .login-panel {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 16px;
  }
  .login-panel-inner { margin: 0 auto; }
}

@media (max-width: 768px) {
  /* Allow page scroll when form + carousel exceed viewport */
  body.login-page {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-container {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 24px);
  }
  .login-panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 0 auto;
    padding-top: calc(env(safe-area-inset-top, 0px) + 48px);
    padding-bottom: 24px;
  }
  .login-home {
    position: fixed;
    right: 16px;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
  }
  .login-bg { display: none; }
  .login-panel-inner {
    gap: 16px;
  }
  .login-header {
    height: 60px;
  }
  .login-header-logo { max-height: 50px; }
  .login-header-tagline { max-height: 40px; }
  .login-carousel-wrap {
    height: 150px;
  }
  .login-ambassador-card {
    flex: 0 0 123px;
    width: 123px;
    height: 150px;
  }
  .login-mobile-box {
    border-radius: 16px;
    border: 1px solid rgba(249, 217, 78, 0.40);
    padding: 12px;
  }
  .login-tabs { height: 40px; }
  .login-tab {
    gap: 6px;
    font-size: 14px;
  }
  .login-tab-icon {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: none;
    opacity: 1;
    transition: filter 0.2s, opacity 0.2s;
  }
  .login-tab--active .login-tab-icon {
    filter: brightness(0);
    opacity: 1;
  }
  .login-mode-btn {
    font-size: 12px;
  }
  .login-form.is-visible {
    padding-bottom: 0;
  }
  .login-keep-text {
    font-size: 12px;
  }
  .login-submit,
  .register-form .register-submit {
    font-size: 14px;
  }
  .login-forgot,
  .register-form .register-forgot {
    font-size: 12px;
  }
  .login-divider {
    gap: 10px;
    margin: 12px 0;
    padding: 10px 10px 0;
  }
  .login-divider-line {
    height: 3px;
    background: rgba(249, 217, 78, 0.45);
  }
  .login-divider-line-left {
    background: linear-gradient(to right, rgb(249 217 78 / 0%) 0%, rgb(249 217 78 / 50%) 100%);
  }
  .login-divider-line-right {
    background: linear-gradient(to right, rgb(249 217 78 / 50%), rgb(249 217 78 / 0%) 100%);
  }
  .login-divider-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    margin-top: 0;
  }
  .login-oneclick {
    margin-top: 0;
  }
}

/* ---- Forgot Password modal ---- */
.forgot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgb(0 0 0 / 80%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.forgot-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.forgot-modal {
  background: #1e1e1e;
  border: 1px solid #F9D94E;
  border-radius: 14px;
  padding: 22px 24px 28px;
  width: 100%;
  max-width: 360px;
  transform: translateY(14px);
  transition: transform 0.25s ease;
}
@media (min-width: 992px) {
  .forgot-modal {
    max-width: 600px;
  }
}
.forgot-overlay.is-open .forgot-modal {
  transform: translateY(0);
}
.forgot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  padding-bottom: 14px;
}
.forgot-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2e2e2e;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.forgot-back:hover {
  background: #3a3a3a;
}
.forgot-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  flex: 1;
}
.forgot-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.forgot-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 20px;
  line-height: 1.55;
}
.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.forgot-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
}
.forgot-input {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.forgot-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.forgot-input:focus {
  border-color: #f9d94e;
}
.forgot-phone-field {
  width: 100%;
}
.forgot-phone-inner {
  display: flex;
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.forgot-phone-inner:focus-within {
  border-color: #f9d94e;
}
.forgot-phone-country {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-right: 1px solid #3a3a3a;
  flex-shrink: 0;
  cursor: pointer;
  height: 44px;
}
.forgot-phone-flag {
  width: 22px;
  height: auto;
  display: block;
}
.forgot-phone-code {
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
}
.forgot-phone-chevron {
  width: 10px;
  height: auto;
  opacity: 0.7;
}
.forgot-phone-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 0.9rem;
  color: #fff;
  height: 44px;
  font-family: inherit;
  min-width: 0;
}
.forgot-phone-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.forgot-phone-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.forgot-phone-clear:hover {
  color: #fff;
}

/* OTP step */
.forgot-otp-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}
.forgot-otp-phone {
  color: #f9d94e;
  font-weight: 600;
}
.forgot-resend {
  font-size: 0.78rem;
  color: #f9d94e;
  text-decoration: underline;
  display: inline-block;
}
.forgot-resend:hover {
  color: #f5ce30;
}
.forgot-otp-label {
  margin-top: 4px;
}
.forgot-otp-field {
  display: flex;
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.forgot-otp-field:focus-within {
  border-color: #f9d94e;
}
.forgot-otp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
  min-width: 0;
}
.forgot-otp-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.forgot-otp-timer {
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f9d94e;
  white-space: nowrap;
  flex-shrink: 0;
}
.forgot-newpw-field {
  display: flex;
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.forgot-newpw-field:focus-within {
  border-color: #f9d94e;
}
.forgot-newpw-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
  min-width: 0;
}
.forgot-newpw-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.forgot-newpw-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.forgot-newpw-toggle:hover {
  color: #fff;
}

.forgot-submit,
.reset-password {
  background: #f9d94e;
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
  font-family: inherit;
}
.forgot-submit:hover,
.reset-password:hover {
  background: #f5ce30;
}

/* ---- Reset Password modal (OTP step) ---- */
.reset-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.reset-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.reset-modal {
  background: #1e1e1e;
  border: 1px solid #F9D94E;
  border-radius: 14px;
  padding: 22px 24px 28px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(14px);
  transition: transform 0.25s ease;
}
.reset-overlay.is-open .reset-modal {
  transform: translateY(0);
}
@media (min-width: 992px) {
  .reset-modal { max-width: 600px; }
}
.reset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  margin-bottom: 4px;
}
.reset-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2e2e2e;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.reset-back:hover { background: #3a3a3a; }
.reset-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  flex: 1;
}
.reset-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.reset-otp-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}
.reset-otp-phone {
  color: #f9d94e;
  font-weight: 600;
}
.reset-resend {
  font-size: 0.78rem;
  color: #f9d94e;
  text-decoration: underline;
  display: inline-block;
}
.reset-resend:hover { color: #f5ce30; }
.reset-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reset-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
}
.reset-otp-field {
  display: flex;
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.reset-otp-field:focus-within { border-color: #f9d94e; }
.reset-otp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
  min-width: 0;
}
.reset-otp-input::placeholder { color: rgba(255,255,255,0.3); }
.reset-otp-timer {
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f9d94e;
  white-space: nowrap;
  flex-shrink: 0;
}
.reset-newpw-field {
  display: flex;
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.reset-newpw-field:focus-within { border-color: #f9d94e; }
.reset-newpw-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
  min-width: 0;
}
.reset-newpw-input::placeholder { color: rgba(255,255,255,0.3); }
.reset-newpw-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.reset-newpw-toggle:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::before, .login-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Login popup modal ---- */
.login-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgb(0 0 0 / 82%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.login-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.login-popup-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}
.login-popup-overlay.is-open .login-popup-modal {
  transform: translateY(0) scale(1);
}
.login-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgb(30 30 30 / 95%);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.login-popup-close:hover {
  background: #2e2e2e;
  border-color: rgba(249, 217, 78, 0.45);
  color: var(--login-main);
}
.login-popup-box {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(249, 217, 78, 0.45);
  background: linear-gradient(180deg, rgb(30 30 30 / 98%) 0%, rgb(18 18 18 / 98%) 100%);
  padding: 0 16px 18px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 45%);
  overflow: hidden;
}
.login-popup-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 44px 16px;
  margin: 0 -16px 14px;
  border-bottom: 1px solid rgba(249, 217, 78, 0.18);
  background: linear-gradient(180deg, rgba(249, 217, 78, 0.08) 0%, rgba(249, 217, 78, 0) 100%);
}
.login-popup-logo {
  height: 46px;
  width: auto;
  max-width: 132px;
  object-fit: contain;
}
.login-popup-overlay .login-popup-title {
  margin: 0;
  font-family: var(--login-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(249, 217, 78, 0.85);
}
.login-popup-overlay .login-auth {
  gap: 12px;
}
.login-popup-overlay .login-mode-bar {
  height: 46px;
  margin-bottom: 2px;
}
.login-popup-overlay .login-mode-btn {
  font-size: 13px;
}

.login-popup-overlay .login-popup-mode-bar[hidden] {
  display: none !important;
}
.login-popup-overlay.is-login-loading .login-fields,
.login-popup-overlay.is-login-loading .login-submit {
  pointer-events: none;
  opacity: 0.7;
}
body.login-popup-open {
  overflow: hidden;
}
