/* Consumer dashboard — "Refer friends, earn commission" banner, partner popup + profile form (js/partner-menu.js) */

/* Sit above the cookie banner (z 9998) so first-visit users can still reach the popup;
   toasts stay on top. */
#toastContainer { z-index: 10020; }

/* ── Refer & earn banner (Settings tab, above Sign Out) ─────────────────── */
.pz-refer-banner {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid #d3d9f4; background: #eff1fc; color: #1e1b4b; font: inherit; transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.pz-refer-banner { margin: 0 0 4px; }
.pz-refer-banner:hover { box-shadow: 0 6px 18px -8px rgba(67,56,202,0.45); }
.pz-refer-banner:active { transform: scale(0.985); }
.pz-refer-banner__ic { width: 38px; height: 38px; border-radius: 12px; background: #4338ca; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.pz-refer-banner__txt { display: flex; flex-direction: column; min-width: 0; }
.pz-refer-banner__txt strong { font-size: 0.9375rem; line-height: 1.25; font-weight: 700; }
.pz-refer-banner__txt small { font-size: 0.78rem; line-height: 1.3; opacity: 0.75; margin-top: 2px; }
/* ── Partner popup + profile form ───────────────────────────────────────── */
.pz-pm {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center; padding: 0;
  background: rgba(15,23,42,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.22s ease;
}
.pz-pm.is-open { opacity: 1; }
.pz-pm__card {
  width: 100%; max-width: 460px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--pz-white, #fff); color: var(--pz-ink, #0f172a); border-radius: 24px 24px 0 0;
  padding: 24px 22px calc(24px + var(--safe-bottom, 0px)); box-shadow: 0 -10px 40px rgba(15,23,42,0.25);
  transform: translateY(24px); transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.pz-pm.is-open .pz-pm__card { transform: none; }
@media (min-width: 640px) {
  .pz-pm { align-items: center; padding: 20px; }
  .pz-pm__card { border-radius: 24px; max-height: 90dvh; }
}
.pz-pm__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pz-pm__title { margin: 0; font-family: var(--pz-font-display, inherit); font-size: 1.625rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.pz-pm__x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--pz-muted, #475569); font-size: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.pz-pm__x:hover { background: var(--pz-surface-2, #f1f5f9); color: var(--pz-ink, #0f172a); }
.pz-pm__linkbox { text-align: center; padding: 20px 16px 16px; border-radius: 14px; background: #fff6e0; border: 1px solid #f3e1b0; margin-bottom: 14px; }
.pz-pm__url { display: block; font-size: 1.0625rem; line-height: 1.45; font-weight: 500; color: #1f2937; word-break: break-all; text-decoration: underline dotted #b9a76c; text-underline-offset: 4px; }
.pz-pm__copy { margin-top: 12px; border: 0; background: none; color: #1d6fc4; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pz-pm__copy.is-done { color: #047857; text-decoration: none; }
.pz-pm__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pz-pm__stat { text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--pz-surface, #f8fafc); border: 1px solid var(--pz-line, #e2e8f0); }
.pz-pm__stat b { display: block; font-size: 1.125rem; font-weight: 700; }
.pz-pm__stat span { font-size: 0.75rem; color: var(--pz-muted, #475569); }
.pz-pm__status { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid; }
.pz-pm__status h4 { margin: 0 0 4px; font-size: 0.9688rem; font-weight: 700; }
.pz-pm__status p { margin: 0; font-size: 0.875rem; line-height: 1.45; }
.pz-pm__status .pz-pm__btn { margin-top: 12px; }
.pz-pm__status--todo { background: #fff6e0; border-color: #f3e1b0; color: #5b3a05; }
.pz-pm__status--wait { background: #e8effb; border-color: #c5d5ee; color: #1e3a8a; }
.pz-pm__status--ok   { background: #e3f6ee; border-color: #b8dfcc; color: #065f46; }
.pz-pm__status--bad  { background: #fdeaea; border-color: #f3c2c2; color: #991b1b; }
.pz-pm__h3 { margin: 6px 0 16px; text-align: center; font-size: 1.25rem; font-weight: 600; }
.pz-pm__steps { display: flex; flex-direction: column; align-items: stretch; }
.pz-pm__step { display: flex; align-items: center; gap: 18px; }
.pz-pm__badge { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; box-shadow: 0 8px 18px -8px rgba(15,23,42,0.45), inset 0 -4px 8px rgba(0,0,0,0.12), inset 0 3px 6px rgba(255,255,255,0.28); }
.pz-pm__badge--1 { background: linear-gradient(145deg, #5b8ae6, #1e3a8a); }
.pz-pm__badge--2 { background: linear-gradient(145deg, #5fd0a6, #1f9a72); }
.pz-pm__badge--3 { background: linear-gradient(145deg, #f6bf55, #d98a16); }
.pz-pm__step p { margin: 0; font-size: 0.9688rem; line-height: 1.4; }
.pz-pm__arrow { width: 64px; text-align: center; color: var(--pz-muted, #475569); font-size: 18px; line-height: 1; padding: 6px 0; }
.pz-pm__more { margin-top: 20px; display: flex; justify-content: center; }
.pz-pm__btn {
  border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 600; font-size: 0.9375rem; cursor: pointer;
  background: var(--pz-blue, #1e3a8a); color: #fff; transition: background 0.15s ease, transform 0.12s ease;
}
.pz-pm__btn:hover { background: var(--pz-blue-hover, #1e40af); }
.pz-pm__btn:active { transform: scale(0.97); }
.pz-pm__btn[disabled] { opacity: 0.6; cursor: default; }
.pz-pm__btn--ghost { background: transparent; color: var(--pz-blue, #1e3a8a); border: 1.5px solid var(--pz-blue, #1e3a8a); }
.pz-pm__btn--ghost:hover { background: var(--pz-blue-mist, #e8effb); }
.pz-pm__skel { height: 120px; border-radius: 14px; background: linear-gradient(90deg, var(--pz-surface-2,#eef2f7) 25%, var(--pz-surface,#f8fafc) 50%, var(--pz-surface-2,#eef2f7) 75%); background-size: 200% 100%; animation: pzPmShimmer 1.2s linear infinite; margin-bottom: 14px; }
@keyframes pzPmShimmer { to { background-position: -200% 0; } }

/* profile form */
.pz-pf label { display: block; font-size: 0.8125rem; font-weight: 600; margin: 14px 0 6px; color: var(--pz-ink-secondary, #334155); }
.pz-pf input, .pz-pf select, .pz-pf textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--pz-line, #cbd5e1);
  background: var(--pz-white, #fff); color: var(--pz-ink, #0f172a); font: inherit; font-size: 0.9375rem;
}
.pz-pf input[readonly] { background: var(--pz-surface, #f8fafc); color: var(--pz-muted, #475569); }
.pz-pf textarea { min-height: 84px; resize: vertical; }
.pz-pf input:focus, .pz-pf select:focus, .pz-pf textarea:focus { outline: 2px solid var(--pz-blue, #1e3a8a); outline-offset: 1px; border-color: transparent; }
.pz-pf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pz-pf__hint { font-size: 0.78rem; color: var(--pz-muted, #475569); margin: 6px 0 0; }
.pz-pf__terms { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 0.875rem; line-height: 1.4; }
.pz-pf__terms input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.pz-pf__err { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fdeaea; color: #991b1b; font-size: 0.875rem; display: none; }
.pz-pf__err.is-on { display: block; }
.pz-pf .pz-pm__btn { width: 100%; margin-top: 18px; padding: 14px; }

/* dark theme */
[data-theme="dark"] .pz-pm__x:hover { background: #27324a; }
[data-theme="dark"] .pz-refer-banner { background: #1e2140; border-color: #353a73; color: #e0e7ff; }
[data-theme="dark"] .pz-refer-banner__ic { background: #6366f1; }
[data-theme="dark"] .pz-pm__card { box-shadow: 0 -10px 40px rgba(0,0,0,0.7); }
[data-theme="dark"] .pz-pm__linkbox { background: #2a1c00; border-color: #4a3600; }
[data-theme="dark"] .pz-pm__url { color: #f1f5f9; text-decoration-color: #7a6320; }
[data-theme="dark"] .pz-pm__copy { color: #7db4fb; }
[data-theme="dark"] .pz-pm__copy.is-done { color: #34d399; }
[data-theme="dark"] .pz-pm__stat { background: #1c2333; border-color: #2a3550; }
[data-theme="dark"] .pz-pm__status--todo { background: #2a1c00; border-color: #4a3600; color: #fcd34d; }
[data-theme="dark"] .pz-pm__status--wait { background: #16305a; border-color: #2a4a82; color: #bfdbfe; }
[data-theme="dark"] .pz-pm__status--ok   { background: #063d24; border-color: #0b5c34; color: #6ee7b7; }
[data-theme="dark"] .pz-pm__status--bad  { background: #3a1010; border-color: #5a1a1a; color: #fca5a5; }
[data-theme="dark"] .pz-pm__btn--ghost { color: #93c5fd; border-color: #93c5fd; }
[data-theme="dark"] .pz-pm__btn--ghost:hover { background: #16305a; }
[data-theme="dark"] .pz-pf__err { background: #3a1010; color: #fca5a5; }

@media (prefers-reduced-motion: reduce) {
  .pz-pm, .pz-pm__card, .pz-refer-banner { transition: none; }
  .pz-pm__skel { animation: none; }
}