/* ============================================================
   همدان واش — سیستم طراحی لیکویید گلس (Liquid Glass)
   ============================================================ */

@import url("/lib/vazirmatn.css");
@import url("/lib/bootstrap-icons.min.css");

:root {
  --hw-primary: #0d9488;
  --hw-primary-2: #14b8a6;
  --hw-primary-deep: #0f766e;
  --hw-accent: #f59e0b;
  --hw-rose: #f43f5e;
  --hw-emerald: #10b981;
  --hw-ink: #134e4a;
  --hw-bg: #eef7f4;

  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .38));
  --glass-bg-strong: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .62));
  --glass-border: rgba(255, 255, 255, .65);
  --glass-blur: 20px;
  --glass-shadow: 0 8px 32px rgba(15, 118, 110, .12);
  --glass-shadow-hover: 0 14px 44px rgba(15, 118, 110, .2);
  --glass-radius: 1.25rem;

  --bs-primary: #0d9488;
  --bs-primary-rgb: 13, 148, 136;
  --bs-body-font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --bs-body-color: #27352f;
  --bs-body-bg: #eef7f4;
  --bs-link-color: #0f766e;
  --bs-link-hover-color: #0d9488;
  --bs-border-radius: .9rem;
  --bs-border-radius-lg: 1.25rem;
}

[data-bs-theme="dark"] {
  --hw-bg: #0b1517;
  --hw-ink: #99f6e4;
  --glass-bg: linear-gradient(135deg, rgba(23, 42, 44, .68), rgba(15, 27, 29, .42));
  --glass-bg-strong: linear-gradient(135deg, rgba(28, 50, 52, .92), rgba(17, 31, 33, .72));
  --glass-border: rgba(148, 210, 200, .18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, .35);
  --glass-shadow-hover: 0 14px 44px rgba(0, 0, 0, .5);
  --bs-body-bg: #0b1517;
  --bs-body-color: #d9ece8;
}

