/* انوشاکو | مسیر هوشمند تجارت — نسخه آزمایشی v0.5 beta
   فونت ۹ وزنه Peyda، تم روشن/تاریک، کارت‌پیکر، افکت بلور خودرو، نوتیفیکیشن و PWA */

:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --card: #ffffff;
  --surface-2: #f8fafc;
  --soft: rgba(37, 99, 235, 0.10);
  --surface-hover: #f1f5f9;
  --sidebar: #081226;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.10);
  --primary-ring: rgba(37, 99, 235, 0.22);
  --navy: #0a1f3c;
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.11);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.10);
  --wa: #16a34a;
  --wa-soft: rgba(22, 163, 74, 0.11);
  --tg: #0284c7;
  --tg-soft: rgba(2, 132, 199, 0.11);
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px rgba(8, 18, 38, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
}

body.dark {
  --bg: #070d1a;
  --surface: #111d35;
  --card: #111d35;
  --surface-2: #172644;
  --surface-hover: #1e3156;
  --soft: rgba(59, 130, 246, 0.16);
  --sidebar: #050a14;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --border: #233558;
  --border-strong: #324a76;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --primary-ring: rgba(59, 130, 246, 0.30);
  --navy: #f1f5f9;
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);
  --wa: #22c55e;
  --wa-soft: rgba(34, 197, 94, 0.15);
  --tg: #38bdf8;
  --tg-soft: rgba(56, 189, 248, 0.16);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'peyda', 'Peyda(FaNum)', 'PeydaFaNum', Tahoma, sans-serif;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

button, input, select, textarea, optgroup, option {
  font-family: inherit;
}

.ico-svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.hidden-perm { display: none !important; }

/* ==================== صفحه ورود ==================== */
.login-screen {
  display: none; position: fixed; inset: 0; z-index: 800;
  background: radial-gradient(circle at 20% 20%, #173c73 0%, #091830 52%, #050a14 100%);
  align-items: center; justify-content: center; padding: 16px;
}
.login-screen.show { display: flex; }
.login-card {
  width: 100%; max-width: 396px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo-img {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
  margin: 0 auto 12px; display: block;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36); border: 1px solid rgba(255, 255, 255, 0.14);
}
.login-logo h1 { margin: 0; font-size: 21px; font-weight: 900; color: var(--navy); }
.login-logo p { margin: 4px 0 0; font-size: 12px; font-weight: 400; color: var(--muted); }
.login-err {
  display: none; background: var(--red-soft); color: var(--red); border: 1px solid rgba(220, 38, 38, 0.22);
  padding: 9px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; margin-bottom: 14px;
}

/* ==================== چیدمان اصلی و سایدبار خلوت ==================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 242px; background: var(--sidebar); color: #e2e8f0;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; border-left: 1px solid var(--sidebar-border);
}
.brand {
  padding: 18px 16px; border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.brand-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark-img {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38); border: 1px solid rgba(255, 255, 255, 0.16);
}
.brand h1 { margin: 0; font-size: 16.5px; font-weight: 900; color: #fff; line-height: 1.2; }
.brand small { display: block; font-size: 10.5px; font-weight: 300; color: #94a3b8; margin-top: 2px; }
.ver-pill {
  background: rgba(245, 158, 11, 0.16); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.32);
  font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; direction: ltr; white-space: nowrap;
}

.nav { padding: 14px 10px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-sep { height: 1px; background: var(--sidebar-border); margin: 10px 6px; }
.nav button {
  width: 100%; background: transparent; border: 1px solid transparent; color: #cbd5e1;
  text-align: right; padding: 10px 12px; border-radius: 10px; font-family: inherit;
  font-size: 12.8px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background .16s ease, color .16s ease, transform .16s ease, border-color .16s ease;
}
.nav button .ico-svg { opacity: 0.78; transition: opacity .16s; }
.nav button:hover { background: var(--sidebar-hover); color: #fff; transform: translateX(-2px); }
.nav button:hover .ico-svg { opacity: 1; }
.nav button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.34); border-color: rgba(255, 255, 255, 0.12);
}
.nav button.active .ico-svg { opacity: 1; }
.nav button.admin-nav-btn { color: #fcd34d; }
.nav button.admin-nav-btn.active {
  background: linear-gradient(135deg, #0f294a, #1d4ed8); color: #fff;
}
.nav-badge {
  margin-right: auto; font-size: 10.5px; font-weight: 800; padding: 1px 7px;
  border-radius: 99px; background: rgba(255, 255, 255, 0.12); color: #e2e8f0;
}
.nav-badge.warn { background: rgba(239, 68, 68, 0.24); color: #fca5a5; }
.nav button.active .nav-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

.sb-foot {
  padding: 12px 14px; border-top: 1px solid var(--sidebar-border);
  font-size: 11px; color: #94a3b8; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.sb-user-meta { min-width: 0; }
.sb-role-tag {
  display: inline-block; font-size: 9.8px; font-weight: 700; color: #93c5fd;
  background: rgba(59, 130, 246, 0.16); padding: 1px 7px; border-radius: 99px; margin-top: 2px;
}
.sb-foot-acts { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.sb-mini-btn {
  background: rgba(255, 255, 255, 0.08); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.12);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.sb-mini-btn:hover { background: var(--primary); color: #fff; border-color: transparent; }
.logout-btn {
  background: rgba(239, 68, 68, 0.14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.logout-btn:hover { background: #dc2626; color: #fff; border-color: transparent; }

/* ==================== هدر بالا ==================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 11px 22px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 60;
}
.top-right { display: flex; align-items: center; gap: 12px; }
.topbar h2 { margin: 0; font-size: 15.5px; color: var(--navy); font-weight: 800; }
.cmd-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  padding: 6px 12px; border-radius: 10px; font-size: 12px; cursor: pointer;
  transition: border-color .16s, box-shadow .16s, color .16s, background .16s;
}
.cmd-trigger:hover {
  border-color: var(--primary); color: var(--text); background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.kbd {
  background: var(--surface); border: 1px solid var(--border); padding: 1px 6px;
  border-radius: 5px; font-size: 10px; font-family: 'peyda', Tahoma, sans-serif; color: var(--muted);
}
.top-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* ==================== دکمه‌ها ==================== */
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 8px 13px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3), 0 4px 12px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.34);
}
.btn-navy {
  background: linear-gradient(180deg, #163059 0%, #0a1f3c 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(10, 31, 60, 0.24);
}
.btn-navy:hover { box-shadow: 0 6px 16px rgba(10, 31, 60, 0.32); }
.btn-green {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(5, 150, 105, 0.25);
}
.btn-green:hover { box-shadow: 0 6px 18px rgba(5, 150, 105, 0.34); }
.btn-wa {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(22, 163, 74, 0.24);
}
.btn-wa:hover { box-shadow: 0 6px 18px rgba(22, 163, 74, 0.34); }
.btn-tg {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(2, 132, 199, 0.24);
}
.btn-tg:hover { box-shadow: 0 6px 18px rgba(2, 132, 199, 0.34); }
.btn-soft {
  background: var(--surface); color: var(--text-2); border-color: var(--border); box-shadow: var(--shadow-xs);
}
.btn-soft:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-soft-primary { background: var(--primary-soft); color: var(--primary); }
.btn-soft-primary:hover { background: var(--primary); color: #fff; }
.btn-soft-green { background: var(--green-soft); color: var(--green); }
.btn-soft-green:hover { background: var(--green); color: #fff; }
.btn-soft-wa { background: var(--wa-soft); color: var(--wa); }
.btn-soft-wa:hover { background: var(--wa); color: #fff; }
.btn-soft-tg { background: var(--tg-soft); color: var(--tg); }
.btn-soft-tg:hover { background: var(--tg); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-danger-solid { background: linear-gradient(180deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 2px 10px rgba(220, 38, 38, 0.26); }
.btn-danger-solid:hover { box-shadow: 0 6px 18px rgba(220, 38, 38, 0.36); }
.btn-sm { padding: 5px 10px; font-size: 11.4px; border-radius: 8px; gap: 5px; }

.icon-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; box-shadow: var(--shadow-xs); position: relative;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.icon-btn:hover {
  transform: translateY(-1px); border-color: var(--primary); color: var(--primary);
  background: var(--primary-soft); box-shadow: var(--shadow-sm);
}
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.edit:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.icon-btn.del:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.icon-btn.wa:hover { border-color: var(--wa); color: var(--wa); background: var(--wa-soft); }
.icon-btn.tg:hover { border-color: var(--tg); color: var(--tg); background: var(--tg-soft); }
.icon-btn.green:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.icon-btn.amber:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.icon-btn.navy:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-hover); }

.notif-dot {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; display: none; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}
.notif-dot.show { display: inline-flex; }

.act-group { display: inline-flex; align-items: center; gap: 5px; }
.menu-toggle { display: none; }

/* ==================== نوتیفیکیشن پاپ‌اوور ==================== */
.notif-wrap { position: relative; }
.notif-popover {
  display: none; position: absolute; top: calc(100% + 10px); left: 0;
  width: 340px; max-width: 92vw; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  z-index: 300; overflow: hidden;
}
.notif-popover.open { display: block; animation: fadeIn .14s ease; }
.notif-head {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 12.8px; color: var(--navy);
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: flex-start; gap: 10px; transition: background .14s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--primary-soft); }
.notif-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--primary);
}
.notif-item.k-success .notif-ico { background: var(--green-soft); color: var(--green); }
.notif-item.k-bug .notif-ico { background: var(--red-soft); color: var(--red); }
.notif-item.k-deal .notif-ico { background: var(--primary-soft); color: var(--primary); }
.notif-title { font-weight: 700; font-size: 12px; color: var(--navy); }
.notif-body { font-size: 11.2px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.notif-time { font-size: 10.2px; color: var(--muted); margin-top: 4px; direction: ltr; text-align: right; }

/* بورد دوگانه CRM و عملیات مبدا */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  align-items: start;
}

.board-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.board-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.board-card.due-followup {
  border-color: var(--red);
}

.owner-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--soft);
  color: var(--primary);
}

/* ==================== محتوای اصلی و کارت‌ها ==================== */
.view-area { padding: 20px 22px 48px; max-width: 1420px; width: 100%; margin: 0 auto; }

