/* ============================================================
   Xenzaa registration page (member/signup.php) - XENZAA blue theme.
   Standalone: css/auth.css still serves login/success unchanged.
   Tokens match css/member.css.
   ============================================================ */
:root {
  --bg-deep: #020817;
  --bg-panel: #061329;
  --blue: #087BFF;
  --cyan: #00D9FF;
  --silver: #DCE6F2;
  --text: #F4F8FF;
  --muted: #98A9C4;
  --line: rgba(64, 160, 255, 0.22);
  --line-strong: rgba(80, 180, 255, 0.45);
  --ok: #4ADE80;
  --err: #FCA5A5;
  --focus: 0 0 0 3px rgba(0, 217, 255, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.xr-page {
  min-height: 100vh; overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-deep); color: var(--text); -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: #fff; }
.xr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Background ---------- */
.xr-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.xr-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 50% 22%, rgba(8, 123, 255, 0.22), transparent 70%),
    radial-gradient(700px 500px at 0% 60%, rgba(0, 217, 255, 0.08), transparent 70%),
    radial-gradient(700px 500px at 100% 50%, rgba(8, 123, 255, 0.12), transparent 70%),
    linear-gradient(180deg, #020817 0%, #03102A 60%, #020817 100%);
}
.xr-globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.xr-orbit ellipse { stroke: rgba(0, 190, 255, 0.45); stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(0, 170, 255, 0.6)); }
.xr-orbit ellipse.dim { stroke: rgba(8, 123, 255, 0.22); stroke-width: 1; filter: none; }
.xr-platform {
  position: absolute; left: 50%; bottom: -120px; width: min(1300px, 140vw); height: 260px; transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(0, 190, 255, 0.35);
  box-shadow: 0 0 40px rgba(0, 150, 255, 0.35), inset 0 0 60px rgba(0, 150, 255, 0.25);
  background: radial-gradient(ellipse at center, rgba(8, 123, 255, 0.25), transparent 65%);
}
.xr-platform::before {
  content: ''; position: absolute; inset: 40px 140px; border-radius: 50%;
  border: 1px solid rgba(0, 217, 255, 0.3);
}

/* ---------- Layout ---------- */
.xr-wrap {
  position: relative; z-index: 1; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 2rem 1rem 3rem; display: flex; flex-direction: column; align-items: center;
}
.xr-logo { display: block; margin-bottom: 0.75rem; }
.xr-logo img { display: block; width: 300px; height: auto; filter: drop-shadow(0 8px 30px rgba(0, 120, 255, 0.4)); }

