/* ═══════════════════════════════════════════════════════════════
   VERITAS LANGUAGE LLC — auth.css
   Login & Register — Navy Blue & Amber Gold theme
   Fonts: Fraunces (headings) + Geist (body)
═══════════════════════════════════════════════════════════════ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 1rem 3rem;   /* top = fixed topbar height */
  background: var(--cream);
  position: relative;
  box-sizing: border-box;
}

/* ─── Background orbs ────────────────────────────────────────── */
.auth-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.auth-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
}
.auth-orb-1 {
  width: 480px; height: 480px; top: -140px; left: -140px;
  background: radial-gradient(circle, rgba(200,146,42,.10) 0%, transparent 70%);
  animation: orbFloat1 14s ease-in-out infinite;
}
.auth-orb-2 {
  width: 380px; height: 380px; bottom: -100px; right: -100px;
  background: radial-gradient(circle, rgba(13,42,78,.07) 0%, transparent 70%);
  animation: orbFloat2 16s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(18px,14px) scale(1.04); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-14px,-18px) scale(1.04); }
}

/* ─── Auth Topbar ─────────────────────────────────────────── */
/*
  DESKTOP: pill floats at top-right (position:fixed, justify:flex-end)
  MOBILE : full-width bar, back-link left | toggle right
*/
.auth-topbar {
  position: fixed !important;   /* stays at top of VIEWPORT regardless of scroll */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;   /* desktop: pill sits on right */
  padding: 10px 20px;
  pointer-events: none;        /* transparent bar — only pill/link are clickable */
}

/* Mobile back-link — hidden on desktop */
.auth-topbar-back {
  display: none !important;        /* hidden on desktop — overridden by mobile media query */
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: rgba(13,42,78,.85);
  text-decoration: none;
  pointer-events: all;
  background: rgba(244,239,230,.9);
  border: 1px solid rgba(13,42,78,.15);
  border-radius: 20px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .2s;
}
.auth-topbar-back:hover { opacity: .75; }
.auth-topbar-back svg { width: 13px; height: 13px; stroke: var(--ink); flex-shrink: 0; }

/* Right pill: lang toggle + home link */
.auth-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13,42,78,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 5px 12px;
  pointer-events: all;
}
.auth-topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: rgba(244,239,230,.8);
  text-decoration: none;
  transition: color .2s;
  letter-spacing: .01em;
}
.auth-topbar-home:hover { color: var(--gold-soft); }
.auth-topbar-home svg { width: 12px; height: 12px; }

/* Lang toggle inside pill */
.auth-topbar .lang-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  overflow: hidden;
  padding: 2px;
  display: flex;
  align-items: center;
}
.auth-topbar .lang-toggle button {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(244,239,230,.75);
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .06em;
}
.auth-topbar .lang-toggle button.active {
  background: var(--gold-soft);
  color: var(--ink);
}

/* Body padding: reserve space for fixed topbar */
/* (padding-top is set in .auth-body main rule) */

/* Legacy — keep hidden */
.auth-lang-toggle { display: none; }


/* Brand (not used in minimal mode, but kept for safety) */
.auth-topbar-brand {
  font-family: var(--serif); font-size: 16px; font-weight: 500;
  color: var(--cream); text-decoration: none; letter-spacing: -.01em;
}
.auth-topbar-brand em { color: var(--gold-soft); font-style: italic; }

/* ─── Wrap ───────────────────────────────────────────────────── */
.auth-wrap {
  position: relative; z-index: 1; width: 100%;
  max-width: 460px; display: flex; flex-direction: column;
  align-items: center; gap: 1.5rem; margin: 0 auto;
}

/* ─── Logo ───────────────────────────────────────────────────── */
.auth-logo-wrap {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; transition: opacity .2s;
}
.auth-logo-wrap:hover { opacity: .85; }
.auth-logo-img { height: 38px; width: auto; }
.auth-logo-text {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600;
  letter-spacing: -.01em; color: var(--ink); line-height: 1;
}
.auth-logo-text span {
  display: block; font-family: var(--sans);
  font-size: 9px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}

/* ─── Card ───────────────────────────────────────────────────── */
.auth-card {
  width: 100%; background: var(--paper);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 2.5rem; box-shadow: var(--shadow-md);
}

.auth-card-header {
  text-align: center; margin-bottom: 2rem;
  padding-bottom: 1.75rem; border-bottom: 1px solid var(--line);
}
.auth-card-header h1 {
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  margin-bottom: .35rem; color: var(--ink); letter-spacing: -.02em;
}
.auth-card-header p {
  font-family: var(--sans); font-size: 14px; color: var(--muted);
}