.alert-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 15px; border-radius: 12px; font-size: 12.2px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.alert-pill .a-left { display: flex; align-items: center; gap: 9px; }
.alert-pill.amber { border-right: 4px solid var(--amber); }
.alert-pill.amber .a-ico { color: var(--amber); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kpi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.kpi.green .kpi-icon { background: var(--green-soft); color: var(--green); }
.kpi.amber .kpi-icon { background: var(--amber-soft); color: var(--amber); }
.kpi.red .kpi-icon { background: var(--red-soft); color: var(--red); }
.kpi .lbl { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi .val { font-size: 23px; font-weight: 900; color: var(--navy); margin: 2px 0 4px; direction: ltr; text-align: right; letter-spacing: -0.4px; }
.kpi .val.fa-val { direction: rtl; font-family: inherit; }
.kpi .sub { font-size: 11.2px; font-weight: 400; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.card-hdr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-hdr h3 { margin: 0; font-size: 14.5px; color: var(--navy); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-hdr h3 .ico-svg { color: var(--primary); }

/* ==================== هایپرلینک‌های سریع (مشتری، خودرو، پرونده) ==================== */
.entity-link {
  background: none; border: none; padding: 0; color: var(--navy);
  font-weight: 700; font-size: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  border-bottom: 1px dashed transparent;
  transition: color .14s, border-color .14s;
}
.entity-link:hover { color: var(--primary); border-bottom-color: var(--primary); }
.entity-link.subtle { color: var(--text-2); font-weight: 600; }
.entity-link.subtle:hover { color: var(--primary); }

/* ==================== کارت‌پیکر (جایگزین منوهای کشویی مشتری و خودرو) ==================== */
.picker-wrap { margin-top: 8px; }
.picker-search { margin-bottom: 8px; }
.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 9px;
  max-height: 240px; overflow-y: auto; padding: 2px;
}
.picker-card {
  position: relative; overflow: hidden; text-align: right;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 11px;
  padding: 10px 12px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.picker-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.picker-card.selected {
  border-color: var(--primary); background: var(--primary-soft);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.picker-card-thumb {
  width: 48px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.picker-card-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.picker-card-info { min-width: 0; flex: 1; }
.picker-card-title { font-weight: 700; font-size: 12.2px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-card-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-check {
  width: 20px; height: 20px; border-radius: 99px; flex-shrink: 0;
  background: var(--primary); color: #fff; display: none; align-items: center; justify-content: center;
}
.picker-card.selected .picker-check { display: inline-flex; }

/* گالری کارتی مشتریان/خودروها در بخش مالی */
.entity-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 10px; margin-bottom: 16px;
}
.entity-select-card {
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; text-align: right;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.entity-select-card:hover { border-color: var(--primary); transform: translateY(-1px); background: var(--surface); box-shadow: var(--shadow-sm); }
.entity-select-card.active {
  border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-ring);
}
.esc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 5px; }
.esc-name { font-weight: 800; font-size: 13px; color: var(--navy); }
.esc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.2px; color: var(--muted); }

/* ==================== نوار مدیریت سیستم (Admin Hub Tabs) ==================== */
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
  padding: 7px; box-shadow: var(--shadow-xs);
}
.admin-tab-btn {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.admin-tab-btn:hover { background: var(--surface-2); color: var(--text); }
.admin-tab-btn.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }
.admin-tab-badge {
  background: rgba(239, 68, 68, 0.16); color: var(--red); font-size: 10.2px;
  font-weight: 800; padding: 1px 6px; border-radius: 99px;
}
.admin-tab-btn.active .admin-tab-badge { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* ==================== دراور حساب‌ها ==================== */
.accounts-drawer {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); margin-bottom: 16px; overflow: hidden;
}
.accounts-drawer summary {
  list-style: none; cursor: pointer; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: 12.8px; color: var(--text-2); user-select: none;
}
.accounts-drawer summary::-webkit-details-marker { display: none; }
.accounts-drawer summary:hover { background: var(--surface-2); color: var(--navy); }
.accounts-drawer .sum-left { display: flex; align-items: center; gap: 8px; }
.accounts-drawer .chev { transition: transform .2s ease; color: var(--muted); }
.accounts-drawer[open] .chev { transform: rotate(180deg); }
.accounts-drawer-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }

.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.acc-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; transition: transform .16s, border-color .16s;
}
.acc-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.acc-card .name { font-size: 12px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.acc-card .bal { font-size: 20px; font-weight: 900; color: var(--navy); margin: 6px 0; direction: ltr; text-align: right; }
.acc-card .io { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 7px; }

/* ==================== جدول‌ها ==================== */
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 12.2px; }
th, td { border-bottom: 1px solid var(--border); padding: 10px 9px; text-align: center; white-space: nowrap; font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11.2px; }
tbody tr { transition: background .14s ease; }
tbody tr:hover td { background: var(--surface-hover); }
tbody tr.row-closed td { opacity: 0.72; }
tbody tr.row-inactive td { opacity: 0.56; }
tfoot td {
  background: var(--surface-2); font-weight: 800; color: var(--navy);
  border-top: 2px solid var(--border-strong); padding: 11px 9px;
}
.ltr { direction: ltr; font-family: 'peyda', Tahoma, Arial, sans-serif; }
.money-pill {
  display: inline-block; padding: 3px 10px; border-radius: 8px;
  font-weight: 800; font-size: 12.4px; direction: ltr; font-family: 'peyda', Tahoma, Arial, sans-serif;
}
.money-pill.due { background: var(--red-soft); color: var(--red); border: 1px solid rgba(220, 38, 38, 0.18); }
.money-pill.ok  { background: var(--green-soft); color: var(--green); border: 1px solid rgba(5, 150, 105, 0.18); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
}
.b-green { background: var(--green-soft); color: var(--green); }
.b-blue  { background: var(--primary-soft); color: var(--primary); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red   { background: var(--red-soft); color: var(--red); }
.b-gray  { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.b-closed { background: #0f294a; color: #93c5fd; border: 1px solid rgba(147, 197, 253, 0.25); }

.prog-wrap { width: 110px; margin: 0 auto; }
.prog-bg { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s ease; }
.prog-fill.green { background: var(--green); }
.prog-lbl { font-size: 10.4px; color: var(--muted); margin-top: 3px; direction: ltr; }

/* ==================== بورد مراحل Kanban ==================== */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 11px; overflow-x: auto; padding-bottom: 8px; }
.k-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; min-height: 280px; }
.k-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 2px solid var(--border); font-weight: 800; font-size: 12.4px; }
.k-cnt { background: var(--surface); border: 1px solid var(--border); padding: 1px 8px; border-radius: 99px; font-size: 11px; color: var(--muted); }
.k-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px; margin-bottom: 9px; box-shadow: var(--shadow-xs);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.k-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.k-card.has-photo { position: relative; overflow: hidden; padding-top: 12px; }
.k-card-blur-bg {
  position: absolute; top: 0; left: 0; right: 0; height: 74px;
  background-size: cover; background-position: center;
  filter: blur(11px) saturate(1.1); transform: scale(1.15);
  opacity: 0.32; z-index: 0; pointer-events: none;
}
body.dark .k-card-blur-bg { opacity: 0.40; }
.k-card-blur-fade {
  position: absolute; top: 0; left: 0; right: 0; height: 82px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, var(--surface) 95%);
}
body.dark .k-card-blur-fade {
  background: linear-gradient(180deg, rgba(15, 24, 44, 0.38) 0%, var(--surface) 95%);
}
.k-card-inner { position: relative; z-index: 2; }
.k-card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.k-card-thumb {
  width: 48px; height: 34px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border-strong); cursor: zoom-in; box-shadow: var(--shadow-xs);
}
.k-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.k-name { font-weight: 800; color: var(--navy); font-size: 12.6px; margin-bottom: 2px; }
.k-car { font-size: 11.2px; color: var(--muted); direction: ltr; text-align: right; margin-bottom: 8px; }
.k-money { display: flex; justify-content: space-between; font-size: 11.2px; margin-bottom: 6px; }
.k-acts { display: flex; gap: 5px; margin-top: 9px; align-items: center; }
.k-acts select { padding: 4px 6px; font-size: 11px; flex: 1; }

/* ==================== عکس خودرو با افکت بلور ==================== */
.car-cell { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.car-thumb {
  width: 44px; height: 30px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border-strong); cursor: zoom-in; background: var(--surface-2);
  box-shadow: var(--shadow-xs);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.car-thumb:hover { transform: scale(1.08); border-color: var(--primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28); }

.car-hover-preview {
  position: fixed; z-index: 990; display: none; pointer-events: none;
  width: 268px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 50px rgba(8, 18, 38, 0.45);
  background: #0b1326;
}
.car-hover-preview-stage {
  position: relative; width: 100%; height: 164px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.car-hover-preview-blur {
  position: absolute; inset: -16px; background-size: cover; background-position: center;
  filter: blur(16px) brightness(0.6) saturate(1.2); transform: scale(1.1);
}
.car-hover-preview-img {
  position: relative; z-index: 2; max-width: 92%; max-height: 90%;
  border-radius: 9px; object-fit: contain; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.car-hover-preview-cap {
  position: relative; z-index: 3; padding: 7px 11px; font-size: 11.4px; font-weight: 600;
  color: #f8fafc; background: rgba(8, 18, 38, 0.88); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}

.deal-hero {
  position: relative; border-radius: 13px; overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--border); min-height: 112px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px;
}
.deal-hero-bg {
  position: absolute; inset: -18px; background-size: cover; background-position: center;
  filter: blur(15px) saturate(1.15); transform: scale(1.08); z-index: 0;
}
.deal-hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(95deg, rgba(8, 18, 38, 0.86) 0%, rgba(10, 31, 60, 0.72) 55%, rgba(8, 18, 38, 0.56) 100%);
}
.deal-hero-body { position: relative; z-index: 2; color: #f8fafc; flex: 1; min-width: 0; }
.deal-hero-title { font-size: 16px; font-weight: 800; color: #ffffff; margin: 0 0 5px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
.deal-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.8px; color: #e2e8f0; }
.deal-hero-chip {
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
  padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600;
}
.deal-hero-thumb-wrap { position: relative; z-index: 2; flex-shrink: 0; }
.deal-hero-thumb {
  width: 126px; height: 84px; border-radius: 10px; object-fit: cover; cursor: zoom-in;
  border: 2px solid rgba(255, 255, 255, 0.35); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: transform .18s ease, border-color .18s ease;
}
.deal-hero-thumb:hover { transform: scale(1.04); border-color: #60a5fa; }
.deal-hero-cam {
  position: absolute; bottom: -6px; left: -6px;
  width: 28px; height: 28px; border-radius: 99px;
  background: #2563eb; color: #fff; border: 2px solid #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); transition: transform .15s, background .15s;
}
.deal-hero-cam:hover { transform: scale(1.08); background: #1d4ed8; }

.photo-upload-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px dashed var(--border-strong);
}
.photo-upload-preview {
  width: 78px; height: 54px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.photo-upload-preview img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }

/* پروفایل سریع مشتری/خودرو */
.profile-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; margin-bottom: 14px; }
.profile-kv {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
}
.profile-kv .k { font-size: 10.8px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.profile-kv .v { font-size: 12.5px; color: var(--navy); font-weight: 700; word-break: break-word; }

/* ==================== تب‌ها، سگمنت و فرم‌ها ==================== */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 9px; flex-wrap: wrap; }
.tabs button {
  background: transparent; border: 1px solid transparent; padding: 7px 13px; border-radius: 9px;
  font-size: 12.2px; font-weight: 700; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active { background: var(--primary-soft); color: var(--primary); border-color: rgba(37, 99, 235, 0.18); }

.seg-ctrl {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap;
}
.seg-ctrl button {
  background: transparent; border: none; padding: 5px 11px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: .15s;
}
.seg-ctrl button:hover { color: var(--text); }
.seg-ctrl button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }

input, select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 12.5px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.f-full { grid-column: 1 / -1; }
.f-lbl { display: block; font-size: 11.4px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.req-star { color: var(--red); margin-right: 2px; }

.strip { padding: 11px 14px; border-radius: 10px; font-size: 12.2px; font-weight: 600; line-height: 1.7; }
.strip.green { background: var(--green-soft); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.24); }
.strip.blue  { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.24); }
.strip.amber { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.28); }
.strip.muted { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

/* ==================== مودال‌ها ==================== */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(6, 12, 26, 0.62); backdrop-filter: blur(3px);
  z-index: 500; align-items: center; justify-content: center; padding: 14px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 590px; max-height: 90vh; overflow-y: auto; padding: 20px;
  box-shadow: var(--shadow-lg);
}
.modal.wide { max-width: 880px; }
.modal-hdr { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.modal-hdr h3 { margin: 0; font-size: 15px; color: var(--navy); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.close-x {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.close-x:hover { background: var(--red-soft); color: var(--red); border-color: rgba(220, 38, 38, 0.2); }
.modal-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); justify-content: flex-end; flex-wrap: wrap; }

.del-option {
  display: flex; align-items: flex-start; gap: 9px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .15s;
}
.del-option:hover { border-color: var(--primary); }
.del-option input { width: auto; margin-top: 3px; }

/* جستجوی Ctrl+K */
.cmd-list { max-height: 360px; overflow-y: auto; margin-top: 10px; }
.cmd-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .14s, transform .14s;
}
.cmd-item:hover { background: var(--primary-soft); transform: translateX(-2px); }

/* نمودار SVG با Hover */
.chart-box { width: 100%; overflow-x: auto; padding: 6px 0; position: relative; }
.chart-bar { cursor: pointer; transition: opacity .15s, filter .15s; }
.chart-bar:hover { filter: brightness(1.14); opacity: 0.92; }
.chart-tooltip {
  position: fixed; pointer-events: none; z-index: 980; display: none;
  background: #0f172a; color: #f8fafc; padding: 7px 11px; border-radius: 9px;
  font-size: 11.5px; font-weight: 700; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.legend { display: flex; gap: 18px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }

/* نقش‌ها و محدوده دید */
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.role-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 12px 14px; transition: border-color .16s;
}
.role-card:hover { border-color: var(--primary); }
.role-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.role-card p { margin: 0; font-size: 11.2px; color: var(--muted); line-height: 1.55; }
.origin-checks {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.origin-chk {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.origin-chk input { width: auto; margin: 0; }

/* لایت‌باکس، لودینگ، توست */
.lightbox-backdrop {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 10, 20, 0.86); backdrop-filter: blur(10px);
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox-backdrop.open { display: flex; animation: fadeIn .15s ease; }
.lightbox-card { position: relative; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-img {
  max-width: 90vw; max-height: 78vh; border-radius: 14px; object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65); border: 1px solid rgba(255, 255, 255, 0.16);
}
.lightbox-cap {
  color: #f8fafc; font-size: 13px; font-weight: 600;
  background: rgba(15, 23, 42, 0.8); padding: 6px 14px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.lightbox-close {
  position: absolute; top: -14px; left: -14px;
  width: 34px; height: 34px; border-radius: 99px;
  background: #0f172a; color: #fff; border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: #dc2626; border-color: transparent; }

.loader {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); backdrop-filter: blur(2px);
  z-index: 900; align-items: center; justify-content: center;
}
.loader.show { display: flex; }
.loader-card {
  background: var(--surface); border: 1px solid var(--border); padding: 16px 24px;
  border-radius: 14px; display: flex; align-items: center; gap: 12px;
  font-weight: 700; color: var(--navy); box-shadow: var(--shadow-md);
}
.spin { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 22px; left: 22px; background: #0f172a; color: #f8fafc;
  padding: 11px 16px; border-radius: 11px; font-size: 12.2px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 950; display: none; align-items: center; gap: 8px;
}
.toast.show { display: inline-flex; }

/* نوار پایین موبایل */
.mobile-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--surface); border-top: 1px solid var(--border); z-index: 120;
  grid-template-columns: repeat(4, 1fr); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.mobile-bar button {
  background: transparent; border: none; color: var(--muted); font-size: 10px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
.mobile-bar button.active { color: var(--primary); }

@media (max-width: 820px) {
  .sidebar { position: fixed; right: -265px; z-index: 400; transition: .2s; }
  .sidebar.open { right: 0; }
  .menu-toggle { display: inline-flex; }
  .cmd-trigger .kbd { display: none; }
  .f-grid { grid-template-columns: 1fr; }
  .view-area { padding: 12px 12px 78px; }
  .mobile-bar { display: grid; }
  .toast { bottom: 68px; left: 12px; right: 12px; justify-content: center; }
  [data-tip]::after { display: none; }
  .car-hover-preview { display: none !important; }
  .deal-hero { flex-direction: column; align-items: flex-start; }
  .deal-hero-thumb { width: 100%; height: 140px; }
}

/* بورد دوگانه CRM و عملیات مبدا */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  align-items: start;
}

.board-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.board-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.board-card.due-followup {
  border-color: var(--red);
}

.owner-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--soft);
  color: var(--primary);
}

/* نسخه v0.5.1 — کانبان تک‌ردیفه فشرده، هاور بزرگ‌نمایی و درگ‌انددراپ */
.kanban {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 10px;
  padding-bottom: 10px;
  align-items: flex-start;
}
.k-col {
  min-width: 220px;
  max-width: 245px;
  flex: 0 0 228px;
}
.k-col.drag-over {
  outline: 2px dashed var(--primary);
  background: var(--soft);
}
.board-card {
  padding: 7px 9px !important;
  margin-bottom: 6px !important;
  font-size: 11.2px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, z-index 0.16s ease;
  position: relative;
  cursor: grab;
}
.board-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
  z-index: 15;
}
.holiday-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--amber);
  font-weight: 600;
}


/* ==================== ارتقای رابط کاربری: لندینگ مینیمال، سایدبار بازشو، منوی همبرگری، کارت زیرمنو و موبایل ==================== */

