/* ═══════════════════════════════════════════════════════════
   CAREER STUDIO — AUTH STYLES v4.1 (clean, no duplicates)
   Used by: auth.html · login.html · register.html
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:   #0a0a0b; --s: #141416; --e: #1a1a1d; --el: #1f1f23;
  --gold: #5b7c99; --gd: #4a6a86; --cyan: #5b7c99; --green: #22c55e;
  --violet: #5b7c99; --red: #ef4444;
  --t0: #f5f5f6; --t1: #d4d4d8; --t2: #8a8a92; --t3: #59595f;
  --bd0: rgba(255,255,255,.06); --bd1: rgba(255,255,255,.11); --bd2: rgba(255,255,255,.18);
  --bdg: rgba(91,124,153,.22); --bdc: rgba(91,124,153,.2);
  /* --ts-font-primary comes from typography-system.css when a page links
     it (forgot-password/reset-password/verify-otp all do) — falls back to
     the original Bricolage Grotesque brand pairing if that stylesheet
     isn't present, so this file works standalone either way. --fm/--fb
     (mono labels, italic accent text) are left as the original brand
     choice — this only swaps the primary reading/heading typeface. */
  --ff: var(--ts-font-primary, 'Bricolage Grotesque', sans-serif);
  --fm: 'JetBrains Mono', monospace;
  --fb: 'Instrument Serif', serif;
}

html, body { background: var(--bg); color: var(--t1); font-family: var(--ff); min-height: 100vh; overflow-x: hidden; }

/* Background canvas — pointer-events:none so it NEVER blocks clicks */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none !important; z-index: 0; }

/* ── TWO-COLUMN LAYOUT ─────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── LEFT HERO ──────────────────────────────────────────── */
.auth-hero {
  background: linear-gradient(160deg, rgba(91,124,153,.04) 0%, rgba(91,124,153,.02) 50%, rgba(139,92,246,.04) 100%);
  border-right: 1px solid var(--bd0);
  padding: 56px 52px 56px 60px;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
  position: relative; overflow: hidden;
}
.auth-hero::before {
  content: ''; position: absolute; top: -120px; left: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(91,124,153,.05), transparent 70%);
  pointer-events: none;
}

/* Logo */
.logo-row { display: flex; align-items: center; gap: 14px; }
#corePulse { animation: corePop 2.5s ease-in-out infinite; }
@keyframes corePop { 0%,100%{r:5} 50%{r:7.5} }
.logo-word { font-size: 22px; font-weight: 800; letter-spacing: .08em; color: var(--t1); line-height: 1.1; }
.logo-word span { color: var(--text-accent); }
.logo-byline { font-family: var(--fm); font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--t3); margin-top: 4px; }

/* Hero text */
.hero-h { font-size: clamp(28px, 3.2vw, 46px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--t0); }
.hero-h em { font-style: normal; background: linear-gradient(135deg, var(--gold), var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-p { font-family: var(--fb); font-size: 15px; color: var(--t2); line-height: 1.72; font-style: italic; }

/* Feature list */
.feat-ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.feat-ul li { display: flex; align-items: flex-start; gap: 10px; font-family: var(--fm); font-size: 10.5px; color: var(--t2); letter-spacing: .02em; line-height: 1.5; }
.fic { font-size: 14px; flex-shrink: 0; line-height: 1.4; }

/* Trust pills */
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-pill { font-family: var(--fm); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--bd1); color: var(--t3); }

/* ── RIGHT FORM PANEL ───────────────────────────────────── */
.auth-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  background: rgba(4,6,15,.5);
  position: relative; z-index: 2;  /* above canvas */
}
/* Real bug fixed (2026-09-07): hardcoded dark background with no light
   override, while its own text (--t1/--t2/--t3) already switches to
   dark-on-light via theme-light.css's generic variable remap -- left
   alone this reads as muddy dark-gray-on-dark-gray in light mode. */
html[data-theme="light"] .auth-form-side {
  background: rgba(255,255,255,.6);
}

