/* ═══════════════════════════════════════════════════════════
   حساب کاربری عمومی — ثبت‌نام/ورود + داشبورد متقاضیان
   تکمیلی بر main.css و header.css — بارگذاری پس از آن‌ها
   ═══════════════════════════════════════════════════════════ */

/* ── چیپ کاربر در هدر ────────────────────────────────────── */
.userchip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 4px 12px 4px 8px; flex-shrink: 0;
  border-radius: 13px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.userchip__ava {
  width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #17223f;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.userchip__name { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.userchip__name b { color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.userchip__name small { color: var(--on-navy-2); font-size: 10.5px; white-space: nowrap; }
.userchip:hover {
  background: rgba(201,162,75,.13);
  border-color: rgba(201,162,75,.38);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(201,162,75,.18);
}

/* کاربر در کشوی موبایل */
.drawer__who {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; margin-top: 10px;
  border-radius: 13px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
}
.drawer__who-ava {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #17223f;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.drawer__who span:last-child { display: flex; flex-direction: column; line-height: 1.6; min-width: 0; }
.drawer__who b { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer__who small { color: var(--on-navy-2); font-size: 11.5px; }

/* ── هیرو صفحات احراز هویت ───────────────────────────────── */
.page-hero--auth { padding: 42px 0 30px; }

/* ── کارت انتخاب نقش ─────────────────────────────────────── */
.auth-wrap--wide { max-width: 880px; }
.auth-err { margin-bottom: 20px; }

.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-bottom: 22px;
}
.role-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 22px 26px;
  text-align: center;
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.role-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: var(--gold-grad);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.role-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-400);
  box-shadow: var(--sh-lg);
}
.role-card:hover::before { transform: scaleX(1); }
.role-card__ic {
  width: 74px; height: 74px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy-50), var(--navy-100));
  color: var(--navy-700);
  transition: background .3s, color .3s;
}
.role-card:hover .role-card__ic { background: var(--gold-grad); color: #17223f; }
.role-card__title { font-size: 18px; font-weight: 800; color: var(--text); }
.role-card__desc { font-size: 13px; color: var(--text-2); line-height: 2; min-height: 52px; }
.role-card__go {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold-600); font-weight: 700; font-size: 13.5px;
  margin-top: 4px;
}
.role-card__badge {
  position: absolute; top: 13px; inset-inline-start: 13px;
  background: var(--gold-grad); color: #17223f;
  font-size: 10.5px; font-weight: 800;
  padding: 4px 11px; border-radius: 99px;
}

/* ── کارت فرم احراز هویت ─────────────────────────────────── */
.auth-card--form { text-align: right; }
.auth-card--form .auth-icon { margin-bottom: 14px; }
.auth-card--form > h2 { text-align: center; }
.auth-card--form > p { text-align: center; margin-bottom: 22px; }

.auth-rolebar {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-bottom: 22px;
}
.auth-rolebar__ic {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy-850), var(--navy-700));
  color: var(--gold-400);
}
.auth-rolebar b { display: block; font-size: 14.5px; color: var(--navy-850); }
.auth-rolebar small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.auth-rolebar__change { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; color: var(--gold-600); white-space: nowrap; }
.auth-rolebar__change:hover { color: var(--gold-700); }

.reg-grid, .login-form { display: grid; gap: 16px; }
.reg-grid { grid-template-columns: 1fr 1fr; }
.login-form { grid-template-columns: 1fr; }
.reg-terms {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-2);
  background: var(--ok-bg); border: 1px solid #cfeeda;
  border-radius: var(--r-sm); padding: 11px 14px;
}
.reg-terms svg { color: var(--ok); flex-shrink: 0; }
.reg-form .btn { grid-column: 1 / -1; margin-top: 6px; }

.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.auth-switch a { color: var(--gold-600); font-weight: 800; margin-inline-start: 4px; }
.auth-note--center { justify-content: center; }

