/* ═══════════════════════════════════════════════════════════════════════
   AUTH — cyberpunk login / signup / forgot / reset / invite
   Consumes tokens from /shared/cyber.css. Hebrew-aware (RTL), neon-green.
═══════════════════════════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--cyber-fg);
  background: var(--cyber-bg);
  background-image:
    radial-gradient(70% 90% at 100% 0%, rgba(255,0,255,.10), transparent 60%),
    radial-gradient(80% 90% at 0% 100%, rgba(0,212,255,.10), transparent 55%),
    radial-gradient(60% 70% at 50% 120%, rgba(0,255,136,.10), transparent 60%),
    linear-gradient(rgba(0,255,136,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  min-height: 100%;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  -webkit-font-smoothing: antialiased;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.auth-card {
  position: relative;
  width: 100%; max-width: 400px;
  background: var(--cyber-card);
  border: 1px solid var(--cyber-border);
  padding: 30px 28px 24px;
  clip-path: polygon(
    0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px)
  );
  /* No box-shadow here: the chamfer clip-path would clip it away. The glow
     lives on the .auth-glow wrapper (filter: drop-shadow traces the cut). */
}
.auth-glow {
  width: 100%; max-width: 400px;
  filter: drop-shadow(0 0 6px var(--cyber-accent-glow))
          drop-shadow(0 24px 40px rgba(0,0,0,.55));
}
.auth-glow .auth-card { max-width: none; }
/* HUD corner ticks */
.auth-card::before, .auth-card::after {
  content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none;
}
.auth-card::before { top: 6px; inset-inline-start: 6px;  border-top: 2px solid var(--cyber-accent); border-inline-start: 2px solid var(--cyber-accent); }
.auth-card::after  { bottom: 6px; inset-inline-end: 6px; border-bottom: 2px solid var(--cyber-accent); border-inline-end: 2px solid var(--cyber-accent); }

/* .auth-logo is the brand mark (cyber.css). The old terminal-prompt "> " ::before is gone —
   it would have rendered a stray caret next to the logo on all six auth-card pages. */

.auth-card h1 {
  font-family: var(--font-head);
  font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  color: var(--cyber-fg);
  text-shadow: 0 0 10px rgba(0,255,136,.35);
}
.auth-sub { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; color: var(--cyber-muted-fg); margin: 6px 0 22px; }
.auth-sub::before { content: '// '; color: var(--cyber-accent); }

/* ── Form ───────────────────────────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 14px; }
label {
  display: flex; flex-direction: column; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase; color: var(--cyber-muted-fg);
}
.auth-hint { letter-spacing: .08em; opacity: .8; text-transform: none; }

/* Input with terminal ">" prefix (RTL: sits at the logical start = right side) */
.auth-field { position: relative; display: block; }
.auth-field::before {
  content: '>'; position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); color: var(--cyber-accent); pointer-events: none; font-size: 15px;
}
input {
  width: 100%;
  font-family: var(--font-mono); font-size: 15px; color: var(--cyber-accent);
  background: var(--cyber-bg);
  border: 1px solid var(--cyber-border);
  padding: 12px 14px; padding-inline-start: 30px;
  outline: none; transition: all .2s var(--cyber-ease);
  clip-path: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
}
input::placeholder { color: var(--cyber-muted-fg); }
input:focus { border-color: var(--cyber-accent); box-shadow: var(--neon-sm); }

/* ── Button (glitch CTA: solid accent, dark text) ───────────────────────── */
.auth-btn {
  margin-top: 6px;
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyber-bg);
  background: var(--cyber-accent);
  border: none; padding: 13px; cursor: pointer;
  clip-path: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
  transition: all .15s var(--cyber-ease);
}
.auth-btn:hover { filter: brightness(1.12); box-shadow: var(--neon); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .5; cursor: default; filter: none; box-shadow: none; }
.auth-btn:focus-visible { outline: 2px solid var(--cyber-accent); outline-offset: 2px; }