/* ── CARD ───────────────────────────────────────────────── */
.auth-card {
  background: var(--s);
  border: 1.5px solid var(--bd1);
  border-radius: 22px;
  padding: 36px 34px;
  width: 100%; max-width: 460px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  position: relative; z-index: 3;  /* always above canvas */
}

/* ── SINGLE-PAGE LAYOUT (login.html / register.html) ────── */
body.single-auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background:
    radial-gradient(ellipse 65% 55% at 20% 20%, rgba(91,124,153,.04), transparent),
    radial-gradient(ellipse 55% 65% at 80% 80%, rgba(91,124,153,.03), transparent),
    var(--bg);
}
body.single-auth .auth-card { max-width: 480px; }
body.single-auth .auth-card-header { text-align: center; margin-bottom: 28px; }
.auth-logo-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 22px; }
.auth-logo-text { font-size: 20px; font-weight: 800; letter-spacing: .06em; color: var(--t1); }
.auth-logo-text span { color: var(--text-accent); }
.auth-page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--t0); margin-bottom: 5px; }
.auth-page-sub { font-family: var(--fb); font-size: 14px; color: var(--t2); font-style: italic; line-height: 1.6; }

/* ── TAB BAR ────────────────────────────────────────────── */
.tab-bar {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--cs-inset); border-radius: 13px;
  padding: 4px; gap: 4px; margin-bottom: 28px;
}
.atab {
  font-family: var(--fm); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: transparent; border: none; border-radius: 10px;
  color: var(--t3); padding: 12px 16px; cursor: pointer; transition: all .22s;
}
.atab.active { background: linear-gradient(135deg, rgba(91,124,153,.14), rgba(91,124,153,.08)); color: var(--text-accent); border: 1px solid var(--bdg); box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.atab:hover:not(.active) { color: var(--t1); background: rgba(255,255,255,.05); }

/* ── FORM SECTIONS ──────────────────────────────────────── */
.form-section { animation: fadeUp .25s ease; }
.form-section.hidden { display: none !important; }
@keyframes fadeUp { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:translateY(0) } }

.form-head { margin-bottom: 22px; }
.fh-title { font-size: 20px; font-weight: 800; color: var(--t0); letter-spacing: -.01em; margin-bottom: 5px; }
.fh-sub   { font-family: var(--fm); font-size: 10px; color: var(--t3); letter-spacing: .05em; }

/* ── FORM FIELDS — UNIFORM ──────────────────────────────── */
.fg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.fg label { font-family: var(--fm); font-size: 9px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--t2); padding-left: 2px; }

.fg input,
.fg select,
.fg textarea {
  width: 100%; min-height: 48px; padding: 13px 16px; font-size: 13px;
  font-family: var(--fm); color: var(--t0); letter-spacing: .02em;
  background: rgba(8,12,28,.9);
  border: 1.5px solid rgba(255,255,255,.13); border-radius: 12px;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.025);
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
  -webkit-appearance: none; appearance: none; caret-color: var(--cyan);
}
.fg input:hover:not(:focus), .fg select:hover:not(:focus) { border-color: rgba(255,255,255,.22); background: rgba(8,12,28,.95); }
.fg input:focus, .fg select:focus {
  border-color: rgba(91,124,153,.65); background: rgba(91,124,153,.03);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.25), 0 0 0 3px rgba(91,124,153,.1), 0 0 18px rgba(91,124,153,.07);
  transform: translateY(-1px);
}
.fg input::placeholder { color:var(--cs-placeholder); font-style: italic; font-size: 12px; }
.fg select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234f5e7a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.fg select option { background: var(--el); color: var(--t1); }

