/* ============================================================
   ForexArena — Auth Page Styles
   ============================================================ */

body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.auth-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,107,43,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,43,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.auth-glow {
  position: absolute; top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,43,0.1) 0%, transparent 70%);
}

.auth-back {
  position: fixed; top: 1.5rem; left: 1.5rem; z-index: 10;
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.auth-back:hover { color: var(--text-primary); border-color: var(--border-bright); }

.auth-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  padding: 1rem;
}

.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 2rem; text-decoration: none; color: var(--text-primary);
}
.auth-logo span { color: var(--accent); }
.auth-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: #fff;
}

/* Tabs */
.auth-tabs {
  position: relative;
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 2rem;
}
.auth-tab {
  flex: 1; padding: 0.6rem 1rem;
  background: none; border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer; transition: color 0.2s;
  position: relative; z-index: 1;
}
.auth-tab.active { color: var(--text-primary); }
.auth-tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px;
  width: calc(50% - 4px);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  left: 4px;
}
.auth-tab-indicator.right { transform: translateX(calc(100% + 0px)); }

/* Form wrap */
.auth-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-form-header { margin-bottom: 1.75rem; }
.auth-form-header h1 {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 0.35rem;
}
.auth-form-header p { font-size: 0.875rem; color: var(--text-secondary); }

/* Input with eye toggle */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 2.5rem; }
.input-eye {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 0.9rem; cursor: pointer;
  opacity: 0.5; transition: opacity 0.2s;
  padding: 0;
}
.input-eye:hover { opacity: 1; }

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

/* Demo accounts */
.auth-demo-label {
  font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.75rem;
}
.demo-btns { display: flex; gap: 0.75rem; }
.demo-btn {
  flex: 1; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-mono);
}
.demo-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.demo-role {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.demo-role.admin  { background: var(--accent-subtle); color: var(--accent); }
.demo-role.trader { background: var(--blue-dim); color: var(--blue); }

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 0.82rem; color: var(--text-muted);
  margin-top: 1.25rem;
}
.auth-switch a {
  color: var(--accent); font-weight: 700; cursor: pointer;
  transition: opacity 0.2s;
}
.auth-switch a:hover { opacity: 0.8; }

/* Trust badges */
.auth-trust {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-top: 1.5rem; flex-wrap: wrap;
}
.trust-item {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 0.35rem;
}

/* Password strength */
.pwd-strength {
  margin-top: 0.5rem;
  display: flex; gap: 4px;
}
.pwd-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.pwd-bar.weak   { background: var(--red); }
.pwd-bar.medium { background: var(--yellow); }
.pwd-bar.strong { background: var(--green); }

@media (max-width: 540px) {
  .auth-container { padding: 0.75rem; }
  .auth-form-wrap { padding: 1.5rem; }
  .demo-btns { flex-direction: column; }
  .auth-trust { gap: 1rem; }
}