/* سایدبار قابل باز و بسته شدن (دسکتاپ) */
.sidebar {
  transition: width 0.22s ease, right 0.24s ease;
}
.sidebar.collapsed {
  width: 68px;
}
.sidebar.collapsed .brand-left > div,
.sidebar.collapsed .ver-pill,
.sidebar.collapsed .nav button > span:not([data-ico]),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sb-user-meta {
  display: none !important;
}
.sidebar.collapsed .brand {
  padding: 14px 10px;
  justify-content: center;
}
.sidebar.collapsed .nav {
  padding: 12px 8px;
}
.sidebar.collapsed .nav button {
  justify-content: center;
  padding: 10px;
}
.sidebar.collapsed .sb-foot {
  padding: 10px 8px;
  justify-content: center;
}
.sidebar.collapsed .sb-foot-acts {
  flex-direction: column;
  gap: 6px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 38, 0.48);
  backdrop-filter: blur(2px);
  z-index: 390;
}
.sidebar-backdrop.open {
  display: block;
}

/* دکمه باز و بسته کردن سایدبار همیشه در دسترس */
.menu-toggle {
  display: inline-flex !important;
}

/* منوی همبرگری / کشویی (Topbar و ردیف‌ها/کارت‌ها) */
.hm-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.hm-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 196px;
  max-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 14px 34px rgba(15, 23, 42, 0.16));
  padding: 6px;
  z-index: 520;
  flex-direction: column;
  gap: 2px;
}
.hm-menu.align-right {
  left: auto;
  right: 0;
}
.hm-menu.open {
  display: flex;
  animation: hmFade 0.14s ease;
}
@keyframes hmFade {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hm-head {
  padding: 6px 10px 4px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.hm-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}
.hm-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.hm-item:hover {
  background: var(--soft);
  color: var(--primary);
}
.hm-item.danger {
  color: var(--red);
}
.hm-item.danger:hover {
  background: var(--red-soft);
}
.hm-item.success {
  color: var(--green);
}
.hm-item.success:hover {
  background: rgba(16, 185, 129, 0.12);
}

/* لندینگ پیج مینیمال و کاربردی */
.landing-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 4px 20px;
}
.landing-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 24px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.landing-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
}
.landing-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.landing-search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.landing-search-bar:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 13px;
}
.landing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
  font-family: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.landing-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.landing-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.landing-card-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  color: var(--primary);
}
.landing-card.c-green .landing-card-ico { background: rgba(16, 185, 129, 0.14); color: var(--green); }
.landing-card.c-amber .landing-card-ico { background: rgba(245, 158, 11, 0.14); color: var(--amber); }
.landing-card.c-red .landing-card-ico { background: rgba(239, 68, 68, 0.14); color: var(--red); }
.landing-card-stat {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
}
.landing-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.landing-card-desc {
  font-size: 11.6px;
  color: var(--muted);
  line-height: 1.55;
}

/* کارت‌های نمای کلی زیرمنوها (Submenu Overview Hub) */
.overview-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.overview-hdr h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--navy);
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.overview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  font-family: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.overview-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.overview-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.overview-card-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.overview-card.tone-green .overview-card-ico { background: rgba(16, 185, 129, 0.14); color: var(--green); }
.overview-card.tone-amber .overview-card-ico { background: rgba(245, 158, 11, 0.14); color: var(--amber); }
.overview-card.tone-red .overview-card-ico { background: rgba(239, 68, 68, 0.14); color: var(--red); }
.overview-card-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
}
.overview-card-lbl {
  font-size: 13.2px;
  font-weight: 800;
  color: var(--text);
}
.overview-card-sub {
  font-size: 11.4px;
  color: var(--muted);
}

.sub-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* نوار جستجو و دکمه ثبت دقیقاً در یک خط کنار هم */
.sub-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 440px;
}
.sub-toolbar input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.sub-toolbar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* درگ‌انددراپ زیباتر و کاربردی‌تر */
.kanban {
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.k-col {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  scroll-snap-align: start;
}
.k-col.drag-over {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: var(--primary) !important;
  outline: 2px dashed var(--primary);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.k-drop-hint {
  display: none;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.10);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 7px;
}
.k-col.drag-over .k-drop-hint {
  display: block;
}
.board-card.dragging,
.k-card.dragging {
  opacity: 0.48 !important;
  transform: rotate(-1.2deg) scale(0.97) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25) !important;
  cursor: grabbing !important;
}
.board-card .card-extra-hover {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.18s ease, opacity 0.18s ease, margin 0.18s ease;
}
.board-card:hover .card-extra-hover {
  max-height: 90px;
  opacity: 1;
  margin-top: 5px;
}

/* بهینه‌سازی کامل موبایل برای دسترسی به همه امکانات */
@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -280px;
    width: 268px !important;
    z-index: 410;
    transition: right 0.24s cubic-bezier(.22, .61, .36, 1);
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.28);
  }
  .sidebar.open {
    right: 0;
  }
  
  .topbar {
    padding: 8px 10px;
    gap: 8px;
  }
  .topbar h2 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
  }
  .cmd-trigger span:nth-child(2) {
    display: none;
  }
  .cmd-trigger {
    padding: 7px 9px;
  }
  .landing-hero {
    padding: 16px;
  }
  .landing-title {
    font-size: 17px;
  }
  .landing-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .landing-card,
  .overview-card {
    padding: 13px;
  }
  .sub-toolbar {
    max-width: 100%;
    width: 100%;
  }
  .sub-toolbar .btn {
    padding: 7px 10px;
    font-size: 11.5px;
  }
  .mobile-bar {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .board-card .card-extra-hover {
    max-height: 90px;
    opacity: 1;
    margin-top: 4px;
  }
  .modal {
    width: 96vw !important;
    max-height: 90vh;
    padding: 14px;
    border-radius: 14px;
  }
  .hm-menu {
    position: fixed;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 72px !important;
    max-width: none !important;
    min-width: 0 !important;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    z-index: 650;
  }
  .hm-item {
    padding: 11px 12px;
    font-size: 13.5px;
  }
}


/* ==================== لایه‌بندی الهام‌گرفته از دیجی‌کالا + منوی شناور Always-on-Top ==================== */

/* سایدبار به‌صورت کشوی اسلایدی در همه ابعاد (مثل دسته‌بندی‌های دیجی‌کالا) */
.sidebar {
  position: fixed !important;
  top: 0;
  bottom: 0;
  right: -285px !important;
  width: 268px !important;
  z-index: 460 !important;
  transition: right 0.24s cubic-bezier(.22, .61, .36, 1) !important;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.28);
}
.sidebar.open {
  right: 0 !important;
}

.main {
  width: 100%;
  min-width: 0;
}

/* هدر دوطبقه دیجی‌کالایی */
.dk-header {
  position: sticky;
  top: 0;
  z-index: 160;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.dk-top {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 62px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dk-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.dk-brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.dk-brand-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
}
.dk-brand-txt {
  font-size: 17px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.2px;
}
.dk-search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dk-search:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.dk-search-ph {
  flex: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dk-catbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--border);
}
.dk-catbar::-webkit-scrollbar { display: none; }
.dk-cat-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  padding: 10px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.14s ease;
}
.dk-cat-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 8px;
  left: 8px;
  height: 2.5px;
  border-radius: 99px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.16s ease;
}
.dk-cat-btn:hover,
.dk-cat-btn.active {
  color: var(--primary);
}
.dk-cat-btn:hover::after,
.dk-cat-btn.active::after {
  transform: scaleX(1);
}
.dk-cat-all {
  color: var(--text);
  font-weight: 800;
}
.dk-cat-div {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* منوی شناور Always-on-Top (مثل کلیک راست ویندوز) */
.hm-menu.floating-portal {
  position: fixed !important;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 9999 !important;
  max-height: min(76vh, 420px);
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24), 0 2px 8px rgba(15, 23, 42, 0.10) !important;
}

/* لندینگ دیجی‌کالایی: بنر + نوار آیکون‌های دایره‌ای سریع + قفسه کارت‌ها */
.dk-hero-banner {
  background: linear-gradient(135deg, #0a1f3c 0%, #1d4ed8 65%, #2563eb 100%);
  color: #fff;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 10px 28px rgba(29, 78, 216, 0.22);
}
.dk-hero-banner h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}
.dk-hero-banner p {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: #dbeafe;
}
.dk-quick-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.dk-quick-strip::-webkit-scrollbar { display: none; }
.dk-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 78px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  padding: 4px;
  transition: transform 0.14s ease;
}
.dk-quick-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
}
.dk-quick-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.dk-quick-item.q-green .dk-quick-circle { color: var(--green); background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.25); }
.dk-quick-item.q-amber .dk-quick-circle { color: var(--amber); background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.25); }
.dk-quick-item span {
  font-size: 11.4px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .dk-top {
    padding: 8px 12px;
    gap: 8px;
  }
  .dk-brand-txt { display: none; }
  .dk-search { padding: 8px 10px; }
  .dk-search .kbd { display: none; }
  .dk-catbar { display: none; }
  .dk-hero-banner { padding: 16px; }
  .dk-hero-banner h2 { font-size: 17px; }
  .hm-menu.floating-portal {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 72px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 16px;
    padding: 10px;
  }
}


/* ==================== فیلد رمز عبور حرفه‌ای: دکمه چشم، سنجش قدرت و چک‌لیست امنیتی ==================== */
.pw-field {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-field input {
  width: 100%;
  padding-right: 38px !important;
}
.pw-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.pw-eye-btn:hover {
  background: var(--soft);
  color: var(--primary);
}
.pw-caps-warn {
  display: none;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
}
.pw-caps-warn.show {
  display: block;
}
.pw-meter-box {
  margin-top: 8px;
  padding: 9px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pw-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
}
.pw-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.pw-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.18s ease;
}
.pw-bars.lvl-1 .pw-bar:nth-child(1) { background: var(--red); }
.pw-bars.lvl-2 .pw-bar:nth-child(-n+2) { background: var(--amber); }
.pw-bars.lvl-3 .pw-bar:nth-child(-n+3) { background: #3b82f6; }
.pw-bars.lvl-4 .pw-bar { background: var(--green); }

.pw-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 4px 10px;
  font-size: 10.8px;
  color: var(--muted);
}
.pw-rule {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pw-rule.ok {
  color: var(--green);
  font-weight: 700;
}
.pw-gen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}


/* ==================== v0.5.5: فیکس منوی کشویی، لندینگ مینیمال جذاب و شمارنده‌های نوار بالا ==================== */

/* فیکس کامل چیدمان منوی کشویی سمت راست */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.sidebar .brand {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 15px 14px !important;
  flex-shrink: 0;
}
.sidebar .brand-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0;
}
.sidebar .brand-left > div {
  display: block !important;
}

.sidebar .nav {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 12px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.sidebar .nav button {
  display: flex;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 10px 12px !important;
}
.sidebar .nav button > span:not([data-ico]) {
  display: inline-flex !important;
  align-items: center;
}
.sidebar .nav-badge {
  display: inline-flex !important;
  margin-right: auto !important;
}
.sidebar .sb-foot {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 12px 14px !important;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar .sb-user-meta {
  display: block !important;
  min-width: 0;
}
.sidebar .sb-foot-acts {
  display: flex !important;
  flex-direction: row !important;
  gap: 6px !important;
}

/* شمارنده زنده روی نوار دوم بالا */
.dk-cat-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--soft);
  color: var(--primary);
}
.dk-cat-badge.warn {
  background: rgba(239, 68, 68, 0.14);
  color: var(--red);
}

