/* ==========================================================================
   چله زیباریس — تم رسمی چله
   متغیرها و کلاس‌های `ch-*` دقیقاً از فایل تم چله آمده‌اند.
   کلاس‌های `zb-*` پوستهٔ ماژول‌های زیباریس‌اند و روی همان متغیرها سوارند،
   تا یک تغییر رنگ در `:root` همه‌جا اثر کند.
   ========================================================================== */

:root {
  --ch-primary: #7c3aed; --ch-pink: #ec4899; --ch-orange: #f97316;
  --ch-teal: #14b8a6; --ch-yellow: #facc15; --ch-blue: #3b82f6;
  --ch-bg: #f4f2fb; --ch-card: #ffffff; --ch-text: #2b2440;
  --ch-muted: #8a84a3; --ch-border: rgba(124, 58, 237, .10);
  --ch-shadow: 0 10px 30px -12px rgba(124, 58, 237, .25);
  --ch-sidebar: linear-gradient(180deg, #7c3aed 0%, #a855f7 55%, #ec4899 100%);
  --ch-grid: rgba(43, 36, 64, .08);
  --ch-gradient: linear-gradient(135deg, #7c3aed, #ec4899);
  --ch-sidebar-w: 262px;
}

[data-bs-theme="dark"] {
  --ch-bg: #131022; --ch-card: #1d1832; --ch-text: #efeaff;
  --ch-muted: #9d95bd; --ch-border: rgba(168, 85, 247, .18);
  --ch-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --ch-sidebar: linear-gradient(180deg, #241b47 0%, #31175a 55%, #511049 100%);
  --ch-grid: rgba(239, 234, 255, .08);
}

/* پوستهٔ لایهٔ مدیریت — عمداً سرد و جدی، تا با سامانهٔ روزمره اشتباه نشود */
body.manage-shell {
  --ch-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 60%, #334155 100%);
  --ch-primary: #0ea5e9;
  --ch-gradient: linear-gradient(135deg, #0ea5e9, #6366f1);
  --ch-border: rgba(14, 165, 233, .14);
  --ch-shadow: 0 10px 30px -12px rgba(15, 23, 42, .3);
}
body.manage-shell[data-shell="manage"] .blob { display: none; }

* { font-family: 'Vazirmatn', Tahoma, sans-serif; }
body {
  background: var(--ch-bg); color: var(--ch-text);
  overflow-x: hidden; margin: 0; font-size: .92rem;
  transition: background .5s ease, color .5s ease;
}

/* ------------------------------------------------------------- بلاب‌ها */
.blob {
  position: fixed; border-radius: 50%; filter: blur(90px); opacity: .35;
  z-index: 0; pointer-events: none;
  animation: chFloat 14s ease-in-out infinite alternate;
}
.blob-1 { width: 420px; height: 420px; background: #a855f7; top: -120px; right: -120px; }
.blob-2 { width: 360px; height: 360px; background: #ec4899; bottom: -100px; left: 22%; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: #14b8a6; top: 35%; right: 30%; animation-delay: -9s; }
@keyframes chFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, -40px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ------------------------------------------------------------ لوگو */
.chelle-logo { display: inline-block; line-height: 0; }
.chelle-logo svg { width: 100%; height: 100%; display: block; }
.chelle-logo .mark { fill: url(#chGrad); }
.logo-float { animation: chLogoFloat 5s ease-in-out infinite; }
@keyframes chLogoFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(6deg); } }
.logo-spin { animation: chLogoSpin 2.4s cubic-bezier(.6, .1, .3, 1) infinite; }
@keyframes chLogoSpin { 0% { transform: rotate(0) scale(.9); } 50% { transform: rotate(180deg) scale(1.08); } 100% { transform: rotate(360deg) scale(.9); } }

/* --------------------------------------------------------- لودر صفحه */
.page-loader {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #2a1a52 0%, #17102e 70%);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s ease;
}
.page-loader.show { opacity: 1; visibility: visible; }
.loader-core { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.loader-core .ring1, .loader-core .ring2 { position: absolute; border-radius: 50%; border: 3px solid transparent; }
.loader-core .ring1 { width: 150px; height: 150px; border-top-color: #a855f7; border-right-color: #ec4899; animation: chSpin 1.1s linear infinite; }
.loader-core .ring2 { width: 118px; height: 118px; border-bottom-color: #14b8a6; border-left-color: #facc15; animation: chSpin 1.5s linear infinite reverse; }
@keyframes chSpin { to { transform: rotate(360deg); } }
.loader-core .chelle-logo { width: 74px; height: 74px; }
.loader-word {
  position: absolute; bottom: -46px; font-weight: 800; letter-spacing: 2px; color: #efeaff;
  background: linear-gradient(90deg, #a855f7, #ec4899, #14b8a6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ------------------------------------------------------------ سایدبار */
.sidebar {
  position: fixed; inset-block: 0; right: 0; width: var(--ch-sidebar-w);
  background: var(--ch-sidebar); color: #fff; z-index: 1040;
  padding: 1.3rem 1rem; display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.7, 0, .3, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, .15); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.3rem;
  color: #fff; text-decoration: none; }
.brand small { font-size: .68rem; font-weight: 500; opacity: .8; display: block; }
.brand-badge {
  width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; backdrop-filter: blur(6px); padding: 6px; flex: none;
  animation: chPulse 3s ease-in-out infinite;
}
.brand-badge .chelle-logo { width: 100%; height: 100%; }
.brand-badge .mark { fill: #fff; }
@keyframes chPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }

.nav-ch { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.nav-ch a {
  color: rgba(255, 255, 255, .82); text-decoration: none; padding: .62rem .9rem;
  border-radius: 13px; display: flex; align-items: center; gap: .7rem;
  font-weight: 500; transition: all .3s ease; position: relative; overflow: hidden;
}
.nav-ch a i { font-size: 1.12rem; transition: transform .3s; width: 20px; text-align: center; }
.nav-ch a:hover { background: rgba(255, 255, 255, .14); color: #fff; transform: translateX(-6px); }
.nav-ch a:hover i { transform: rotate(-12deg) scale(1.2); }
.nav-ch a.active { background: rgba(255, 255, 255, .22); color: #fff; font-weight: 700; }
.nav-ch a.active::before { content: ""; position: absolute; right: 0; top: 18%; height: 64%; width: 4px; border-radius: 4px; background: var(--ch-yellow); }
.nav-ch .badge { margin-inline-start: auto; }
.nav-sep { font-size: .7rem; opacity: .7; padding: 1rem .9rem .3rem; letter-spacing: .5px; }
.side-foot { margin-top: auto; background: rgba(255, 255, 255, .13); border-radius: 16px; padding: .8rem; text-align: center; backdrop-filter: blur(8px); }
.side-foot a { color: #fff; text-decoration: none; }

/* ------------------------------------------------------------- بدنه */
.main { margin-right: var(--ch-sidebar-w); position: relative; z-index: 1; padding: 1.2rem 1.4rem 3rem; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.show { transform: none; }
  .main { margin-right: 0; padding: .9rem .8rem 3rem; }
  .sidebar-backdrop.show { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1035; }
}

/* ------------------------------------------------------------ تاپ‌بار */
/* تاپ‌بار یک ردیف است: عنوان سمت راست، ابزارها سمت چپ.
   نبودِ `display:flex` باعث می‌شد عنوان، زیرعنوان و دکمه‌ها زیر هم
   بیفتند و نوار سه‌طبقه شود. */
.topbar {
  background: color-mix(in srgb, var(--ch-card) 75%, transparent);
  backdrop-filter: blur(14px); border: 1px solid var(--ch-border);
  border-radius: 20px; padding: .7rem 1.1rem; box-shadow: var(--ch-shadow);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  /* `backdrop-filter` یک «زمینهٔ چیدمان» تازه می‌سازد. بدون z-index صریح،
     منوی کشویی پروفایل زیرِ کارت‌های آمارِ بعد از تاپ‌بار می‌افتد و
     عملاً غیرقابل استفاده می‌شود — چیزی که در مرورگر دیده شد. */
  position: relative; z-index: 30;
}
/* منوی کشویی باید از هر چیزی در صفحه بالاتر بیاید، حتی کارت‌های چسبان. */
.topbar .dropdown-menu { z-index: 1061; }
/* بلوک عنوان باید بتواند کوچک شود، وگرنه زیرعنوانِ بلند دکمه‌ها را
   به سطر بعد هل می‌دهد. */
.topbar > div:not(.ms-auto) { min-width: 0; flex: 1 1 auto; }
.topbar .section-title { margin-bottom: 0; }
.topbar .zb-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* گروه ابزارها خودش هم فلکس می‌شود و به کلاس `d-flex` بوت‌استرپ تکیه
   نمی‌کند: این نوار مهم‌ترین چیزِ هر صفحه است و نباید چیدمانش به بار
   شدنِ یک فایل بیرونی بند باشد. */
.topbar .ms-auto {
  flex: 0 0 auto; display: flex; align-items: center;
  gap: .5rem; flex-wrap: wrap; justify-content: flex-end;
}
@media (max-width: 575.98px) {
  .topbar { padding: .6rem .8rem; }
  .topbar .zb-hint { white-space: normal; }
}
.search-box { background: var(--ch-bg); border-radius: 14px; padding: .45rem .9rem; display: flex; align-items: center; gap: .5rem; min-width: 220px; }
.search-box input { border: 0; background: transparent; outline: 0; color: var(--ch-text); width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--ch-border);
  background: var(--ch-card); color: var(--ch-text); display: grid; place-items: center;
  position: relative; transition: all .3s;
}
.icon-btn:hover { transform: translateY(-3px) rotate(-6deg); box-shadow: var(--ch-shadow); color: var(--ch-primary); }
.icon-btn .dot { position: absolute; top: 8px; left: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--ch-pink); animation: chBlink 1.6s infinite; }
@keyframes chBlink { 50% { opacity: .2; } }
.theme-toggle { width: 64px; height: 34px; border-radius: 99px; border: 0; position: relative; cursor: pointer; background: linear-gradient(90deg, #facc15, #f97316); transition: background .5s; }
[data-bs-theme="dark"] .theme-toggle { background: linear-gradient(90deg, #312e81, #6d28d9); }
.theme-toggle .knob { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .95rem; transition: transform .5s cubic-bezier(.68, -.4, .32, 1.4); }
[data-bs-theme="dark"] .theme-toggle .knob { transform: translateX(-30px); }

/* ------------------------------------------------------------- کارت‌ها */
.card-ch, .zb-card {
  background: var(--ch-card); border: 1px solid var(--ch-border);
  border-radius: 22px; box-shadow: var(--ch-shadow); padding: 1.1rem;
  transition: transform .35s ease, box-shadow .35s ease;
}
.card-ch:hover { transform: translateY(-6px); box-shadow: 0 22px 45px -15px rgba(124, 58, 237, .35); }
.zb-card + .zb-card { margin-top: .9rem; }
.zb-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .85rem; flex-wrap: wrap; }
.zb-card-head h1, .zb-card-head h2 { font-size: 1.05rem; margin: 0; font-weight: 800; }
.zb-hint { color: var(--ch-muted); font-size: .82rem; }
.text-muted-2 { color: var(--ch-muted); }

.stat-card { position: relative; overflow: hidden; color: #fff; border: 0; border-radius: 22px; padding: 1rem; }
.stat-card::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .16); top: -60px; right: -40px; }
.stat-card::before { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .12); bottom: -40px; left: -25px; }
.stat-card .display-num { font-size: 1.9rem; font-weight: 800; line-height: 1.15; }
.stat-card a, .stat-card .opacity-75 { color: #fff; }
.stat-icon { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 1.5rem; backdrop-filter: blur(4px); }
.g-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.g-pink { background: linear-gradient(135deg, #ec4899, #f472b6); }
.g-orange { background: linear-gradient(135deg, #f97316, #fbbf24); }
.g-teal { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.g-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.g-red { background: linear-gradient(135deg, #dc2626, #f87171); }
.g-slate { background: linear-gradient(135deg, #475569, #94a3b8); }
.trend { font-size: .74rem; background: rgba(255, 255, 255, .22); border-radius: 99px;
  padding: .15rem .6rem; display: inline-block; max-width: 100%; line-height: 1.7;
  white-space: normal; }
.stat-card > div { position: relative; z-index: 1; }
/* بدون `min-width:0`، ستون متنِ فلکس کوچک‌تر از محتوایش نمی‌شود و
   نوشتهٔ بلند از کارت بیرون می‌زند. */
.stat-card > div > div:first-child { min-width: 0; }
.stat-card .display-num + .trend { margin-top: .15rem; }

/* کارت آمار سادهٔ داخلی (غیر گرادیانی) */
.zb-stat { background: var(--ch-card); border: 1px solid var(--ch-border); border-radius: 18px; padding: .85rem 1rem; height: 100%; }
.zb-stat .n { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.zb-stat .t { color: var(--ch-muted); font-size: .8rem; }

.section-title { font-weight: 800; display: flex; align-items: center; gap: .55rem; }
.section-title .bar { width: 6px; height: 26px; border-radius: 6px; background: var(--ch-gradient); }
.chip { border-radius: 99px; font-size: .78rem; padding: .3rem .8rem; font-weight: 600; display: inline-block; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; border: 2px solid var(--ch-card); }
.avatar-stack { display: flex; } .avatar-stack .avatar { margin-inline-start: -10px; }
.progress-slim { height: 8px; border-radius: 99px; background: var(--ch-grid); }
.progress-slim .progress-bar { border-radius: 99px; transition: width 1.4s cubic-bezier(.3, .9, .3, 1); }
/* ظاهر شدنِ تدریجی — فقط وقتی جاوااسکریپت زنده است.
   بدون شرطِ `body.js-reveal`، اگر اسکریپت بارگذاری نشود یا IntersectionObserver
   نباشد، کارت‌ها برای همیشه نامرئی می‌مانند و کاربر صفحه‌ای خالی می‌بیند. */
body.js-reveal .reveal { opacity: 0; transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease; }
body.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------- جدول */
.zb-table-wrap, .table-responsive { overflow-x: auto; }
.zb-table, .table-ch { width: 100%; margin: 0; font-size: .88rem; --bs-table-bg: transparent; }
.zb-table th { font-weight: 600; font-size: .8rem; color: var(--ch-muted); white-space: nowrap; border-bottom: 1px solid var(--ch-border); padding: .5rem .6rem; text-align: start; }
.zb-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--ch-border); vertical-align: middle; }
.zb-table tbody tr, .table-ch tbody tr { transition: background .25s; }
.zb-table tbody tr:hover, .table-ch tbody tr:hover { background: color-mix(in srgb, var(--ch-primary) 7%, transparent); }

/* ------------------------------------------------- ماتریس دسترسی */
.zb-matrix-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--ch-border); border-radius: 18px; }
.zb-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.zb-matrix thead th { position: sticky; top: 0; z-index: 3; background: var(--ch-card); border-bottom: 2px solid var(--ch-border); padding: .55rem .7rem; text-align: start; }
.zb-matrix td, .zb-matrix th { padding: .45rem .7rem; border-bottom: 1px solid var(--ch-border); }
.zb-matrix .perm-cell { min-width: 260px; }
.zb-matrix .mod-row td { background: color-mix(in srgb, var(--ch-primary) 8%, transparent); font-weight: 700; position: sticky; top: 38px; z-index: 2; }
.zb-matrix .sec-row td { color: var(--ch-muted); font-size: .8rem; padding-top: .6rem; }
.zb-matrix tr.hidden-row { display: none; }
.badge-sensitive { background: #fef3c7; color: #92400e; }
.badge-danger-soft { background: #fee2e2; color: #991b1b; }
[data-bs-theme="dark"] .badge-sensitive { background: #4a3a10; color: #fde68a; }
[data-bs-theme="dark"] .badge-danger-soft { background: #4a1616; color: #fecaca; }

/* ------------------------------------------------------ تایم‌لاین */
.timeline { position: relative; padding-right: 1.4rem; }
.timeline::before { content: ""; position: absolute; right: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--ch-primary), var(--ch-pink)); }
.t-item { position: relative; padding-bottom: 1rem; }
.t-item .t-dot { position: absolute; right: -1.4rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ch-card); }

/* --------------------------------------------- نوار مراحل سفارش */
.flow { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .6rem; }
.flow-step { flex: 1 0 auto; min-width: 108px; text-align: center; padding: .55rem .4rem; border-radius: 14px; border: 1px solid var(--ch-border); background: var(--ch-card); position: relative; }
.flow-step .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin: 0 auto .3rem; background: var(--ch-grid); color: var(--ch-muted); }
.flow-step .lb { font-size: .78rem; font-weight: 600; }
.flow-step .dt { font-size: .7rem; color: var(--ch-muted); }
.flow-step.done .ic { background: var(--ch-teal); color: #fff; }
.flow-step.current { border-color: var(--ch-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ch-primary) 15%, transparent); }
.flow-step.current .ic { background: var(--ch-gradient); color: #fff; }
.flow-step.cancelled .ic { background: #ef4444; color: #fff; }

/* --------------------------------------------------- جست‌وجوی آژاکس */
.ac-wrap { position: relative; }
.ac-results { position: absolute; inset-inline: 0; top: 100%; z-index: 1050; background: var(--ch-card); border: 1px solid var(--ch-border); border-radius: 14px; max-height: 280px; overflow-y: auto; display: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
.ac-item { padding: .5rem .75rem; cursor: pointer; }
.ac-item small { color: var(--ch-muted); }
.ac-item:hover, .ac-item.active { background: color-mix(in srgb, var(--ch-primary) 12%, transparent); }

/* ------------------------------------------------------------- ورود */
.zb-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; position: relative; z-index: 1; }
.zb-login-card { background: var(--ch-card); border: 1px solid var(--ch-border); border-radius: 24px; padding: 1.9rem 1.6rem; width: 100%; max-width: 390px; box-shadow: 0 20px 55px -18px rgba(124, 58, 237, .45); }

/* ------------------------------------------------------------ ریزه‌کاری */
.zb-messages { margin-bottom: .8rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--ch-card); border-top: 1px solid var(--ch-border); padding: .75rem 0; margin-top: .9rem; display: flex; gap: .5rem; flex-wrap: wrap; z-index: 5; }
.form-label { font-size: .84rem; font-weight: 600; margin-bottom: .25rem; }
.form-text { font-size: .76rem; color: var(--ch-muted); }
.form-control, .form-select { border-radius: 13px; border-color: var(--ch-border); background: var(--ch-bg); color: var(--ch-text); }
.form-control:focus, .form-select:focus { background: var(--ch-card); border-color: var(--ch-primary); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--ch-primary) 18%, transparent); color: var(--ch-text); }
.btn { border-radius: 13px; }
.btn-zb { background: var(--ch-gradient); color: #fff; border: none; }
.btn-zb:hover { filter: brightness(1.08); color: #fff; }
.alert { border-radius: 16px; }
.dropdown-menu { border-radius: 16px; border-color: var(--ch-border); box-shadow: var(--ch-shadow); }
.pagination .page-link { border-radius: 10px; margin: 0 2px; border-color: var(--ch-border); color: var(--ch-text); background: var(--ch-card); }
.pagination .page-item.active .page-link { background: var(--ch-primary); border-color: var(--ch-primary); color: #fff; }
@media (max-width: 575.98px) { .zb-hide-xs { display: none !important; } }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--ch-primary), var(--ch-pink)); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* نوار هشدار لایهٔ مدیریت */
.manage-banner {
  background: linear-gradient(90deg, #0f172a, #334155); color: #e2e8f0;
  border-radius: 0 0 18px 18px; padding: .7rem 1.2rem;
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  /* سایدبار ثابت است؛ بدون این حاشیه، ابتدای جمله زیرش پنهان می‌شود. */
  margin-right: var(--ch-sidebar-w); position: relative; z-index: 2;
}
@media (max-width: 991.98px) { .manage-banner { margin-right: 0; } }
.manage-banner a { color: #7dd3fc; }

/* ---------------------------------------------------------------- عمومی
   صفحه‌هایی که بدون ورود باز می‌شوند: لینک تأیید نمونه و ورود پرتال.
   مخاطبشان با موبایل می‌آید و شاید اولین بارش باشد — پس بزرگ، ساده، و
   بدون هیچ عنصری که به سامانهٔ داخلی راه بدهد. */
body.public-shell { background: var(--ch-bg); }
.public-wrap { max-width: 560px; margin: 0 auto; padding: 1.2rem 1rem 3rem;
  position: relative; z-index: 1; }
.public-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.public-head .brand-badge { width: 46px; height: 46px; }
.public-foot { text-align: center; color: var(--ch-muted); font-size: .78rem;
  margin-top: 1.6rem; }
.public-card { background: var(--ch-card); border: 1px solid var(--ch-border);
  border-radius: 22px; padding: 1.3rem; box-shadow: var(--ch-shadow); }
.public-card + .public-card { margin-top: .9rem; }
.sample-photo { width: 100%; border-radius: 18px; border: 1px solid var(--ch-border);
  display: block; }
.swatch-lg { width: 100%; height: 120px; border-radius: 18px;
  border: 1px solid var(--ch-border); }
/* گزینه‌های تصمیم — بزرگ و انگشت‌خور، نه رادیوی ریز */
.choice-list { display: grid; gap: .6rem; }
.choice-list label { display: flex; align-items: center; gap: .6rem;
  border: 2px solid var(--ch-border); border-radius: 16px; padding: .8rem 1rem;
  cursor: pointer; font-weight: 600; transition: border-color .2s, background .2s; }
.choice-list input { margin: 0; }
.choice-list label:hover { border-color: var(--ch-primary); }
.choice-list input:checked + span { color: var(--ch-primary); }
.choice-list label:has(input:checked) { border-color: var(--ch-primary);
  background: color-mix(in srgb, var(--ch-primary) 8%, transparent); }
.otp-input { letter-spacing: .6rem; text-align: center; font-size: 1.5rem; }

/* پوستهٔ پرتال مشتری — همان رنگ چله، ولی بدون سایدبار */
body.portal-shell { background: var(--ch-bg); }
.portal-wrap { max-width: 920px; margin: 0 auto; padding: 1rem 1rem 3rem;
  position: relative; z-index: 1; }
.portal-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.portal-nav a { border-radius: 99px; padding: .4rem .9rem; font-size: .86rem;
  font-weight: 600; text-decoration: none; color: var(--ch-text);
  background: var(--ch-card); border: 1px solid var(--ch-border); }
.portal-nav a.active { background: var(--ch-gradient); color: #fff; border-color: transparent; }

/* ------------------------------------------------------------- گزارش‌ها */
/* آیکون کارت گزارش: `.stat-icon` پس‌زمینهٔ شیشه‌ای دارد و روی کارت سفید
   دیده نمی‌شود؛ این یکی رنگ سازمانی را کم‌رنگ می‌گیرد. */
.report-icon { width: 48px; height: 48px; border-radius: 15px; flex: none;
  display: grid; place-items: center; font-size: 1.35rem;
  color: var(--ch-primary);
  background: color-mix(in srgb, var(--ch-primary) 12%, transparent); }
a.zb-card { color: inherit; transition: transform .15s, box-shadow .15s; }
a.zb-card:hover { transform: translateY(-2px); box-shadow: var(--ch-shadow);
  border-color: color-mix(in srgb, var(--ch-primary) 35%, transparent); }
.zb-table tr.table-danger-soft > td { background: color-mix(in srgb, #ef4444 8%, transparent); }
[data-bs-theme="dark"] .zb-table tr.table-danger-soft > td { background: rgba(239, 68, 68, .14); }

/* ------------------------------------------------------------ PWA/آفلاین */
.zb-offline-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 1080;
  background: #b45309; color: #fff; padding: .55rem .9rem; font-size: .84rem;
  text-align: center; transform: translateY(110%); transition: transform .25s; }
.zb-offline-bar.show { transform: none; }
@media print { .zb-offline-bar { display: none !important; } }

/* ------------------------------------------------- جابه‌جایی با کشیدن */
/* ردیف‌های قابل مرتب‌سازی (مراحل تولید). دستگیره جداست تا کشیدن با
   ورودی‌های داخل ردیف تداخل نکند، و دکمه‌های بالا/پایین هم هست چون
   کشیدن روی موبایل و با صفحه‌کلید کار نمی‌کند. */
.drag-handle { cursor: grab; color: var(--ch-muted); font-size: 1.1rem; line-height: 1; }
.drag-handle:active { cursor: grabbing; }
tr.zb-dragging { opacity: .45; }
tr.zb-drop-before td { box-shadow: inset 0 3px 0 0 var(--ch-primary); }
tr.zb-drop-after td { box-shadow: inset 0 -3px 0 0 var(--ch-primary); }
.zb-move { border: 0; background: transparent; color: var(--ch-muted); padding: 0 .15rem;
  line-height: 1; cursor: pointer; }
.zb-move:hover { color: var(--ch-primary); }