/* نمایش/مخفی رمز */
.pass-wrap { position: relative; }
.pass-wrap input { padding-inline-start: 14px; padding-inline-end: 46px; }
.pass-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color .2s, background .2s;
}
.pass-toggle:hover { color: var(--gold-600); background: var(--navy-50); }

/* ── بنر خوش‌آمد ─────────────────────────────────────────── */
.welcome-hero {
  margin-top: 26px;
  background:
    radial-gradient(700px 300px at 12% -30%, rgba(201,162,75,.22), transparent 60%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-850) 60%, var(--navy-800) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.welcome-hero__in { display: flex; align-items: center; gap: 20px; padding: 34px 0; flex-wrap: wrap; }
.welcome-hero__ic {
  width: 72px; height: 72px; border-radius: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31,157,97,.16); color: #35d68a;
  border: 1px solid rgba(53,214,138,.35);
}
.welcome-hero h2 { font-size: 19px; font-weight: 800; }
.welcome-hero p { color: var(--on-navy-2); font-size: 13.5px; margin-top: 5px; }
.welcome-hero p b { color: var(--gold-400); }
.welcome-hero .btn { margin-inline-start: auto; }

/* ── داشبورد ─────────────────────────────────────────────── */
.db-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px; align-items: start;
}

/* هدر داشبورد */
.db-head {
  display: flex; align-items: center; gap: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.db-head__ava {
  width: 62px; height: 62px; border-radius: 19px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy-850), var(--navy-700));
  color: var(--gold-400);
  font-size: 21px; font-weight: 800;
}
.db-head__info { flex: 1; min-width: 200px; }
.db-head__info h1 { font-size: 19px; font-weight: 800; color: var(--text); }
.db-head__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 7px; font-size: 12.5px; color: var(--text-2); }
.db-head__meta svg { color: var(--gold-500); vertical-align: -3px; }
.db-head__cta { flex-shrink: 0; }

.db-role {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800;
  padding: 5px 13px; border-radius: 99px;
}
.db-role--individual { background: var(--info-bg); color: var(--info); }
.db-role--lawyer { background: var(--warn-bg); color: var(--warn); }
.db-role--colleague { background: var(--ok-bg); color: var(--ok); }

.db-notice {
  display: flex; align-items: center; gap: 10px;
  background: var(--warn-bg); border: 1px solid #f3e0bb;
  color: var(--warn);
  border-radius: var(--r-md);
  padding: 13px 16px; font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
}
.db-notice svg { flex-shrink: 0; }

/* آمار */
.db-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 18px;
}
.db-stat {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--sh-sm);
}
.db-stat__ic {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.db-stat__ic--navy { background: var(--navy-50); color: var(--navy-700); }
.db-stat__ic--gold { background: var(--warn-bg); color: var(--gold-600); }
.db-stat__ic--ok { background: var(--ok-bg); color: var(--ok); }
.db-stat__ic--muted { background: var(--bg); color: var(--muted); }
.db-stat b { display: block; font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.3; }
.db-stat > span:last-child { font-size: 12px; color: var(--muted); }

/* نوبت بعدی */
.db-next {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh-sm);
  margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.db-next::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: var(--gold-grad);
}
.db-next__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.db-next__head b { font-size: 15px; font-weight: 800; color: var(--navy-850); display: inline-flex; align-items: center; gap: 7px; }
.db-next__head svg { color: var(--gold-600); }
.db-next__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px;
  background: var(--navy-50);
  border-radius: var(--r-md);
  padding: 16px 18px; margin-bottom: 14px;
}
.db-next__grid > div { display: flex; flex-direction: column; gap: 3px; }
.db-next__grid span { font-size: 11.5px; color: var(--muted); }
.db-next__grid b { font-size: 13.5px; font-weight: 700; color: var(--text); }
.db-code { color: var(--gold-600) !important; letter-spacing: 2px; font-weight: 800 !important; }