/* لندینگ پیج مینیمال، مدرن و چشم‌نواز */
.apple-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal;
  font-weight: 400;
  display: inline-block;
  margin-right: 4px;
}
.dk-hero-v2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1930 0%, #132d5e 52%, #1d4ed8 100%);
  color: #fff;
  border-radius: 22px;
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.dk-hero-v2::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.32) 0%, rgba(96, 165, 250, 0) 70%);
  pointer-events: none;
}
.dk-hero-v2::after {
  content: '';
  position: absolute;
  bottom: -70px;
  right: 25%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0) 70%);
  pointer-events: none;
}
.dk-hero-left {
  position: relative;
  z-index: 2;
}
.dk-hero-greet {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dk-hero-role {
  margin-top: 6px;
  font-size: 12.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dk-clock-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: 14px;
}
.dk-clock-time {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  direction: ltr;
}
.dk-clock-date {
  font-size: 11.8px;
  color: #dbeafe;
  font-weight: 600;
}

@media (max-width: 820px) {
  .dk-hero-v2 {
    padding: 18px 18px;
    border-radius: 18px;
  }
  .dk-hero-greet {
    font-size: 18px;
  }
  .dk-clock-pill {
    width: 100%;
    justify-content: space-between;
  }
}


/* ==================== v0.5.6: اسلایدر تم، فرم حرفه‌ای کاربر و فیکس قطعی مخفی‌سازی مجوزها ==================== */

/* فیکس قطعی مخفی‌سازی عناصر بدون مجوز در همه بخش‌ها */
.hidden-perm,
.sidebar .nav button.hidden-perm,
.sidebar .nav-sep.hidden-perm,
.dk-cat-btn.hidden-perm,
.dk-cat-badge.hidden-perm,
.hm-item.hidden-perm,
.mobile-bar button.hidden-perm {
  display: none !important;
}

/* اسلایدر تم روشن / تاریک */
.theme-slider-btn {
  position: relative;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease;
  flex-shrink: 0;
}
.theme-slider-btn:hover {
  border-color: var(--primary);
}
.theme-slider-ico {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.theme-slider-knob {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.45);
  transition: transform 0.24s cubic-bezier(.34, 1.56, .64, 1), background 0.22s ease, box-shadow 0.22s ease;
  z-index: 1;
}
body.dark .theme-slider-btn {
  background: #1e293b;
  border-color: #334155;
}
body.dark .theme-slider-knob {
  transform: translateX(-26px);
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}
body:not(.dark) .theme-slider-ico.sun { color: #fff; }
body.dark .theme-slider-ico.moon { color: #fff; }

/* بخش‌بندی حرفه‌ای مودال تعریف/ویرایش کاربر */
.form-sec {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.form-sec-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ==================== v0.5.7: هینت فیکس بدون پرش + ریدیزاین انگیزشی و مدرن لندینگ پیج ==================== */

/* جایگاه ثابت پیام خطا/هینت زیر فیلدها تا پنجره هرگز تغییر سایز ندهد */
.field-hint {
  min-height: 16px;
  line-height: 16px;
  font-size: 10.6px;
  color: var(--red);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-hint.warn {
  color: var(--amber);
  font-weight: 600;
}

/* باکس قوانین زنده همیشه ثابت */
.live-rules-box {
  margin-top: 6px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.live-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.pw-rule.fail {
  color: var(--red);
}
.pw-rule.neutral {
  color: var(--muted);
}
.pw-rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
  flex-shrink: 0;
  margin: 0 3px;
}

/* ===== لندینگ پیج جدید: مدرن، انگیزشی، چشم‌نواز و تمیز ===== */
.land-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 2px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.land-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 28px 30px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.24) 0%, rgba(56, 189, 248, 0) 52%),
    radial-gradient(90% 120% at 100% 100%, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0) 55%),
    linear-gradient(135deg, #071226 0%, #0e2248 48%, #163a7a 100%);
  color: #fff;
  box-shadow: 0 18px 44px rgba(10, 25, 58, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.land-hero-grid {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.land-hero-main {
  flex: 1 1 360px;
  min-width: 0;
}
.land-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.land-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
  backdrop-filter: blur(8px);
}
.land-pill.live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}
.land-pill.warn-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}
.land-greet {
  margin: 0;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.land-quote {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #dbeafe;
  max-width: 580px;
  font-weight: 500;
}

.land-clock-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 190px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.land-clock-time {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  direction: ltr;
  line-height: 1.1;
}
.land-clock-date {
  font-size: 12.2px;
  font-weight: 700;
  color: #bfdbfe;
}
.land-clock-role {
  font-size: 10.8px;
  color: rgba(255, 255, 255, 0.72);
}

/* نوار نبض امروز (Momentum Cards) */
.land-pulse-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.land-pulse-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.land-pulse-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.land-pulse-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.land-pulse-lbl {
  font-size: 11.8px;
  font-weight: 700;
  color: var(--muted);
}
.land-pulse-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
}
.land-pulse-sub {
  font-size: 11px;
  color: var(--muted);
}
.land-pulse-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--soft);
  color: var(--primary);
}
.land-pulse-card.p-red .land-pulse-ico { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.land-pulse-card.p-green .land-pulse-ico { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.land-pulse-card.p-amber .land-pulse-ico { background: rgba(245, 158, 11, 0.12); color: var(--amber); }

/* عنوان سکشن‌های لندینگ */
.land-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.land-sec-hdr h3 {
  margin: 0;
  font-size: 13.8px;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 7px;
}
.land-sec-hdr span {
  font-size: 11.5px;
  color: var(--muted);
}

/* نوار اقدامات سریع شیک */
.land-actions-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}
.land-actions-rail::-webkit-scrollbar { display: none; }
.land-act-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.land-act-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}
.land-act-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.land-act-pill.a-green .land-act-ico { background: rgba(16, 185, 129, 0.13); color: var(--green); }
.land-act-pill.a-amber .land-act-ico { background: rgba(245, 158, 11, 0.13); color: var(--amber); }

