/* Paymn look for the shared sign-in, sign-up and password pages. Loaded on Paymn hosts only,
   after the backend's own styles, so every rule here has to win against them. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/assets/fonts/manrope-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); }

html:has(body.pm-auth) { background: #f6f3fd !important; }
body.pm-auth {
  --pm-accent: #5b33d6; --pm-accent-2: #7c56ee; --pm-accent-3: #5126c9; --pm-ink: #191430; --pm-muted: #615b7a;
  --pm-line: #e3dcf5; --pm-lav: #e9e3fa;
  margin: 0 !important; min-height: 100vh; color: var(--pm-ink) !important;
  background: #f6f3fd !important;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
  overflow-x: hidden;
}
body.pm-auth *, body.pm-auth *::before, body.pm-auth *::after { box-sizing: border-box; }
body.pm-auth .bg-grid, body.pm-auth .starfield, body.pm-auth .theme-toggle-wrap, body.pm-auth .register-badge { display: none !important; }

/* ---------- frame: brand panel + form ---------- */
body.pm-auth .login-container, body.pm-auth .register-shell {
  display: grid !important; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch;
  min-height: 100vh; width: 100%; max-width: none; margin: 0; padding: 0 !important;
  background: none !important; position: relative; overflow: visible;
}
body.pm-auth .pm-auth__side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 52px; color: #fff;
  background: radial-gradient(900px 520px at 0% 0%, rgba(124, 86, 238, .55), transparent 60%),
    radial-gradient(700px 480px at 100% 100%, rgba(81, 38, 201, .5), transparent 62%), #1b1533;
}
body.pm-auth .pm-auth__side::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
body.pm-auth .pm-auth__side > * { position: relative; z-index: 1; }
body.pm-auth .pm-auth__brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 700 21px/1 'Manrope', 'Inter', sans-serif; letter-spacing: -.02em; }
body.pm-auth .pm-auth__brand .pm-mark { width: 38px; height: 38px; flex: none; border-radius: 10px; }
body.pm-auth .pm-auth__pitch h2 { margin: 0 0 14px; max-width: 440px; color: #fff; font: 700 clamp(28px, 2.6vw, 38px)/1.14 'Manrope', 'Inter', sans-serif; letter-spacing: -.03em; }
body.pm-auth .pm-auth__pitch h2 em { font-style: normal; color: #c3b0ff; }
body.pm-auth .pm-auth__pitch p { margin: 0 0 26px; max-width: 420px; color: rgba(255, 255, 255, .72); font-size: 15.5px; line-height: 1.6; }
body.pm-auth .pm-auth__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
body.pm-auth .pm-auth__points li { display: flex; align-items: flex-start; gap: 12px; color: rgba(255, 255, 255, .9); font-size: 14.5px; line-height: 1.5; }
body.pm-auth .pm-auth__points li::before {
  content: ''; flex: none; width: 22px; height: 22px; margin-top: 0; border-radius: 50%;
  background: rgba(195, 176, 255, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c3b0ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4'/%3E%3C/svg%3E") center/12px no-repeat;
}
body.pm-auth .pm-auth__methods { display: flex; flex-wrap: wrap; gap: 8px; }
body.pm-auth .pm-auth__methods span { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 600; }
body.pm-auth .pm-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 88px 28px 56px; }
body.pm-auth .pm-auth__main > .pm-auth__brand { display: none; margin-bottom: 26px; color: var(--pm-ink); }

/* ---------- card ---------- */
body.pm-auth .login-card, body.pm-auth .register-card {
  width: 100% !important; max-width: 420px !important; margin: 0 !important; padding: 0 !important;
  background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; text-align: left !important; animation: none !important;
  position: relative; z-index: 1;
}
body.pm-auth .register-card { max-width: 480px !important; }
body.pm-auth .login-card::before, body.pm-auth .register-card::before { display: none !important; }
body.pm-auth .logo-wrap { display: none !important; }
body.pm-auth .login-card h1, body.pm-auth .register-card h1 {
  margin: 0 0 8px !important; color: var(--pm-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
  font: 700 30px/1.15 'Manrope', 'Inter', sans-serif !important; letter-spacing: -.03em !important; text-align: left !important;
}
body.pm-auth .login-card .subtitle, body.pm-auth .register-subtitle {
  margin: 0 0 26px !important; color: var(--pm-muted) !important; font-size: 15px !important; line-height: 1.55 !important; text-align: left !important;
}

/* tabs (password / email code) */
body.pm-auth .login-mode-tabs { gap: 4px !important; padding: 4px; margin-bottom: 22px !important; border-radius: 12px; background: var(--pm-lav); }
body.pm-auth .login-mode-tab {
  padding: 9px 10px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important;
  color: var(--pm-muted) !important; font: 600 13.5px/1.2 'Inter', sans-serif !important; box-shadow: none !important; transition: background .15s, color .15s;
}
/* the page script marks the active tab with an inline background only */
body.pm-auth .login-mode-tab[style*='130, 246'] {
  background: #fff !important; color: var(--pm-accent) !important; box-shadow: 0 1px 3px rgba(25, 20, 48, .12) !important;
}

/* fields */
body.pm-auth .form-group, body.pm-auth .register-field { margin: 0 0 16px !important; position: relative; }
body.pm-auth .form-group label, body.pm-auth .register-field label {
  display: block !important; position: static !important; margin: 0 0 7px !important; padding: 0 !important; background: none !important;
  color: var(--pm-ink) !important; font: 600 13px/1.3 'Inter', sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; transform: none !important;
}
body.pm-auth .form-group input, body.pm-auth .register-field input, body.pm-auth .register-field select,
body.pm-auth .register-country-wrap, body.pm-auth .register-dial-wrap, body.pm-auth .captcha-box, body.pm-auth .register-captcha-box {
  width: 100%; min-height: 46px; border: 1px solid var(--pm-line) !important; border-radius: 11px !important; background: #fff !important;
  color: var(--pm-ink) !important; font: 500 15px/1.3 'Inter', sans-serif !important; box-shadow: 0 1px 2px rgba(25, 20, 48, .04) !important;
  transition: border-color .15s, box-shadow .15s;
}
body.pm-auth .form-group input, body.pm-auth .register-field > input, body.pm-auth .register-phone-row > input, body.pm-auth .register-field > select { padding: 12px 14px !important; }
body.pm-auth .form-group input::placeholder, body.pm-auth .register-field input::placeholder { color: #a39dba !important; font-weight: 400; }
body.pm-auth .form-group input:focus, body.pm-auth .register-field input:focus, body.pm-auth .register-field select:focus,
body.pm-auth .register-country-wrap:focus-within, body.pm-auth .register-dial-wrap:focus-within {
  outline: none !important; border-color: var(--pm-accent-2) !important; box-shadow: 0 0 0 4px rgba(124, 86, 238, .16) !important;
}
body.pm-auth .register-country-wrap select, body.pm-auth .register-dial-wrap select {
  min-height: 44px; border: 0 !important; background-color: transparent !important; box-shadow: none !important; color: var(--pm-ink) !important;
}
body.pm-auth .register-row-2, body.pm-auth .register-phone-row { gap: 12px !important; }
body.pm-auth .otp-meta, body.pm-auth .register-verify-hint { color: var(--pm-muted) !important; font-size: 13px !important; line-height: 1.5 !important; }
body.pm-auth .turnstile-field { margin: 4px 0 18px !important; }

/* buttons */
body.pm-auth .login-button, body.pm-auth .register-btn-next {
  width: 100%; min-height: 48px; padding: 13px 18px !important; border: 0 !important; border-radius: 12px !important; cursor: pointer;
  background: linear-gradient(135deg, var(--pm-accent-2), var(--pm-accent-3)) !important; color: #fff !important;
  font: 700 15px/1.2 'Manrope', 'Inter', sans-serif !important; letter-spacing: 0 !important; text-transform: none !important;
  box-shadow: 0 10px 24px -10px rgba(91, 51, 214, .7) !important; transition: transform .15s, box-shadow .15s, filter .15s;
}
body.pm-auth .login-button::before, body.pm-auth .register-btn-next::before { display: none !important; }
body.pm-auth .login-button:hover, body.pm-auth .register-btn-next:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 28px -10px rgba(91, 51, 214, .8) !important; }
body.pm-auth .register-nav { display: flex; gap: 12px !important; margin-top: 22px !important; }
body.pm-auth .register-btn-next { flex: 1; width: auto; }
body.pm-auth .register-btn-back {
  min-height: 48px; padding: 13px 20px !important; border: 1px solid var(--pm-line) !important; border-radius: 12px !important; background: #fff !important;
  color: var(--pm-ink) !important; font: 600 15px/1.2 'Inter', sans-serif !important; cursor: pointer;
}
body.pm-auth .register-btn-back:disabled { opacity: .45; cursor: default; }

/* links under the form */
body.pm-auth .register-link, body.pm-auth .register-footer-link { margin-top: 16px !important; text-align: left !important; color: var(--pm-muted) !important; font-size: 14px !important; }
body.pm-auth .register-link a, body.pm-auth .register-footer-link a { color: var(--pm-accent) !important; font-weight: 600 !important; text-decoration: none !important; }
body.pm-auth .register-link a:hover, body.pm-auth .register-footer-link a:hover { text-decoration: underline !important; }
body.pm-auth .login-home-link { margin-top: 10px !important; }
body.pm-auth .login-home-link a { color: var(--pm-muted) !important; font-weight: 500 !important; }

/* messages */
body.pm-auth .error-message, body.pm-auth .register-error {
  margin: 0 0 18px !important; padding: 12px 14px !important; border: 1px solid #f3c2c8 !important; border-radius: 11px !important;
  background: #fdf1f2 !important; color: #a3202f !important; font-size: 14px !important; line-height: 1.5 !important; text-align: left !important;
}
body.pm-auth .register-success { padding: 14px 16px !important; border: 1px solid #bfe6d5 !important; border-radius: 11px !important; background: #effaf5 !important; color: #0b6b4b !important; }
body.pm-auth .register-credentials { border: 1px solid var(--pm-line) !important; border-radius: 11px !important; background: #fff !important; color: var(--pm-ink) !important; }

/* sign-up steps */
body.pm-auth .register-steps { margin: 0 0 24px !important; }
body.pm-auth .register-step-circle { border-color: var(--pm-line) !important; background: #fff !important; color: var(--pm-muted) !important; box-shadow: none !important; }
body.pm-auth .register-step-item.active .register-step-circle, body.pm-auth .register-step-item.done .register-step-circle {
  border-color: transparent !important; background: linear-gradient(135deg, var(--pm-accent-2), var(--pm-accent-3)) !important; color: #fff !important;
}
body.pm-auth .register-step-item::after { background: var(--pm-line) !important; }
body.pm-auth .register-step-item.done::after { background: var(--pm-accent-2) !important; }
body.pm-auth .register-step-label { color: var(--pm-muted) !important; letter-spacing: .04em; }
body.pm-auth .register-step-item.active .register-step-label { color: var(--pm-accent) !important; }

/* language switcher, top right of the form side */
body.pm-auth .admin-locale-switcher-wrap { position: absolute !important; top: 22px !important; right: 26px !important; z-index: 5; }
body.pm-auth .admin-locale-switcher-wrap .admin-locale-switcher-select {
  min-width: 0; padding: 8px 30px 8px 12px !important; border: 1px solid var(--pm-line) !important; border-radius: 10px !important;
  background-color: #fff !important; color: var(--pm-ink) !important; font: 600 13px/1.2 'Inter', sans-serif !important; box-shadow: none !important;
  appearance: none !important; -webkit-appearance: none !important; cursor: pointer;
  background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 12px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23615b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}

@media (max-width: 900px) {
  body.pm-auth .login-container, body.pm-auth .register-shell { grid-template-columns: minmax(0, 1fr); }
  body.pm-auth .pm-auth__side { display: none; }
  body.pm-auth .pm-auth__main { justify-content: flex-start; padding: 76px 20px 40px; }
  body.pm-auth .pm-auth__main > .pm-auth__brand { display: inline-flex; align-self: flex-start; max-width: 420px; }
  body.pm-auth .login-card, body.pm-auth .register-card { max-width: 480px !important; }
  body.pm-auth .pm-auth__main > .pm-auth__brand { width: 100%; max-width: 480px; }
  body.pm-auth .login-card h1, body.pm-auth .register-card h1 { font-size: 26px !important; }
  body.pm-auth .admin-locale-switcher-wrap { top: 18px !important; right: 18px !important; }
}
@media (max-width: 480px) {
  body.pm-auth .register-row-2 { grid-template-columns: 1fr !important; display: grid !important; }
}
