/* ── WApp Flow — Shared Auth Page Styles (register.html, login.html) ── */

:root {
  --bg     : #0a0f1a;
  --card   : #111827;
  --border : rgba(255,255,255,.08);
  --green  : #25d366;
  --green2 : #1ea952;
  --text   : #f1f5f9;
  --muted  : #94a3b8;
  --red    : #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  padding: 40px 16px;
}

/* Background glows */
.auth-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.auth-glow.g1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,211,102,.18) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: drift 12s ease-in-out infinite alternate;
}
.auth-glow.g2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: drift 15s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from{transform:translate(0,0)} to{transform:translate(30px,20px)} }

/* Back Link */
.auth-back {
  position: fixed; top: 18px; left: 22px;
  color: var(--muted); text-decoration: none; font-size: 13px;
  z-index: 10; transition: color .2s;
}
.auth-back:hover { color: var(--green); }

/* Wrap */
.auth-wrap {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  position: relative; z-index: 2;
  width: 100%; max-width: 900px;
}
.auth-wrap-center { justify-content: center; max-width: 440px; }

/* Card */
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  flex: 1; max-width: 480px;
  backdrop-filter: blur(20px);
}

/* Brand */
.auth-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 22px;
  color: #fff; margin-bottom: 4px;
}
.auth-brand span { color: var(--green); }

h2 { font-size: 26px; font-weight: 700; margin: 12px 0 4px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* Fields */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 6px;
}
.field input, .field select {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px; outline: none;
  transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37,211,102,.15);
}
.field select option { background: #1a2332; }

/* Auth row */
.auth-row.two { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.auth-row.two .field:last-child input { width: 80px; }

/* Password wrap */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; color: var(--muted);
}

/* Password strength */
.pass-strength {
  height: 4px; background: rgba(255,255,255,.08);
  border-radius: 4px; margin-top: 6px; overflow: hidden;
}
.ps-bar { height: 100%; border-radius: 4px; width: 0; transition: width .3s, background .3s; }
.ps-label { font-size: 11px; color: var(--muted); margin-top: 4px; min-height: 16px; }

/* Plan picker */
.auth-plan-picker {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 22px;
}
.plan-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; border-radius: 12px;
  border: 2px solid var(--border); background: rgba(255,255,255,.04);
  color: var(--text); cursor: pointer; position: relative; transition: all .2s;
}
.plan-btn:hover { border-color: rgba(37,211,102,.4); background: rgba(37,211,102,.06); }
.plan-btn.active { border-color: var(--green); background: rgba(37,211,102,.1); }
.plan-icon { font-size: 20px; }
.plan-btn strong { font-size: 13px; font-weight: 700; }
.plan-btn small { font-size: 10px; color: var(--muted); }
.plan-badge {
  position: absolute; top: -8px; right: -6px;
  background: var(--green); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 20px;
}

/* Buttons */
.btn-block { width: 100%; display: block; text-align: center; border: none; }
.btn-primary {
  background: var(--green); color: #fff;
  padding: 13px 24px; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .1s; border: none;
}
.btn-primary:hover { background: var(--green2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-glow { box-shadow: 0 6px 30px rgba(37,211,102,.35); }

/* Spinner */
.spin {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.auth-err {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}
.hidden { display: none !important; }

/* Switch link */
.auth-switch { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.auth-switch a { color: var(--green); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.admin-hint { margin-top: 8px; }

/* Feature list (register page) */
.auth-features {
  display: flex; flex-direction: column; gap: 14px;
  padding: 36px 24px; align-self: center;
}
.af-item {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 15px;
}
.af-item span { font-size: 18px; }

@media (max-width: 700px) {
  .auth-wrap { flex-direction: column; }
  .auth-features { display: none; }
  .auth-row.two { grid-template-columns: 1fr; }
}