/* شبکه بنتو برای ماژول‌ها */
.land-bento {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 13px;
}
.land-mod-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
  font-family: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.land-mod-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  opacity: 0.7;
  transition: opacity 0.18s ease;
}
.land-mod-card.c-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.land-mod-card.c-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.land-mod-card.c-red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.land-mod-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.land-mod-card:hover::before {
  opacity: 1;
}
.land-mod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.land-mod-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.land-mod-card.c-green .land-mod-ico { background: rgba(16, 185, 129, 0.13); color: var(--green); }
.land-mod-card.c-amber .land-mod-ico { background: rgba(245, 158, 11, 0.13); color: var(--amber); }
.land-mod-card.c-red .land-mod-ico { background: rgba(239, 68, 68, 0.13); color: var(--red); }
.land-mod-stat {
  font-size: 19px;
  font-weight: 900;
  color: var(--navy);
}
.land-mod-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}
.land-mod-desc {
  font-size: 11.7px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 820px) {
  .land-hero { padding: 18px; border-radius: 18px; }
  .land-greet { font-size: 19px; }
  .land-clock-card { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .land-pulse-row { grid-template-columns: 1fr; gap: 10px; }
  .land-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .land-mod-card { padding: 14px; border-radius: 14px; }
}


/* ==================== v0.5.8: باکس آیکون یکدست، تقویم شمسی، کمبوباکس خودرو، کانبان یک‌صفحه‌ای و پنل مدیریت حرفه‌ای ==================== */

/* باکس رنگی یکدست برای آیکون‌های ناوبری */
.nav-ico-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.nb-blue    { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.nb-indigo  { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.nb-green   { background: linear-gradient(135deg, #059669, #10b981); }
.nb-rose    { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.nb-amber   { background: linear-gradient(135deg, #d97706, #f59e0b); }
.nb-sky     { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.nb-emerald { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.nb-purple  { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.nav button.active .nav-ico-box {
  background: rgba(255, 255, 255, 0.22) !important;
}

/* ایموجی داخل باکس رنگی یکدست در لندینگ */
.emoji-box {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.land-greet-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.land-greet-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.land-greet-name {
  font-size: 20px;
  font-weight: 800;
  color: #93c5fd;
}

/* تقویم شمسی بومی (Jalali DatePicker) */
.jalali-date-input {
  cursor: pointer;
  background-color: var(--surface) !important;
}
.jdp-pop {
  display: none;
  position: fixed;
  z-index: 10050;
  width: 274px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
  padding: 12px;
}
.jdp-pop.open { display: block; }
.jdp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.jdp-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
}
.jdp-nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.jdp-nav:hover { border-color: var(--primary); color: var(--primary); }
.jdp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.jdp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.jdp-day {
  height: 31px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.jdp-day:hover { background: var(--soft); color: var(--primary); }
.jdp-day.fri { color: var(--red); }
.jdp-day.sun {
  color: var(--amber);
  font-weight: 800;
}
.jdp-day.today { border-color: var(--primary); }
.jdp-day.sel { background: var(--primary) !important; color: #fff !important; }
.jdp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--muted);
}

/* کمبوباکس قابل جستجوی برند و مدل خودرو */
.combo-wrap {
  position: relative;
}
.combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 210px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  z-index: 600;
  padding: 4px;
}
.combo-list.open { display: block; }
.combo-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  direction: ltr;
}
.combo-item:hover { background: var(--soft); color: var(--primary); }
.brand-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: var(--soft);
  color: var(--primary);
  margin-right: 6px;
}

/* کانبان یک‌صفحه‌ای (Fit View) بدون اسکرول افقی و در یک ردیف روی دسکتاپ */
@media (min-width: 960px) {
  .kanban.kanban-fit {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    gap: 8px !important;
  }
  .kanban.kanban-fit .k-col {
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    padding: 8px 7px !important;
  }
  .kanban.kanban-fit .k-head {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .kanban.kanban-fit .board-card,
  .kanban.kanban-fit .k-card {
    padding: 6px 7px !important;
    font-size: 10.8px !important;
  }
}

/* پنل مدیریت سیستم حرفه‌ای دو ستونه (Enterprise Settings Layout) */
.admin-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.admin-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 10px;
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-nav-group {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 10px 4px;
  letter-spacing: 0.2px;
}
.admin-nav-group:first-child { padding-top: 2px; }
.admin-nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.4px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.admin-nav-item:hover {
  background: var(--bg);
  color: var(--primary);
}
.admin-nav-item.active {
  background: var(--soft);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.22);
}
.admin-nav-cnt {
  margin-right: auto;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--muted);
}
.admin-nav-item.active .admin-nav-cnt {
  background: var(--primary);
  color: #fff;
}
.admin-nav-cnt.warn {
  background: rgba(239, 68, 68, 0.14);
  color: var(--red);
}
.admin-content {
  min-width: 0;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  .admin-nav-group { display: none; }
  .admin-nav-item { width: auto; white-space: nowrap; }
}


/* ==================== v0.5.9: تگ‌های خودروی درخواستی، یکدست‌سازی آیکون‌ها و ری‌دیزاین کارت کانبان ==================== */

/* تگ‌های انتخابی خودروی درخواستی مشتری */
.tag-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.tag-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 11.4px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.tag-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.tag-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
}

/* یکدست‌سازی سیستم آیکون‌ها در کل اپلیکیشن (زبان طراحی واحد: باکس نرم گرد در کارت‌ها و ناوبری، فلت در دکمه‌های خطی) */
.kpi-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: var(--soft) !important;
  color: var(--primary) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.kpi.green .kpi-icon { background: rgba(16, 185, 129, 0.14) !important; color: var(--green) !important; }
.kpi.red .kpi-icon   { background: rgba(239, 68, 68, 0.14) !important; color: var(--red) !important; }
.kpi.amber .kpi-icon { background: rgba(245, 158, 11, 0.14) !important; color: var(--amber) !important; }

.land-mod-ico,
.overview-card-ico,
.land-pulse-ico {
  border-radius: 12px !important;
}
.nav-ico-box {
  border-radius: 9px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

/* کانبان: در نمای عریض جزئیات تکمیلی مستقیم دیده می‌شوند؛ در نمای یک‌صفحه‌ای روی هاور باز می‌شوند */
.kanban:not(.kanban-fit) .k-col {
  min-width: 270px;
  max-width: 295px;
  flex: 0 0 280px;
}
.kanban:not(.kanban-fit) .board-card .card-extra-hover {
  max-height: 220px !important;
  opacity: 1 !important;
  margin-top: 6px !important;
}
.board-card {
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
}
.board-card .card-tags-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.board-card .card-tag-mini {
  font-size: 9.8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.board-card .card-price-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  font-size: 10.6px;
}


/* ==================== v0.5.10: یکدست‌سازی کامل باکس آیکون‌ها در تم تاریک و روشن + کدگذاری رنگی معنایی ==================== */

/* باکس آیکون پایه (آبی) با پس‌زمینه نیمه‌شفاف و حاشیه ظریف در هر دو تم */
.land-mod-ico,
.land-pulse-ico,
.land-act-ico,
.overview-card-ico,
.kpi-icon {
  background: rgba(59, 130, 246, 0.14) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.24) !important;
}
body.dark .land-mod-ico,
body.dark .land-pulse-ico,
body.dark .land-act-ico,
body.dark .overview-card-ico,
body.dark .kpi-icon {
  background: rgba(59, 130, 246, 0.16) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.26) !important;
}

/* کدگذاری رنگی معنایی برای کارت‌های بخش‌های سامانه */
.land-mod-card.c-blue::before    { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.land-mod-card.c-blue .land-mod-ico { background: rgba(59, 130, 246, 0.16) !important; color: #3b82f6 !important; border-color: rgba(59, 130, 246, 0.28) !important; }
body.dark .land-mod-card.c-blue .land-mod-ico { color: #60a5fa !important; }

.land-mod-card.c-emerald::before,
.land-mod-card.c-green::before   { background: linear-gradient(90deg, #059669, #34d399); }
.land-mod-card.c-emerald .land-mod-ico,
.land-mod-card.c-green .land-mod-ico,
.land-pulse-card.p-green .land-pulse-ico,
.land-act-pill.a-green .land-act-ico,
.overview-card.tone-green .overview-card-ico,
.kpi.green .kpi-icon {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
}
body.dark .land-mod-card.c-emerald .land-mod-ico,
body.dark .land-mod-card.c-green .land-mod-ico,
body.dark .land-pulse-card.p-green .land-pulse-ico,
body.dark .land-act-pill.a-green .land-act-ico { color: #34d399 !important; }

.land-mod-card.c-rose::before,
.land-mod-card.c-red::before     { background: linear-gradient(90deg, #e11d48, #fb7185); }
.land-mod-card.c-rose .land-mod-ico,
.land-mod-card.c-red .land-mod-ico,
.land-pulse-card.p-red .land-pulse-ico,
.overview-card.tone-red .overview-card-ico,
.kpi.red .kpi-icon {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #f43f5e !important;
  border-color: rgba(244, 63, 94, 0.28) !important;
}
body.dark .land-mod-card.c-rose .land-mod-ico,
body.dark .land-mod-card.c-red .land-mod-ico,
body.dark .land-pulse-card.p-red .land-pulse-ico { color: #fb7185 !important; }

.land-mod-card.c-amber::before   { background: linear-gradient(90deg, #d97706, #fbbf24); }
.land-mod-card.c-amber .land-mod-ico,
.land-pulse-card.p-amber .land-pulse-ico,
.land-act-pill.a-amber .land-act-ico,
.overview-card.tone-amber .overview-card-ico,
.kpi.amber .kpi-icon {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}
body.dark .land-mod-card.c-amber .land-mod-ico,
body.dark .land-pulse-card.p-amber .land-pulse-ico,
body.dark .land-act-pill.a-amber .land-act-ico { color: #fbbf24 !important; }

.land-mod-card.c-indigo::before  { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.land-mod-card.c-indigo .land-mod-ico,
.land-act-pill.a-indigo .land-act-ico {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #6366f1 !important;
  border-color: rgba(99, 102, 241, 0.28) !important;
}
body.dark .land-mod-card.c-indigo .land-mod-ico,
body.dark .land-act-pill.a-indigo .land-act-ico { color: #818cf8 !important; }

.land-mod-card.c-teal::before    { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.land-mod-card.c-teal .land-mod-ico {
  background: rgba(20, 184, 166, 0.15) !important;
  color: #14b8a6 !important;
  border-color: rgba(20, 184, 166, 0.28) !important;
}
body.dark .land-mod-card.c-teal .land-mod-ico { color: #2dd4bf !important; }

.land-mod-card.c-violet::before  { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.land-mod-card.c-violet .land-mod-ico,
.land-act-pill.a-violet .land-act-ico {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #8b5cf6 !important;
  border-color: rgba(139, 92, 246, 0.28) !important;
}
body.dark .land-mod-card.c-violet .land-mod-ico,
body.dark .land-act-pill.a-violet .land-act-ico { color: #a78bfa !important; }

.land-mod-card.c-slate::before   { background: linear-gradient(90deg, #475569, #94a3b8); }
.land-mod-card.c-slate .land-mod-ico,
.land-act-pill.a-slate .land-act-ico {
  background: rgba(148, 163, 184, 0.16) !important;
  color: #64748b !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}
body.dark .land-mod-card.c-slate .land-mod-ico,
body.dark .land-act-pill.a-slate .land-act-ico { color: #cbd5e1 !important; }

/* آیکون‌های هدر و عنوان سکشن‌ها کاملاً فلت و هم‌ضخامت */
.dk-cat-btn .ico-svg,
.land-sec-hdr .ico-svg {
  stroke-width: 1.85;
}


/* ==================== v0.5.11: بنر شیشه‌ای جمع‌وجور + ایموجی متحرک 👋 + تقویم کامل شمسی ==================== */

@keyframes waveHand {
  0%   { transform: rotate(0deg); }
  12%  { transform: rotate(16deg); }
  24%  { transform: rotate(-10deg); }
  36%  { transform: rotate(14deg); }
  48%  { transform: rotate(-6deg); }
  60%  { transform: rotate(10deg); }
  72%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.wave-emoji {
  display: inline-block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  transform-origin: 70% 70%;
  animation: waveHand 2.2s ease-in-out 1;
  font-style: normal;
  font-weight: 400;
}
.land-hero-v3:hover .wave-emoji {
  animation: waveHand 1.6s ease-in-out infinite;
}

/* بنر شیشه‌ای جدید (جمع‌وجور، متعادل و چشم‌نواز در هر دو تم) */
.land-hero-v3 {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 20px 24px;
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0) 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(99, 102, 241, 0.26) 0%, rgba(99, 102, 241, 0) 55%),
    linear-gradient(135deg, #09162d 0%, #112752 55%, #193c7e 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(10, 25, 58, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.land-hero-v3-right {
  flex: 1 1 340px;
  min-width: 0;
}
.land-hero-v3-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.35;
}
.land-hero-v3-quote {
  margin: 7px 0 0;
  font-size: 12.8px;
  color: #dbeafe;
  line-height: 1.65;
  max-width: 560px;
}

.land-clock-clickable {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 205px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.land-clock-clickable:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}
.land-clock-open-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.6px;
  font-weight: 700;
  color: #93c5fd;
  margin-top: 2px;
}

/* تقویم کامل شمسی (Modal) */
.fcal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
}
.fcal-board {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.fcal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fcal-month-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--navy);
}
.fcal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.fcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.fcal-cell {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  transition: border-color 0.14s, transform 0.12s, background 0.14s;
}
.fcal-cell:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.fcal-cell.fri { color: var(--red); }
.fcal-cell.sun { color: var(--amber); }
.fcal-cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fcal-cell.sel {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.fcal-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 6px;
}
.fcal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.fcal-dot.fup { background: var(--red); }
.fcal-dot.deal { background: var(--green); }
.fcal-cell.sel .fcal-dot { background: #fff; }

.fcal-side {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 310px;
}
.fcal-side-head {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.fcal-ev-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 11.8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

@media (max-width: 780px) {
  .fcal-layout {
    grid-template-columns: 1fr;
  }
  .land-clock-clickable {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.jdp-empty { height: 31px; }
.fcal-empty { min-height: 46px; }


/* ==================== v0.5.13: نوار فیلتر سریع جداول و پیش‌فاکتور یکپارچه ==================== */
.quick-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.quick-filter-bar select,
.quick-filter-bar input {
  width: auto !important;
  min-width: 132px;
  max-width: 190px;
  padding: 6px 10px !important;
  font-size: 11.8px !important;
}
.match-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.14);
  color: var(--green);
}


/* ==================== v0.5.15: سایدبار آیکونی بازشو در دسکتاپ + تگ‌های خودکار قفل‌شده ==================== */

/* در دسکتاپ: نوار ناوبری همیشه کنار صفحه می‌ماند و در حالت بسته به شکل نوار آیکونی جمع می‌شود */
@media (min-width: 821px) {
  aside.sidebar {
    position: sticky !important;
    top: 0 !important;
    right: auto !important;
    height: 100vh !important;
    width: 248px !important;
    z-index: 150 !important;
    box-shadow: none !important;
    transition: width 0.22s ease !important;
  }
  aside.sidebar .sb-close-btn {
    display: inline-flex !important;
  }
  aside.sidebar.collapsed {
    width: 68px !important;
  }
  aside.sidebar.collapsed .brand {
    padding: 12px 8px !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  aside.sidebar.collapsed .brand-left > div,
  aside.sidebar.collapsed .ver-pill,
  aside.sidebar.collapsed .nav button > span:not(.nav-ico-box),
  aside.sidebar.collapsed .nav-badge,
  aside.sidebar.collapsed .sb-user-meta {
    display: none !important;
  }
  aside.sidebar.collapsed .nav {
    padding: 12px 8px !important;
  }
  aside.sidebar.collapsed .nav button {
    justify-content: center !important;
    padding: 8px !important;
    gap: 0 !important;
  }
  aside.sidebar.collapsed .sb-foot {
    padding: 10px 6px !important;
    justify-content: center !important;
  }
  aside.sidebar.collapsed .sb-foot-acts {
    flex-direction: column !important;
    gap: 6px !important;
  }
  .sidebar-backdrop {
    display: none !important;
  }
}

/* تگ‌های خودکار (غیرقابل انتخاب دستی) در ثبت و ویرایش خودرو */
.tag-chip.auto-locked {
  cursor: default !important;
  opacity: 0.72;
  border-style: dashed;
}
.tag-chip.auto-locked.active {
  opacity: 1;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--green);
  box-shadow: none;
}
body.dark .tag-chip.auto-locked.active {
  color: #34d399;
}
.tag-auto-badge {
  font-size: 9px;
  font-weight: 800;
  opacity: 0.85;
  margin-right: 4px;
}

/* v0.5.18: جلوگیری از شکستن عنوان سایدبار */
aside.sidebar .brand-left > div {
  min-width: 0;
  white-space: nowrap;
}
aside.sidebar .brand h1,
aside.sidebar .brand small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== v0.5.19: ریدیزاین کامل نوار ناوبری + تولتیپ شناور Always-on-Top ==================== */

/* غیرفعال کردن تولتیپ CSS قدیمی تا هرگز داخل باکس‌ها بریده نشود */
[data-tip]::after {
  display: none !important;
  content: none !important;
}

/* تولتیپ شناور سراسری روی body (Always-on-Top) */
.global-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10095;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  font-family: 'peyda', 'Peyda(FaNum)', Tahoma, sans-serif;
  font-size: 11.4px;
  font-weight: 600;
  line-height: 1.45;
  padding: 6px 11px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.13s ease, transform 0.13s ease, visibility 0.13s ease;
}
.global-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* رنگ‌های تکمیلی آیکون باکس سایدبار */
.nb-cyan  { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.nb-slate { background: linear-gradient(135deg, #475569, #94a3b8); }

/* ریدیزاین بدنه و هدر نوار ناوبری */
aside.sidebar {
  background: linear-gradient(180deg, #071122 0%, #09172e 55%, #060e1d 100%) !important;
  border-left: 1px solid rgba(148, 163, 184, 0.12) !important;
}
aside.sidebar .brand {
  padding: 15px 14px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10) !important;
  gap: 8px !important;
}
aside.sidebar .brand-text {
  min-width: 0;
  white-space: nowrap;
}
aside.sidebar .brand-text h1 {
  font-size: 15.5px !important;
  font-weight: 900 !important;
  letter-spacing: -0.2px;
}
aside.sidebar .brand-text small {
  font-size: 10.2px !important;
  color: #94a3b8 !important;
}

/* دکمه شیک جمع و باز کردن پنل (جایگزین همبرگری) */
.sb-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.2s ease;
}
.sb-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.38);
  color: #fff;
}
aside.sidebar.collapsed .sb-toggle-btn svg {
  transform: scaleX(-1);
}

/* دسته‌بندی‌های داخل ناوبری */
aside.sidebar .nav {
  padding: 10px 10px 14px !important;
  gap: 3px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.18) transparent;
}
.nav-group-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  padding: 10px 10px 4px;
  letter-spacing: 0.2px;
  user-select: none;
}
.nav-group-lbl:first-child {
  padding-top: 2px;
}
.nav-group-lbl.hidden-perm {
  display: none !important;
}

/* دکمه‌های ناوبری با استایل مدرن Linear / Glass */
aside.sidebar .nav button {
  position: relative;
  border-radius: 11px !important;
  padding: 8px 10px !important;
  gap: 10px !important;
  font-size: 12.6px !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}
aside.sidebar .nav button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
  transform: none !important;
}
aside.sidebar .nav button.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.24) 100%) !important;
  border-color: rgba(96, 165, 250, 0.30) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.24) !important;
}
aside.sidebar .nav button.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 99px 0 0 99px;
  background: #60a5fa;
  box-shadow: 0 0 8px #60a5fa;
}
aside.sidebar .nav button.active .nav-ico-box {
  background: inherit !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}
aside.sidebar .nav-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
aside.sidebar .nav-badge {
  font-size: 10.2px !important;
  min-width: 20px;
  height: 20px;
  padding: 0 6px !important;
  border-radius: 999px !important;
  justify-content: center;
  background: rgba(148, 163, 184, 0.16) !important;
  color: #cbd5e1 !important;
}
aside.sidebar .nav-badge.warn {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
}

/* فوتر جدید نوار ناوبری + کارت کاربر + نوار نسخه در پایین‌ترین بخش */
aside.sidebar .sb-foot {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 12px 12px 10px !important;
  background: rgba(2, 6, 23, 0.35);
  border-top: 1px solid rgba(148, 163, 184, 0.10) !important;
}
.sb-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.sb-user-name {
  color: #f8fafc;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-user-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: nowrap;
}
.sb-today-txt {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
aside.sidebar .sb-foot-acts {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px !important;
}
aside.sidebar .sb-foot-acts button {
  width: 100%;
  height: 30px;
  border-radius: 8px;
}
.sb-ver-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
}
.sb-ver-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  flex-shrink: 0;
}

/* حالت جمع‌شده به نوار آیکونی روی دسکتاپ */
@media (min-width: 821px) {
  aside.sidebar {
    width: 248px !important;
  }
  aside.sidebar.collapsed {
    width: 72px !important;
  }
  aside.sidebar.collapsed .brand {
    flex-direction: column !important;
    padding: 12px 8px !important;
    gap: 10px !important;
  }
  aside.sidebar.collapsed .brand-text,
  aside.sidebar.collapsed .nav-lbl,
  aside.sidebar.collapsed .nav-badge,
  aside.sidebar.collapsed .sb-user-meta,
  aside.sidebar.collapsed .sb-ver-label {
    display: none !important;
  }
  aside.sidebar.collapsed .nav-group-lbl {
    font-size: 0 !important;
    padding: 0 !important;
    height: 1px;
    background: rgba(148, 163, 184, 0.14);
    margin: 7px 10px !important;
  }
  aside.sidebar.collapsed .nav-group-lbl:first-child {
    display: none !important;
  }
  aside.sidebar.collapsed .nav button {
    justify-content: center !important;
    padding: 8px 0 !important;
    gap: 0 !important;
  }
  aside.sidebar.collapsed .sb-user-card {
    justify-content: center;
  }
  aside.sidebar.collapsed .sb-foot-acts {
    grid-template-columns: 1fr !important;
  }
  aside.sidebar.collapsed .sb-ver-foot {
    padding-top: 6px;
  }
}

/* ==================== v0.5.20: ثابت ماندن کامل جایگاه دکمه باز/بستن ناوبری ==================== */
@media (min-width: 821px) {
  aside.sidebar .brand {
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 14px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  aside.sidebar.collapsed .brand {
    height: 64px !important;
    min-height: 64px !important;
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  aside.sidebar.collapsed .brand-left {
    display: none !important;
  }
}

/* ==================== v0.5.21: ریل آیکونی ثابت + باز شدن شناور (Overlay) بدون تکان خوردن صفحه ==================== */
.sb-brand-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.16s ease;
}

@media (min-width: 821px) {
  /* محتوای اصلی همیشه به اندازه ریل ۶۸ پیکسلی فاصله دارد و هرگز تکان نمی‌خورد */
  .main {
    margin-right: 68px !important;
    width: calc(100% - 68px) !important;
  }

  aside.sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    width: 248px !important;
    z-index: 460 !important;
    box-shadow: -14px 0 38px rgba(2, 6, 23, 0.48) !important;
    transition: width 0.20s cubic-bezier(.22, .61, .36, 1), box-shadow 0.20s ease !important;
  }

  aside.sidebar.collapsed {
    width: 68px !important;
    box-shadow: none !important;
  }

  /* جایگاه دکمه باز/بستن در هر دو حالت باز و بسته دقیقاً یکسان است (0px جابه‌جایی) */
  aside.sidebar .brand,
  aside.sidebar.collapsed .brand {
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 18px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  aside.sidebar.collapsed .sb-brand-title {
    display: none !important;
  }
}

/* ==================== v0.5.22: قفل کامل مختصات افقی و عمودی تمام آیکون‌های نوار ناوبری ==================== */
@media (min-width: 821px) {
  /* ۱. قفل محور افقی: 68px = 10px(nav) + 10px(btn) + 28px(icon) + 10px(btn) + 10px(nav) */
  aside.sidebar .nav,
  aside.sidebar.collapsed .nav {
    padding: 10px 10px 14px !important;
    gap: 3px !important;
  }

  aside.sidebar .nav button,
  aside.sidebar.collapsed .nav button {
    justify-content: flex-start !important;
    padding: 8px 10px !important;
    gap: 10px !important;
    height: 44px !important;
    min-height: 44px !important;
    overflow: hidden !important;
  }

  /* ۲. قفل محور عمودی: ارتفاع عنوان گروه‌ها در هر دو حالت باز و بسته دقیقاً ۲۲ پیکسل ثابت می‌ماند */
  aside.sidebar .nav-group-lbl,
  aside.sidebar.collapsed .nav-group-lbl {
    height: 22px !important;
    min-height: 22px !important;
    line-height: 22px !important;
    padding: 0 10px !important;
    margin: 6px 0 2px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    background: transparent !important;
  }
  aside.sidebar .nav-group-lbl:first-child,
  aside.sidebar.collapsed .nav-group-lbl:first-child {
    margin-top: 0 !important;
    display: flex !important;
  }
  aside.sidebar.collapsed .nav-group-lbl {
    color: transparent !important;
    font-size: 0 !important;
  }
  aside.sidebar.collapsed .nav-group-lbl::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(148, 163, 184, 0.16);
  }
  aside.sidebar.collapsed .nav-group-lbl:first-child::after {
    display: none;
  }

  /* ۳. قفل جایگاه افقی آواتار کاربر در فوتر: 68px = 12px(foot) + 5px(card) + 34px(avatar) + 5px + 12px */
  aside.sidebar .sb-user-card,
  aside.sidebar.collapsed .sb-user-card {
    justify-content: flex-start !important;
    padding: 0 5px !important;
  }
}

/* ==================== v0.5.23: انتقال پروفایل به بالای ناوبری + قفل ۱۰۰٪ دکمه‌های فوتر ==================== */
.sb-top-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.sb-top-profile .sb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 13px;
}

aside.sidebar .sb-foot {
  padding: 8px 10px 10px !important;
  gap: 6px !important;
}
.sb-foot-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sb-foot-row {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sb-foot-row:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.sb-foot-row.danger {
  color: #fca5a5;
}
.sb-foot-row.danger:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fecaca;
}
.sb-foot-row.hidden-perm {
  display: none !important;
}
.sb-foot-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-foot-row.danger .sb-foot-ico {
  background: rgba(239, 68, 68, 0.16);
}

@media (min-width: 821px) {
  aside.sidebar.collapsed .sb-top-profile {
    display: none !important;
  }
  aside.sidebar .sb-foot,
  aside.sidebar.collapsed .sb-foot {
    padding: 8px 10px 10px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  aside.sidebar .sb-foot-row,
  aside.sidebar.collapsed .sb-foot-row {
    justify-content: flex-start !important;
    padding: 0 10px !important;
    gap: 10px !important;
  }
}

/* ==================== v0.5.24: پروفایل زیر دکمه باز/بستن + انیمیشن نرم و حرفه‌ای + حذف تکرار دسته‌بندی‌ها ==================== */
.sb-brand-mini-lbl {
  font-size: 13.5px;
  font-weight: 900;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.sb-profile-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 56px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  flex-shrink: 0;
}
.sb-profile-row .sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 13.5px;
  flex-shrink: 0;
}
.sb-profile-row .sb-user-meta {
  min-width: 0;
  flex: 1 1 auto;
  transition: opacity 0.20s ease, transform 0.20s ease;
}

/* تفکیک دکمه منو در موبایل و خانه در دسکتاپ */
.mobile-only-cat { display: none !important; }
.desktop-only-cat { display: inline-flex !important; font-weight: 800; color: var(--navy); }
body.dark .desktop-only-cat { color: #e2e8f0; }

@media (max-width: 820px) {
  .mobile-only-cat { display: inline-flex !important; }
  .desktop-only-cat { display: none !important; }
}

@media (min-width: 821px) {
  /* انیمیشن نرم و روان باز و بسته شدن سایدبار */
  aside.sidebar {
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease !important;
  }

  /* محو و ظاهر شدن نرم متن‌ها بدون پرش ناگهانی */
  aside.sidebar .nav-lbl,
  aside.sidebar .nav-badge,
  aside.sidebar .sb-ver-label,
  aside.sidebar .sb-brand-mini-lbl,
  aside.sidebar .sb-profile-row .sb-user-meta {
    display: inline-flex !important;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.20s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  aside.sidebar .sb-profile-row .sb-user-meta {
    display: block !important;
  }

  aside.sidebar.collapsed .nav-lbl,
  aside.sidebar.collapsed .nav-badge,
  aside.sidebar.collapsed .sb-ver-label,
  aside.sidebar.collapsed .sb-brand-mini-lbl,
  aside.sidebar.collapsed .sb-profile-row .sb-user-meta {
    opacity: 0 !important;
    transform: translateX(8px) !important;
    pointer-events: none !important;
  }

  /* حفظ مخفی‌بودن بج‌های بدون مجوز */
  aside.sidebar .nav-badge.hidden-perm {
    display: none !important;
  }

  aside.sidebar .sb-toggle-btn svg {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ==================== v0.5.25: پاپ‌آپ داینامیک نصب و به‌روزرسانی وب‌اپ ==================== */
.pwa-pro-popup {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: min(370px, calc(100vw - 28px));
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(14px);
  z-index: 9800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.26s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.26s ease;
}
.pwa-pro-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.pwa-pro-popup.mode-update {
  border-color: rgba(16, 185, 129, 0.42);
}
.pwa-pro-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pwa-pro-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.pwa-pro-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}
.pwa-pro-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.25);
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.pwa-pro-popup.mode-update .pwa-pro-badge {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.30);
}
.pwa-pro-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #fff;
  line-height: 1.35;
}
.pwa-pro-close {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.pwa-pro-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.pwa-pro-desc {
  margin: 10px 0 13px;
  font-size: 11.8px;
  line-height: 1.7;
  color: #cbd5e1;
}
.pwa-pro-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-pro-acts .btn-primary {
  flex: 1;
  justify-content: center;
}
.pwa-pro-popup.mode-update .pwa-pro-acts .btn-primary {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border-color: #10b981 !important;
}
.pwa-pro-acts .btn-soft {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #cbd5e1 !important;
}
.pwa-pro-acts .btn-soft:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

@media (max-width: 820px) {
  .pwa-pro-popup {
    left: 14px;
    right: 14px;
    width: auto;
    bottom: 76px;
  }
}

/* ==================== v0.5.27: دیالوگ اختصاصی پیام و تایید (جایگزین alert و confirm مرورگر) ==================== */
.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(6px);
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.app-dialog-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.app-dialog-box {
  width: min(410px, 100%);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
  transform: translateY(10px) scale(0.96);
  transition: transform 0.20s cubic-bezier(0.22, 1, 0.36, 1);
}
.app-dialog-backdrop.open .app-dialog-box {
  transform: translateY(0) scale(1);
}
.app-dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.app-dialog-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.14);
  color: var(--primary);
}
.app-dialog-box.type-warn .app-dialog-ico {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
}
.app-dialog-box.type-error .app-dialog-ico {
  background: rgba(239, 68, 68, 0.16);
  color: var(--red);
}
.app-dialog-title {
  font-size: 14.2px;
  font-weight: 900;
  color: var(--text);
}
.app-dialog-msg {
  font-size: 12.6px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 18px;
  white-space: pre-line;
}
body.dark .app-dialog-msg {
  color: #cbd5e1;
}
.app-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ==================== v0.5.33: قفل ۱۰۰٪ مختصات X/Y آیکون‌های فوتر سایدبار + نشانگر قابل بررسی کارت‌های داشبورد ==================== */

/* ۱. قفل کامل افقی و عمودی فوتر سایدبار و ۳ آیکون پایین در هر دو حالت باز و بسته */
aside.sidebar .sb-foot,
aside.sidebar.collapsed .sb-foot {
  padding: 8px 10px 10px !important;
  gap: 6px !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

aside.sidebar .sb-foot-list,
aside.sidebar.collapsed .sb-foot-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

aside.sidebar .sb-foot-row,
aside.sidebar.collapsed .sb-foot-row {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  gap: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

aside.sidebar .sb-foot-ico,
aside.sidebar.collapsed .sb-foot-ico {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  flex: 0 0 28px !important;
  margin: 0 !important;
}

/* ارتفاع خط نسخه در پایین سایدبار در هر دو حالت باز و بسته دقیقاً ۲۲ پیکسل قفل می‌شود تا دکمه‌های بالا بالا/پایین نپرند */
aside.sidebar .sb-ver-foot,
aside.sidebar.collapsed .sb-ver-foot {
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  padding: 4px 0 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
@media (min-width: 821px) {
  aside.sidebar.collapsed .sb-ver-label {
    display: none !important;
  }
}

/* ۲. نشانگر بصری «قابل بررسی / نیازمند اقدام» روی کارت‌های صفحه اول و میز کار (هماهنگ با تم روشن و تاریک) */
@keyframes pulseBeaconRing {
  0%   { transform: scale(0.95); opacity: 0.75; }
  70%  { transform: scale(2.1);  opacity: 0; }
  100% { transform: scale(2.1);  opacity: 0; }
}

.pulse-beacon {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.pulse-beacon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulseBeaconRing 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.pulse-beacon.tone-rose  { background: #f43f5e; }
.pulse-beacon.tone-amber { background: #f59e0b; }
.pulse-beacon.tone-green { background: #10b981; }
.pulse-beacon.tone-blue  { background: #3b82f6; }

/* حالت دارای مورد قابل بررسی روی کارت‌های ردیف اول لندینگ */
.land-pulse-card {
  position: relative;
}
.land-pulse-card.has-items {
  border-color: rgba(59, 130, 246, 0.36);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.05) 100%);
}
.land-pulse-card.p-red.has-items {
  border-color: rgba(244, 63, 94, 0.42);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(244, 63, 94, 0.06) 100%);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.08);
}
.land-pulse-card.p-amber.has-items {
  border-color: rgba(245, 158, 11, 0.40);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(245, 158, 11, 0.06) 100%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.07);
}
.land-pulse-card.is-calm {
  opacity: 0.84;
}
.land-pulse-card.is-calm:hover {
  opacity: 1;
}

.land-pulse-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.land-pulse-action-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 10.6px;
  font-weight: 800;
  color: var(--primary);
}
.land-pulse-card.p-red.has-items .land-pulse-action-hint   { color: #f43f5e; }
.land-pulse-card.p-amber.has-items .land-pulse-action-hint { color: #d97706; }
body.dark .land-pulse-card.p-amber.has-items .land-pulse-action-hint { color: #fbbf24; }
.land-pulse-action-hint svg {
  transition: transform 0.16s ease;
}
.land-pulse-card:hover .land-pulse-action-hint svg {
  transform: translateX(-3px);
}

/* نشانگر قابل بررسی روی کارت‌های بخش‌های سامانه (بنتو) */
.land-mod-card.has-items {
  border-color: rgba(96, 165, 250, 0.34);
}
.land-mod-card.c-rose.has-items {
  border-color: rgba(244, 63, 94, 0.40);
  box-shadow: 0 6px 22px rgba(244, 63, 94, 0.08);
}
.land-mod-card.c-amber.has-items {
  border-color: rgba(245, 158, 11, 0.38);
}
.land-mod-card.c-emerald.has-items {
  border-color: rgba(16, 185, 129, 0.36);
}
.land-mod-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.13);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.land-mod-alert-pill.tone-rose {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.28);
}
.land-mod-alert-pill.tone-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
}
.land-mod-alert-pill.tone-green {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}
body:not(.dark) .land-mod-alert-pill { color: #2563eb; }
body:not(.dark) .land-mod-alert-pill.tone-rose { color: #e11d48; }
body:not(.dark) .land-mod-alert-pill.tone-amber { color: #d97706; }
body:not(.dark) .land-mod-alert-pill.tone-green { color: #059669; }

/* کارت‌های قابل کلیک در میز کار (Dashboard) */
.kpi.kpi-clickable {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.kpi.kpi-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.kpi.kpi-clickable.has-items {
  border-color: rgba(59, 130, 246, 0.38);
}
.kpi.amber.kpi-clickable.has-items {
  border-color: rgba(245, 158, 11, 0.42);
}
.kpi.green.kpi-clickable.has-items {
  border-color: rgba(16, 185, 129, 0.40);
}

/* ==================== v0.5.34: نوار اقدام سریع کارت کانبان + قیف تبدیل فروش (Sales Funnel) ==================== */
.crm-quick-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}
.crm-qbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 10.6px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.12s;
}
.crm-qbtn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.crm-qbtn.wa {
  color: var(--wa);
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}
.crm-qbtn.wa:hover {
  background: var(--wa);
  color: #fff;
  border-color: var(--wa);
}
.crm-qbtn.call {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.08);
}
.crm-qbtn.call:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.crm-qbtn.claim {
  flex: 1;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-color: transparent;
}
.crm-qbtn.claim:hover {
  filter: brightness(1.06);
  color: #fff;
}
.crm-qbtn.log {
  flex: 1;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.26);
}
.crm-qbtn.log:hover {
  background: var(--primary);
  color: #fff;
}

.crm-act-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
}

/* نوار قیف تبدیل فروش بالای کانبان */
.funnel-strip-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.funnel-top-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--border);
}
.funnel-metric-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.f-mpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.2px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.f-mpill b { font-weight: 900; }
.f-mpill.win b { color: var(--green); }
.f-mpill.sla b { color: var(--red); }
.f-mpill.val b { color: var(--primary); }

.funnel-steps-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.funnel-step-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.funnel-step-box.is-win {
  border-color: rgba(16, 185, 129, 0.36);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(16, 185, 129, 0.06) 100%);
}
.funnel-step-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10.8px;
  font-weight: 700;
  color: var(--muted);
}
.funnel-step-num {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
}
body.dark .funnel-step-num { color: #f8fafc; }
.funnel-bar-bg {
  height: 5px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  margin-top: 2px;
}
.funnel-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.25s ease;
}
.funnel-step-box.is-win .funnel-bar-fill {
  background: linear-gradient(90deg, #059669, #34d399);
}

@media (max-width: 960px) {
  .funnel-steps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== v0.5.35: نشانگرهای SLA پاسخ اولیه، بازپس‌گیری خودکار و قفل مراحل فروش ==================== */
.sla-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.sla-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.8px;
  font-weight: 800;
  line-height: 1.45;
  border: 1px solid transparent;
}
.sla-pill.breach {
  background: rgba(244, 63, 94, 0.14);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.34);
}
body.dark .sla-pill.breach {
  color: #fda4af;
}
.sla-pill.fresh {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.26);
}
body.dark .sla-pill.fresh {
  color: #93c5fd;
}
.sla-pill.recycle-warn {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.34);
}
body.dark .sla-pill.recycle-warn {
  color: #fcd34d;
}
.board-card.sla-breached {
  border-color: rgba(244, 63, 94, 0.48) !important;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.14), 0 6px 16px rgba(244, 63, 94, 0.08);
}

/* ==================== v0.5.36: حذف کامل پرش بج‌های نوار بالا + همسان‌سازی جداول، مودال‌ها و فیلترها ==================== */
.dk-cat-btn {
  position: relative !important;
  flex-shrink: 0;
}
.dk-cat-btn.has-cat-badge {
  padding-left: 24px !important;
}
.dk-cat-btn .dk-cat-badge {
  position: absolute !important;
  top: 4px !important;
  left: 3px !important;
  min-width: 17px !important;
  height: 17px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 9.8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  pointer-events: none !important;
  transition: opacity 0.16s ease, transform 0.16s ease !important;
}
.dk-cat-btn .dk-cat-badge.hidden-perm {
  display: inline-flex !important;
  opacity: 0 !important;
  transform: scale(0.75) !important;
  visibility: hidden !important;
}
.admin-nav-item {
  position: relative;
  min-height: 36px;
}
.admin-nav-cnt {
  margin-right: auto !important;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}
table th,
table td {
  vertical-align: middle;
}
.ltr,
.kpi .val,
.land-pulse-val,
.land-mod-stat,
.funnel-step-num,
.overview-card-val {
  font-variant-numeric: tabular-nums;
}
.quick-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.quick-filter-bar input[type="text"],
.quick-filter-bar input:not([type]),
.quick-filter-bar select {
  height: 33px !important;
  min-height: 33px !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
}
.quick-filter-bar .qf-search {
  min-width: 180px !important;
  max-width: 240px !important;
  flex: 1 1 180px;
}
.quick-filter-bar .qf-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  height: 33px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.4px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.quick-filter-bar .qf-check input {
  width: auto !important;
  min-width: 0 !important;
  margin: 0;
}
.modal .f-grid {
  align-items: start;
}
.modal .f-lbl {
  display: block;
  margin-bottom: 4px;
}
.origin-dep-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.8px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.30);
}
body.dark .origin-dep-pill {
  color: #fcd34d;
}

/* ==================== v0.5.37: حذف کامل اسکرول ویندوز (Zero Layout Shift) + استرداد بیعانه + مشتری معتبر ==================== */

/* ۱. مخفی‌سازی کامل اسکرول‌بار نیتیو ویندوز با حفظ ۱۰۰٪ اسکرول ماوس، تاچ و کیبورد (صفر پیکسل جابه‌جایی افقی) */
html,
body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-x: hidden !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.modal,
.nav,
.view-area,
.notif-list,
.picker-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal::-webkit-scrollbar,
.nav::-webkit-scrollbar,
.view-area::-webkit-scrollbar,
.notif-list::-webkit-scrollbar,
.picker-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ۲. کارت هشدار استرداد بیعانه و نشانگرهای جدید */
.refund-alert-card {
  border: 1px solid rgba(244, 63, 94, 0.38);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, var(--surface) 100%);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 14px;
}
.refund-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 8px;
}
.origin-reassign-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.8px;
  font-weight: 800;
  background: rgba(139, 92, 246, 0.14);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.32);
}
body.dark .origin-reassign-pill {
  color: #c4b5fd;
}
.badge.b-refund {
  background: rgba(139, 92, 246, 0.16);
  color: #7c3aed;
}
body.dark .badge.b-refund {
  color: #c4b5fd;
}
.trusted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.8px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(99, 102, 241, 0.14));
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.36);
  white-space: nowrap;
}
body.dark .trusted-badge {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.36);
}