/* فهرست نوبت‌ها */
.db-list__title { font-size: 15.5px; font-weight: 800; color: var(--navy-850); margin-bottom: 13px; display: flex; align-items: center; gap: 7px; }
.db-list__title svg { color: var(--gold-600); }
.db-appts { display: flex; flex-direction: column; gap: 11px; }
.db-appt {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 18px;
  box-shadow: var(--sh-sm);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.db-appt:hover { border-color: var(--gold-400); transform: translateY(-2px); box-shadow: var(--sh-md); }
.db-appt__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-appt__svc { font-size: 14px; font-weight: 800; color: var(--text); }
.db-appt__sub { font-size: 12px; color: var(--text-2); }
.db-appt__meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.db-appt__meta svg { color: var(--gold-500); vertical-align: -3px; }
.db-appt__meta b { color: var(--gold-600); letter-spacing: 1px; }
.db-appt__side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }
.db-appt__link { font-size: 12px; font-weight: 700; color: var(--gold-600); display: inline-flex; align-items: center; gap: 3px; }

.db-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 44px 20px;
  color: var(--muted); text-align: center;
}
.db-empty svg { color: var(--gold-400); }

/* سایدبار داشبورد */
.db-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.db-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-sm);
}
.db-card h3 { font-size: 14.5px; font-weight: 800; color: var(--navy-850); margin-bottom: 15px; display: flex; align-items: center; gap: 7px; }
.db-card h3 svg { color: var(--gold-600); }

.db-profile { display: flex; flex-direction: column; gap: 0; margin: 0; }
.db-profile > div {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.db-profile > div:last-child { border-bottom: 0; }
.db-profile dt { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.db-profile dd { font-size: 13px; font-weight: 700; color: var(--text); margin: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.db-card--actions a {
  display: flex; align-items: center; gap: 10px;
  padding: 10.5px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: background .2s, color .2s, padding .2s;
}
.db-card--actions a:hover { background: var(--navy-50); color: var(--navy-850); padding-inline-start: 18px; }
.db-card--actions svg { color: var(--gold-600); flex-shrink: 0; }
.db-logout { color: var(--err) !important; }
.db-logout svg { color: var(--err) !important; }

.db-card--help { text-align: center; }
.db-card--help svg { color: var(--gold-600); }
.db-card--help b { display: block; font-size: 14px; color: var(--navy-850); margin-top: 9px; }
.db-card--help p { font-size: 12.5px; color: var(--muted); margin: 6px 0 13px; }

/* ── نوار کاربر در فرم رزرو ─────────────────────────────── */
.bk-userbar {
  display: flex; align-items: center; gap: 11px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--r-md);
  padding: 11px 15px;
  margin-bottom: 18px;
}
.bk-userbar__ava {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy-850), var(--navy-700));
  color: var(--gold-400); font-weight: 800; font-size: 14px;
}
.bk-userbar__txt { display: flex; flex-direction: column; line-height: 1.6; }
.bk-userbar__txt b { font-size: 13.5px; color: var(--navy-850); }
.bk-userbar__txt small { font-size: 12px; color: var(--muted); }
.bk-userbar__link { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--gold-600); white-space: nowrap; }

/* ── واکنش‌گرایی ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .db-layout { grid-template-columns: 1fr; }
  .db-side { position: static; }
  .db-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .role-grid { grid-template-columns: 1fr; }
  .reg-grid { grid-template-columns: 1fr; }
  .welcome-hero .btn { margin-inline-start: 0; width: 100%; }
}
@media (max-width: 640px) {
  .userchip__name { display: none; }
  .userchip { padding: 5px; }
  .db-next__grid { grid-template-columns: 1fr 1fr; }
  .db-appt { flex-direction: column; align-items: flex-start; }
  .db-appt__side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .db-head__cta { width: 100%; justify-content: center; }
  .userchip__ava { width: 34px; height: 34px; }
}
