/* Login / register pages. Every rule is scoped under .fb-auth so it out-ranks
   the legacy Flatsome input[type=...] / button rules (specificity 0,1,1). */

.fb-auth {
  --a-ink: var(--fb-ink, #0e1116);
  --a-ink-2: var(--fb-ink-2, #1a1f27);
  --a-accent: var(--fb-accent, #d6001c);
  --a-accent-dark: var(--fb-accent-dark, #a80016);
  --a-line: #e3e6eb;
  --a-soft: #6b7280;
  --a-ok: #0f8a4b;
  background: #f2f3f5;
  padding: 40px 20px 64px;
  font-family: var(--fb-font, "Inter", sans-serif);
  color: var(--a-ink);
}
.fb-auth *, .fb-auth *::before, .fb-auth *::after { box-sizing: border-box; }

.fb-auth .fb-auth-shell {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(14,17,22,.05), 0 24px 60px rgba(14,17,22,.12);
  min-height: 640px;
  animation: fbAuthIn .5s cubic-bezier(.2,.7,.2,1) both;
}
.fb-auth.fb-auth-register .fb-auth-shell { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* ---------- brand panel ---------- */
.fb-auth .fb-auth-brand {
  position: relative;
  overflow: hidden;
  padding: 44px 44px 0;
  color: #e9edf2;
  background:
    radial-gradient(120% 70% at 100% 100%, rgba(214,0,28,.38) 0%, rgba(214,0,28,0) 60%),
    radial-gradient(80% 50% at 0% 0%, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 70%),
    linear-gradient(160deg, #161b23 0%, var(--a-ink) 70%);
  display: flex;
  flex-direction: column;
}
.fb-auth .fb-auth-brand::after {
  /* thin speed stripes */
  content: "";
  position: absolute; left: -10%; right: -10%; bottom: 150px; height: 70px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px);
  transform: skewY(-8deg);
  pointer-events: none;
}
.fb-auth .fb-auth-brand .fb-auth-logo { width: 162px; height: 54px; max-width: none; object-fit: contain; display: block; margin: 0 0 34px; }
.fb-auth .fb-auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #ff5a6e; margin: 0 0 12px;
}
.fb-auth .fb-auth-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--a-accent); }
.fb-auth .fb-auth-brand h2 {
  font-family: var(--fb-display, "Barlow Condensed", sans-serif);
  font-size: clamp(34px, 3.4vw, 46px);
  line-height: 1.02; letter-spacing: .01em; text-transform: uppercase;
  color: #fff; margin: 0 0 14px; font-weight: 700;
}
.fb-auth .fb-auth-brand p.fb-auth-lead { color: #b9c1cc; font-size: 15px; line-height: 1.6; margin: 0 0 26px; max-width: 420px; }
.fb-auth .fb-auth-props { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.fb-auth .fb-auth-props li { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 14px; color: #dfe4ea; line-height: 1.45; }
.fb-auth .fb-auth-props i {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(214,0,28,.16); color: #ff5a6e; font-size: 14px;
  border: 1px solid rgba(214,0,28,.35);
}
.fb-auth .fb-auth-props strong { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.fb-auth .fb-auth-car {
  position: relative; z-index: 1;
  margin: auto -70px -8px 0; padding-top: 24px;
  width: calc(100% + 70px); max-width: none; height: auto; display: block;
  filter: drop-shadow(0 24px 30px rgba(0,0,0,.55));
}

/* ---------- form side ---------- */
.fb-auth .fb-auth-main { padding: 44px 52px; display: flex; flex-direction: column; justify-content: center; }
.fb-auth .fb-auth-crumb { font-size: 13px; color: var(--a-soft); margin: 0 0 18px; }
.fb-auth .fb-auth-crumb a { color: var(--a-soft); text-decoration: none; }
.fb-auth .fb-auth-crumb a:hover { color: var(--a-ink); }
.fb-auth .fb-auth-main h1 {
  font-family: var(--fb-display, "Barlow Condensed", sans-serif);
  font-size: 40px; line-height: 1; text-transform: uppercase; letter-spacing: .01em;
  margin: 0 0 8px; color: var(--a-ink); font-weight: 700;
}
.fb-auth .fb-auth-sub { color: var(--a-soft); font-size: 15px; margin: 0 0 26px; line-height: 1.5; }

.fb-auth .fb-flash { border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.fb-auth .fb-flash i { margin-top: 2px; }
.fb-auth .fb-flash-ok { background: #ecfdf3; border: 1px solid #a6f0c6; color: #075e35; }
.fb-auth .fb-flash-err { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }

.fb-auth .fb-auth-form { margin: 0; }
.fb-auth .fb-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.fb-auth .fb-grid-2 { grid-template-columns: 1fr 1fr; }
.fb-auth .fb-span-2 { grid-column: 1 / -1; }
.fb-auth .fb-field { display: flex; flex-direction: column; margin: 0; min-width: 0; }
.fb-auth .fb-field .fb-label {
  display: block; margin: 0 0 7px; padding: 0;
  font-size: 13px; font-weight: 600; color: #2a313b; letter-spacing: .01em; text-transform: none;
}
.fb-auth .fb-field .fb-label .fb-opt { color: var(--a-soft); font-weight: 500; }
.fb-auth .fb-input-wrap { position: relative; }
.fb-auth .fb-input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #9aa3ae; font-size: 15px; pointer-events: none; transition: color .15s;
  width: 16px; text-align: center;
}
.fb-auth .fb-input {
  display: block; width: 100%; height: 52px; margin: 0;
  padding: 0 16px 0 46px;
  font-family: inherit; font-size: 16px; color: var(--a-ink);
  background: #f7f8fa; border: 1.5px solid var(--a-line); border-radius: 12px;
  box-shadow: none; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.fb-auth .fb-input::placeholder { color: #a3abb5; opacity: 1; }
.fb-auth .fb-input:hover { border-color: #cfd5dd; }
.fb-auth .fb-input:focus {
  background: #fff; border-color: var(--a-ink);
  box-shadow: 0 0 0 4px rgba(14,17,22,.08);
}
.fb-auth .fb-input-wrap:focus-within .fb-input-icon { color: var(--a-ink); }
.fb-auth .fb-input.fb-has-eye { padding-right: 56px; }
.fb-auth .fb-input.is-invalid { border-color: var(--a-accent); }
.fb-auth .fb-input.is-valid { border-color: var(--a-ok); }

.fb-auth .fb-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; margin: 0; padding: 0; min-height: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; box-shadow: none;
  color: #8a939e; font-size: 16px; cursor: pointer; line-height: 1;
  text-transform: none; letter-spacing: 0;
}
.fb-auth .fb-eye:hover { color: var(--a-ink); background: rgba(14,17,22,.05); }
.fb-auth .fb-eye:focus-visible { outline: 2px solid var(--a-ink); outline-offset: 1px; }

.fb-auth .fb-hint { font-size: 12.5px; margin: 7px 0 0; min-height: 18px; color: var(--a-soft); display: flex; align-items: center; gap: 6px; }
.fb-auth .fb-hint.is-ok { color: var(--a-ok); }
.fb-auth .fb-hint.is-bad { color: var(--a-accent); }

.fb-auth .fb-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 9px 0 0; }
.fb-auth .fb-meter span { height: 4px; border-radius: 4px; background: #e6e9ee; transition: background-color .2s; }
.fb-auth .fb-meter[data-score="1"] span:nth-child(-n+1) { background: #e5484d; }
.fb-auth .fb-meter[data-score="2"] span:nth-child(-n+2) { background: #f5a524; }
.fb-auth .fb-meter[data-score="3"] span:nth-child(-n+3) { background: #7cc35f; }
.fb-auth .fb-meter[data-score="4"] span:nth-child(-n+4) { background: var(--a-ok); }

/* file picker rendered as a drop row; the real input stays focusable */
.fb-auth .fb-file { position: relative; }
.fb-auth .fb-file input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0);
}
.fb-auth .fb-file-face {
  display: flex; align-items: center; gap: 12px; margin: 0;
  min-height: 52px; padding: 8px 14px 8px 8px;
  border: 1.5px dashed #cdd3db; border-radius: 12px; background: #f7f8fa;
  cursor: pointer; transition: border-color .15s, background-color .15s;
  font-size: 14px; color: var(--a-soft); font-weight: 500;
}
.fb-auth .fb-file-face:hover { border-color: var(--a-ink); background: #fff; }
.fb-auth .fb-file input[type="file"]:focus-visible + .fb-file-face { border-color: var(--a-ink); box-shadow: 0 0 0 4px rgba(14,17,22,.08); }
.fb-auth .fb-file-thumb {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e9ecf0; color: #7b8590; overflow: hidden;
  background-size: cover; background-position: center;
}
.fb-auth .fb-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fb-auth .fb-file-name b { color: var(--a-ink); font-weight: 600; }

.fb-auth .fb-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px 0 22px; font-size: 14px; flex-wrap: wrap;
}
.fb-auth .fb-check { display: inline-flex; align-items: center; gap: 9px; margin: 0; cursor: pointer; color: #3a424d; font-weight: 500; font-size: 14px; }
.fb-auth .fb-check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; accent-color: var(--a-ink); cursor: pointer;
}
.fb-auth .fb-link { color: var(--a-ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(214,0,28,.5); padding-bottom: 1px; }
.fb-auth .fb-link:hover { border-bottom-color: var(--a-accent); color: var(--a-accent); }

.fb-auth .fb-legal { font-size: 13px; color: var(--a-soft); margin: 18px 0 20px; line-height: 1.5; }
.fb-auth .fb-legal a { color: #2a313b; text-decoration: underline; text-underline-offset: 2px; }

.fb-auth .fb-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; margin: 0; padding: 0 20px; min-height: 0;
  border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #e3132e 0%, var(--a-accent) 100%);
  color: #fff; font-family: var(--fb-display, "Barlow Condensed", sans-serif);
  font-size: 19px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 22px rgba(214,0,28,.28);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.fb-auth .fb-submit i { font-size: 15px; transition: transform .15s ease; }
.fb-auth .fb-submit:hover { background: linear-gradient(180deg, #ef1d38 0%, #c40019 100%); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 28px rgba(214,0,28,.34); color: #fff; }
.fb-auth .fb-submit:hover i { transform: translateX(3px); }
.fb-auth .fb-submit:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(214,0,28,.25); }
.fb-auth .fb-submit:focus-visible { outline: 3px solid rgba(214,0,28,.35); outline-offset: 3px; }

.fb-auth .fb-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; color: #9aa3ae; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.fb-auth .fb-divider::before, .fb-auth .fb-divider::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }
.fb-auth .fb-switch { text-align: center; font-size: 15px; color: #3a424d; margin: 0; }
.fb-auth .fb-back { text-align: center; margin: 18px 0 0; font-size: 14px; }
.fb-auth .fb-back a { color: var(--a-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.fb-auth .fb-back a:hover { color: var(--a-ink); }

/* the section already supplies bottom spacing; drop the footer's gap */
.fb-auth ~ .fb-footer { margin-top: 0; }

@keyframes fbAuthIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- tablet / mobile ---------- */
@media (max-width: 960px) {
  .fb-auth { padding: 20px 16px 48px; }
  .fb-auth .fb-auth-shell,
  .fb-auth.fb-auth-register .fb-auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 18px; }
  .fb-auth .fb-auth-brand { padding: 24px 22px 0; }
  .fb-auth .fb-auth-brand .fb-auth-logo { width: 120px; height: 40px; margin: 0 0 18px; }
  .fb-auth .fb-auth-brand h2 { font-size: 30px; margin-bottom: 8px; }
  .fb-auth .fb-auth-brand p.fb-auth-lead { font-size: 14px; margin-bottom: 16px; }
  .fb-auth .fb-auth-props { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 20px; }
  .fb-auth .fb-auth-props li { flex-direction: column; gap: 8px; font-size: 12px; }
  .fb-auth .fb-auth-props li span { display: none; }
  .fb-auth .fb-auth-props strong { font-size: 12.5px; line-height: 1.3; }
  .fb-auth .fb-auth-car, .fb-auth .fb-auth-brand::after { display: none; }
  .fb-auth .fb-auth-main { padding: 28px 22px 30px; }
  .fb-auth .fb-auth-main h1 { font-size: 34px; }
  .fb-auth .fb-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .fb-auth { padding-left: 10px; padding-right: 10px; }
  .fb-auth .fb-auth-main { padding: 24px 16px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-auth .fb-auth-shell { animation: none; }
  .fb-auth * { transition: none !important; }
}