/* "Continue with Kick" (OAuth) — Kick-green block button + an "or" divider */
.auth-btn-kick {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: #53fc18; color: #07090f; box-sizing: border-box;
}
/* "Continue with Discord" — Discord blurple, same block shape */
.auth-btn-discord {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: #5865f2; color: #ffffff; box-sizing: border-box; margin-top: 10px;
}
.auth-btn-discord:focus-visible { outline: 2px solid #5865f2; outline-offset: 2px; }
.auth-or {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 6px;
  color: var(--cyber-dim, #667); font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--cyber-border, #2a2a3a); }

/* ── Messages ───────────────────────────────────────────────────────────── */
.auth-err, .auth-ok {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .03em;
  padding: 10px 12px; border: 1px solid;
  clip-path: polygon(0 5px, 5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px));
}
.auth-err { color: #ffd0d5; background: rgba(255,51,102,.12); border-color: rgba(255,51,102,.45); }
.auth-err::before { content: '! ERR: '; color: var(--cyber-danger); }
.auth-ok  { color: #c8ffe6; background: rgba(0,255,136,.10); border-color: rgba(0,255,136,.40); }
.auth-ok::before  { content: '✓ OK: '; color: var(--cyber-accent); }

/* ── Links ──────────────────────────────────────────────────────────────── */
.auth-forgot { text-align: start; margin-top: -4px; }
.auth-forgot a, .auth-alt a {
  font-family: var(--font-mono); letter-spacing: .06em; color: var(--cyber-accent-3); text-decoration: none;
}
.auth-forgot a { font-size: 11px; color: var(--cyber-muted-fg); }
.auth-forgot a:hover, .auth-alt a:hover { color: var(--cyber-accent); text-shadow: var(--neon-sm); }
.auth-alt { font-family: var(--font-mono); text-align: center; font-size: 12.5px; color: var(--cyber-muted-fg); margin-top: 20px; }

.hidden { display: none !important; }

/* Legal links pinned under the card */
.auth-legal {
  position: fixed; bottom: 10px; inset-inline: 0; text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em;
}
.auth-legal a { color: var(--cyber-muted-fg); text-decoration: none; margin: 0 8px; }
.auth-legal a:hover { color: var(--cyber-accent); }

/* The card logo is a home link. Sizing comes from the brand block in cyber.css; this only has to
   avoid re-declaring display/background at a higher specificity than that block. */
a.auth-logo { text-decoration: none; }

/* Language picker pinned to the top corner (logical end — flips in RTL) */
.auth-lang {
  position: fixed; top: 14px; inset-inline-end: 14px; z-index: 50;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em;
  color: var(--cyber-fg); background: rgba(10,10,18,.85);
  border: 1px solid var(--cyber-border); padding: 6px 10px; cursor: pointer;
  clip-path: polygon(0 5px,5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px));
}
.auth-lang:hover { border-color: var(--cyber-accent); color: var(--cyber-accent); }
.auth-lang option { background: #0c0c14; color: #e8e8f0; }

/* Terms checkbox + CAPTCHA slot + Kick-button consent note (signup/login) */
.auth-terms {
  display: flex !important; align-items: flex-start; gap: 9px;
  font-size: .8rem; line-height: 1.45; color: var(--cyber-text-dim);
  margin: 14px 0 4px; cursor: pointer;
}
.auth-terms input { margin-top: 2px; accent-color: var(--cyber-accent); cursor: pointer; flex-shrink: 0; }
.auth-terms a { color: var(--cyber-accent); text-decoration: underline; }
.auth-captcha { display: flex; justify-content: center; margin: 12px 0 4px; min-height: 65px; }
.auth-kick-terms {
  font-size: .72rem; color: var(--cyber-muted-fg); text-align: center; margin-top: 6px;
}
.auth-kick-terms a { color: var(--cyber-accent); text-decoration: underline; }

/* Password-strength meter (signup + reset): an animated fill + a weak/fair/strong label. */
.auth-pw-meter { display: flex; align-items: center; gap: 9px; margin: -6px 0 10px; }
.auth-pw-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.auth-pw-fill { display: block; height: 100%; width: 0; background: var(--cyber-danger, #ff5470); transition: width .3s ease, background-color .3s ease; }
.auth-pw-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; min-width: 3.4em; text-align: right; }

/* Kick-connected banner (finish-signup mode): the linked channel + avatar. */
.auth-kick-connected { display: flex; align-items: center; gap: 11px; margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--cyber-surface-2, rgba(255,255,255,.05)); border: 1px solid var(--cyber-border, rgba(255,255,255,.1)); }
.auth-kc-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--cyber-border, rgba(255,255,255,.12)); }
.auth-kc-meta { min-width: 0; }
.auth-kc-badge { font-size: .82rem; font-weight: 700; color: var(--cyber-accent); }
.auth-kc-slug { font-family: var(--font-mono); font-size: .72rem; color: var(--cyber-muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Two-factor code step on the login page. */
.auth-2fa-hint { font-size: .82rem; color: var(--cyber-text-dim, #9aa0b8); margin: 0 0 14px; line-height: 1.5; }
