/* ═══════════════════════════════════════════════════════════
   auth-split.css — صفحات ورود/ثبت‌نام عمومی به سبک ورود ادمین
   (نسخه ۸.۳ — دو ستونی: برندینگ سرمه‌ای + پنل فرم روشن)
   ═══════════════════════════════════════════════════════════ */

body.authpage {
  margin: 0; min-height: 100vh;
  background: #f2f4f8;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.auth-split {
  display: grid; grid-template-columns: minmax(400px, 520px) 1fr;
  min-height: 100vh;
}

/* ── ستون برندینگ ── */
.auth-split__aside {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 46px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(201,162,75,.16), transparent 60%),
    radial-gradient(700px 480px at -10% 110%, rgba(201,162,75,.10), transparent 55%),
    linear-gradient(160deg, var(--navy-950, #0b1730), var(--navy-900, #101f3d) 55%, var(--navy-850, #152548));
  color: #fff;
}
.auth-split__aside::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.auth-split__deco {
  position: absolute; top: -70px; left: -70px; width: 240px; height: 240px;
  border-radius: 50%; border: 34px solid rgba(201,162,75,.12); pointer-events: none;
}
.auth-split__brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.auth-split__mid { position: relative; z-index: 1; }
.auth-split__mid h2 { font-size: 26px; font-weight: 900; line-height: 1.8; margin-bottom: 10px; color: #fff; }
.auth-split__mid h2 em {
  font-style: normal;
  background: var(--gold-grad, linear-gradient(135deg, #dbb869, #c9a24b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-split__mid p { color: #aeb9d6; font-size: 13.8px; line-height: 2.1; max-width: 44ch; margin: 0 0 26px; }
.auth-split__feats { display: grid; gap: 13px; }
.auth-split__feat { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #c6cfe6; }
.auth-split__feat-ic {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(201,162,75,.14); border: 1px solid rgba(201,162,75,.35); color: var(--gold-400, #dbb869);
}
.auth-split__foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #8b96b5; font-size: 11.8px; }
.auth-split__foot .dot { width: 7px; height: 7px; border-radius: 50%; background: #2fd583; box-shadow: 0 0 10px rgba(47,213,131,.7); animation: authDot 2.4s infinite; }
@keyframes authDot { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ── ستون فرم ── */
.auth-split__panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(28px, 7vw, 96px);
  background: #fff;
}
.auth-split__panel--wide { justify-content: flex-start; overflow-y: auto; }
.auth-split__mobile-brand { display: none; margin-bottom: 24px; }
.auth-split__mobile-brand { align-items: center; gap: 11px; }
.auth-split__mobile-brand b { font-size: 14px; color: var(--navy-900, #101f3d); display: block; line-height: 1.5; }
.auth-split__mobile-brand small { display: block; font-size: 11px; color: var(--muted, #7b8494); }

.auth-split__panel h1 { font-size: 22px; font-weight: 900; color: var(--navy-900, #101f3d); margin: 0 0 4px; }
.auth-split__sub { color: var(--muted, #7b8494); font-size: 13.3px; margin: 0 0 26px; }

.auth-split__err {
  display: flex; align-items: center; gap: 9px;
  background: #fdeaea; color: var(--err, #c0392b);
  border-radius: 12px; padding: 12px 15px; font-size: 13px; font-weight: 700;
  margin-bottom: 18px;
}

/* فیلدها (هم‌سبک ادمین) */
.authfield { position: relative; margin-bottom: 16px; }
.authfield label { display: block; font-size: 12.6px; font-weight: 700; color: var(--navy-800, #152548); margin-bottom: 7px; }
.authfield .req { color: var(--err, #c0392b); }
.authfield > svg, .pass-wrap > svg {
  position: absolute; bottom: 13px; inset-inline-start: 14px;
  color: #9aa4b8; pointer-events: none;
}
.authfield input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--line, #e5e8ef); border-radius: 13px;
  padding: 12px 44px 12px 14px; font-family: inherit; font-size: 14px;
  background: #f8f9fc; color: var(--navy-900, #101f3d);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.authfield input:focus { outline: none; border-color: var(--gold-500, #c9a24b); background: #fff; box-shadow: 0 0 0 4px rgba(201,162,75,.14); }

.auth-split__submit { width: 100%; justify-content: center; margin-top: 4px; border-radius: 14px; }

/* نوار اعتماد امنیتی */
.auth-secure {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  margin: 16px 0 14px; padding: 11px 14px; border-radius: 12px;
  background: linear-gradient(160deg, #f6f8fc, #eef3f9); border: 1px dashed var(--line, #e5e8ef);
}
.auth-secure span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--navy-800, #152548); white-space: nowrap; }
.auth-secure svg { color: var(--gold-600, #b08a35); }

/* پایین پنل */
.auth-split__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line, #e5e8ef);
  font-size: 12.8px; color: var(--muted, #7b8494);
}
.auth-split__meta a { color: var(--gold-600, #b08a35); font-weight: 700; text-decoration: none; }
.auth-split__meta--center { justify-content: center; }
.auth-split__back { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-800, #152548) !important; }
.auth-split__back:hover { color: var(--gold-600, #b08a35) !important; }

/* نوار نقش انتخاب‌شده (ثبت‌نام) */
.auth-rolebar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, #f6f8fc, #eef3f9);
  border: 1px solid var(--line, #e5e8ef); border-radius: 15px;
  padding: 13px 16px; margin-bottom: 22px;
}
.auth-rolebar__ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(160deg, var(--navy-850, #152548), var(--navy-700, #1d3157));
  color: var(--gold-400, #dbb869);
}
.auth-rolebar > div { flex: 1; }
.auth-rolebar b { display: block; font-size: 13.5px; color: var(--navy-900, #101f3d); }
.auth-rolebar small { font-size: 11.5px; color: var(--muted, #7b8494); }
.auth-rolebar__change { font-size: 12px; font-weight: 700; color: var(--gold-600, #b08a35); text-decoration: none; white-space: nowrap; }
.auth-rolebar__change:hover { text-decoration: underline; }

/* کارت‌های نقش داخل پنل */
.auth-split__roles { margin-bottom: 6px; }

/* ══ انتخاب نقش — کارت‌های سه‌بعدی با انیمیشن ورود پله‌ای ══ */
.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 10px;
}
.role-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 18px 22px;
  background: #fff;
  border: 1.5px solid var(--line, #e5e8ef);
  border-radius: 20px;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  animation: roleIn .5s var(--ease) backwards;
}
.role-card:nth-child(1) { animation-delay: .05s; }
.role-card:nth-child(2) { animation-delay: .14s; }
.role-card:nth-child(3) { animation-delay: .23s; }
@keyframes roleIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
/* هاله طلایی بالا هنگام هاور */
.role-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: var(--gold-grad, linear-gradient(135deg, #dbb869, #c9a24b));
  transform: scaleX(0); transform-origin: center;
  transition: transform .35s var(--ease);
}
.role-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(340px 180px at 50% -12%, rgba(201,162,75,.14), transparent 70%);
  transition: opacity .35s var(--ease);
}
.role-card:hover { transform: translateY(-7px); border-color: rgba(201,162,75,.6); box-shadow: 0 26px 48px -20px rgba(15, 26, 47, .28); }
.role-card:hover::before { transform: scaleX(1); }
.role-card:hover::after { opacity: 1; }
.role-card__ic {
  width: 74px; height: 74px; border-radius: 23px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(160deg, var(--navy-850, #152548), var(--navy-700, #1d3157));
  color: var(--gold-400, #dbb869);
  box-shadow: 0 14px 28px -12px rgba(15, 26, 47, .45), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  position: relative; z-index: 1;
}
.role-card__ic::after {
  content: ''; position: absolute; inset: 5px; border-radius: 18px;
  border: 1px dashed rgba(219, 184, 105, .35);
  pointer-events: none;
}
.role-card:hover .role-card__ic {
  transform: translateY(-4px) rotate(-4deg) scale(1.06);
  box-shadow: 0 20px 36px -12px rgba(201, 162, 75, .55);
}
.role-card__title { font-size: 15.5px; font-weight: 900; color: var(--navy-900, #101f3d); margin-bottom: 7px; position: relative; z-index: 1; }
.role-card__desc { font-size: 11.8px; color: var(--muted, #7b8494); line-height: 1.95; min-height: 46px; position: relative; z-index: 1; }
.role-card__go {
  margin-top: 16px; padding-top: 13px; width: 100%;
  border-top: 1px dashed var(--line, #e5e8ef);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 800; color: var(--gold-600, #b08a35);
  transition: gap .25s var(--ease);
  position: relative; z-index: 1;
}
.role-card__go svg { transition: transform .25s var(--ease); }
.role-card:hover .role-card__go { gap: 12px; }
.role-card:hover .role-card__go svg { transform: translateX(-3px); }
.role-card__badge {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
  background: var(--gold-grad, linear-gradient(135deg, #dbb869, #c9a24b));
  color: var(--navy-950, #0b1730);
  font-size: 10px; font-weight: 900; letter-spacing: .2px;
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 8px 18px -8px rgba(176, 138, 53, .65);
}

/* فرم ثبت‌نام */
.auth-split__panel .reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.auth-split__panel .field { margin-bottom: 14px; }
.auth-split__panel .field label { display: block; font-size: 12.4px; font-weight: 700; color: var(--navy-800, #152548); margin-bottom: 6px; }
.auth-split__panel .field input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--line, #e5e8ef); border-radius: 12px;
  padding: 11px 14px; font-family: inherit; font-size: 13.5px;
  background: #f8f9fc; color: var(--navy-900, #101f3d);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth-split__panel .field input:focus { outline: none; border-color: var(--gold-500, #c9a24b); background: #fff; box-shadow: 0 0 0 4px rgba(201,162,75,.14); }
.auth-split__panel .field.has-error input { border-color: var(--err, #c0392b); }
.auth-split__panel .field__error { display: none; font-size: 11px; color: var(--err, #c0392b); margin-top: 5px; }
.auth-split__panel .field.has-error .field__error { display: block; }
.pass-wrap { position: relative; }
.pass-wrap .pass-toggle {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; color: #9aa4b8;
  display: inline-flex; padding: 3px; border-radius: 8px;
}
.pass-toggle:hover { color: var(--gold-600, #b08a35); }
.auth-split__panel .reg-terms {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 11.8px; color: var(--muted, #7b8494); line-height: 1.9;
  background: #f8f9fc; border-radius: 12px; padding: 11px 14px; margin: 8px 0 4px;
}
.auth-split__panel .reg-terms svg { color: var(--ok, #2e9e63); flex-shrink: 0; margin-top: 3px; }
.auth-split__panel .reg-terms a { color: var(--gold-600, #b08a35); font-weight: 700; }

/* هشدار Caps Lock */
.pass-caps {
  position: absolute; inset-inline-start: 0; bottom: calc(100% + 6px);
  background: var(--navy-900, #101f3d); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap; z-index: 5;
}

/* ── واکنش‌گرایی ── */
@media (max-width: 980px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split__aside { display: none; }
  .auth-split__mobile-brand { display: flex; flex-direction: row; }
  .auth-split__mobile-brand > div { display: flex; flex-direction: column; }
  .auth-split__panel { padding: 34px 22px 44px; min-height: 100vh; }
  .auth-split__panel .reg-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 700px) {
  .role-grid { grid-template-columns: 1fr; gap: 12px; }
  .role-card { padding: 24px 16px 18px; }
  .role-card__desc { min-height: 0; }
  .role-card__ic { width: 62px; height: 62px; border-radius: 19px; }
}
@media (max-width: 560px) {
  .auth-split__meta { flex-direction: column; align-items: flex-start; }
}
