/* ═══════════════════════════════════════════════
   Book Mentor — Auth Pages (Login / Signup)
   ═══════════════════════════════════════════════ */

* { box-sizing: border-box; }

/* ── Wrapper ── */
.auth-page {
  display: flex;
  min-height: 100vh;
}

/* ── Brand panel (left on RTL = right side visually) ── */
.auth-brand {
  flex: 0 0 42%;
  background: linear-gradient(160deg, var(--primary-dark) 0%, #7c3aed 60%, var(--primary) 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 60px 56px; color: #fff;
  position: relative; overflow: hidden;
}
.auth-brand::before {
  content: ''; position: absolute; top: -80px; left: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-brand::after {
  content: ''; position: absolute; bottom: -60px; right: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}

.brand-logo {
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 52px;
  position: relative; z-index: 1;
}
.brand-tagline {
  font-size: clamp(22px, 3vw, 32px); font-weight: 800;
  line-height: 1.3; margin-bottom: 16px;
  position: relative; z-index: 1;
}
.brand-sub {
  font-size: 15px; opacity: .85; line-height: 1.7;
  position: relative; z-index: 1; max-width: 320px;
}

/* Perks (login) */
.brand-perks {
  margin-top: 40px; display: flex; flex-direction: column;
  gap: 14px; position: relative; z-index: 1;
}
.brand-perk       { display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: .9; }
.brand-perk-icon  {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

/* Steps (signup) */
.brand-steps {
  margin-top: 36px; display: flex; flex-direction: column;
  gap: 16px; position: relative; z-index: 1;
}
.brand-step  { display: flex; align-items: center; gap: 12px; font-size: 13px; opacity: .9; }
.step-num    {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}

/* ── Form panel ── */
.auth-form-panel {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 48px 32px; background: var(--bg); overflow-y: auto;
}
.auth-form-box   { width: 100%; max-width: 400px; }
.auth-heading    { font-size: 26px; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.auth-sub        { font-size: 14px; color: var(--muted); margin-bottom: 32px; }

/* ── Social login buttons ── */
.social-login-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

/* Single button (Google only, no LinkedIn configured) */
.social-login-btns:has(.social-btn:only-child) {
  grid-template-columns: 1fr;
}

.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 12px 10px;
  border: 2px solid var(--border); border-radius: 12px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .18s;
  text-decoration: none; font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  white-space: nowrap;
}
.social-btn:hover { text-decoration: none; transform: translateY(-1px); }

.social-btn--google {
  background: var(--surface);
  color: var(--text);
}
.social-btn--google:hover {
  border-color: #4285F4;
  box-shadow: 0 4px 12px rgba(66,133,244,.15);
  color: var(--text);
}

.social-btn--linkedin {
  background: #0a66c2;
  color: #fff !important;
  border-color: #0a66c2;
}
.social-btn--linkedin:hover {
  background: #004182;
  border-color: #004182;
  box-shadow: 0 4px 12px rgba(10,102,194,.3);
  color: #fff !important;
}

/* Legacy — keep for any template still using .google-btn */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px;
  border: 2px solid var(--border); border-radius: 12px;
  background: var(--surface); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .18s;
  color: var(--text); text-decoration: none; font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.google-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241,.15);
  text-decoration: none; color: var(--text);
}

/* ── OR divider ── */
.or-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--muted-light); font-size: 13px;
}
.or-divider::before,
.or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Form controls (override base for auth) ── */
.auth-form-box .form-control {
  padding: 13px 16px; border-radius: 12px; font-size: 15px;
}
.auth-form-box .form-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #374151;
}
.auth-form-box .form-group { margin-bottom: 18px; }

/* ── Submit button ── */
.submit-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: opacity .18s, box-shadow .18s;
  box-shadow: var(--shadow-brand);
}
.submit-btn:hover { opacity: .92; box-shadow: 0 6px 20px rgba(99,102,241,.4); }

/* ── Footer ── */
.auth-footer { text-align: center; font-size: 14px; color: var(--muted); margin-top: 24px; }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ── Back link ── */
.back-home {
  position: fixed; top: 16px; right: 20px; font-size: 13px;
  color: var(--muted); display: flex; align-items: center; gap: 6px; z-index: 10;
}
.back-home:hover { color: var(--primary); text-decoration: none; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .auth-brand { display: none; }
  .auth-form-panel {
    padding: 36px 24px 40px;
    background: var(--surface);
    min-height: 100vh;
    justify-content: flex-start;
    align-items: stretch;
  }
  .auth-form-box    { max-width: 100%; }
  .mobile-logo      { display: block; text-align: center; font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 28px; }
  .back-home        { display: none; }
}
@media (min-width: 769px) {
  .mobile-logo { display: none; }
}

/* ── Social signup: allauth renders bare <input> without our class ── */
.auth-form-box input[type="email"]:not(.form-control),
.auth-form-box input[type="text"]:not(.form-control),
.auth-form-box input[type="password"]:not(.form-control) {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  direction: ltr;
}