/* ==================== v0.5.38: اخطارها و اعلان‌های پررنگ و حیاتی + ارتقای چیدمان و تجربه کاربری ==================== */

/* ۱. بازطراحی پنجره اخطار و تایید (مات، پرکنتراست، نوار قرمز پررنگ در بالا — حذف کامل ظاهر شیشه‌ای) */
.app-dialog-backdrop {
  background: rgba(2, 6, 23, 0.74) !important;
  backdrop-filter: blur(2px) !important;
}
.app-dialog-box {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-top: 4px solid var(--primary) !important;
  border-radius: 16px !important;
  padding: 20px 22px 18px !important;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.56) !important;
}
.app-dialog-box.type-error,
.app-dialog-box.type-danger {
  border-color: rgba(220, 38, 38, 0.45) !important;
  border-top: 4px solid #dc2626 !important;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.58), 0 0 0 1px rgba(220, 38, 38, 0.18), 0 10px 32px rgba(220, 38, 38, 0.22) !important;
}
.app-dialog-box.type-error .app-dialog-ico,
.app-dialog-box.type-danger .app-dialog-ico {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.42);
}
.app-dialog-box.type-error .app-dialog-title,
.app-dialog-box.type-danger .app-dialog-title {
  color: #dc2626 !important;
}
body.dark .app-dialog-box.type-error .app-dialog-title,
body.dark .app-dialog-box.type-danger .app-dialog-title {
  color: #fca5a5 !important;
}
.app-dialog-box.type-warn {
  border-color: rgba(217, 119, 6, 0.45) !important;
  border-top: 4px solid #f59e0b !important;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.56), 0 8px 28px rgba(245, 158, 11, 0.16) !important;
}
.app-dialog-box.type-warn .app-dialog-ico {
  background: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.36);
}
.app-dialog-msg {
  color: var(--text-2) !important;
  font-size: 12.8px !important;
  line-height: 1.8 !important;
}
body.dark .app-dialog-msg {
  color: #e2e8f0 !important;
}