/* Two-column grid inside form */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── SUBMIT BUTTON ──────────────────────────────────────── */
.submit-btn {
  width: 100%; min-height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--fm); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold), var(--gd));
  color: #ffffff; border: none; border-radius: 13px; padding: 14px 24px;
  cursor: pointer; transition: all .24s; margin-top: 8px;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(91,124,153,.18);
}
.submit-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-140%); transition: transform .55s; }
.submit-btn:hover::before { transform: translateX(140%); }
.submit-btn:hover { box-shadow: 0 0 40px rgba(91,124,153,.4); transform: translateY(-2px); }
.submit-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(91,124,153,.2); }
.submit-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-arrow { font-size: 16px; transition: transform .2s; }
.submit-btn:not(:disabled):hover .btn-arrow { transform: translateX(4px); }

/* ── OR DIVIDER ─────────────────────────────────────────── */
.or-div { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-family: var(--fm); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--t3); }
.or-div::before, .or-div::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent); }

/* ── OAUTH BUTTONS ──────────────────────────────────────── */
.oauth-row { display: flex; gap: 10px; }
.oauth-btn {
  flex: 1; min-height: 46px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--fm); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--t1); background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.13); border-radius: 12px;
  text-decoration: none; transition: all .2s; cursor: pointer;
}
.oauth-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); transform: translateY(-1px); color: var(--t0); }
.oauth-btn.linkedin { border-color: rgba(10,102,194,.35); }
.oauth-btn.linkedin:hover { background: rgba(10,102,194,.12); border-color: rgba(10,102,194,.5); }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert { font-family: var(--fm); font-size: 10.5px; letter-spacing: .03em; padding: 11px 14px; border-radius: 11px; margin-bottom: 16px; line-height: 1.55; }
.alert.err { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); color: var(--text-status-error); }
.alert.ok  { background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.28); color: var(--text-status-success); }
.alert.hidden { display: none !important; }
.hidden { display: none !important; }

/* ── TERMS NOTE ─────────────────────────────────────────── */
.terms-note { text-align: center; margin-top: 16px; font-family: var(--fm); font-size: 9.5px; color: var(--t3); letter-spacing: .03em; line-height: 1.6; }
.terms-note a { color: var(--t2); text-decoration: none; border-bottom: 1px solid var(--bd1); cursor: pointer; }
.terms-note a:hover { color: var(--text-accent); border-color: var(--bdg); }

/* ── PAGE LINK ──────────────────────────────────────────── */
.auth-page-link { text-align: center; margin-top: 18px; font-family: var(--fm); font-size: 10px; color: var(--t3); letter-spacing: .04em; }
.auth-page-link a { color: var(--text-accent); text-decoration: none; font-weight: 600; }
.auth-page-link a:hover { color: var(--t0); }

/* ── PASSWORD STRENGTH ──────────────────────────────────── */
.pw-row { display: flex; align-items: center; gap: 10px; margin: -8px 0 14px; }
.pw-bar  { flex: 1; height: 3px; background: var(--bd0); border-radius: 2px; overflow: hidden; }
.pw-fill { height: 100%; border-radius: 2px; transition: width .4s, background .4s; width: 0; }
.pw-label { font-family: var(--fm); font-size: 9px; color: var(--t3); white-space: nowrap; min-width: 42px; }

/* ── SPINNER ────────────────────────────────────────────── */
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(4,6,15,.3); border-top-color: #ffffff; border-radius: 50%; animation: spin .65s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-hero   { display: none; }
  .auth-form-side { min-height: 100vh; padding: 32px 20px; align-items: flex-start; padding-top: 48px; background: var(--bg); }
}
@media (max-width: 480px) {
  .auth-card  { padding: 26px 18px; border-radius: 16px; }
  .two-col    { grid-template-columns: 1fr; }
  .oauth-row  { flex-direction: column; }
  body.single-auth { padding: 14px; }
}

/* Real, live UX audit (2026-09-08): .fg input/select/textarea above is
   13px -- iOS Safari force-zooms the viewport on tap for any input under
   16px. auth.html (this file's own consumer, the combined login/register
   page) doesn't load typography-system.css, which now carries this same
   guard for every other page -- so it needs its own copy here. */
@media (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
