/* =============================================
   AUTH PAGE (ورود / ثبت‌نام / بازیابی رمز)
   barghfani.ir
   ============================================= */

.bf-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  direction: rtl;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: #2b1013;
  background: #fff;
}

/* ---------- Right brand panel ---------- */
.bf-auth__aside {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  padding: 56px 60px;
  color: #fff;
  background: linear-gradient(155deg, #5e0f1a 0%, #a81f2b 48%, #e0303a 100%);
}
.bf-auth__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 15%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse at 30% 15%, #000 0%, transparent 78%);
}
.bf-auth__spark {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .45;
  pointer-events: none;
}
.bf-auth__spark--1 {
  width: 230px; height: 230px;
  background: #ff9b9b;
  top: -50px; right: -50px;
  animation: bf-drift 9s ease-in-out infinite;
}
.bf-auth__spark--2 {
  width: 280px; height: 280px;
  background: #ffc99e;
  bottom: -80px; left: -70px;
  animation: bf-drift 12s ease-in-out infinite reverse;
}
@keyframes bf-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-20px, 26px, 0); }
}

.bf-auth__aside-inner { position: relative; max-width: 440px; }

.bf-auth__headline {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.55;
  margin: 0 0 14px;
}
.bf-auth__sub {
  font-size: 14.5px;
  line-height: 2.1;
  opacity: .82;
  margin: 0 0 30px;
}
.bf-auth__features { list-style: none; padding: 0; margin: 0 0 30px; }
.bf-auth__features li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 0;
  opacity: .95;
}
.bf-auth__features li > span:first-child {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 10px;
  font-size: 15px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
}
.bf-auth__quote {
  font-size: 13.5px;
  line-height: 2.1;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- Brand mark ---------- */
.bf-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 38px; }
.bf-brand__mark {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  font-size: 28px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
}
.bf-brand__name  { font-size: 22px; font-weight: 900; line-height: 1.25; }
.bf-brand__latin { font-size: 11px; letter-spacing: 3px; opacity: .7; }

.bf-brand__mark--sm {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  font-size: 27px;
  color: #fff;
  border: none;
  background: linear-gradient(135deg, #ff3b3b, #c4272b);
  box-shadow: 0 10px 26px rgba(255,59,59,.32);
}

/* ---------- Left form panel ---------- */
.bf-auth__main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  background: #fff7f7;
}
.bf-auth__back {
  position: absolute;
  top: 26px; right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(43,16,19,.14);
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: #5a2e32;
  cursor: pointer;
  transition: all .2s;
}
.bf-auth__back:hover {
  color: #c4272b;
  background: rgba(255,59,59,.06);
  border-color: rgba(196,39,43,.35);
}