/* ۲. نوارهای هشدار حیاتی (.strip.red، .alert-pill.red و کارت استرداد بیعانه) */
.strip {
  border-right-width: 4px !important;
  border-right-style: solid !important;
}
.strip.green { border-right-color: var(--green) !important; }
.strip.blue  { border-right-color: var(--primary) !important; }
.strip.amber { border-right-color: var(--amber) !important; }
.strip.muted { border-right-color: var(--border-strong) !important; }

.strip.red {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  border-right: 4px solid #dc2626 !important;
}
body.dark .strip.red {
  background: rgba(185, 28, 28, 0.24) !important;
  color: #fecaca !important;
  border: 1px solid rgba(239, 68, 68, 0.52) !important;
  border-right: 4px solid #ef4444 !important;
}
.alert-pill.red {
  border-color: rgba(220, 38, 38, 0.42) !important;
  border-right: 4px solid #dc2626 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}
body.dark .alert-pill.red {
  background: rgba(185, 28, 28, 0.22) !important;
  color: #fecaca !important;
}
.alert-pill.red .a-ico { color: #dc2626 !important; }
body.dark .alert-pill.red .a-ico { color: #f87171 !important; }

.refund-alert-card {
  border: 1px solid rgba(220, 38, 38, 0.48) !important;
  border-right: 4px solid #dc2626 !important;
  background: #fef2f2 !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.10);
}
body.dark .refund-alert-card {
  background: rgba(185, 28, 28, 0.20) !important;
  border-color: rgba(239, 68, 68, 0.52) !important;
  border-right-color: #ef4444 !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.16);
}

/* ۳. اعلان‌های زنگوله: موج نبض‌دار قرمز + تفکیک رنگی واضح برای هشدار (warn) و بحرانی (bug) + z-index درست */
@keyframes notifDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.65); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.dk-header {
  z-index: 320 !important;
}
.notif-dot.show {
  background: #dc2626 !important;
  animation: notifDotPulse 2.1s infinite;
}
.notif-popover {
  z-index: 620 !important;
  border-color: var(--border-strong) !important;
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.42) !important;
}
.notif-item.k-bug {
  border-right: 3.5px solid #dc2626;
}
.notif-item.k-bug .notif-ico {
  background: #dc2626 !important;
  color: #ffffff !important;
}
.notif-item.k-warn {
  border-right: 3.5px solid #f59e0b;
}
.notif-item.k-warn .notif-ico {
  background: #d97706 !important;
  color: #ffffff !important;
}
.notif-item.k-bug.unread {
  background: rgba(220, 38, 38, 0.12) !important;
}
.notif-item.k-warn.unread {
  background: rgba(245, 158, 11, 0.12) !important;
}

/* ۴. پیام‌های لحظه‌ای (Toast): وسط-پایین صفحه، بالاتر از همه لایه‌ها، با رنگ‌بندی پررنگ و واضح */
.toast {
  bottom: 24px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 10060 !important;
  max-width: min(480px, calc(100vw - 24px));
  padding: 11px 18px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.45) !important;
}
.toast.t-success {
  background: #059669 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 36px rgba(5, 150, 105, 0.42) !important;
}
.toast.t-error {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 36px rgba(220, 38, 38, 0.48) !important;
}
.toast.t-warn {
  background: #d97706 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 14px 36px rgba(217, 119, 6, 0.42) !important;
}
.toast.t-info {
  background: #1d4ed8 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.42) !important;
}
@media (max-width: 820px) {
  .toast {
    bottom: 74px !important;
    width: calc(100vw - 24px);
    justify-content: center;
  }
}

/* ۵. احیای کادر قرمز کارت‌های معوق و SLA کانبان + حذف زوم مزاحم هاور */
.board-card:hover {
  transform: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.16) !important;
}
.board-card.due-followup {
  border-color: rgba(220, 38, 38, 0.56) !important;
  border-right: 3.5px solid #dc2626 !important;
}
.board-card.sla-breached {
  border-color: rgba(220, 38, 38, 0.72) !important;
  border-right: 4px solid #dc2626 !important;
  background: linear-gradient(270deg, rgba(220, 38, 38, 0.08) 0%, var(--surface) 42%) !important;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.14) !important;
}
body.dark .board-card.due-followup {
  border-color: rgba(239, 68, 68, 0.58) !important;
  border-right-color: #ef4444 !important;
}
body.dark .board-card.sla-breached {
  border-color: rgba(239, 68, 68, 0.78) !important;
  border-right-color: #ef4444 !important;
  background: linear-gradient(270deg, rgba(220, 38, 38, 0.18) 0%, var(--surface) 46%) !important;
}

/* ۶. هم‌عرض کردن هدر، صفحه اول و تمام پنل‌ها روی 1360px + کادربندی منظم دسترسی سریع */
.dk-top,
.dk-catbar,
.view-area,
.land-shell {
  max-width: 1360px !important;
}
.land-actions-rail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px !important;
  box-shadow: var(--shadow-xs);
}

/* ۷. چسبان کردن هدر و فوتر تمام مودال‌ها (Sticky Modal Header & Footer) بدون ناپدید شدن دکمه ذخیره */
.modal-backdrop {
  background: rgba(2, 6, 23, 0.68) !important;
  backdrop-filter: blur(2px) !important;
}
.modal {
  border-color: var(--border-strong) !important;
}
.modal:has(> .modal-hdr) {
  padding-top: 0 !important;
}
.modal:has(> .modal-foot) {
  padding-bottom: 0 !important;
}
.modal > .modal-hdr {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--surface);
  margin: 0 -20px 14px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.modal > .modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 12;
  background: var(--surface);
  margin: 16px -20px 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
@media (max-width: 820px) {
  .modal > .modal-hdr {
    margin: 0 -14px 12px;
    padding: 13px 14px 10px;
  }
  .modal > .modal-foot {
    margin: 14px -14px 0;
    padding: 10px 14px 13px;
  }
}

/* ۸. سرستون چسبان جداول + اسکرول‌بار افقی باریک و شیک برای جداول و کانبان */
.tbl-wrap {
  max-height: 70vh;
  overflow: auto !important;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.tbl-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-2) !important;
  box-shadow: inset 0 -1px 0 var(--border-strong);
}
.tbl-wrap::-webkit-scrollbar,
.kanban::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.tbl-wrap::-webkit-scrollbar-track,
.kanban::-webkit-scrollbar-track {
  background: transparent;
}
.tbl-wrap::-webkit-scrollbar-thumb,
.kanban::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border-radius: 999px;
}
.tbl-wrap::-webkit-scrollbar-thumb:hover,
.kanban::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.62);
}
.kanban {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

/* ۹. پنجره بارگذاری مات و واضح + فوکوس قوی فیلدهای فرم */
.loader {
  background: rgba(2, 6, 23, 0.58) !important;
  backdrop-filter: blur(1.5px) !important;
  z-index: 10070 !important;
}
.loader-card {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.50) !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-ring) !important;
}

/* ==================== v0.5.39: پروفایل حرفه‌ای + آواتار + بازار زیر تقویم + فیکس اسکرول‌بار و کانبان ==================== */
.cmd-box, .cmd-list, .hm-menu, .hm-menu.floating-portal, #customCtxMenu {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.cmd-list { overflow-x: hidden !important; }
.cmd-box::-webkit-scrollbar, .cmd-list::-webkit-scrollbar, .hm-menu::-webkit-scrollbar,
.hm-menu.floating-portal::-webkit-scrollbar, #customCtxMenu::-webkit-scrollbar { width: 6px; height: 6px; }
.cmd-box::-webkit-scrollbar-track, .cmd-list::-webkit-scrollbar-track, .hm-menu::-webkit-scrollbar-track,
.hm-menu.floating-portal::-webkit-scrollbar-track, #customCtxMenu::-webkit-scrollbar-track { background: transparent; }
.cmd-box::-webkit-scrollbar-thumb, .cmd-list::-webkit-scrollbar-thumb, .hm-menu::-webkit-scrollbar-thumb,
.hm-menu.floating-portal::-webkit-scrollbar-thumb, #customCtxMenu::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.36); border-radius: 999px; }
.cmd-box::-webkit-scrollbar-thumb:hover, .cmd-list::-webkit-scrollbar-thumb:hover, .hm-menu::-webkit-scrollbar-thumb:hover,
.hm-menu.floating-portal::-webkit-scrollbar-thumb:hover, #customCtxMenu::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.62); }