/* ---------- Card ---------- */
.xr-card {
  position: relative; width: 100%; padding: 1.75rem 2rem 1.5rem; border-radius: 22px;
  background: linear-gradient(160deg, rgba(10, 32, 72, 0.72) 0%, rgba(3, 12, 32, 0.82) 100%);
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 0 1px rgba(0, 217, 255, 0.06),
    0 0 40px rgba(8, 123, 255, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(170, 220, 255, 0.14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.xr-card::before {
  content: ''; position: absolute; top: -1px; left: 20%; right: 20%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px var(--cyan);
}

/* ---------- Tabs ---------- */
.xr-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.xr-tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  padding: 0.95rem 0.75rem; border: 1px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0;
  background: none; color: #A9C2E6; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.xr-tab:hover { color: var(--text); background: rgba(8, 123, 255, 0.08); }
.xr-tab .xr-ico { width: 22px; height: 22px; color: #6FB6FF; }
.xr-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 123, 255, 0.55), rgba(8, 90, 200, 0.25));
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(180, 225, 255, 0.25), 0 -6px 24px rgba(8, 123, 255, 0.25);
}
.xr-tab.active .xr-ico { color: var(--cyan); }
.xr-tab.active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; width: 48px; height: 3px; transform: translateX(-50%);
  border-radius: 3px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
.xr-tab:focus-visible, .xr-btn:focus-visible, .xr-foot a:focus-visible, .xr-logo:focus-visible {
  outline: none; box-shadow: var(--focus);
}

/* ---------- Fields ---------- */
.xr-field { margin-bottom: 1.35rem; }
.xr-field label, .xr-label {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem;
  font-size: 1rem; font-weight: 600; color: var(--text);
}
.xr-field label .xr-ico, .xr-label .xr-ico { width: 20px; height: 20px; color: var(--silver); }
.xr-input-wrap { position: relative; }
.xr-input {
  width: 100%; height: 56px; padding: 0 3.25rem 0 1.15rem; border-radius: 14px;
  background: rgba(10, 26, 56, 0.75); border: 1px solid var(--line-strong); color: var(--text);
  font: inherit; font-size: 1rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.xr-input::placeholder { color: #7D90B0; }
.xr-input:focus { border-color: var(--cyan); box-shadow: var(--focus); }
.xr-input[aria-invalid="true"] { border-color: rgba(248, 113, 113, 0.7); }
#sponsorWallet { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.92rem; }
#sponsorWallet::placeholder { font-family: 'Inter', system-ui, sans-serif; font-size: 1rem; }
input[type=number].xr-input { padding-right: 1.15rem; }
input[type=number].xr-input::-webkit-inner-spin-button { opacity: 0.6; }
.xr-input-ico { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: #8FB8E8; display: flex; }
.xr-input-ico .xr-ico { width: 22px; height: 22px; }
.xr-status { min-height: 1.15rem; margin-top: 0.45rem; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.xr-status.ok { color: var(--ok); }
.xr-status.err { color: var(--err); }
.xr-status.center { text-align: center; }
.xr-status a { color: var(--cyan); }
.xr-hint { font-size: 0.78rem; color: #7488A8; margin-top: 0.15rem; }

/* ---------- Package card ---------- */
.xr-package {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.25rem;
  padding: 1.1rem 1.5rem; border-radius: 16px;
  background: linear-gradient(120deg, rgba(8, 70, 170, 0.45), rgba(6, 22, 52, 0.85) 60%);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(180, 225, 255, 0.12), 0 0 24px rgba(8, 123, 255, 0.15);
}
.xr-package::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(0, 217, 255, 0.05) 60px 61px);
}
.xr-package.matched { border-color: rgba(0, 217, 255, 0.7); box-shadow: 0 0 28px rgba(0, 217, 255, 0.25); }
.xr-package.nomatch { border-color: rgba(248, 113, 113, 0.5); }
.xr-package-ico {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0B6BFF, #08307A); border: 1px solid rgba(0, 217, 255, 0.6); color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 170, 255, 0.45);
}
.xr-package-ico .xr-ico { width: 30px; height: 30px; }
.xr-package-name { flex: 1; min-width: 0; font-size: 1.3rem; font-weight: 700; overflow-wrap: anywhere; }
.xr-package-range { padding-left: 1.5rem; border-left: 1px solid var(--line-strong); text-align: left; flex-shrink: 0; }
.xr-package-range span { display: block; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: #A9C2E6; }
.xr-package-range b { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 0.2rem; white-space: nowrap; }

/* ---------- Buttons ---------- */
.xr-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  width: min(100%, 520px); min-height: 60px; margin: 1.6rem auto 0; padding: 0.85rem 1.5rem;
  border-radius: 16px; border: 1px solid rgba(160, 225, 255, 0.55);
  background: linear-gradient(180deg, #19C3FF 0%, #0A8BFF 100%); color: #fff;
  font: inherit; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 0 28px rgba(0, 180, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.2s, transform 0.15s, opacity 0.2s;
}
.xr-btn:hover { box-shadow: 0 0 38px rgba(0, 200, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.xr-btn:active { transform: scale(0.985); }
.xr-btn .xr-ico { width: 24px; height: 24px; flex-shrink: 0; }
.xr-btn[disabled] { cursor: not-allowed; opacity: 0.55; box-shadow: none; transform: none; }

/* ---------- Login page (member/login.php) ---------- */
.xr-tabs-single { grid-template-columns: minmax(0, 360px); justify-content: center; }
h1.xr-tab { cursor: default; font-size: 1.05rem; margin: 0; }
.xr-lead { text-align: center; color: #B9C7DD; font-size: 0.98rem; margin: -0.25rem 0 1.4rem; }
.xr-points { list-style: none; display: grid; gap: 0.75rem; margin: 0 auto; max-width: 520px; }
.xr-points li {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(10, 26, 56, 0.6); border: 1px solid var(--line); font-size: 0.9rem; color: #C3D1E6;
}
.xr-points .xr-ico { width: 22px; height: 22px; flex-shrink: 0; color: var(--cyan); }

/* ---------- Registration payment note (member/signup.php) ---------- */
.xr-pay-note {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(0, 217, 255, 0.06); border: 1px solid var(--line); font-size: 0.84rem; color: #B9C7DD; line-height: 1.5;
}
.xr-pay-note .xr-ico { width: 20px; height: 20px; flex-shrink: 0; color: var(--cyan); margin-top: 0.1rem; }
.xr-pay-note b { color: var(--text); }

/* ---------- Registration status (member/registration-status.php) ---------- */
.xr-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0 0 1.4rem; counter-reset: s; }
.xr-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; text-align: center; font-size: 0.78rem; color: #7D90B0; }
.xr-steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: rgba(80, 140, 220, 0.25);
}
.xr-steps .dot {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid rgba(80, 140, 220, 0.35); background: rgba(10, 26, 56, 0.8); color: #7D90B0;
}
.xr-steps li.done { color: #B9C7DD; }
.xr-steps li.done .dot { background: linear-gradient(135deg, #16A34A, #22C55E); border-color: rgba(134, 239, 172, 0.6); color: #fff; }
.xr-steps li.done:not(:last-child)::after { background: linear-gradient(90deg, #22C55E, rgba(34, 197, 94, 0.4)); }
.xr-steps li.current { color: var(--text); font-weight: 600; }
.xr-steps li.current .dot { border-color: var(--cyan); color: #fff; background: rgba(8, 123, 255, 0.5); box-shadow: 0 0 16px rgba(0, 217, 255, 0.55); }
.xr-steps li.error .dot { border-color: rgba(248, 113, 113, 0.8); background: rgba(127, 29, 29, 0.6); color: #fff; }
.xr-state { text-align: center; margin-bottom: 1.2rem; }
.xr-state p { margin-top: 0.6rem; color: #C3D1E6; font-size: 0.95rem; line-height: 1.5; }
.xr-badge {
  display: inline-block; padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(8, 123, 255, 0.18); border: 1px solid var(--line-strong); color: #9BD3FF;
}
.xr-badge.activated { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.45); color: var(--ok); }
.xr-badge.failed, .xr-badge.expired { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.45); color: var(--err); }
.xr-member-id {
  display: grid; justify-items: center; gap: 0.35rem; padding: 1.1rem; margin-bottom: 1.2rem; border-radius: 16px;
  background: linear-gradient(120deg, rgba(8, 70, 170, 0.45), rgba(6, 22, 52, 0.85)); border: 1px solid rgba(0, 217, 255, 0.6);
}
.xr-member-id[hidden] { display: none; }
.xr-member-id > span { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #A9C2E6; }
.xr-member-id b { font-size: 1.6rem; letter-spacing: 0.06em; }
.xr-member-id .xr-btn { margin-top: 0.75rem; text-decoration: none; }
.xr-kv { display: grid; gap: 0.5rem; margin: 0; }
.xr-kv div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0.9rem; border-radius: 12px; background: rgba(10, 26, 56, 0.55); border: 1px solid var(--line); font-size: 0.86rem; }
.xr-kv dt { color: var(--muted); flex-shrink: 0; }
.xr-kv dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.xr-kv a { color: var(--cyan); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.8rem; }
.xr-manual { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.xr-manual[hidden] { display: none; }
.xr-manual .xr-hint { margin-bottom: 0.6rem; }
.xr-btn-ghost { background: rgba(8, 123, 255, 0.15); box-shadow: none; text-transform: none; letter-spacing: 0; min-height: 50px; margin-top: 0.85rem; }

/* ---------- Alerts / footer ---------- */
.xr-alert.ok { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); color: #86EFAC; }
.xr-alert { padding: 0.85rem 1rem; border-radius: 12px; font-size: 0.88rem; margin-bottom: 1.25rem; }
.xr-alert.err { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: var(--err); }
.xr-alert.warn { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.4); color: #FCD34D; }
.xr-foot { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.88rem; color: var(--muted); }
.xr-foot a { color: var(--cyan); font-weight: 600; text-decoration: none; border-radius: 4px; }
.xr-foot a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .xr-wrap { padding: 1.25rem 0.85rem 2rem; }
  .xr-logo img { width: 190px; }
  .xr-card { padding: 1.1rem 1rem 1.25rem; border-radius: 18px; }
  .xr-tab { flex-direction: column; gap: 0.3rem; font-size: 0.86rem; padding: 0.75rem 0.4rem; }
  .xr-tab .xr-ico { width: 20px; height: 20px; }
  .xr-field label, .xr-label { font-size: 0.92rem; }
  .xr-input { height: 52px; }
  #sponsorWallet { font-size: 0.8rem; padding-right: 2.8rem; }
  .xr-package { flex-wrap: wrap; gap: 0.85rem; padding: 1rem; }
  .xr-package-ico { width: 48px; height: 48px; }
  .xr-package-name { font-size: 1.1rem; }
  .xr-package-range { flex-basis: 100%; padding: 0.75rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .xr-btn { font-size: 0.92rem; min-height: 56px; gap: 0.6rem; padding: 0.75rem 1rem; }
  .xr-platform { bottom: -160px; }
  .xr-btn { letter-spacing: 0.02em; }
  .xr-btn > .xr-ico:last-child:not(:first-child) { display: none; }
  .xr-tabs-single .xr-tab { flex-direction: row; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
