/* ============================================================
   ZynexPay Auth Pages Stylesheet
   Covers Login, Signup, Forgot-Password, Reset-Password
   Dark-first aesthetic matching the dashboard design system.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --auth-bg:          #0a0e1a;
  --auth-surface:     #111827;
  --auth-card:        rgba(17, 24, 39, 0.85);
  --auth-border:      rgba(124, 58, 237, 0.12);
  --auth-border-subtle: rgba(255,255,255, 0.06);

  --auth-purple:      #7c3aed;
  --auth-purple-light:#a78bfa;
  --auth-purple-glow: rgba(124, 58, 237, 0.35);
  --auth-purple-soft: rgba(124, 58, 237, 0.08);

  --auth-text:        #f1f5f9;
  --auth-muted:       #94a3b8;
  --auth-placeholder: rgba(148,163,184, 0.4);

  --auth-success:     #22c55e;
  --auth-error:       #ef4444;

  --auth-font:        'Inter', system-ui, -apple-system, sans-serif;
  --auth-radius:      14px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.auth-page {
  font-family: var(--auth-font);
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Animated Background ────────────────────────────────── */
.auth-bg-fx {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.auth-bg-fx::before {
  content: '';
  position: absolute;
  top: -25%; right: -15%;
  width: 65vw; height: 65vw;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 60%);
  animation: auth-orb1 22s ease-in-out infinite;
}
.auth-bg-fx::after {
  content: '';
  position: absolute;
  bottom: -15%; left: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 60%);
  animation: auth-orb2 28s ease-in-out infinite;
}
@keyframes auth-orb1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-25px,35px); } }
@keyframes auth-orb2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px,-30px); } }

.auth-grid-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Navbar ─────────────────────────────────────────────── */
.auth-nav {
  position: relative; z-index: 100;
  padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--auth-border-subtle);
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(20px);
}
.auth-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--auth-text); font-weight: 800; font-size: 1.2rem; }
.auth-logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--auth-purple), #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: #fff; font-weight: 800;
}
.auth-nav-links { display: flex; align-items: center; gap: 1rem; }
.auth-nav-links a {
  color: var(--auth-muted); text-decoration: none;
  font-size: 0.88rem; font-weight: 500; transition: color 0.2s;
}
.auth-nav-links a:hover { color: var(--auth-text); }
.auth-nav-links .auth-nav-btn {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.45rem 1.1rem; border-radius: 8px;
  color: var(--auth-text) !important; transition: border-color 0.2s;
}
.auth-nav-links .auth-nav-btn:hover { border-color: var(--auth-purple); }
.auth-lang-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--auth-text); border-radius: 6px;
  padding: 0.3rem 0.6rem; font-size: 0.8rem; cursor: pointer;
  font-family: var(--auth-font);
}
.auth-lang-select option { background: #111827; }

/* ── Mobile navbar ──────────────────────────────────────── */
.auth-mobile-nav {
  display: none;
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  padding: 0.75rem 1.25rem;
  background: rgba(10,14,26,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--auth-border-subtle);
  justify-content: space-between; align-items: center;
}
.auth-mobile-nav .auth-logo { font-size: 1.1rem; }
@media (max-width: 900px) {
  .auth-mobile-nav { display: flex; }
  .auth-nav { display: none; }
}

/* ── Split layout ───────────────────────────────────────── */
.auth-split {
  position: relative; z-index: 1;
  flex: 1; display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 62px);
}
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; min-height: auto; }
}

/* ── Hero panel (left on login, left on signup) ─────────── */
.auth-hero {
  padding: 3.5rem 4rem 3.5rem 3.5rem;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--auth-border-subtle);
}
@media (max-width: 900px) {
  .auth-hero {
    padding: 2.5rem 1.5rem 2rem;
    border-right: none;
    border-bottom: 1px solid var(--auth-border-subtle);
  }
}
.auth-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--auth-purple-soft);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 99px; padding: 5px 16px;
  font-size: 0.76rem; font-weight: 600;
  color: var(--auth-purple-light);
  margin-bottom: 1.8rem; width: fit-content;
}
.auth-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--auth-purple-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
}
.auth-hero .auth-tagline {
  font-size: 0.95rem; color: var(--auth-muted);
  line-height: 1.65; margin-bottom: 2.5rem; max-width: 380px;
}

/* Feature cards */
.auth-features { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
.auth-feat {
  display: flex; align-items: flex-start; gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--auth-border-subtle);
  border-radius: var(--auth-radius);
  transition: border-color 0.25s, transform 0.25s;
}
.auth-feat:hover { border-color: rgba(124,58,237,0.25); transform: translateX(4px); }
.auth-feat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.auth-feat-icon.purple { background: rgba(124,58,237,0.15); color: var(--auth-purple-light); }
.auth-feat-icon.green  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.auth-feat-icon.pink   { background: rgba(236,72,153,0.15); color: #f472b6; }
.auth-feat h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.2rem; }
.auth-feat p  { font-size: 0.78rem; color: var(--auth-muted); line-height: 1.5; }