.crm-act-count-pill { white-space: nowrap !important; flex-shrink: 0; padding: 2px 6px !important; font-size: 9.8px !important; }
.crm-qbtn { white-space: nowrap !important; flex-shrink: 0; }
.crm-qbtn.log { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; font-size: 10.6px !important; padding: 5px 7px !important; }
.kanban.kanban-fit .crm-qbtn.log span { overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 1120px) { .land-bento { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 760px) and (max-width: 1119px) { .land-bento { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

.land-clock-stack { display: flex; flex-direction: column; gap: 8px; min-width: 248px; flex-shrink: 0; }
.land-market-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; }
.land-market-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.2px; }
.land-market-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); }
.land-market-state { font-size: 10.6px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.land-market-state.open { background: var(--green-soft); color: var(--green); }
.land-market-state.partial { background: var(--amber-soft); color: var(--amber); }
.land-market-state.closed { background: var(--red-soft); color: var(--red); }
.land-mkt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.land-mkt-dot.open { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.land-mkt-dot.partial { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.land-mkt-dot.closed { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.land-quote-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.land-quote-hide-btn { background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 7px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.55; transition: opacity .15s, background .15s, color .15s; flex-shrink: 0; }
.land-quote-hide-btn:hover { opacity: 1; background: var(--surface-hover); color: var(--text); }

.sb-profile-row.clickable { cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.sb-profile-row.clickable:hover { background: var(--sidebar-hover); }
.sb-avatar, .top-profile-av, .prof-hero-av, .user-tbl-av { overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-avatar svg, .sb-avatar img, .top-profile-av svg, .top-profile-av img, .prof-hero-av svg, .prof-hero-av img, .user-tbl-av svg, .user-tbl-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

.top-profile-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s; }
.top-profile-chip:hover { border-color: var(--primary); background: var(--surface-hover); }
.top-profile-av { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; }
.top-profile-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .top-profile-name { display: none; } .top-profile-chip { padding: 3px; } }
.user-tbl-av { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; border: 1px solid var(--border); }

.prof-hero-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface-2) 100%); border: 1px solid var(--border); margin-bottom: 14px; }
.prof-hero-banner.compact { padding: 12px 14px; }
.prof-hero-av { width: 64px; height: 64px; border-radius: 18px; background: var(--surface); border: 2px solid var(--primary); color: var(--primary); font-size: 24px; font-weight: 900; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.20); }
.prof-hero-info { flex: 1; min-width: 160px; }
.prof-hero-name { font-size: 15.5px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.prof-hero-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prof-tabs-bar { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.prof-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.prof-tab:hover { border-color: var(--primary); color: var(--primary); }
.prof-tab.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.prof-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.av-cat-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.av-cat-btn { padding: 5px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 11.6px; font-weight: 700; cursor: pointer; transition: all .14s; }
.av-cat-btn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.av-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .av-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.av-opt { position: relative; border-radius: 14px; padding: 6px; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.av-opt:hover { border-color: var(--primary); transform: translateY(-2px); }
.av-opt.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-ring); }
.av-opt-img { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; }
.av-opt-img svg { width: 100%; height: 100%; display: block; }
.av-opt-lbl { font-size: 10.2px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
#customCtxMenu .ctx-meta-head { padding: 6px 12px; font-size: 10.6px; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ==================== v0.5.40: صفحه اول مینیمال کارمحور + نوار میانبر یک‌ردیفه + اینباکس اعلان‌ها ==================== */
.top-prof-wrap { position: relative; display: inline-flex; align-items: center; }
.top-prof-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 232px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
  display: none; flex-direction: column; gap: 2px; z-index: 1200;
}
.top-prof-menu.open { display: flex; }

.notif-foot { padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.prof-inbox-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; scrollbar-width: thin; }
.prof-inbox-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.prof-inbox-item:hover { border-color: var(--primary); background: var(--surface-hover); }
.prof-inbox-item.unread { border-right: 3px solid var(--primary); background: var(--primary-soft); }
.prof-inbox-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }

/* صفحه اول مینیمال جدید (v0.5.40) */
.home-min-shell { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.home-min-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.home-min-greet { margin: 0; font-size: 17.5px; font-weight: 900; color: var(--navy); letter-spacing: -0.2px; }
.home-min-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.home-mkt-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.home-clock-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; transition: border-color .15s;
}
.home-clock-pill:hover { border-color: var(--primary); }
.home-clock-time { font-size: 16px; font-weight: 900; color: var(--navy); font-variant-numeric: tabular-nums; }
.home-clock-date { font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* نوار میانبرهای شخصی‌سازی‌شده — همیشه دقیقاً یک سطر با عرض برابر (۴ تا ۸ کارت) */
.home-sc-bar-wrap { display: flex; align-items: stretch; gap: 8px; }
.home-sc-row {
  flex: 1; display: grid; grid-template-columns: repeat(var(--sc-cols, 4), minmax(0, 1fr));
  gap: 8px; min-width: 0;
}
@media (max-width: 900px) {
  .home-sc-row { display: flex; overflow-x: auto; scrollbar-width: none; }
  .home-sc-row::-webkit-scrollbar { display: none; }
  .home-sc-card { min-width: 145px; flex: 1 0 145px; }
}
.home-sc-card {
  position: relative; display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-align: right; cursor: pointer; min-width: 0;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.home-sc-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.home-sc-ico {
  width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); flex-shrink: 0;
}
.home-sc-card.t-amber .home-sc-ico { background: var(--amber-soft); color: var(--amber); }
.home-sc-card.t-green .home-sc-ico { background: var(--green-soft); color: var(--green); }
.home-sc-card.t-rose .home-sc-ico { background: var(--red-soft); color: var(--red); }
.home-sc-card.t-violet .home-sc-ico { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.home-sc-txt { flex: 1; min-width: 0; }
.home-sc-lbl { font-size: 12.2px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-sc-sub { font-size: 10.4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.home-sc-edit-btn {
  width: 38px; border-radius: 13px; border: 1px dashed var(--border-strong); background: var(--surface-2);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.home-sc-edit-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ۴ کارت وضعیت حیاتی در یک سطر */
.home-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 820px) { .home-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-kpi-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; text-align: right; transition: border-color .15s, transform .15s;
}
.home-kpi-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.home-kpi-card.urgent { border-color: rgba(239, 68, 68, 0.45); background: linear-gradient(135deg, rgba(239, 68, 68, 0.07), var(--surface)); }
.home-kpi-val { font-size: 21px; font-weight: 900; color: var(--navy); line-height: 1.1; }
.home-kpi-card.urgent .home-kpi-val { color: var(--red); }
.home-kpi-lbl { font-size: 11.8px; font-weight: 700; color: var(--text-2); margin-top: 2px; }
.home-kpi-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* میز اقدام امروز (دو ستون متمرکز) */
.home-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .home-action-grid { grid-template-columns: 1fr; } }
.home-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.home-panel-hdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-panel-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 900; color: var(--navy); }
.home-task-list { display: flex; flex-direction: column; gap: 7px; }
.home-task-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .14s;
}
.home-task-row:hover { border-color: var(--primary); }
.home-task-main { flex: 1; min-width: 0; cursor: pointer; }
.home-task-name { font-size: 12.6px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-task-sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-task-acts { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }

.sc-active-list { display: flex; flex-direction: column; gap: 6px; }
.sc-active-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}

/* ==================== v0.5.41: بنر زنده خوشامدگویی (آواتار + 👋 متحرک + ویجت ساعت دوسطری + هم‌ترازی عریض) ==================== */
.home-min-shell {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
}

.home-min-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 18px;
  background:
    radial-gradient(520px 180px at 96% 0%, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0) 70%),
    radial-gradient(420px 160px at 4% 100%, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.home-min-head:hover {
  border-color: rgba(59, 130, 246, 0.45);
}
.home-min-head:hover .wave-emoji {
  animation: waveHand 1.4s ease-in-out infinite;
}

.home-min-head-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 340px;
}
.home-min-av {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 19px;
  font-weight: 900;
  border: 2px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.home-min-av:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.18);
}
.home-min-av svg, .home-min-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-min-greet-col { min-width: 0; }
.home-min-greet {
  margin: 0;
  font-size: 18.5px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.home-min-greet .wave-emoji {
  font-size: 21px;
  line-height: 1;
}

.home-mkt-chip.role {
  background: var(--primary-soft);
  border-color: rgba(59, 130, 246, 0.30);
  color: var(--primary);
}

@keyframes liveMarketPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.land-mkt-dot.open {
  animation: liveMarketPulse 2.2s ease-out infinite;
}

.home-clock-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex-shrink: 0;
  text-align: right;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.home-clock-widget:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.home-clock-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.home-clock-tz {
  font-size: 9.8px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.2px;
}
.home-clock-widget .home-clock-time {
  font-size: 19px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.home-clock-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}
.home-clock-cal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.home-clock-weekday {
  font-size: 11.6px;
  font-weight: 800;
  color: var(--text);
}
.home-clock-widget .home-clock-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.home-clock-widget .home-clock-date [data-ico] {
  color: var(--primary);
}
.home-clock-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

/* ==================== v0.5.42: ریدیزاین مرکز صدور و تنظیم قرارداد رسمی (A4) ==================== */
.ct-studio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface-2));
  border: 1px solid rgba(59, 130, 246, 0.30);
}
.ct-sb-main { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--navy); }
.ct-sb-sep { color: var(--muted); }
.ct-sb-fin { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }

.ct-studio-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 12px;
  align-items: start;
}
@media (max-width: 820px) {
  .ct-studio-grid { grid-template-columns: 1fr; }
}
.ct-studio-col { display: flex; flex-direction: column; gap: 11px; }

.ct-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 13px;
}
.ct-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.ct-card-hdr > span:first-child { display: inline-flex; align-items: center; gap: 6px; }

.ct-checks-list { display: flex; flex-direction: column; gap: 6px; }
.ct-check-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.3px;
  line-height: 1.45;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.ct-check-ico {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}
.ct-check-item.ok .ct-check-ico { background: var(--green-soft); color: var(--green); }
.ct-check-item.warn { border-color: rgba(245, 158, 11, 0.38); }
.ct-check-item.warn .ct-check-ico { background: var(--amber-soft); color: var(--amber); }
.ct-check-item.err { border-color: rgba(239, 68, 68, 0.45); }
.ct-check-item.err .ct-check-ico { background: var(--red-soft); color: var(--red); }

.ct-kv-wrap { display: flex; flex-direction: column; gap: 5px; }
.ct-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.4px;
  color: var(--text-2);
}
.ct-kv-row b { color: var(--navy); font-weight: 800; text-align: left; }
.ct-kv-row.total {
  padding-top: 5px;
  margin-top: 2px;
  border-top: 1px dashed var(--border-strong);
  font-size: 12.2px;
  font-weight: 800;
  color: var(--navy);
}
.ct-kv-row.total b { color: var(--primary); font-size: 13px; }
.ct-kv-sep { height: 1px; background: var(--border); margin: 3px 0; }

.ct-quick-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ct-chip {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 10.4px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.ct-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.ct-sec-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11.3px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.ct-sec-toggle input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* ==================== v0.5.46: ریدیزاین خلوت و ساختاریافته تنظیمات مدیر ==================== */
.adm-subtabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.adm-subtab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.adm-subtab:hover {
  color: var(--text);
  background: var(--bg);
}
.adm-subtab.active {
  background: var(--soft);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.22);
}
.adm-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
@media (max-width: 960px) {
  .adm-two-col { grid-template-columns: 1fr; }
}
.adm-origins-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  padding-left: 2px;
}
.adm-origin-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.adm-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.2px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.adm-check-pill input { width: auto; }
.adm-save-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.adm-style-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 960px) {
  .adm-style-layout { grid-template-columns: 1fr; }
}
.adm-style-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.adm-swatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.2px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.adm-swatch input[type="color"] {
  width: 28px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* ==================== v0.5.51: بهینه‌سازی کامل ریسپانسیو موبایل برای هدر، کارت ساعت و صفحه اصلی ==================== */
.mobile-hdr-menu-btn {
  display: none;
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .mobile-hdr-menu-btn {
    display: inline-flex !important;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .dk-top {
    min-height: 54px;
    padding: 7px 10px;
    gap: 6px;
  }
  .dk-top-right {
    gap: 6px;
  }
  .dk-brand-img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .dk-search {
    padding: 7px 9px;
    gap: 6px;
    min-width: 0;
    border-radius: 9px;
  }
  .dk-search-ph {
    font-size: 11.4px;
  }
  .top-actions {
    gap: 5px;
    flex-shrink: 0;
  }
  .dk-quick-add-btn {
    padding: 0 9px !important;
    height: 32px;
    border-radius: 9px;
  }
  .top-profile-name {
    display: none;
  }
  .top-profile-chip {
    padding: 2px;
    border-radius: 99px;
  }

  /* کارت خوشامدگویی و ویجت ساعت + تقویم در موبایل */
  .home-min-head {
    padding: 12px 13px;
    gap: 10px;
  }
  .home-min-head-right {
    flex: 1 1 100%;
    gap: 10px;
  }
  .home-min-av {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 16px;
  }
  .home-min-greet {
    font-size: 15.5px;
  }
  .home-clock-widget {
    width: 100%;
    justify-content: space-between;
    padding: 9px 12px;
    gap: 10px;
    border-radius: 13px;
  }
  .home-clock-widget .home-clock-time {
    font-size: 16.5px;
  }
  .home-clock-divider {
    height: 26px;
  }
  .home-clock-weekday {
    font-size: 11px;
  }
  .home-clock-widget .home-clock-date {
    font-size: 10.5px;
  }

  /* شبکه میانبرهای دسترسی سریع در موبایل */
  .home-sc-bar-wrap {
    align-items: flex-start;
  }
  .home-sc-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .home-sc-card {
    padding: 9px 10px;
  }
}

@media (max-width: 460px) {
  .dk-qa-lbl {
    display: none;
  }
  .dk-quick-add-btn {
    width: 32px;
    padding: 0 !important;
    justify-content: center;
  }
  .theme-slider-btn {
    transform: scale(0.9);
  }
  .home-clock-tz {
    font-size: 9px;
  }
  .home-clock-widget .home-clock-time {
    font-size: 15px;
  }
}
