/* ═══════════════════════════════════════════════════════
   FITPASSIO LOGIN — ENHANCED v2 (Stunning Dark Gym Background)
   Extracted from login.html. Loaded after common.css so its
   page-specific tokens win on this standalone page.
   ═══════════════════════════════════════════════════════ */
:root {
  --primary:        #C62828;
  --primary-start:  #E53935;
  --primary-end:    #C62828;
  --on-primary:     #FFDAD6;
  --bg:             #0A0A0A;
  --surface:        #121212;
  --surface-2:      #1E1E1E;
  --surface-3:      #2A2A2A;
  --text:           #FFFFFF;
  --text-muted:     rgba(255,255,255,0.65);
  --text-dim:       rgba(255,255,255,0.35);
  --text-faint:     rgba(255,255,255,0.18);
  --border:         rgba(198,40,40,0.25);
  --border-subtle:  rgba(255,255,255,0.07);
  --border-input:   rgba(255,255,255,0.12);
  --glow:           rgba(229,57,53,0.45);
  --glow-soft:      rgba(229,57,53,0.18);
  --font:           'Noto Sans', system-ui, sans-serif;
  --grad:           linear-gradient(135deg, var(--primary-start), var(--primary-end));
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    100px;
  --ok-bg:   rgba(74,222,128,0.08);
  --ok-fg:   #4ade80;
  --ok-bd:   rgba(74,222,128,0.25);
  --err-bg:  rgba(229,57,53,0.08);
  --err-fg:  #f87171;
  --err-bd:  rgba(229,57,53,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── STUNNING DARK GYM BACKGROUND ───────────────────── */
.gym-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.gym-bg img,
.gym-bg-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.16) contrast(1.02) saturate(1.08);
}
.gym-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      rgba(28,17,14,0.72) 0%,
      rgba(28,17,14,0.58) 35%,
      rgba(28,17,14,0.42) 65%,
      rgba(28,17,14,0.78) 100%
    ),
    linear-gradient(180deg, rgba(255,248,240,0.08) 0%, transparent 42%, rgba(10,10,10,0.14) 100%),
    radial-gradient(ellipse 80% 55% at 75% 25%, rgba(229,57,53,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 65% 65% at 25% 80%, rgba(198,40,40,0.12) 0%, transparent 60%);
  z-index: 1;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; opacity: 0.3;
}

body::after {
  content: '';
  position: fixed; inset: 0; z-index: 2;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255,232,214,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(198,40,40,0.08) 0%, transparent 55%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ── Loader styles + spin/shimmer/pulse keyframes are now in common.css ── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse   { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.5)} }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ── Layout ───────────────────────────────────────── */
.layout {
  position: relative; z-index: 3;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Page wrapper ─────────────────────────────────── */
.page {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 32px; padding: 100px 40px 60px;
}

/* ── LEFT PANEL ───────────────────────────────────── */
.panel-left {
  width: 300px; flex-shrink: 0;
  animation: fadeUp 0.7s 0.05s ease both;
}

.hero-card {
  background: linear-gradient(145deg, rgba(30,10,10,0.94), rgba(18,12,12,0.90));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px 40px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.hero-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-start), var(--primary-end), transparent);
}
.hero-card::after {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(229,57,53,0.14) 0%, transparent 65%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(229,57,53,0.1); border: 1px solid rgba(229,57,53,0.3);
  border-radius: var(--radius-full); padding: 5px 13px 5px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--primary-start);
  margin-bottom: 22px; width: fit-content; position: relative; z-index: 1;
}
.badge-dot {
  width: 6px; height: 6px; background: #4ade80; border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: 40px; font-weight: 900; line-height: 1.05;
  letter-spacing: -1.8px; margin-bottom: 14px; position: relative; z-index: 1;
}
.hero-title .gradient {
  display: block; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}

.hero-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.75;
  margin-bottom: 28px; position: relative; z-index: 1;
}

.hero-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(229,57,53,0.3), rgba(229,57,53,0.05));
  margin-bottom: 24px; position: relative; z-index: 1;
}

.feat {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
  position: relative; z-index: 1; transition: transform 0.2s; cursor: default;
}
.feat:last-of-type { border-bottom: none; padding-bottom: 0; }
.feat:hover { transform: translateX(4px); }
.feat-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: rgba(229,57,53,0.1); border: 1px solid rgba(229,57,53,0.22);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--primary-start);
}
.feat-icon svg { width: 15px; height: 15px; }
.feat-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.feat-desc  { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }

.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 1px; background: var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  margin-top: 24px; position: relative; z-index: 1;
}
.hstat { padding: 14px 10px; text-align: center; background: rgba(10,10,10,0.7); }
.hstat-num {
  display: block; font-size: 20px; font-weight: 900; letter-spacing: -0.8px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; line-height: 1; margin-bottom: 3px;
}
.hstat-label { font-size: 9.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }

/* ── RIGHT PANEL (FORM CARD) ──────────────────────── */
.panel-right {
  width: 440px; flex-shrink: 0;
  animation: fadeUp 0.7s 0.12s ease both;
}

.form-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 40px 100px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
}