/* Stats row */
.auth-stats {
  display: flex; gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--auth-border-subtle);
  border-radius: var(--auth-radius);
}
.auth-stat { text-align: center; flex: 1; }
.auth-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--auth-purple-light), #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-stat-label { font-size: 0.72rem; color: var(--auth-muted); margin-top: 2px; }

/* ── Form panel ─────────────────────────────────────────── */
.auth-form-panel {
  padding: 3.5rem 3.5rem 3.5rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center;
}
@media (max-width: 900px) {
  .auth-form-panel { padding: 2rem 1.5rem 3rem; }
}
.auth-form-wrap { max-width: 480px; width: 100%; }
.auth-form-wrap h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.35rem; }
.auth-form-sub { font-size: 0.85rem; color: var(--auth-muted); margin-bottom: 1.75rem; }

/* ── Form elements ──────────────────────────────────────── */
.auth-fg { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.9rem; }
.auth-fg.full { grid-column: 1 / -1; }
.auth-fg label {
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--auth-muted);
}
.auth-fg input,
.auth-fg select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--auth-border-subtle);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: var(--auth-text);
  font-family: var(--auth-font);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.auth-fg input::placeholder { color: var(--auth-placeholder); }
.auth-fg input:focus,
.auth-fg select:focus {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.auth-fg .auth-input-icon {
  position: relative;
}
.auth-fg .auth-input-icon i,
.auth-fg .auth-input-icon svg {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--auth-muted); font-size: 0.9rem; pointer-events: none;
}
.auth-fg .auth-input-icon input {
  padding-left: 2.75rem;
}
.auth-fg select option { background: #111827; }

.auth-error-msg {
  color: #f87171; font-size: 0.74rem; margin-top: 0.25rem; display: none;
}
.auth-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 900px) { .auth-fgrid { grid-template-columns: 1fr; } }

/* ── Buttons ────────────────────────────────────────────── */
.auth-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--auth-purple), #9333ea);
  color: #fff; border: none;
  border-radius: 12px; padding: 0.95rem;
  font-size: 1rem; font-weight: 700;
  font-family: var(--auth-font);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 20px var(--auth-purple-glow);
}
.auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--auth-purple-glow);
}
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-btn-social {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--auth-border-subtle);
  color: var(--auth-text);
  border-radius: 12px; padding: 0.8rem;
  font-size: 0.92rem; font-weight: 600;
  font-family: var(--auth-font);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s;
}
.auth-btn-social:hover { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.06); }

/* ── Divider ────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.5rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--auth-border-subtle);
}
.auth-divider span { font-size: 0.8rem; color: var(--auth-muted); white-space: nowrap; }

/* ── Links ──────────────────────────────────────────────── */
.auth-link {
  color: var(--auth-purple-light); font-weight: 600;
  text-decoration: none; transition: color 0.2s;
}
.auth-link:hover { color: #c4b5fd; text-decoration: underline; }

/* ── Error / Success messages ───────────────────────────── */
.auth-alert {
  border-radius: 10px; padding: 0.75rem 1rem;
  font-size: 0.85rem; display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 1rem;
}
.auth-alert.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
}
.auth-alert.success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  color: #86efac;
}
.auth-alert i { margin-top: 2px; flex-shrink: 0; }

/* ── Spinner ────────────────────────────────────────────── */
.auth-spinner {
  border: 3px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  border-top-color: white;
  width: 20px; height: 20px;
  animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ── Security badges ────────────────────────────────────── */
.auth-security {
  display: flex; align-items: center; justify-content: center;
  gap: 1.25rem; margin-top: 2rem;
}
.auth-security-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--auth-muted);
}
.auth-security-item i { color: #22c55e; font-size: 0.85rem; }

/* ── Checkbox ───────────────────────────────────────────── */
.auth-checkbox-row {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.2rem; margin-top: 0.25rem;
}
.auth-checkbox-row input[type="checkbox"] {
  width: 1rem; height: 1rem; flex-shrink: 0;
  accent-color: var(--auth-purple); border-radius: 4px;
}
.auth-checkbox-row label {
  text-transform: none; font-size: 0.85rem;
  font-weight: 400; color: var(--auth-muted);
  letter-spacing: 0;
}
.auth-checkbox-row a { color: var(--auth-purple-light); text-decoration: none; }
.auth-checkbox-row a:hover { text-decoration: underline; }

/* ── Center layout (forgot-password) ────────────────────── */
.auth-center {
  position: relative; z-index: 1;
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-center-card {
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%; max-width: 440px;
  backdrop-filter: blur(12px);
}
.auth-center-card h2 {
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: 0.5rem; text-align: center;
}
.auth-center-card .auth-form-sub { text-align: center; }

/* ── Subtle animations ──────────────────────────────────── */
.auth-fade-in {
  animation: auth-fadeIn 0.5s ease-out forwards;
  opacity: 0; transform: translateY(10px);
}
@keyframes auth-fadeIn { to { opacity: 1; transform: translateY(0); } }

/* ── Utility ────────────────────────────────────────────── */
.hidden { display: none !important; }
