/* =============================================
   QPH AUTH — Shared styles for all auth pages
   Register · Login · Password Reset
============================================= */
.qph-auth-wrap {
  --g:   #00bd19;
  --gd:  #009914;
  --gg:  rgba(0,189,25,.12);
  --pk:  #E91E63;
  --ch:  #374046;
  --s1:  #0d1214;
  --s2:  #182025;
  --s3:  #1e292f;
  --br:  rgba(55,64,70,.6);
  --tx:  #d4dde2;
  --tm:  #7a909a;
  --wh:  #fff;
  --err: #ff4d4f;
  --ok:  #00bd19;
  --r:   10px;
  --tr:  .2s ease;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--s1);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0,189,25,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(233,30,99,.05) 0%, transparent 60%);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--tx);
  box-sizing: border-box;
}

.qph-auth-wrap *, .qph-auth-wrap *::before, .qph-auth-wrap *::after {
  box-sizing: border-box;
}

/* ── Card ───────────────────────────────── */
.qph-auth-card {
  background: var(--s2);
  border: 1px solid var(--br);
  border-radius: 18px;
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

/* ── Logo ───────────────────────────────── */
.qph-auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.qph-auth-logo__icon {
  width: 38px;
  height: 38px;
  background: var(--g);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  flex-shrink: 0;
}

.qph-auth-logo__icon svg { width: 20px; height: 20px; }

.qph-auth-logo__text {
  font-family: 'Syne', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--wh);
  letter-spacing: -.02em;
}

.qph-auth-logo__text span { color: var(--g); }

/* ── Headings ───────────────────────────── */
.qph-auth-title {
  font-family: 'Syne', 'Inter', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--wh);
  letter-spacing: -.025em;
  margin: 0 0 6px;
  line-height: 1.2;
}

.qph-auth-sub {
  font-size: .875rem;
  color: var(--tm);
  margin: 0 0 28px;
}

/* ── Alerts ─────────────────────────────── */
.qph-alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.5;
}

.qph-alert--error {
  background: rgba(255,77,79,.1);
  border: 1px solid rgba(255,77,79,.3);
  color: #ff7875;
}

.qph-alert--success {
  background: rgba(0,189,25,.1);
  border: 1px solid rgba(0,189,25,.3);
  color: var(--g);
}

/* ── Form rows ──────────────────────────── */
.qph-form-row { display: flex; gap: 16px; }
.qph-form-row--2 > .qph-field { flex: 1; min-width: 0; }

/* ── Field ──────────────────────────────── */
.qph-field { margin-bottom: 18px; }

.qph-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

.qph-field__labelrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.qph-field__labelrow label { margin-bottom: 0; }

.qph-forgot-link {
  font-size: .78rem;
  color: var(--tm);
  text-decoration: none;
  transition: color var(--tr);
}

.qph-forgot-link:hover { color: var(--g); }

.qph-field-note {
  font-size: .72rem;
  color: var(--tm);
  margin: 5px 0 0;
}

/* ── Input wrap ─────────────────────────── */
.qph-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.qph-input-icon {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--tm);
  pointer-events: none;
  flex-shrink: 0;
}

.qph-input-wrap input {
  width: 100%;
  background: var(--s3);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 11px 44px 11px 40px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--wh);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
  -webkit-appearance: none;
}

.qph-input-wrap input::placeholder { color: var(--tm); }

.qph-input-wrap input:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(0,189,25,.15);
}

/* readonly country field */
.qph-input-wrap--country input[readonly] {
  color: var(--tm);
  cursor: default;
  padding-right: 80px;
}

.qph-country-loader,
.qph-country-flag {
  position: absolute;
  right: 13px;
  font-size: 1.3rem;
  line-height: 1;
  pointer-events: none;
}

.qph-country-loader { color: var(--tm); }
.qph-country-flag   { display: none; }

/* ── Eye button ─────────────────────────── */
.qph-eye {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--tm);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color var(--tr);
  border-radius: 4px;
}

.qph-eye:hover { color: var(--g); }
.qph-eye svg   { width: 17px; height: 17px; display: block; }

/* ── Password strength ──────────────────── */
.qph-pw-strength { margin-top: 10px; }

.qph-pw-strength__bar {
  height: 4px;
  background: var(--s3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.qph-pw-strength__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width .3s ease, background .3s ease;
}

.qph-bar-weak   { background: #ff4d4f; }
.qph-bar-fair   { background: #faad14; }
.qph-bar-good   { background: #52c41a; }
.qph-bar-strong { background: var(--g); box-shadow: 0 0 8px rgba(0,189,25,.4); }

.qph-pw-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.qph-pw-rules li {
  font-size: .73rem;
  color: var(--tm);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--tr);
}

.qph-pw-rules li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--br);
  flex-shrink: 0;
  transition: background var(--tr);
}

.qph-rule-pass { color: var(--g) !important; }
.qph-rule-pass::before { background: var(--g) !important; }

.qph-rule-fail { color: #ff7875 !important; }
.qph-rule-fail::before { background: #ff4d4f !important; }

/* ── Match message ──────────────────────── */
.qph-match-msg {
  font-size: .75rem;
  margin: 5px 0 0;
  font-weight: 500;
}

.qph-match-ok { color: var(--g); }
.qph-match-no { color: #ff7875; }

/* ── Submit button ──────────────────────── */
.qph-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 24px;
  background: var(--g);
  color: #000;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
  letter-spacing: .01em;
}

.qph-submit:hover:not(:disabled) {
  background: var(--gd);
  box-shadow: 0 0 24px rgba(0,189,25,.3);
  transform: translateY(-1px);
}

.qph-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.qph-submit__loader {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Spinner ────────────────────────────── */
.qph-spin {
  width: 18px;
  height: 18px;
  animation: qph-spin 0.8s linear infinite;
}

@keyframes qph-spin {
  to { transform: rotate(360deg); }
}

/* ── Switch link ────────────────────────── */
.qph-auth-switch {
  text-align: center;
  font-size: .82rem;
  color: var(--tm);
  margin: 20px 0 0;
}

.qph-auth-switch a {
  color: var(--g);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--tr);
}

.qph-auth-switch a:hover { color: var(--gd); text-decoration: underline; }

/* ── 2FA login step ─────────────────────── */
.qph-2fa-login-header {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; margin-bottom: 24px;
}
.qph-2fa-login-icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(0,189,25,.12); border: 1px solid rgba(0,189,25,.25);
  display: flex; align-items: center; justify-content: center; color: var(--g);
}
.qph-2fa-login-icon svg { width: 24px; height: 24px; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 520px) {
  .qph-auth-card { padding: 28px 20px 24px; }
  .qph-form-row  { flex-direction: column; gap: 0; }
  .qph-pw-rules  { grid-template-columns: 1fr; }
}