/* ─── Alert ──────────────────────────────────────────────────── */
.auth-alert {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: 12px 14px; border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 14px;
  margin-bottom: 1.5rem; line-height: 1.5;
}
.auth-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: .05rem; }
.auth-alert-error   { background: rgba(181,64,64,.08); border: 1px solid rgba(181,64,64,.2); color: var(--error); }
.auth-alert-success { background: rgba(74,124,89,.08); border: 1px solid rgba(74,124,89,.2); color: var(--success); }

/* ─── Form ───────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.auth-field { margin-bottom: 1.25rem; }

.auth-field label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .5rem;
}
.auth-forgot {
  font-size: 11px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--gold); transition: opacity .15s;
}
.auth-forgot:hover { opacity: .75; }

.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap input {
  width: 100%; background: var(--cream-deep);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 2.75rem 11px 2.75rem;
  color: var(--ink); font-family: var(--sans); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input-wrap input::placeholder { color: var(--muted); }
.auth-input-wrap input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,146,42,.12);
  background: var(--paper);
}

.auth-input-icon {
  position: absolute; left: .85rem;
  width: 17px; height: 17px;
  color: var(--muted); pointer-events: none;
}
.auth-eye {
  position: absolute; right: .85rem;
  width: 20px; height: 20px; color: var(--muted);
  transition: color .15s; display: flex; align-items: center; justify-content: center;
}
.auth-eye svg { width: 17px; height: 17px; }
.auth-eye:hover { color: var(--ink); }

.auth-field-hint {
  font-family: var(--sans); font-size: 12px;
  margin-top: .4rem; min-height: 1.2em; transition: all .2s;
}

/* ─── Password Strength ──────────────────────────────────────── */
.pass-strength {
  height: 3px; background: var(--cream-deep);
  border-radius: 3px; margin-top: .5rem; overflow: hidden;
}
.pass-bar {
  height: 100%; width: 0; border-radius: 3px;
  transition: width .3s var(--ease), background .3s;
  background: var(--gold);
}

/* ─── Submit Button ──────────────────────────────────────────── */
.auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: var(--ink); color: var(--cream);
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); border: 1px solid var(--ink); cursor: pointer;
  transition: all .25s; box-shadow: var(--shadow-sm); margin-top: .5rem;
}
.auth-btn:hover:not(:disabled) {
  background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.auth-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.auth-btn svg { width: 15px; height: 15px; }

.auth-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(244,239,230,.35);
  border-top-color: var(--cream); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ─── Switch ─────────────────────────────────────────────────── */
.auth-switch {
  text-align: center; font-family: var(--sans);
  font-size: 14px; color: var(--muted);
}
.auth-switch a { color: var(--gold); font-weight: 600; transition: opacity .15s; }
.auth-switch a:hover { opacity: .75; }

/* ─── Back link ──────────────────────────────────────────────── */
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 13px;
  color: var(--muted); transition: color .15s;
}
.auth-back svg { width: 13px; height: 13px; }
.auth-back:hover { color: var(--ink); }

/* ─── req marker ─────────────────────────────────────────────── */
.req { color: var(--gold); font-style: normal; }

/* ─── Responsive ─────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
  .auth-body { padding: 68px 1rem 3rem; }
  .auth-card  { padding: 2rem 1.5rem; }
  .auth-row   { grid-template-columns: 1fr; }
}

/* Mobile — full-width topbar redesign */
@media (max-width: 600px) {
  .auth-body { padding: 58px 1rem 3rem; }
  .auth-card  { padding: 1.75rem 1.2rem; }

  /* Topbar becomes a narrow full-width bar */
  .auth-topbar {
    justify-content: space-between;   /* back LEFT | toggle RIGHT */
    padding: 8px 14px;
    background: rgba(244,239,230,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13,42,78,.08);
    box-shadow: 0 1px 8px rgba(13,42,78,.06);
    pointer-events: all;              /* entire bar is interactive */
  }

  /* Show mobile back-link on left */
  .auth-topbar-back {
    display: inline-flex !important;
  }

  /* Right pill: hide home text link, keep only toggle */
  .auth-topbar-right {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 0;
    pointer-events: all;
  }
  .auth-topbar-home { display: none; }   /* hidden on mobile */

  /* Lang toggle exposed (no pill wrapper now) */
  .auth-topbar .lang-toggle {
    background: rgba(13,42,78,.08);
    border: 1px solid rgba(13,42,78,.15);
    border-radius: 999px;
    padding: 2px;
  }
  .auth-topbar .lang-toggle button {
    color: var(--ink);
    font-size: 10px;
    padding: 3px 10px;
  }
  .auth-topbar .lang-toggle button.active {
    background: var(--ink);
    color: var(--cream);
  }

  .auth-card-header h1 { font-size: 22px; }
}
