/* ==========================================================
   Folio — auth pages  |  Centered card on dark animated bg
   Completely different from split-screen layouts
   ========================================================== */

/* ─── Wrapper: full page dark bg ─── */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: var(--bg); padding: 40px 20px;
}

/* Animated ambient blobs */
.auth-bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); pointer-events: none;
}
.auth-bg-orb.o1 {
  width: 440px; height: 440px;
  background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
  top: -160px; left: -120px;
  animation: orbDrift 14s ease-in-out infinite;
}
.auth-bg-orb.o2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(245,158,11,0.14) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation: orbDrift 10s ease-in-out infinite reverse;
}
.auth-bg-orb.o3 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(139,92,246,0.16) 0%, transparent 70%);
  top: 40%; left: 60%;
  animation: orbDrift 18s ease-in-out infinite 4s;
}
@keyframes orbDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(18px,-22px) scale(1.04); }
  66%      { transform: translate(-12px, 14px) scale(0.97); }
}

/* ─── Centered auth card ─── */
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  position: relative; z-index: 1;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55);
  animation: cardIn .45s cubic-bezier(.22,.9,.32,1);
}
/* Top gradient accent line */
.auth-card::before {
  content: ''; display: block;
  height: 3px; margin: -40px -36px 32px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px 20px 0 0;
}
@keyframes cardIn {
  from { opacity:0; transform:translateY(20px) scale(.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Brand mark inside card */
.auth-brand {
  display: flex; align-items: center; gap: 9px; margin-bottom: 28px;
  font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; color: var(--text);
}
.auth-brand .brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--grad-warm); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(245,158,11,0.4);
}

/* Headings */
.auth-card h1 {
  font-size: 26px; margin: 0 0 6px; color: var(--text); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.auth-card .sub { color: var(--text-soft); font-size: 14.5px; margin: 0 0 28px; }

/* ─── Form fields ─── */
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 7px; color: var(--text);
}
.auth-field input {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--border); font-size: 14.5px; font-family: inherit;
  background: rgba(255,255,255,0.03); color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-field input::placeholder { color: var(--text-muted); }
.auth-field input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.16);
  background: rgba(99,102,241,0.04);
}
.auth-field .hint { font-size: 12px; color: var(--text-soft); margin-top: 6px; }

/* ─── Row between (remember + forgot) ─── */
.auth-row-between {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; margin: -4px 0 20px;
}
.auth-row-between a { color: var(--primary); font-weight: 600; }
.auth-row-between a:hover { text-decoration: underline; }
.auth-remember { display: flex; align-items: center; gap: 6px; color: var(--text-soft); }

/* ─── Submit button ─── */
.auth-submit {
  width: 100%; padding: 14px; border-radius: 10px;
  background: var(--grad-primary); color: #fff; border: none;
  font-weight: 700; font-size: 15.5px; cursor: pointer; font-family: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 24px rgba(99,102,241,0.4);
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(99,102,241,0.55); }
.auth-submit:disabled { opacity:.4; cursor:not-allowed; transform:none; box-shadow:none; }
.auth-submit .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.auth-submit.busy .spinner   { display: inline-block; }
.auth-submit.busy .btn-label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ─── Alt link ─── */
.auth-alt { text-align: center; font-size: 14px; color: var(--text-soft); }
.auth-alt a { color: var(--primary); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* ─── Message banners ─── */
.auth-msg {
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px;
  margin-bottom: 18px; display: none; animation: msgIn .3s ease;
}
.auth-msg.show { display: block; }
.auth-msg.error  { background: rgba(244,63,94,0.1); color:#ff7096; border:1px solid rgba(244,63,94,0.25); }
.auth-msg.success { background: rgba(16,185,129,0.1); color:var(--success); border:1px solid rgba(16,185,129,0.25); }
@keyframes msgIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* ─── Password strength ─── */
.pw-strength { height: 4px; border-radius:999px; background:rgba(255,255,255,0.06); margin-top:8px; overflow:hidden; }
.pw-strength-fill { height:100%; width:0%; border-radius:999px; transition:width .28s ease, background .28s ease; }

/* ─── Keep legacy classes referenced by tool pages ─── */
/* These may be used by auth.js indirectly */
.auth-side, .auth-side-content, .auth-features,
.auth-feature, .floaty, .doc-stack, .doc-card,
.auth-form-side, .auth-box { display: none; }
