/* ============================================
   auth.css — Les Loups Sauvages Auth System
   ============================================ */

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

:root {
  --bg:        #080c10;
  --surface:   #0e1318;
  --border:    rgba(255,255,255,.07);
  --orange:    #f97316;
  --cyan:      #22d3ee;
  --text:      #e8eaed;
  --muted:     #6b7280;
  --danger:    #ef4444;
  --success:   #22c55e;
  --radius:    14px;
  --font-head: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}

/* ---- Background ---- */
.auth-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  animation: pulse 8s ease-in-out infinite alternate;
}
.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
  top: -120px; left: -120px;
  animation-delay: 0s;
}
.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}

@keyframes pulse {
  from { transform: scale(1) translate(0, 0); opacity: .35; }
  to   { transform: scale(1.15) translate(20px, 20px); opacity: .5; }
}

/* ---- Layout ---- */
.auth-container {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ---- Card ---- */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem 2rem;
  box-shadow:
    0 0 0 1px rgba(249,115,22,.06),
    0 20px 60px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.04);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.auth-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.6rem;
}
.brand-icon { font-size: 1.5rem; }
.brand-name {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Title ---- */
.auth-title {
  font-family: var(--font-head);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: .4rem;
}
.auth-sub {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

/* ---- Alerts ---- */
.alert {
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .88rem;
  margin-bottom: 1.2rem;
  border-left: 3px solid;
}
.alert a { color: inherit; font-weight: 600; }
.alert-error   { background: rgba(239,68,68,.12);  border-color: var(--danger);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.12);  border-color: var(--success); color: #86efac; }
.alert-locked  {
  background: rgba(249,115,22,.1);
  border-color: var(--orange);
  color: #fdba74;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.alert-locked .alert-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.alert-locked a { color: var(--cyan); font-weight: 600; }

/* ---- Fields ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}
.field label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hint {
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
}
.field input {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem .9rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input::placeholder { color: rgba(255,255,255,.2); }
.field input:focus {
  border-color: rgba(249,115,22,.5);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}

/* ---- Password toggle ---- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.8rem; }
.toggle-pw {
  position: absolute;
  right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 1rem; opacity: .45;
  transition: opacity .2s;
}
.toggle-pw:hover { opacity: .85; }

/* ---- Forgot link ---- */
.forgot-link {
  text-align: right;
  margin-bottom: 1.2rem;
  margin-top: -.4rem;
}
.forgot-link a {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.forgot-link a:hover { color: var(--orange); }

/* ---- Buttons ---- */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--orange), #ea580c);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .8rem;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(249,115,22,.3);
  margin-top: .4rem;
}
.btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(249,115,22,.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .75rem;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  margin-top: 1.2rem;
}
.btn-outline:hover { color: var(--orange); border-color: rgba(249,115,22,.4); }

/* ---- Switch ---- */
.auth-switch {
  text-align: center;
  margin-top: 1.4rem;
  font-size: .88rem;
  color: var(--muted);
}
.auth-switch a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.auth-switch a:hover { color: var(--orange); }

/* ---- Dashboard ---- */
.dashboard-info {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 1.4rem 0;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem .9rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.info-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 500;
}
.info-value { font-size: .95rem; color: var(--text); }

.role-badge {
  padding: .2rem .7rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.role-admin  { background: rgba(249,115,22,.15); color: var(--orange); }
.role-vip    { background: rgba(34,211,238,.15);  color: var(--cyan);   }
.role-member { background: rgba(255,255,255,.06); color: var(--muted);  }
