/* v24/Stage 5 — پرداختِ سراسریِ دیداری (ساختاری نیست). پس از unfold_fa.css و پوسته‌ی
 * per-user بار می‌شود؛ فقط از متغیرهای --ax-* استفاده می‌کند تا با هر پالت هماهنگ بماند. */

/* ---- نوارِ باریک و هماهنگِ اسکرول (منوی کناری و کلی) ---- */
#nav-sidebar, #nav-sidebar * {
  scrollbar-width: thin;
  scrollbar-color: var(--ax-sidebar-border, #2A2E37) transparent;
}
#nav-sidebar::-webkit-scrollbar { width: 8px; height: 8px; }
#nav-sidebar::-webkit-scrollbar-thumb {
  background: var(--ax-sidebar-border, #2A2E37);
  border-radius: 8px;
}
#nav-sidebar::-webkit-scrollbar-track { background: transparent; }

/* ---- ریتمِ ۸px و گذارِ نرمِ آیتم‌های منو + نوارِ باریکِ اکسنت روی آیتمِ فعال ---- */
#nav-sidebar a {
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  border-radius: 8px;
}
#nav-sidebar a.active,
#nav-sidebar-apps a.active {
  /* نوارِ باریکِ اکسنت سمتِ شروع (RTL: راست) */
  box-shadow: inset 3px 0 0 0 var(--ax-gold, #C9A14A);
}
html[dir="rtl"] #nav-sidebar a.active,
html[dir="rtl"] #nav-sidebar-apps a.active {
  box-shadow: inset -3px 0 0 0 var(--ax-gold, #C9A14A);
}

/* ---- حلقه‌ی فوکوسِ فیلدهای فرم با رنگِ اکسنت ---- */
.aligned input:focus-visible,
.aligned select:focus-visible,
.aligned textarea:focus-visible,
input.vTextField:focus-visible,
.select2-container--focus .select2-selection {
  outline: 2px solid var(--ax-gold, #C9A14A) !important;
  outline-offset: 1px;
  border-color: var(--ax-gold, #C9A14A) !important;
}

/* ---- گوشه‌ی نرمِ کارت‌ها (۱۲px) — محافظه‌کارانه روی کانتینرهای گِردِ Unfold ---- */
.rounded-default, .rounded-md, .rounded-lg { border-radius: 12px !important; }

/* ---- دکمه‌ی اصلی: پس‌زمینه‌ی جوهری، هاورِ طلایی/اکسنت ---- */
.submit-row input[type="submit"].default,
a.button.default, .button.default {
  transition: background-color .15s ease, box-shadow .15s ease;
}
.submit-row input[type="submit"].default:hover,
a.button.default:hover, .button.default:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

/* ==== v30/S8 — کارت‌های منوی اصلی: هر گروهِ سایدبار یک کارتِ مجزا (بندِ ذغالی/کرم، نوارِ
 * طلاییِ لبه، سرگروهِ درشت‌تر) و فرزندان تورفته/سبک‌تر — با متغیرهای پوسته، نه رنگِ ثابت. ==== */
#nav-sidebar-apps > div {
  background: var(--ax-sidebar-card, color-mix(in srgb, var(--color-base-100, #f6f4ef) 55%, transparent));
  border-inline-start: 3px solid var(--ax-gold, #C9A14A);
  border-radius: 12px;
  margin: 0 10px 10px;
  padding: 6px 4px 8px;
}
.dark #nav-sidebar-apps > div, html.dark #nav-sidebar-apps > div {
  background: var(--ax-sidebar-card-dark, rgba(255, 255, 255, 0.04));
}
#nav-sidebar-apps > div > h2 {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  letter-spacing: 0;
}
#nav-sidebar-apps > div > h2::before {          /* نشانه‌ی گروه (لوزیِ طلایی) */
  content: "";
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--ax-gold, #C9A14A);
  transform: rotate(45deg);
  margin-inline-end: 8px; flex: 0 0 auto;
}
#nav-sidebar-apps > div > ol { padding-inline-start: 1.4rem; padding-inline-end: 1rem; }
#nav-sidebar-apps > div > ol a { font-size: 0.82rem; opacity: 0.92; }
#nav-sidebar-apps > div > ol a .material-symbols-outlined {
  color: var(--ax-gold, #C9A14A); opacity: 0.85;
}
#nav-sidebar-apps > div > ol a.active,
#nav-sidebar-apps > div > ol a:hover { opacity: 1; }
#nav-sidebar-apps > div > ol a.active {
  box-shadow: inset 2px 0 0 var(--ax-gold, #C9A14A);
}


/* ==== v38-hotfix2 — بلوکِ لایه‌بندیِ v38 حذف شد: overflow-y:auto!important روی میزبانِ
 * data-simplebar (h-0 grow) موتورِ اسکرولِ SimpleBarِ خودِ Unfold را می‌شکست → سایدبارِ
 * «خالی/کلیپ‌شده». رفتارِ اسکرول/لایه به بومیِ Unfold برگشت؛ کارت‌های v30 دست‌نخورده. ==== */