.card-strip {
  height: 3px;
  background: linear-gradient(90deg, var(--primary-end) 0%, var(--primary-start) 25%, #ff6b6b 50%, var(--primary-start) 75%, var(--primary-end) 100%);
  background-size: 200% 100%; animation: shimmer 3.5s linear infinite;
}

.card-body { padding: 40px 40px 34px; }

.card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--primary-start); margin-bottom: 6px;
}
.card-title {
  font-size: 34px; font-weight: 900; letter-spacing: -1.5px;
  color: var(--text); line-height: 1.05; margin-bottom: 5px;
}
.card-sub { font-size: 13.5px; color: var(--text-dim); margin-bottom: 32px; line-height: 1.5; }

/* ── Form Fields ──────────────────────────────────── */
.field { margin-bottom: 18px; }
.field-label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-muted); margin-bottom: 8px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.field-wrap { position: relative; }
.field-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; z-index: 1; transition: color 0.2s;
}
.field-ico svg { width: 15px; height: 15px; }
.field-wrap:focus-within .field-ico { color: var(--primary-start); }

/* ── Dynamic icon swap area ───────────────────────── */
.field-ico-phone { display: none; }

.field-input {
  width: 100%; height: 50px;
  padding: 0 14px 0 44px;
  background: var(--surface-2); border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  font-size: 14px; font-family: var(--font); font-weight: 400;
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; -webkit-appearance: none;
}
.field-input::placeholder { color: var(--text-dim); font-size: 13px; }
.field-input:hover  { border-color: rgba(255,255,255,0.2); background: var(--surface-3); }
.field-input:focus  { border-color: var(--primary-start); background: rgba(229,57,53,0.04); box-shadow: 0 0 0 3px rgba(229,57,53,0.12); }
.field-input.error  { border-color: rgba(229,57,53,0.6) !important; box-shadow: 0 0 0 3px rgba(229,57,53,0.1) !important; }

.pw-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-dim);
  display: flex; align-items: center; padding: 4px; transition: color 0.2s;
}
.pw-toggle:hover { color: var(--primary-start); }
.pw-toggle svg { width: 15px; height: 15px; }

.field-footer { display: flex; justify-content: flex-end; margin-top: 7px; }
.field-footer a {
  font-size: 12px; font-weight: 600; color: var(--primary-start);
  text-decoration: none; transition: color 0.15s;
}
.field-footer a:hover { color: #ef5350; text-decoration: underline; }

/* ── Input type hint chip ─────────────────────────── */
.input-type-chip {
  display: none;
  align-items: center; gap: 4px;
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: rgba(229,57,53,0.1); border: 1px solid rgba(229,57,53,0.25);
  border-radius: var(--radius-full); padding: 2px 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--primary-start);
  pointer-events: none;
}
.input-type-chip.show { display: flex; }

.form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 22px 0;
}

/* ── Alert ────────────────────────────────────────── */
#alertBox {
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500; margin-bottom: 18px; line-height: 1.5;
}
#alertBox.error   { background: var(--err-bg); color: var(--err-fg); border: 1.5px solid var(--err-bd); display: flex; }
#alertBox.success { background: var(--ok-bg);  color: var(--ok-fg);  border: 1.5px solid var(--ok-bd);  display: flex; }
#alertBox svg { flex-shrink: 0; margin-top: 1px; width: 15px; height: 15px; }

/* ── Submit Button ────────────────────────────────── */
.btn-submit {
  width: 100%; height: 54px;
  background: var(--grad); color: white; border: none;
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 24px var(--glow-soft);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative; overflow: hidden;
}
.btn-submit::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 36px var(--glow); filter: brightness(1.08); }
.btn-submit:hover::before { left: 200%; }
.btn-submit:active { transform: translateY(0); box-shadow: 0 4px 16px var(--glow-soft); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-submit svg { width: 15px; height: 15px; }

/* .btn-spinner now defined globally in common.css */

.secure-note {
  text-align: center; margin-top: 13px;
  font-size: 11.5px; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.secure-note svg { color: var(--primary-start); width: 12px; height: 12px; }

/* ── Card Footer ──────────────────────────────────── */
.card-footer-links {
  text-align: center; margin-top: 20px;
  font-size: 13.5px; color: var(--text-muted);
}
.card-footer-links a {
  color: var(--primary-start); font-weight: 700; text-decoration: none; transition: color 0.15s;
}
.card-footer-links a:hover { color: #ef5350; text-decoration: underline; }
.card-footer-sep { display: block; height: 1px; background: rgba(229,57,53,0.15); margin: 12px 0; }
.card-footer-hint { font-size: 12px; color: var(--text-dim); }
.card-footer-hint strong { color: var(--text-muted); font-weight: 600; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .panel-left { display: none; }
  .panel-right { width: 100%; max-width: 480px; }
}
@media (max-width: 600px) {
  .page { padding: 80px 16px 48px; }
  .card-body { padding: 28px 22px 24px; }
}
/* xs phones — tighter spacing so the card fits on small viewports
   without the heading wrapping awkwardly. */
@media (max-width: 480px) {
  .page                { padding: 64px 12px 36px; }
  .card-body           { padding: 22px 18px 20px; }
  .brand-logo,
  .brand-mark          { width: 48px; height: 48px; }
  .card-title          { font-size: 22px; }
  .card-sub            { font-size: 13px; }
  .form-divider        { margin: 14px 0; }
  .btn-submit          { padding: 12px 14px; font-size: 14px; }
  .field-input         { height: 42px; font-size: 13px; }
  .card-footer-links   { flex-direction: column; gap: 6px; }
  .card-footer-sep     { display: none; }
}