/* ---------- پس‌زمینه متحرک (بلاب‌های شیشه‌ای) ---------- */
body {
  min-height: 100vh;
  font-family: "Vazirmatn", system-ui, Tahoma, sans-serif;
  background: var(--hw-bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.hw-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hw-blobs::before,
.hw-blobs::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  animation: blobFloat 18s ease-in-out infinite alternate;
}

.hw-blobs::before {
  width: 44vw;
  height: 44vw;
  min-width: 340px;
  min-height: 340px;
  background: radial-gradient(circle at 30% 30%, #5eead4, #0d9488 60%, transparent 75%);
  top: -12vw;
  left: -10vw;
}

.hw-blobs::after {
  width: 38vw;
  height: 38vw;
  min-width: 300px;
  min-height: 300px;
  background: radial-gradient(circle at 70% 40%, #fcd34d, #f59e0b 55%, transparent 75%);
  bottom: -14vw;
  right: -8vw;
  animation-delay: -7s;
}

[data-bs-theme="dark"] .hw-blobs::before { opacity: .28; }
[data-bs-theme="dark"] .hw-blobs::after { opacity: .16; }

.hw-blob-3 {
  position: absolute;
  width: 26vw;
  height: 26vw;
  min-width: 220px;
  min-height: 220px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  background: radial-gradient(circle at 40% 60%, #fda4af, #f43f5e 60%, transparent 75%);
  top: 40%;
  left: 55%;
  animation: blobFloat 22s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, 3vh) scale(1.08); }
  100% { transform: translate(-3vw, -4vh) scale(.96); }
}

/* ---------- کارت شیشه‌ای ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  transition: box-shadow .35s ease, transform .35s ease, background .35s ease;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .8;
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.glass-hover:hover {
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-3px);
}

/* ---------- دکمه‌ها ---------- */
.btn-hw {
  --_btn-c: #fff;
  position: relative;
  border: 0;
  color: var(--_btn-c);
  font-weight: 600;
  border-radius: 1rem;
  padding: .6rem 1.35rem;
  background: linear-gradient(135deg, var(--hw-primary-2), var(--hw-primary-deep));
  box-shadow: 0 6px 18px rgba(13, 148, 136, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
  overflow: hidden;
}

.btn-hw:hover {
  color: var(--_btn-c);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(13, 148, 136, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
  filter: brightness(1.05);
}

.btn-hw:active { transform: translateY(0); }

.btn-hw-accent {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.btn-hw-accent:hover { box-shadow: 0 10px 26px rgba(245, 158, 11, .5), inset 0 1px 0 rgba(255, 255, 255, .4); }

.btn-hw-rose {
  background: linear-gradient(135deg, #fb7185, #be123c);
  box-shadow: 0 6px 18px rgba(244, 63, 94, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-glass {
  border: 1px solid rgba(13, 148, 136, .35);
  background: linear-gradient(135deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .25));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #0f766e;
  font-weight: 600;
  border-radius: 1rem;
  padding: .6rem 1.35rem;
  transition: all .25s ease;
}

.btn-glass:hover {
  color: #0d9488;
  border-color: rgba(13, 148, 136, .65);
  background: linear-gradient(135deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .5));
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-glass { color: #5eead4; border-color: rgba(94, 234, 212, .3); }
[data-bs-theme="dark"] .btn-glass:hover { color: #99f6e4; }

/* ---------- فرم‌ها ---------- */
.form-control, .form-select {
  border-radius: .9rem;
  border: 1px solid rgba(13, 148, 136, .22);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(8px);
  padding: .55rem .9rem;
}

[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select {
  background: rgba(17, 31, 33, .55);
  border-color: rgba(148, 210, 200, .2);
  color: #d9ece8;
}

.form-control:focus, .form-select:focus {
  border-color: var(--hw-primary-2);
  box-shadow: 0 0 0 .25rem rgba(20, 184, 166, .18);
  background: rgba(255, 255, 255, .85);
}

[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background: rgba(23, 42, 44, .8); }

.form-label { font-weight: 600; font-size: .875rem; color: #0f5d56; }
[data-bs-theme="dark"] .form-label { color: #99f6e4; }

.input-group-text {
  border-radius: 0 .9rem .9rem 0;
  border: 1px solid rgba(13, 148, 136, .22);
  background: rgba(13, 148, 136, .08);
}

/* ---------- نوار شیشه‌ای شناور ---------- */
.hw-navbar {
  position: sticky;
  top: .9rem;
  z-index: 1030;
  margin: .9rem auto 0;
  max-width: 1140px;
  border-radius: 1.4rem;
  padding: .55rem 1.1rem;
}

.hw-navbar .nav-link {
  color: #1e3932;
  font-weight: 600;
  border-radius: .9rem;
  padding: .5rem .85rem;
  transition: all .2s ease;
}

[data-bs-theme="dark"] .hw-navbar .nav-link { color: #c8e8e2; }

.hw-navbar .nav-link:hover { color: #0f766e; background: rgba(13, 148, 136, .1); }
[data-bs-theme="dark"] .hw-navbar .nav-link:hover { color: #99f6e4; background: rgba(94, 234, 212, .1); }

.hw-navbar .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--hw-primary-2), var(--hw-primary-deep));
  box-shadow: 0 4px 14px rgba(13, 148, 136, .4);
}

/* ---------- لوگو ---------- */
.hw-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(13, 148, 136, .35);
}

/* ---------- هیرو ---------- */
.hw-hero-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 4.2vw, 3rem);
  line-height: 1.6;
  background: linear-gradient(120deg, #134e4a 20%, #0d9488 55%, #0f766e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-bs-theme="dark"] .hw-hero-title {
  background: linear-gradient(120deg, #99f6e4, #5eead4, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
}

.hw-hero-sub { color: #3c5a53; font-size: clamp(.95rem, 2vw, 1.15rem); line-height: 2; }
[data-bs-theme="dark"] .hw-hero-sub { color: #a7c8c2; }

/* ---------- بج‌های نرم ---------- */
.bg-soft-teal { background: rgba(13, 148, 136, .14); color: #0f766e; }
.bg-soft-emerald { background: rgba(16, 185, 129, .16); color: #047857; }
.bg-soft-amber { background: rgba(245, 158, 11, .16); color: #b45309; }
.bg-soft-rose { background: rgba(244, 63, 94, .14); color: #be123c; }
.bg-soft-slate { background: rgba(71, 85, 105, .14); color: #334155; }
.bg-soft-gold { background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(251, 191, 36, .3)); color: #92400e; }
.bg-soft-silver { background: linear-gradient(135deg, rgba(148, 163, 184, .25), rgba(203, 213, 225, .35)); color: #475569; }
.bg-soft-bronze { background: linear-gradient(135deg, rgba(180, 83, 9, .16), rgba(217, 119, 6, .22)); color: #9a3412; }

[data-bs-theme="dark"] .bg-soft-teal { color: #5eead4; }
[data-bs-theme="dark"] .bg-soft-emerald { color: #6ee7b7; }
[data-bs-theme="dark"] .bg-soft-amber { color: #fcd34d; }
[data-bs-theme="dark"] .bg-soft-rose { color: #fda4af; }
[data-bs-theme="dark"] .bg-soft-slate { color: #cbd5e1; }
[data-bs-theme="dark"] .bg-soft-gold { color: #fbbf24; }
[data-bs-theme="dark"] .bg-soft-silver { color: #cbd5e1; }
[data-bs-theme="dark"] .bg-soft-bronze { color: #fdba74; }

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- جدول شیشه‌ای ---------- */
.table-glass {
  --bs-table-bg: transparent;
  border-collapse: separate;
  border-spacing: 0;
}

.table-glass thead th {
  background: rgba(13, 148, 136, .1);
  color: #0f5d56;
  font-weight: 700;
  font-size: .82rem;
  border-bottom: 1px solid rgba(13, 148, 136, .18) !important;
  padding: .8rem .75rem;
  white-space: nowrap;
}

.table-glass thead th:first-child { border-radius: 0 .8rem 0 0; }
.table-glass thead th:last-child { border-radius: .8rem 0 0 0; }

.table-glass tbody td {
  padding: .7rem .75rem;
  border-bottom: 1px solid rgba(13, 148, 136, .08);
  color: inherit;
  vertical-align: middle;
}

[data-bs-theme="dark"] .table-glass thead th { background: rgba(94, 234, 212, .08); color: #99f6e4; }
[data-bs-theme="dark"] .table-glass tbody td { border-color: rgba(148, 210, 200, .08); }

.table-glass tbody tr { transition: background .2s ease; }
.table-glass tbody tr:hover { background: rgba(13, 148, 136, .06); }
[data-bs-theme="dark"] .table-glass tbody tr:hover { background: rgba(94, 234, 212, .05); }

/* ---------- سایدبار پنل‌ها ---------- */
.hw-shell { max-width: 1320px; margin: 0 auto; width: 100%; padding: 1rem; }

/* v1.3.2: مانیتور — سایدبار کامل و باز در جریان صفحه؛ موبایل — کشویی با دکمه همبرگر */
.hw-sidebar {
  width: 275px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  max-height: calc(100vh - 2rem);
  border-radius: 18px;
  overflow-y: auto;
  padding: 1rem .8rem;
}
@media (max-width: 991.98px) {
  .hw-sidebar {
    position: fixed;
    top: 0; bottom: 0; right: -300px; left: auto;
    z-index: 1080;
    max-height: 100vh;
    border-radius: 0;
    transition: right .3s ease;
  }
  .hw-sidebar.open {
    right: 0;
    box-shadow: -18px 0 50px rgba(15, 23, 42, .22);
  }
}
.hw-sidebar-backdrop {
  position: fixed; inset: 0; z-index: 1075;
  background: rgba(8, 28, 26, .45);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.hw-sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

.hw-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #27423c;
  font-weight: 600;
  font-size: .9rem;
  border-radius: .9rem;
  padding: .6rem .8rem;
  margin-bottom: .2rem;
  transition: all .2s ease;
}

[data-bs-theme="dark"] .hw-sidebar .nav-link { color: #b6d5cf; }

.hw-sidebar .nav-link i { font-size: 1.05rem; opacity: .8; }
.hw-sidebar .nav-link:hover { background: rgba(13, 148, 136, .1); color: #0f766e; }
[data-bs-theme="dark"] .hw-sidebar .nav-link:hover { background: rgba(94, 234, 212, .1); color: #99f6e4; }

.hw-sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--hw-primary-2), var(--hw-primary-deep));
  color: #fff;
  box-shadow: 0 5px 16px rgba(13, 148, 136, .35);
}

.hw-sidebar .nav-section {
  font-size: .72rem;
  font-weight: 700;
  color: #6a8c85;
  padding: .9rem .8rem .35rem;
  letter-spacing: .03em;
}

[data-bs-theme="dark"] .hw-sidebar .nav-section { color: #6f948d; }

/* ---------- کارت آمار ---------- */
.stat-card { padding: 1.15rem 1.25rem; overflow: hidden; }

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.stat-card .stat-value { font-size: clamp(1.05rem, 3.4vw, 1.5rem); font-weight: 800; line-height: 1.4; }
.stat-card .stat-value .small { margin-right: .18rem; white-space: nowrap; }
.stat-card .stat-label { font-size: .8rem; color: #57736c; font-weight: 600; }
[data-bs-theme="dark"] .stat-card .stat-label { color: #8fb3ac; }

.stat-card .stat-trend { font-size: .75rem; font-weight: 700; }

/* ---------- آیتم ویجت صفحه‌ساز ---------- */
.widget-palette-item, .widget-canvas-item {
  border-radius: 1rem;
  border: 1px dashed rgba(13, 148, 136, .35);
  background: rgba(255, 255, 255, .5);
  padding: .7rem 1rem;
  cursor: grab;
  font-weight: 600;
  font-size: .88rem;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.widget-canvas-item { border-style: solid; border-color: rgba(13, 148, 136, .3); cursor: grab; }
.widget-palette-item:hover, .widget-canvas-item:hover { background: rgba(13, 148, 136, .09); }
.widget-canvas-item.dragging { opacity: .55; border-color: var(--hw-primary-2); }
.widget-drop-hint {
  border: 2px dashed rgba(13, 148, 136, .5);
  border-radius: 1rem;
  padding: .5rem;
  margin: .3rem 0;
  background: rgba(13, 148, 136, .06);
}

/* ---------- تایم‌لاین وضعیت سفارش ---------- */
.status-track { display: flex; align-items: center; gap: 0; margin: 1rem 0; }
.status-step { flex: 1; text-align: center; position: relative; }
.status-step .dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto .4rem;
  background: rgba(13, 148, 136, .12); color: #6a8c85; font-weight: 700;
  transition: all .3s ease;
}
.status-step .lbl { font-size: .72rem; font-weight: 700; color: #6a8c85; }
.status-step::after {
  content: ""; position: absolute; top: 19px; right: calc(-50% + 24px);
  width: calc(100% - 48px); height: 3px; border-radius: 3px;
  background: rgba(13, 148, 136, .15);
}
.status-step:last-child::after { display: none; }
.status-step.done .dot { background: linear-gradient(135deg, var(--hw-primary-2), var(--hw-primary-deep)); color: #fff; box-shadow: 0 4px 12px rgba(13, 148, 136, .35); }
.status-step.done .lbl { color: #0f766e; }
.status-step.done::after { background: linear-gradient(90deg, var(--hw-primary-deep), var(--hw-primary-2)); }
.status-step.current .dot { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; box-shadow: 0 4px 14px rgba(245, 158, 11, .4); animation: pulseDot 1.6s ease infinite; }
.status-step.current .lbl { color: #b45309; }

@keyframes pulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(245, 158, 11, .4); }
  50% { transform: scale(1.08); box-shadow: 0 6px 20px rgba(245, 158, 11, .55); }
}

/* ---------- فوتر ---------- */
footer.hw-footer {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

/* ---------- اسکرول‌بار سفارشی ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(13, 148, 136, .45), rgba(13, 148, 136, .25));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(13, 148, 136, .6); background-clip: content-box; }

/* ---------- توست ---------- */
.hw-toast-wrap { position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.hw-toast {
  min-width: 280px; max-width: 360px;
  animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- مودال ---------- */
.modal-content {
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 20px 60px rgba(15, 118, 110, .25);
}

[data-bs-theme="dark"] .modal-content { background: linear-gradient(135deg, rgba(23, 42, 44, .97), rgba(15, 27, 29, .95)); color: #d9ece8; }

/* ---------- انیمیشن ورود صفحه ---------- */
.fade-up { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fade-up-1 { animation-delay: .06s; } .fade-up-2 { animation-delay: .12s; } .fade-up-3 { animation-delay: .18s; }

/* ---------- کارت پلن ---------- */
.plan-card { position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--glass-shadow-hover); }
.plan-card .plan-ribbon {
  position: absolute; top: 1.1rem; left: -3.2rem;
  transform: rotate(-38deg);
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff; font-weight: 700; font-size: .72rem;
  padding: .3rem 3.5rem; box-shadow: 0 4px 12px rgba(245, 158, 11, .4);
}

/* ---------- موبایل ---------- */
@media (max-width: 991.98px) {
  .status-step::after { top: 18px; right: calc(-50% + 20px); width: calc(100% - 40px); }
}

/* ---------- چارت ---------- */
.chart-wrap { position: relative; width: 100%; }

/* ---------- متن کمکی ---------- */
.text-hw { color: var(--hw-primary) !important; }
.text-muted-2 { color: #5c7a73 !important; font-size: .85rem; }
[data-bs-theme="dark"] .text-muted-2 { color: #7fa39c !important; }

.hw-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(13, 148, 136, .25), transparent); margin: 1rem 0; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: #6a8c85; }
.empty-state i { font-size: 2.6rem; opacity: .35; display: block; margin-bottom: .8rem; }

/* ---------- زیرمنوی سایدبار (nav-sub) v1.2 ---------- */
.nav-sub { display: flex; flex-direction: column; gap: .15rem; margin: .1rem 1.2rem .4rem; padding-right: .5rem; border-right: 2px solid rgba(13, 148, 136, .18); }
.nav-sub a {
  display: flex; align-items: center; gap: .4rem;
  font-size: .72rem; padding: .32rem .6rem; border-radius: 8px;
  color: #5c7a73; text-decoration: none; transition: all .18s ease;
}
.nav-sub a i { font-size: .78rem; opacity: .8; }
.nav-sub a:hover { background: rgba(13, 148, 136, .1); color: #0f766e; transform: translateX(-2px); }
.nav-sub a.active { background: rgba(13, 148, 136, .16); color: #0f766e; font-weight: 700; }
[data-bs-theme="dark"] .nav-sub a { color: #7fa39c; }
[data-bs-theme="dark"] .nav-sub a:hover,
[data-bs-theme="dark"] .nav-sub a.active { background: rgba(45, 212, 191, .14); color: #5eead4; }
[data-bs-theme="dark"] .nav-sub { border-right-color: rgba(45, 212, 191, .2); }

/* ---------- بنفش نرم ---------- */
.bg-soft-violet { background: rgba(139, 92, 246, .14); color: #6d28d9; }
[data-bs-theme="dark"] .bg-soft-violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; }

/* ---------- لینک برجسته میز کار ---------- */
.nav-link.nav-workbench {
  background: linear-gradient(135deg, rgba(13, 148, 136, .16), rgba(245, 158, 11, .12));
  border: 1px solid rgba(13, 148, 136, .25);
  margin: .15rem .25rem; border-radius: 12px;
  font-weight: 700;
}
.nav-link.nav-workbench:hover { border-color: rgba(13, 148, 136, .5); transform: translateY(-1px); }

/* ---------- v1.3.1: لینک برجسته تمدید پشتیبانی (فقط پس از پایان واقعی یک سال / نزدیک پایان) ---------- */
.nav-link.nav-support-renew {
  display: flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, .2), rgba(244, 63, 94, .12));
  border: 1px solid rgba(245, 158, 11, .45);
  margin: .1rem .25rem .35rem; border-radius: 12px;
  font-weight: 800; color: #92400e !important;
  text-decoration: none;
  animation: supportPulse 2.4s ease-in-out infinite;
}
.nav-link.nav-support-renew:hover { border-color: #f59e0b; transform: translateY(-1px); }
[data-bs-theme="dark"] .nav-link.nav-support-renew { color: #fcd34d !important; background: linear-gradient(135deg, rgba(245, 158, 11, .18), rgba(244, 63, 94, .14)); }
@keyframes supportPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .35); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* ---------- حالت تمام‌صفحه میز کار (Workbench) ----------
   v1.3.2: میز کار در «همه» حالت‌ها دکمه همبرگر دارد — سایدبار همیشه کشویی است */
body.wb-mode .hw-shell { padding: .55rem; max-width: none; }
body.wb-mode .wb-row { gap: .45rem !important; }
body.wb-mode .hw-navbar { display: none !important; }

body.wb-mode .hw-sidebar {
  position: fixed;
  top: 0; bottom: 0; right: -300px; left: auto;
  width: 275px;
  z-index: 1080;
  max-height: 100vh;
  border-radius: 0;
  transition: right .3s ease;
  overflow-y: auto;
  padding: 1rem .8rem;
}
body.wb-mode .hw-sidebar.open {
  right: 0;
  box-shadow: -18px 0 50px rgba(15, 23, 42, .28);
}
@media (max-width: 991.98px) {
  body.wb-mode .nav-link.nav-support-renew { animation: none; }
}

/* ---------- استایل‌های صفحه میز کار ---------- */
.wb-root { display: flex; flex-direction: column; gap: .55rem; height: calc(100vh - 1.1rem); }
.wb-header {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .6rem .9rem; border-radius: 16px; flex-wrap: wrap;
}
.wb-columns { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: .55rem; flex: 1; min-height: 0; }
@media (max-width: 1199.98px) { .wb-columns { grid-template-columns: 200px minmax(0, 1fr) 280px; } }
@media (max-width: 991.98px) { .wb-columns { grid-template-columns: 1fr; overflow-y: auto; } }

.wb-col { border-radius: 16px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.wb-col-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .8rem; font-weight: 800; font-size: .82rem;
  border-bottom: 1px solid rgba(148, 163, 184, .18); flex-shrink: 0;
}
.wb-col-body { overflow-y: auto; padding: .55rem; flex: 1; min-height: 0; }

.wb-cat {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 12px;
  cursor: pointer; border: 1px solid transparent; transition: all .16s ease; margin-bottom: .3rem;
  font-size: .8rem; font-weight: 600;
}
.wb-cat:hover { background: rgba(13, 148, 136, .09); }
.wb-cat.active { background: rgba(13, 148, 136, .16); border-color: rgba(13, 148, 136, .35); color: #0f766e; }

.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.wb-prod {
  border-radius: 14px; padding: .65rem .7rem; cursor: pointer; text-align: center;
  border: 1px solid rgba(148, 163, 184, .22); transition: all .16s ease; background: rgba(255, 255, 255, .35);
}
.wb-prod:hover { border-color: rgba(13, 148, 136, .5); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13, 148, 136, .12); }
.wb-prod:active { transform: translateY(0); }
[data-bs-theme="dark"] .wb-prod { background: rgba(15, 23, 42, .35); }

.wb-add-tile {
  border: 2px dashed rgba(13, 148, 136, .4); border-radius: 14px; display: grid; place-items: center;
  min-height: 92px; cursor: pointer; color: #0d9488; transition: all .18s ease; font-size: .78rem; font-weight: 700;
}
.wb-add-tile:hover { background: rgba(13, 148, 136, .1); border-color: rgba(13, 148, 136, .7); }

.wb-cart-item {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .7rem; border-radius: 12px; background: rgba(255, 255, 255, .4);
  border: 1px solid rgba(148, 163, 184, .2); margin-bottom: .4rem; font-size: .8rem;
}
[data-bs-theme="dark"] .wb-cart-item { background: rgba(15, 23, 42, .4); }
.wb-customer-pick {
  padding: .6rem .7rem; border-radius: 12px; border: 1px solid rgba(13, 148, 136, .3);
  background: rgba(13, 148, 136, .08);
}

.wb-search-results { max-height: 260px; overflow-y: auto; }
.wb-search-item {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem .65rem; border-radius: 10px; cursor: pointer; font-size: .78rem;
  transition: background .15s ease;
}
.wb-search-item:hover { background: rgba(13, 148, 136, .12); }

.wb-scroll::-webkit-scrollbar { width: 6px; }
.wb-scroll::-webkit-scrollbar-thumb { background: rgba(13, 148, 136, .3); border-radius: 6px; }
.wb-col-body { scrollbar-width: thin; scrollbar-color: rgba(13, 148, 136, .35) transparent; }

/* ---------- v1.3.7 — هدف لمسی دکمه‌های آیکونی جدول در موبایل (حداقل ۴۰px) ---------- */
@media (max-width: 576px) {
  .table-responsive .btn.rounded-circle,
  .table-glass .btn.rounded-circle {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .45rem;
  }
  .table-responsive .d-flex.gap-1 { gap: .5rem !important; }
}
