/* ==========================================================================
   Log in + Sign up (login.php, register.php) — a focused, chrome-less auth screen:
   photo panel on the left (stacked above the form on phones/tablets) and a form
   card on the right.

   Markup: includes/pages/auth/hero.php (photo panel) + the page files.
   Behaviour: assets/js/pages/auth.js

     <1000px   photo banner on top (420px, 340px under 420), card overlaps its bottom edge
     ≥1000px   two columns 1.12fr | 1fr, photo panel full height, intro + feature rows shown
   ========================================================================== */
.pb-auth-page { background: #fff; }

.pb-auth {
  /* auth-specific golds from the design (the shared tokens are a touch darker) */
  --pb-auth-gold:        #b07a07;
  --pb-auth-gold-hover:  #956705;
  --pb-auth-gold-ring:   rgba(176, 122, 7, .16);
  --pb-auth-link:        #a8641d;
  --pb-auth-icon:        #c9900e;
  --pb-auth-line:        #e6e1d5;
  --pb-auth-card-line:   #f1ece2;
  --pb-auth-soft:        #fff8e8;
  --pb-auth-soft-2:      #fdeac0;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  background: #fff;
}

/* ── Photo panel ────────────────────────────────────────────────────────── */
.pb-auth__hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 420px; background: #2a1d08;
}
.pb-auth__photo, .pb-auth__shade { position: absolute; inset: 0; }
.pb-auth__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-auth__shade {
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20,13,3,.45) 0%, rgba(20,13,3,.2) 35%, rgba(20,13,3,.85) 100%);
}
.pb-auth__hero-in {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 24px 44px;
}
.pb-auth__logo {
  align-self: flex-start; display: flex; align-items: center; padding: 8px 14px; border-radius: 14px;
  background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.pb-auth__logo img { display: block; height: 52px; width: auto; }
.pb-auth__headline {
  margin: 0; font-family: var(--pb-font-head); font-weight: 900; font-size: 32px; line-height: 1.08;
  letter-spacing: -.02em; color: #fff; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.pb-auth__headline span { color: var(--pb-amber); }
.pb-auth__intro, .pb-auth__features { display: none; }

/* ── Form side ──────────────────────────────────────────────────────────── */
.pb-auth__main {
  position: relative; display: flex; align-items: flex-start; justify-content: center;
  padding: 0 18px 32px; background: #fffdf9;
}
.pb-auth-card {
  position: relative; z-index: 3; width: 100%; max-width: 560px; margin-top: -24px; padding: 30px 26px 26px;
  border-radius: 24px; background: #fff; border: 1px solid var(--pb-auth-card-line);
  box-shadow: 0 -10px 40px rgba(60,40,0,.08);
}

.pb-auth-card__top { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pb-auth-card__ico {
  width: 68px; height: 68px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: var(--pb-auth-soft); border: 1.5px solid #f6dfa8;
}
.pb-auth-card__ico i { font-size: 27px; color: var(--pb-auth-icon); }
.pb-auth-card__top h1 { margin: 16px 0 0; font-weight: 900; font-size: 30px; line-height: 1.1; color: #141414; }
.pb-auth-card__top p { margin: 8px 0 0; font-size: 17px; color: var(--pb-text-3); }

.pb-auth-note {
  display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 16px 18px;
  border-radius: 14px; background: var(--pb-auth-soft); font-size: 14.5px; line-height: 1.45; color: var(--pb-text-2);
}
.pb-auth-note__ico {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--pb-auth-soft-2);
}
.pb-auth-note__ico i { font-size: 20px; color: #e0a31c; }
.pb-auth-note b { display: block; font-family: var(--pb-font-head); font-weight: 800; font-size: 16px; color: var(--pb-auth-link); }
.pb-auth-card.has-alert .pb-auth-note { display: none; }

.pb-auth-alert {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 14px;
  border-radius: 12px; font-size: 14.5px; line-height: 1.45;
}
.pb-auth-alert[hidden] { display: none; }
.pb-auth-alert > i { flex: none; margin-top: 3px; }
.pb-auth-alert > div { min-width: 0; }
.pb-auth-alert--error { background: #fdeeee; border: 1px solid #f8d2d3; color: #b3261e; }
.pb-auth-alert strong { display: block; font-weight: 800; }
.pb-auth-alert ul { margin: 4px 0 0; padding: 0; list-style: none; }
.pb-auth-alert li { position: relative; padding-left: 14px; }
.pb-auth-alert li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Form ───────────────────────────────────────────────────────────────── */
.pb-auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.pb-auth-field { display: flex; flex-direction: column; gap: 8px; }
.pb-auth-label { font-size: 15px; font-weight: 700; color: var(--pb-text); }

.pb-auth-input {
  display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 16px;
  border: 1.5px solid var(--pb-auth-line); border-radius: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.pb-auth-input--pw { padding-right: 6px; }
.pb-auth-input > i { flex: none; font-size: 16px; color: var(--pb-text-3); width: 16px; text-align: center; }
.pb-auth-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 16px; font-weight: 400; color: var(--pb-text);
}
.pb-auth-input:focus-within { border-color: var(--pb-auth-gold); box-shadow: 0 0 0 3px var(--pb-auth-gold-ring); }
.pb-auth-input.is-invalid { border-color: var(--pb-red); }
.pb-auth-input.is-invalid:focus-within { box-shadow: 0 0 0 3px rgba(240,53,59,.14); }

.pb-auth-eye {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: none;
  display: flex; align-items: center; justify-content: center; color: var(--pb-text-2);
}
.pb-auth-eye:hover { background: #f7f5f0; }
.pb-auth-eye i { font-size: 16px; }

.pb-auth-hint { font-size: 13px; color: var(--pb-text-muted); }

.pb-auth-strength { display: flex; align-items: center; gap: 10px; }
.pb-auth-strength[hidden] { display: none; }
.pb-auth-strength__bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pb-auth-strength__bars span { height: 5px; border-radius: 3px; background: #ece8de; transition: background .2s; }
.pb-auth-strength__label { flex: none; font-size: 13px; font-weight: 700; }
.pb-auth-strength[data-score="1"] { color: var(--pb-red); }
.pb-auth-strength[data-score="2"] { color: var(--pb-orange); }
.pb-auth-strength[data-score="3"] { color: #e0a31c; }
.pb-auth-strength[data-score="4"] { color: var(--pb-green); }
.pb-auth-strength[data-score="1"] .pb-auth-strength__bars span:nth-child(-n+1),
.pb-auth-strength[data-score="2"] .pb-auth-strength__bars span:nth-child(-n+2),
.pb-auth-strength[data-score="3"] .pb-auth-strength__bars span:nth-child(-n+3),
.pb-auth-strength[data-score="4"] .pb-auth-strength__bars span:nth-child(-n+4) { background: currentColor; }

.pb-auth-check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; color: var(--pb-text); }
.pb-auth-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--pb-auth-gold); cursor: pointer; }

.pb-auth-submit {
  height: 58px; margin-top: 4px; border: 0; border-radius: 12px; background: var(--pb-auth-gold); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 20px rgba(176,122,7,.25); transition: background .15s, opacity .15s;
}
.pb-auth-submit:hover { background: var(--pb-auth-gold-hover); }
.pb-auth-submit i { font-size: 15px; }
.pb-auth-submit[disabled] { opacity: .8; cursor: default; }

.pb-auth-legal { margin: -4px 0 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--pb-text-muted); }
.pb-auth-legal a { color: var(--pb-auth-link); text-decoration: none; }

.pb-auth-or { display: flex; align-items: center; gap: 14px; margin-top: 24px; font-size: 14px; color: var(--pb-text-muted); }
.pb-auth-or::before, .pb-auth-or::after { content: ''; flex: 1; height: 1px; background: #ebe7de; }
.pb-auth-switch { margin-top: 16px; text-align: center; font-size: 16px; color: var(--pb-text-2); }
.pb-auth-switch a { font-family: var(--pb-font-head); font-weight: 800; font-size: 16px; color: var(--pb-auth-link); }
.pb-auth-switch a:hover, .pb-auth-guest a:hover { text-decoration: none; }
.pb-auth-guest { margin-top: 14px; text-align: center; }
.pb-auth-guest a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--pb-text-muted); }
.pb-auth-guest i { font-size: 12px; }

/* ── Small phones ───────────────────────────────────────────────────────── */
@media (max-width: 419px) {
  .pb-auth__hero { min-height: 340px; }
  .pb-auth__hero-in { padding: 16px 16px 40px; }
  .pb-auth__logo img { height: 44px; }
  .pb-auth__headline { font-size: 27px; }
  .pb-auth__main { padding: 0 12px 28px; }
  .pb-auth-card { padding: 26px 18px 24px; }
}

/* ── Desktop: two columns ───────────────────────────────────────────────── */
@media (min-width: 1000px) {
  .pb-auth { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }

  .pb-auth__hero { min-height: 100vh; }
  .pb-auth__shade { background: linear-gradient(180deg, rgba(20,13,3,.55) 0%, rgba(20,13,3,.15) 30%, rgba(20,13,3,.35) 55%, rgba(20,13,3,.88) 100%); }
  .pb-auth__hero-in { padding: 36px 10% 48px; }
  .pb-auth__logo img { height: 68px; }
  .pb-auth__copy { max-width: 560px; }
  .pb-auth__headline { font-size: 42px; }
  .pb-auth__intro { display: block; margin: 16px 0 0; max-width: 430px; font-size: 17px; line-height: 1.55; color: #fff; text-wrap: pretty; }
  .pb-auth__features { display: flex; flex-direction: column; gap: 14px; margin: 26px 0 0; }
  .pb-auth__features li { display: flex; align-items: center; gap: 14px; }
  .pb-auth__feat-ico {
    flex: none; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .pb-auth__feat-ico i { font-size: 19px; color: var(--pb-amber); }
  .pb-auth__features strong { display: block; font-family: var(--pb-font-head); font-weight: 800; font-size: 16.5px; color: #fff; }
  .pb-auth__features small { display: block; margin-top: 1px; font-size: 14px; color: #f1ead9; }

  .pb-auth__main { align-items: center; overflow: hidden; padding: 40px 48px; }
  .pb-auth__main::before {
    content: ''; position: absolute; right: -140px; bottom: -140px; width: 360px; height: 360px;
    border-radius: 50%; background: #fdf3df;
  }
  .pb-auth__main::after {
    content: '\f1b0'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: 28px; top: 280px; font-size: 54px; line-height: 1; color: #f8eedb; transform: rotate(18deg);
  }
  .pb-auth-card { margin-top: 0; padding: 36px 56px 32px; box-shadow: 0 20px 60px rgba(60,40,0,.08); }
  .pb-auth-card__top h1 { font-size: 36px; }
}
@media (min-width: 1400px) {
  .pb-auth__headline { font-size: 50px; }
}