.bf-card {
  width: 100%;
  max-width: 424px;
  padding: 38px 34px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(43,16,19,.08);
  box-shadow: 0 24px 60px rgba(122,18,32,.10), 0 2px 6px rgba(43,16,19,.04);
  animation: bf-card-in .4s cubic-bezier(.4, 0, .2, 1);
}
@keyframes bf-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.bf-card__head  { text-align: center; margin-bottom: 26px; }
.bf-card__title { font-size: 21px; font-weight: 900; margin: 0 0 6px; color: #2b1013; }
.bf-card__desc  { font-size: 13px; line-height: 1.9; color: #8b5a5e; margin: 0; }

/* ---------- Tabs ---------- */
.bf-tabs {
  position: relative;
  display: flex;
  padding: 5px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: #ffeef0;
}
.bf-tabs__pill {
  position: absolute;
  top: 5px; right: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  border-radius: 10px;
  background: linear-gradient(135deg, #ff3b3b, #c4272b);
  box-shadow: 0 6px 16px rgba(255,59,59,.28);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.bf-tabs__btn {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: #8b5a5e;
  cursor: pointer;
  transition: color .22s;
}
.bf-tabs__btn.is-active { color: #fff; }

/* ---------- Fields ---------- */
.bf-field { margin-bottom: 16px; }
.bf-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.bf-field__label { font-size: 12.5px; font-weight: 700; color: #5a2e32; }
.bf-field__box {
  display: flex;
  align-items: center;
  border-radius: 13px;
  background: #fff7f7;
  border: 1.5px solid rgba(43,16,19,.1);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.bf-field__box:focus-within {
  background: #fff;
  border-color: #ff3b3b;
  box-shadow: 0 0 0 4px rgba(255,59,59,.13);
}
.bf-field__icon {
  padding: 0 14px 0 8px;
  font-size: 15px;
  line-height: 1;
  opacity: .6;
}
.bf-field__input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #2b1013;
}
.bf-field__input::placeholder { color: #c08f93; font-size: 14px; }
.bf-field__input[type="tel"],
.bf-field__input[type="email"] { direction: ltr; text-align: right; }
.bf-field__eye {
  padding: 0 13px;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s;
}
.bf-field__eye:hover { opacity: 1; }

.bf-link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #c4272b;
  cursor: pointer;
  transition: color .2s;
}
.bf-link:hover { color: #ff3b3b; text-decoration: underline; }

/* ---------- Password strength ---------- */
.bf-strength { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.bf-strength__bar {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: #ffe4e6;
  overflow: hidden;
}
.bf-strength__fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width .3s, background .3s;
}
.bf-strength__text { min-width: 54px; font-size: 11.5px; font-weight: 700; text-align: left; }

.bf-strength[data-lvl="0"] .bf-strength__fill { width: 22%;  background: #ef4444; }
.bf-strength[data-lvl="1"] .bf-strength__fill { width: 48%;  background: #f97316; }
.bf-strength[data-lvl="2"] .bf-strength__fill { width: 74%;  background: #eab308; }
.bf-strength[data-lvl="3"] .bf-strength__fill { width: 100%; background: #1f9d55; }
.bf-strength[data-lvl="0"] .bf-strength__text { color: #ef4444; }
.bf-strength[data-lvl="1"] .bf-strength__text { color: #f97316; }
.bf-strength[data-lvl="2"] .bf-strength__text { color: #b58900; }
.bf-strength[data-lvl="3"] .bf-strength__text { color: #1f9d55; }

/* ---------- Submit ---------- */
.bf-submit {
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff3b3b, #c4272b);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255,59,59,.30);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.bf-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255,59,59,.38);
}
.bf-submit:active:not(:disabled) { transform: translateY(0); }
.bf-submit:disabled {
  cursor: not-allowed;
  opacity: .75;
  filter: grayscale(.35);
  box-shadow: none;
}
.bf-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: bf-spin .7s linear infinite;
}
@keyframes bf-spin { to { transform: rotate(360deg); } }

/* ---------- Alerts ---------- */
.bf-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.8;
  animation: bf-pop .25s ease;
}
.bf-alert--err { background: #fff1f1; border: 1px solid rgba(239,68,68,.28); color: #b91c1c; }
.bf-alert--ok  { background: #f0fdf4; border: 1px solid rgba(31,157,85,.30); color: #15803d; }
@keyframes bf-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Card foot ---------- */
.bf-card__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(43,16,19,.07);
  text-align: center;
  font-size: 13px;
  color: #5a2e32;
}
.bf-auth__legal {
  max-width: 380px;
  margin: 22px auto 0;
  font-size: 11.5px;
  line-height: 1.9;
  text-align: center;
  color: #a67a7e;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bf-auth { grid-template-columns: 1fr; }
  .bf-auth__aside { display: none; }
  .bf-auth__main { min-height: 100vh; padding: 76px 18px 44px; }
}

@media (max-width: 520px) {
  .bf-card { padding: 28px 20px; border-radius: 20px; box-shadow: 0 14px 40px rgba(122,18,32,.10); }
  .bf-card__title { font-size: 19px; }
  .bf-auth__back { top: 16px; right: 16px; padding: 7px 13px; font-size: 12px; }
  .bf-field__input { padding: 13px 0; font-size: 14.5px; }
}