/* بوفه طلا: RTL + Yekan Bakh on MatDash dark */

@font-face {
  font-family: "Yekan Bakh";
  src: url("../fonts/yekan-bakh/YekanBakh-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("../fonts/yekan-bakh/YekanBakh-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("../fonts/yekan-bakh/YekanBakh-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html[dir="rtl"] body,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .btn {
  font-family: "Yekan Bakh", Tahoma, sans-serif !important;
}

html[dir="rtl"] body {
  text-align: right;
}

/* —— RTL: متن و placeholder فیلدها —— */
html[dir="rtl"] input.form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html[dir="rtl"] textarea.form-control,
html[dir="rtl"] select.form-select,
html[dir="rtl"] .vc-input,
html[dir="rtl"] .vc-select,
html[dir="rtl"] .vc-textarea {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] input.form-control::placeholder,
html[dir="rtl"] textarea.form-control::placeholder,
html[dir="rtl"] .vc-input::placeholder,
html[dir="rtl"] .vc-textarea::placeholder {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] select.form-select,
html[dir="rtl"] .vc-select {
  text-align-last: right;
}

/* مبلغ: بلوک LTR — واحد قبل از شروع عدد (چپ ارقام)، نه بعد از آن */
.vc-money-display {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.4rem;
  direction: ltr;
  unicode-bidi: isolate;
  max-width: 100%;
}
html[dir="rtl"] .vc-stat-card__value .vc-money-display,
html[dir="rtl"] .vc-stat-card__value.vc-money-display {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
}
html[dir="rtl"] .vc-stat-card__value {
  text-align: end;
}
.vc-money-unit {
  font-weight: 600;
  color: var(--bs-secondary-color);
  font-size: 0.92em;
  flex-shrink: 0;
}
.vc-money-digits {
  font-weight: 700;
  font-size: 1em;
  line-height: 1.2;
  white-space: nowrap;
}
.vc-wallet-flow {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}
.vc-wallet-flow__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.vc-wallet-flow__kind {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.vc-wallet-flow__amt .vc-money-unit {
  opacity: 0.95;
}
.vc-wallet-flow__row--in .vc-money-digits,
.vc-wallet-flow__row--out .vc-money-digits {
  color: inherit;
}

/* سریال/کد: placeholder فارسی راست، مقدار تایپ‌شده چپ‌به‌راست */
html[dir="rtl"] .vc-input--value-ltr::placeholder {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .vc-input--value-ltr:focus,
html[dir="rtl"] .vc-input--value-ltr:not(:placeholder-shown) {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .vc-input-wrap--icon .vc-input--value-ltr:not(:placeholder-shown),
html[dir="rtl"] .vc-input-wrap--icon .vc-input--value-ltr:focus {
  padding-inline-start: 0.95rem;
}

.boofetala-brand-text {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* —— Layout helpers —— */
.vc-page-header {
  gap: 1rem;
}

.vc-card {
  border-radius: 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  height: auto;
}

/* ارتفاع یکسان فقط داخل گرید ستونی — نه کارت‌های پشت‌سرهم در یک ستون */
.vc-stat-row > [class*="col"] > .vc-card,
.vc-stat-row > [class*="col"] > a.vc-card,
.row > [class*="col"] > .vc-card.h-100,
.row > [class*="col"] > a.vc-card.h-100 {
  height: 100%;
}

.vc-card--filter {
  background: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.06), transparent);
}

.vc-stack-cards > .vc-card,
.vc-card--stacked,
.vc-role-picker-card.vc-card {
  height: auto;
  align-self: flex-start;
}

.vc-card .card-body {
  padding: 1.25rem 1.35rem;
}

@media (min-width: 768px) {
  .vc-card .card-body {
    padding: 1.5rem 1.65rem;
  }
}

/* —— Stat cards —— */
.vc-stat-row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

.vc-stat-row > [class*="col"] {
  min-width: 0;
}

.vc-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vc-stat-card .card-body {
  min-width: 0;
  max-width: 100%;
}

.vc-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.vc-stat-card--drill {
  cursor: pointer;
}

.vc-stat-card--drill:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.65);
  outline-offset: 2px;
}

.vc-stat-card--drill::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.65rem;
  top: 0.55rem;
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.35;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.vc-stat-drill-offcanvas {
  --bs-offcanvas-width: min(32rem, 100vw);
}

.vc-stat-drill-offcanvas .offcanvas-body {
  padding: 1.15rem 1.25rem 1.5rem;
}

.vc-stat-drill-panel__hero {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.18), rgba(var(--bs-primary-rgb), 0.04));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
}

.vc-stat-drill-panel__value {
  font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem);
  font-weight: 700;
}

.vc-stat-drill-panel__hint {
  line-height: 1.65;
}

.vc-stat-drill-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--bs-secondary-color);
}

.vc-stat-drill-metric {
  padding: 0.55rem 0.5rem;
  border-radius: 0.55rem;
  background: rgba(var(--bs-body-color-rgb, 255, 255, 255), 0.04);
  border: 1px solid var(--bs-border-color-translucent);
  text-align: center;
  min-height: 100%;
}

.vc-stat-drill-metric__label {
  display: block;
  font-size: 0.68rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.15rem;
}

.vc-stat-drill-metric__value {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.vc-stat-drill-insight {
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border-inline-start: 3px solid var(--bs-secondary);
  background: rgba(var(--bs-body-color-rgb, 255, 255, 255), 0.03);
  margin-bottom: 0.5rem;
}

.vc-stat-drill-insight--warn {
  border-inline-start-color: var(--bs-warning);
}

.vc-stat-drill-insight--danger {
  border-inline-start-color: var(--bs-danger);
}

.vc-stat-drill-insight--ok {
  border-inline-start-color: var(--bs-success);
}

.vc-stat-drill-table-wrap {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.55rem;
  overflow: hidden;
}

.vc-stat-drill-table-wrap .table thead th {
  font-size: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.vc-stat-drill-entity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vc-stat-drill-entity {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid var(--bs-border-color-translucent);
  background: rgba(var(--bs-body-color-rgb, 255, 255, 255), 0.02);
}

.vc-stat-drill-entity__link {
  text-decoration: none;
  color: inherit;
}

.vc-stat-drill-entity__link:hover {
  color: rgb(var(--bs-primary-rgb));
}

.vc-stat-drill-narrative {
  padding-inline-start: 1.1rem;
  margin-bottom: 0;
}

.vc-stat-drill-empty {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(var(--bs-body-color-rgb, 255, 255, 255), 0.03);
}

a.vc-stat-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.vc-stat-card--link:hover {
  color: inherit;
}

.vc-stat-card__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.15;
  color: var(--bs-primary);
}

.vc-stat-card__label {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.35rem;
}

.vc-stat-card__value {
  font-size: clamp(1rem, 0.75rem + 1.1vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

/* مبالغ داخل KPI — همان بلوک LTR (واحد چپ ارقام)، بدون سرریز */
.vc-stat-card .vc-money-display {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.25rem;
  max-width: 100%;
  min-width: 0;
}

.vc-stat-card .vc-money-unit {
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.9;
  flex-shrink: 0;
}

.vc-stat-card .vc-money-digits {
  font-size: var(--vc-fs, clamp(0.88rem, 0.5rem + 1vw, 1.28rem));
  line-height: 1.2;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.vc-stat-card .vc-wallet-flow {
  font-size: clamp(0.82rem, 0.45rem + 0.85vw, 1.05rem);
}

.vc-stat-card .vc-wallet-flow .vc-money-digits {
  font-size: inherit;
}

.vc-stat-card__meta {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
}

.vc-stat-card--accent {
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.22), rgba(var(--bs-primary-rgb), 0.06));
  border-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* —— Forms —— */
.vc-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-body-color);
  display: block;
}

.vc-field {
  margin-bottom: 0;
}

.vc-filter-form .vc-field + .vc-field {
  margin-top: 0;
}

.vc-input-wrap {
  position: relative;
  display: block;
}

/* آیکون سمت «پایان» خط (چپ در RTL) — متن از راست شروع می‌شود و با آیکون تداخل ندارد */
.vc-input-wrap--icon .vc-input,
.vc-input-wrap--icon .vc-select,
.vc-input-wrap--icon .form-control,
.vc-input-wrap--icon .form-select {
  padding-inline-start: 0.95rem;
  padding-inline-end: 2.85rem;
}

.vc-field-icon {
  position: absolute;
  inset-inline-end: 0.95rem;
  inset-inline-start: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  font-size: 1.35rem;
  color: var(--bs-secondary-color);
  pointer-events: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.vc-input-wrap--icon:has(.vc-textarea) .vc-field-icon,
.vc-input-wrap--icon:has(textarea) .vc-field-icon {
  top: 0.95rem;
  transform: none;
}

.vc-input-wrap--icon:has(.vc-textarea) .vc-textarea,
.vc-input-wrap--icon:has(textarea) textarea {
  padding-inline-end: 2.85rem;
  min-height: 6rem;
}

.vc-input-wrap.is-focused .vc-field-icon {
  color: var(--bs-primary);
}

.vc-input,
.vc-select,
.vc-textarea,
.vc-date-input {
  border-radius: 0.65rem !important;
  min-height: 2.75rem;
  padding-block: 0.55rem;
  padding-inline: 0.95rem;
  line-height: 1.45;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.12) !important;
  background-color: rgba(var(--bs-body-bg-rgb), 0.65) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vc-input:focus,
.vc-select:focus,
.vc-textarea:focus,
.vc-date-input:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.55) !important;
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15) !important;
}

.vc-textarea {
  min-height: 5.5rem;
}

.vc-filter-form .vc-field {
  margin-bottom: 0;
}

.vc-filter-form .vc-field--open-only .vc-filter-switch {
  min-height: 2.75rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  border-radius: 0.65rem;
  background: rgba(var(--bs-body-bg-rgb), 0.65);
  transition: border-color 0.15s ease, background 0.15s ease;
}

html[dir="rtl"] .vc-filter-form .vc-field--open-only .vc-filter-switch {
  flex-direction: row-reverse;
  justify-content: space-between;
}

.vc-filter-form .vc-field--open-only .vc-filter-switch:has(.form-check-input:checked) {
  border-color: rgba(var(--bs-primary-rgb), 0.32);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.vc-filter-form .vc-field--open-only .form-check-input:focus {
  box-shadow: none;
  outline: none;
}

.vc-filter-form .vc-field--open-only .form-check-input:focus-visible {
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.35);
}

.vc-filter-form .vc-field--open-only .form-check-input {
  width: 2.65em;
  height: 1.35em;
  margin: 0;
  flex-shrink: 0;
  float: none;
  cursor: pointer;
  background-position: right center;
  border-radius: 2em;
}

html[dir="rtl"] .vc-filter-form .vc-field--open-only .form-check-input {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.vc-filter-form .vc-field--open-only .form-check-label {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  white-space: normal;
}

.vc-filter-form .vc-field--open-only--compact .form-label {
  display: none;
}

.vc-filter-form .vc-field--open-only--compact .vc-filter-switch {
  min-height: 2.75rem;
}

/* نوار فیلتر ارشد: سوئیچ هم‌تراز با inputها */
.vc-executive-filter-bar .vc-field--open-only .vc-label {
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.vc-executive-filter-bar .col--open-only {
  flex: 0 1 auto;
  min-width: min(100%, 13.5rem);
}

.vc-filter-form .vc-field--submit .vc-filter-submit {
  min-height: 2.75rem;
  white-space: nowrap;
}

.vc-filter-form .row.align-items-end > [class*="col-"] {
  min-width: 0;
}

.vc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.vc-form-actions .btn {
  min-height: 2.75rem;
  border-radius: 0.65rem;
  padding-inline: 1.25rem;
}

.vc-page-hero .vc-form-actions--cta,
.vc-stat-card--accent .vc-form-actions--cta {
  width: 100%;
  justify-content: stretch;
}

.vc-page-hero .vc-form-actions--cta .btn,
.vc-stat-card--accent .vc-form-actions--cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 1 auto;
}

.vc-insight-list {
  margin: 0;
  padding-inline-start: 1.15rem;
  font-size: 0.9rem;
}

.vc-insight-card {
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
  background: rgba(var(--bs-body-bg-rgb), 0.55);
  border-inline-start-width: 3px;
  border-inline-start-style: solid;
}

.vc-insight-card__title {
  font-size: 0.875rem;
  font-weight: 700;
}

.vc-insight-card__body {
  line-height: 1.55;
}

.vc-insight-card--ok {
  border-inline-start-color: var(--bs-success);
  background: rgba(var(--bs-success-rgb), 0.06);
}

.vc-insight-card--info {
  border-inline-start-color: var(--bs-info);
}

.vc-insight-card--warn {
  border-inline-start-color: var(--bs-warning);
  background: rgba(var(--bs-warning-rgb), 0.07);
}

.vc-insight-card--drill {
  cursor: pointer;
}

.vc-insight-card--drill:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.55);
  outline-offset: 2px;
}

.vc-insight-card--drill:active {
  transform: translateY(1px);
}

.vc-insight-card--danger {
  border-inline-start-color: var(--bs-danger);
  background: rgba(var(--bs-danger-rgb), 0.08);
}

.vc-insight-list li {
  margin-bottom: 0.65rem;
  line-height: 1.65;
}

.vc-insight-list li:last-child {
  margin-bottom: 0;
}

.vc-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 12rem;
  height: clamp(12rem, 32vh, 20rem);
}

.vc-chart-wrap[style*="--vc-chart-bars"] {
  min-height: max(12rem, calc(var(--vc-chart-bars, 3) * 2.75rem + 3rem));
}

.vc-chart-panel .card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.vc-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 14rem;
  direction: ltr;
}

.vc-chart-canvas-wrap--tall {
  height: 17rem;
}

.vc-chart-canvas-wrap--transitions {
  height: auto;
  min-height: 12rem;
  max-height: 22rem;
}

.vc-chart-canvas-wrap--transitions[style*="--vc-chart-bars"] {
  min-height: max(12rem, calc(var(--vc-chart-bars, 4) * 2.85rem + 2rem));
}

.vc-analytics-block + .vc-analytics-block {
  margin-top: 0;
}

.vc-analytics-chart-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.vc-analytics-chart-row .vc-chart-panel {
  flex: 1 1 auto;
}

.vc-chart-panel__head h6 {
  font-size: 0.95rem;
}

@media (min-width: 992px) {
  .vc-chart-canvas-wrap {
    height: 16rem;
  }

  .vc-chart-canvas-wrap--tall {
    height: 19rem;
  }
}

.vc-compare-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  border-radius: 0.65rem;
  background: rgba(var(--bs-primary-rgb), 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vc-compare-chip:has(.form-check-input:checked) {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  background: rgba(var(--bs-primary-rgb), 0.12);
}

.vc-compare-chip .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.vc-compare-chip .form-check-label {
  font-size: 0.85rem;
  line-height: 1.35;
}

.vc-link-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vc-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.vc-nav-tabs {
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.15);
  gap: 0.25rem;
}

.vc-nav-tabs .nav-link {
  border: none;
  border-radius: 0.65rem 0.65rem 0 0;
  color: var(--bs-secondary-color);
  padding: 0.65rem 1.1rem;
  white-space: nowrap;
}

.vc-nav-tabs .nav-link.active {
  background: rgba(var(--bs-primary-rgb), 0.15);
  color: var(--bs-primary);
  font-weight: 600;
}

.vc-tab-content {
  min-height: 120px;
}

/* پس از submit فیلتر، Bootstrap/مرورگر روی tab-pane outline سفید می‌گذارد */
.vc-tab-scope .tab-pane:focus,
.vc-tab-scope .tab-pane:focus-visible {
  outline: none !important;
  box-shadow: none;
}

.vc-tab-scope .vc-filter-form:focus,
.vc-tab-scope .vc-filter-form:focus-within {
  outline: none;
  box-shadow: none;
}

/* —— Jalali datepicker (dark MatDash) —— */
jdp-container {
  font-family: "Yekan Bakh", Tahoma, sans-serif !important;
  z-index: 1100 !important;
}

html[data-bs-theme="dark"] jdp-container {
  background: #1e2130 !important;
  border-radius: 0.85rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55) !important;
  color: #e8eaef;
}

html[data-bs-theme="dark"] jdp-container .jdp-day,
html[data-bs-theme="dark"] jdp-container .jdp-day-name,
html[data-bs-theme="dark"] jdp-container .jdp-months,
html[data-bs-theme="dark"] jdp-container .jdp-years {
  color: #e8eaef !important;
  fill: #e8eaef;
}

html[data-bs-theme="dark"] jdp-container .jdp-month select,
html[data-bs-theme="dark"] jdp-container .jdp-year select,
html[data-bs-theme="dark"] jdp-container .jdp-month input,
html[data-bs-theme="dark"] jdp-container .jdp-year input {
  background: #252a3a !important;
  color: #e8eaef !important;
}

html[data-bs-theme="dark"] jdp-container .jdp-icon-minus,
html[data-bs-theme="dark"] jdp-container .jdp-icon-plus {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-bs-theme="dark"] jdp-container .jdp-day:not(.disabled-day):hover {
  background: rgba(var(--bs-primary-rgb), 0.25) !important;
}

html[data-bs-theme="dark"] jdp-container .jdp-day.selected,
html[data-bs-theme="dark"] jdp-container .jdp-day-name.selected {
  background-color: var(--bs-primary) !important;
}

html[data-bs-theme="dark"] jdp-container .jdp-day-name {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-bs-theme="dark"] jdp-container .jdp-btn-empty,
html[data-bs-theme="dark"] jdp-container .jdp-btn-today {
  background: var(--bs-primary) !important;
}

.vc-date-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239aa3b5' stroke-width='1.5'%3E%3Cpath d='M7 3v3M17 3v3M4.5 8h15M5 21h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1.15rem 1.15rem;
  background-position: left 0.95rem center;
  padding-inline-start: 0.95rem !important;
  padding-inline-end: 2.85rem !important;
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .vc-date-input::placeholder {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .vc-input-wrap--icon .form-select {
  background-position: left 0.75rem center;
  padding-inline-end: 2.85rem;
}

/* Tables on dashboard */
.vc-table-card .table {
  margin-bottom: 0;
}

.vc-table-card .table th {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* انتخاب کاربر از سایت اصلی */
.vc-site-user-table__grid tbody tr.vc-site-user-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.vc-site-user-table__grid tbody tr.vc-site-user-row:hover,
.vc-site-user-table__grid tbody tr.vc-site-user-row:focus-visible {
  background: rgba(var(--bs-primary-rgb), 0.07);
  outline: none;
}

.vc-site-user-table__grid tbody tr.vc-site-user-row--linked {
  border-inline-start: 3px solid rgba(var(--bs-success-rgb), 0.55);
}

.vc-site-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  flex-shrink: 0;
}

.vc-site-user-role-badges .badge {
  font-weight: 500;
  font-size: 0.7rem;
}

.vc-site-user-chip {
  font-size: 0.65rem;
  font-weight: 500;
}

.vc-site-user-preview-canvas {
  --bs-offcanvas-width: min(22rem, 100vw);
}

.vc-site-user-preview-kv li {
  padding-block: 0.2rem;
  border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.35);
}

.vc-site-user-preview-kv li:last-child {
  border-bottom: 0;
}

/* جدول مشخصات (key–value) در صفحات جزئیات */
.vc-kv-table th[scope="row"] {
  width: 36%;
  max-width: 11rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  vertical-align: top;
  white-space: nowrap;
  background: rgba(var(--bs-secondary-rgb), 0.06);
  border-inline-end: 1px solid rgba(var(--bs-border-color-rgb), 0.55);
}

html[dir="rtl"] .vc-kv-table th[scope="row"] {
  text-align: right;
}

.vc-kv-table td {
  font-size: 0.9rem;
  vertical-align: top;
  word-break: break-word;
}

.vc-kv-table tbody tr:not(:last-child) th,
.vc-kv-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.35);
}

.vc-timeline-table thead th {
  background: rgba(var(--bs-primary-rgb), 0.08);
  border-bottom-width: 1px;
}

.vc-timeline-table__note-row td {
  background: rgba(var(--bs-secondary-rgb), 0.04);
}

.vc-page-head--detail {
  align-items: flex-start;
}

.vc-page-head--detail .vc-page-head__main {
  flex: 1 1 auto;
  min-width: 0;
}

.vc-page-head--detail .vc-page-head__aside {
  margin-inline-start: auto;
}

@media (max-width: 575.98px) {
  .vc-page-head--detail {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .vc-page-head--detail .vc-page-head__aside {
    margin-inline-start: 0;
    align-self: flex-start;
  }

  .vc-kv-table th[scope="row"] {
    width: 38%;
    font-size: 0.78rem;
  }
}

.vc-export-preview-panel .vc-export-preview-frame {
  min-height: min(78vh, 920px);
  height: 78vh;
  background: #0f1524;
}

@media (max-width: 991.98px) {
  .vc-export-preview-panel .vc-export-preview-frame {
    min-height: 55vh;
    height: 55vh;
  }
}

/* Responsive body padding */
.vc-role-picker-card {
  background: var(--bs-body-bg);
  margin-bottom: 0;
}

.vc-field .vc-role-picker__hint {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding-top: 0.625rem;
  line-height: 1.7;
  border-top: 1px solid var(--bs-border-color-translucent, rgba(255, 255, 255, 0.08));
}

.vc-role-picker__table-wrap {
  max-height: 16.5rem;
  overflow: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
}

.vc-role-picker__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bs-tertiary-bg);
}

.vc-role-picker .min-h-chip {
  min-height: 1.75rem;
}

.vc-email-recipients-card {
  background: var(--bs-body-bg);
}

.vc-email-recipients-field .min-h-chip {
  min-height: 1.75rem;
}

.vc-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem 0.25rem 0.65rem;
  border-radius: 2rem;
  font-size: 0.82rem;
  background: rgba(var(--bs-primary-rgb), 0.16);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.35);
}

.vc-email-chip__text {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-weight: 600;
}

.vc-email-chip__remove {
  border: none;
  background: transparent;
  color: var(--bs-secondary-color);
  line-height: 1;
  padding: 0 0.15rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.vc-email-chip__remove:hover {
  color: var(--bs-danger);
}

.vc-email-recipients-field .vc-input-wrap--icon .vc-input {
  direction: ltr;
  text-align: left;
}

@media (max-width: 575.98px) {
  .body-wrapper .container-fluid {
    padding-inline: 1rem;
  }

  .vc-stat-card {
    min-height: 6.5rem;
  }

  .vc-stat-card__icon {
    display: none;
  }

  .vc-stat-card--accent .vc-form-actions--cta {
    flex-direction: column;
  }

  .vc-stat-card--accent .vc-form-actions--cta .btn {
    width: 100%;
  }

}

@media (min-width: 576px) {
  .vc-stat-card--accent .vc-form-actions--cta {
    width: auto;
    justify-content: flex-end;
  }

  .vc-stat-card--accent .vc-form-actions--cta .btn {
    flex: 0 1 auto;
    min-width: 9.5rem;
  }
}

/* —— وضعیت / برچسب (بدون کشیدگی در flex) —— */
.vc-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.vc-status-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
  width: auto;
  max-width: min(100%, 20rem);
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 0.5rem;
  white-space: normal;
  text-align: center;
}

.vc-status-badge--open {
  background: rgba(var(--bs-primary-rgb), 0.14);
  color: rgb(var(--bs-primary-rgb));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
}

.vc-status-badge--closed {
  background: rgba(var(--bs-secondary-rgb), 0.12);
  color: var(--bs-secondary);
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.28);
}

.vc-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.vc-badge--secondary {
  background: rgba(var(--bs-secondary-rgb), 0.15);
  color: var(--bs-secondary);
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.25);
}

.vc-badge--primary {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: rgb(var(--bs-primary-rgb));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.22);
}

.vc-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--bs-body-color);
  border-radius: 0.65rem;
  border: 1px solid rgba(var(--bs-info-rgb), 0.28);
  background: rgba(var(--bs-info-rgb), 0.08);
}

.vc-notice--warn {
  border-color: rgba(var(--bs-warning-rgb), 0.35);
  background: rgba(var(--bs-warning-rgb), 0.08);
}

/* سایدبار: زیرمنوی دامنه‌ها */
#vcSidebarExecDomains .sidebar-link {
  font-size: 0.88rem;
  padding-inline-start: 2.15rem;
}

#vcSidebarExecDomains .sidebar-link.active {
  font-weight: 600;
}

/* زیرمنوی دامنه‌های تحلیل — بدون Bootstrap collapse (تداخل display) */
#vcSidebarExecDomains.vc-sidebar-domains-panel {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.5rem;
  display: none;
}

#vcSidebarExecDomains.vc-sidebar-domains-panel.in,
#vcSidebarExecDomains.vc-sidebar-domains-panel.show {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  visibility: visible !important;
}

#vcSidebarExecDomains .sidebar-link {
  font-size: 0.88rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

/* MatDash mini-sidebar: hide-menu را روی بقیه منو می‌بندد؛ دامنه‌ها همیشه خوانا */
#vcSidebarExecDomains .sidebar-link .hide-menu {
  display: inline-block !important;
}

.vc-sidebar-domains > a.has-arrow[aria-expanded="true"]::after {
  transform: rotate(-180deg);
}

/* —— ریسپانسیو داشبورد ارشد —— */
@media (max-width: 991.98px) {
  .vc-chart-canvas-wrap,
  .vc-chart-canvas-wrap--tall {
    height: 14rem;
    min-height: 14rem;
  }

  .vc-stat-card--accent .card-body .row > .col-12.col-lg {
    min-width: 0;
  }

  .vc-stat-card__value {
    font-size: clamp(0.95rem, 0.8rem + 1.5vw, 1.3rem);
  }

  .vc-stat-card .vc-money-digits {
    font-size: clamp(0.82rem, 0.4rem + 2.2vw, 1.1rem);
  }
}

@media (max-width: 575.98px) {
  .vc-nav-tabs {
    scrollbar-width: thin;
  }

  .vc-filter-form .vc-form-actions .btn,
  .vc-filter-form .vc-filter-submit .btn {
    width: 100%;
  }

  .vc-wallet-flow__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

/* ---------- جست‌وجو (پنل) ---------- */
.boofe-search-card .card-body { padding: 0.85rem 1rem; }

.boofe-search-form { width: 100%; }

.boofe-search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.7rem;
  padding: 0.3rem 0.35rem 0.3rem 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.boofe-search-field:focus-within {
  border-color: var(--bs-primary);
  background: rgba(93, 135, 255, 0.08);
}

.boofe-search-icon {
  position: absolute;
  inset-inline-start: 0.9rem;
  font-size: 1.15rem;
  opacity: 0.6;
  pointer-events: none;
}

.boofe-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  padding-block: 0.45rem;
  padding-inline-start: 2.35rem;
  padding-inline-end: 0.35rem;
  font-size: 0.95rem;
}
.boofe-search-input::placeholder { color: var(--bs-secondary-color); opacity: 0.85; }
.boofe-search-input:focus { outline: none; }

.boofe-search-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.55rem;
  background: var(--bs-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
}
.boofe-search-btn:hover { filter: brightness(1.08); }

/* جست‌وجوی نوار بالا */
.topbar-search {
  max-width: 420px;
  width: 100%;
  margin-inline-start: auto;
  margin-inline-end: 1rem;
}
.topbar-search .boofe-search-field { padding-block: 0.15rem; }
.topbar-search .boofe-search-input { padding-block: 0.3rem; font-size: 0.85rem; }

/* نوار سهم در جدول کاوش */
.vc-share-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vc-share-bar > span {
  display: block;
  height: 100%;
  background: var(--bs-primary);
  border-radius: 4px;
}

/* ---------- خانهٔ ارشد ---------- */
.boofe-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.35rem 1.5rem;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(120, 140, 180, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(28, 34, 46, 0.96), rgba(17, 20, 27, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.boofe-hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(120, 140, 180, 0.12), transparent 65%);
  pointer-events: none;
}
.boofe-hero__title { font-weight: 800; font-size: 1.15rem; margin: 0 0 0.25rem; }
.boofe-hero__sub { color: var(--bs-secondary-color); font-size: 0.82rem; margin: 0; }
.boofe-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 1.1rem;
  position: relative;
  z-index: 1;
}
.boofe-hero__stat span { display: block; font-size: 0.7rem; color: var(--bs-secondary-color); margin-bottom: 2px; }
.boofe-hero__stat strong { font-size: 1.05rem; font-weight: 800; }
.boofe-hero__stat--money strong { font-size: 0.95rem; }

.boofe-dc {
  --dc: #8091b3;
  position: relative;
  display: block;
  height: 100%;
  border-radius: 0.95rem;
  padding: 1rem 1.05rem 0.9rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.boofe-dc:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.55);
  color: inherit;
}
.boofe-dc__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; }
.boofe-dc__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: #a3b0c9;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.boofe-dc__title { font-weight: 700; font-size: 0.98rem; margin: 0; }
.boofe-dc__badge {
  margin-inline-start: auto;
  font-size: 0.64rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #93a2bb;
  white-space: nowrap;
}
.boofe-dc__badge--off { background: rgba(250, 137, 107, 0.16); color: #fa896b; }
.boofe-dc__hint {
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.boofe-dc__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; }
.boofe-dc__total { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.boofe-dc__total-label { font-size: 0.68rem; color: var(--bs-secondary-color); display: block; margin-bottom: 3px; }
.boofe-dc__spark { flex: 0 0 auto; opacity: 0.95; }
.boofe-dc__spark .spark-line {
  fill: none;
  stroke: #93a3c2;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}
.boofe-dc__spark .spark-area { opacity: 0.22; }
.boofe-dc__spark .spark-dot { fill: #b9c5db; }
.boofe-dc__spark .spark-dot { fill: var(--dc); }
.boofe-dc__pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.7rem; }
.boofe-dc__pill {
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #c3ccdc;
}
.boofe-dc__pill b { font-weight: 800; margin-inline-start: 0.2rem; }
.boofe-dc__pill--warn { color: #d8c49a; border-color: rgba(216, 196, 154, 0.22); }
.boofe-dc__pill--danger { color: #d8b09a; border-color: rgba(216, 176, 154, 0.22); }
.boofe-dc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
}
.boofe-dc__value { font-weight: 700; color: var(--bs-body-color); }
/* یک لهجهٔ خنثی برای همهٔ کارت‌ها — تفکیک با نام و آیکون، نه رنگ */

/* مقادیر عددی زیر نمودارها */
.boofe-chart-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.boofe-chart-values span {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--bs-secondary-color);
}
.boofe-chart-values b { color: var(--bs-body-color); font-weight: 700; margin-inline-start: 0.25rem; }

/* کارت هشدار/یادآور — خنثی، نه شبیه خطا */
.boofe-alert {
  --al: #ffae1f;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.8rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-inline-start: 3px solid var(--al);
  color: var(--bs-body-color);
  font-size: 0.84rem;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.boofe-alert--out { opacity: 0; transform: translateY(-4px); }
.boofe-alert[data-level="warning"] { --al: #7f9cf5; }
.boofe-alert[data-level="success"] { --al: #13deb9; }
.boofe-alert[data-level="info"] { --al: #5d87ff; }
.boofe-alert[data-level="danger"] { --al: #fa896b; }
.boofe-alert__icon { color: var(--al); font-size: 1.15rem; flex-shrink: 0; }
.boofe-alert__text { flex: 1 1 auto; }
.boofe-alert__link {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--al) 45%, transparent);
  color: var(--al);
  text-decoration: none;
  white-space: nowrap;
}
.boofe-alert__link:hover { background: color-mix(in srgb, var(--al) 16%, transparent); color: var(--al); }
.boofe-alert__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bs-secondary-color);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.boofe-alert__close:hover { background: rgba(255, 255, 255, 0.12); color: var(--bs-body-color); }
.boofe-alert__close:hover { color: var(--bs-body-color); }

.boofe-dc__source {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  color: #7f8ca3;
  letter-spacing: 0.2px;
}

/* ---------- داشبورد تحلیلی ---------- */
.boofe-pop {
  font-size: 0.74rem;
  color: var(--bs-secondary-color);
  margin: 0.15rem 0 0;
}
.boofe-pop b { color: var(--bs-body-color); font-weight: 700; }

.boofe-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 150px;
  padding-top: 1.1rem;
}
.boofe-bars__col { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.boofe-bars__value { font-size: 0.68rem; text-align: center; color: var(--bs-secondary-color); margin-bottom: 2px; }
.boofe-bars__bar {
  background: linear-gradient(180deg, rgba(151, 168, 199, 0.55), rgba(151, 168, 199, 0.16));
  border-radius: 4px 4px 2px 2px;
  min-height: 2px;
  transition: background 0.15s ease;
}
.boofe-bars__col:hover .boofe-bars__bar { background: linear-gradient(180deg, #b9c7e0, rgba(151, 168, 199, 0.25)); }
.boofe-bars__label { font-size: 0.64rem; color: var(--bs-secondary-color); text-align: center; margin-top: 4px; white-space: nowrap; }

.boofe-hbar { display: flex; flex-direction: column; gap: 0.55rem; }
.boofe-hbar__row { display: grid; grid-template-columns: 8.5rem 1fr 3.2rem; gap: 0.6rem; align-items: center; font-size: 0.76rem; }
.boofe-hbar__track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.boofe-hbar__fill { height: 100%; border-radius: 999px; background: rgba(151, 168, 199, 0.6); }
.boofe-hbar__num { text-align: end; color: var(--bs-secondary-color); }
.boofe-hbar__label { color: var(--bs-body-color); }

.boofe-funnel { display: flex; flex-direction: column; gap: 0.5rem; }
.boofe-funnel__step { display: flex; align-items: center; gap: 0.7rem; }
.boofe-funnel__bar {
  height: 34px;
  border-radius: 0.45rem;
  background: rgba(151, 168, 199, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.6rem;
  font-size: 0.76rem;
  min-width: 92px;
}
.boofe-funnel__bar--ok { background: rgba(140, 190, 170, 0.28); }
.boofe-funnel__bar--bad { background: rgba(190, 140, 140, 0.26); }
.boofe-funnel__cap { font-size: 0.68rem; color: var(--bs-secondary-color); white-space: nowrap; }

.boofe-insight {
  --ic: #7f9cf5;
  border-radius: 0.8rem;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-inline-start: 3px solid var(--ic);
  height: 100%;
}
.boofe-insight[data-level="warning"] { --ic: #c9a227; }
.boofe-insight[data-level="info"] { --ic: #7f9cf5; }
.boofe-insight__title { font-weight: 700; font-size: 0.83rem; margin: 0 0 0.25rem; }
.boofe-insight__body { font-size: 0.74rem; color: var(--bs-secondary-color); margin: 0; line-height: 1.75; }

.boofe-dq { width: 100%; font-size: 0.78rem; }
.boofe-dq td { padding: 0.42rem 0.2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.boofe-dq tr:last-child td { border-bottom: 0; }
.boofe-dq__num { text-align: end; font-variant-numeric: tabular-nums; }
.boofe-dq__note { color: var(--bs-secondary-color); font-size: 0.68rem; }

/* ---------- سطح و پیشنهاد ---------- */
.boofe-level {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--bs-body-color);
  white-space: nowrap;
}
.boofe-suggest {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.boofe-suggest--up { color: #a8d5b5; border-color: rgba(168, 213, 181, 0.3); background: rgba(168, 213, 181, 0.1); }
.boofe-suggest--down { color: #d8b0a0; border-color: rgba(216, 176, 160, 0.3); background: rgba(216, 176, 160, 0.1); }

/* جدول‌های عریض: اسکرول افقی فقط داخل کارت، نه کل صفحه */
.boofe-loyalty { min-width: 0; }
.table-responsive { -webkit-overflow-scrolling: touch; }

.boofe-loyalty td, .boofe-loyalty th { padding-top: 0.45rem; padding-bottom: 0.45rem; }
.boofe-loyalty__who { white-space: nowrap; }  /* td نباید flex شود؛ خطوط جدول می‌شکند */
.boofe-loyalty__who span:first-child { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }

/* ---------- صفحهٔ کاربر: مقیاس و فاصلهٔ استاندارد ---------- */
.boofe-id {
  padding: 1.1rem 1.25rem;
  border-radius: 0.9rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.boofe-id__title { font-size: 1.15rem; font-weight: 800; margin: 0 0 0.5rem; }
.boofe-id__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.boofe-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.boofe-chip b { color: var(--bs-body-color); font-weight: 600; }
.boofe-chip--ok { color: #a8d5b5; border-color: rgba(168, 213, 181, 0.28); }
.boofe-chip--off { color: #d8b0a0; border-color: rgba(216, 176, 160, 0.28); }

.boofe-sec__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
  margin: 0 0 0.55rem;
}
.boofe-sec + .boofe-sec { margin-top: 1.15rem; }

.boofe-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}
.boofe-kv:last-child { border-bottom: 0; }
.boofe-kv__label { color: var(--bs-secondary-color); }
.boofe-kv__value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.boofe-kv__value.is-neg { color: #e3b980; }
.boofe-kv--total { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 0.2rem; padding-top: 0.6rem; }
.boofe-kv--total .boofe-kv__value { font-weight: 800; }
.vc-stat-card__value.is-neg { color: #e3b980; }

/* ---------- ارزیابی هوشمند ---------- */
.boofe-score {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.boofe-score__ring {
  --p: 60;
  --c: #7f9cf5;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  position: relative;
  flex-shrink: 0;
}
.boofe-score__ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #141a26;
}
.boofe-score__value {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 800;
}
.boofe-score__meta { font-size: 0.78rem; color: var(--bs-secondary-color); }
.boofe-score__grade { font-size: 0.95rem; font-weight: 800; }

.boofe-metric { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.boofe-metric:last-child { border-bottom: 0; }
.boofe-metric__head { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.8rem; }
.boofe-metric__val { font-weight: 700; font-variant-numeric: tabular-nums; }
.boofe-metric__track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.boofe-metric__fill { height: 100%; border-radius: 999px; background: #7f9cf5; }
.boofe-metric__fill.is-good { background: #8fc7a8; }
.boofe-metric__fill.is-bad { background: #cf9b7a; }
.boofe-metric__target { font-size: 0.68rem; color: var(--bs-secondary-color); }

.boofe-rec {
  border-radius: 0.8rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(140deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  height: 100%;
}
.boofe-rec__title { font-size: 0.88rem; font-weight: 700; margin: 0 0 0.45rem; }
.boofe-rec__why { font-size: 0.76rem; color: var(--bs-secondary-color); margin: 0 0 0.5rem; line-height: 1.9; }
.boofe-rec__action { font-size: 0.79rem; margin: 0 0 0.6rem; line-height: 1.95; }
.boofe-rec__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.boofe-tag { font-size: 0.66rem; padding: 0.14rem 0.5rem; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09); color: var(--bs-secondary-color); }
.boofe-tag--up { color: #a8d5b5; border-color: rgba(168,213,181,0.3); }
.boofe-tag--warn { color: #e0c08a; border-color: rgba(224,192,138,0.3); }

/* فیلتر پیشرفته: چندانتخابی جمع‌وجور، دکمه‌ها هم‌ارتفاع */
.vc-filter-form select[multiple] {
  min-height: 86px;
  max-height: 86px;
  font-size: 0.76rem;
  padding: 0.3rem 0.4rem;
}
.vc-filter-form .btn { white-space: nowrap; }

/* هدر هویت کاربر */
.boofe-id__row { display: flex; align-items: flex-start; gap: 0.85rem; }
.boofe-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  color: #cfd8ea;
  background: linear-gradient(140deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* بخش‌های سایدبار: سایت / حسابداری */
.sidebar-item--soon .sidebar-link {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.sidebar-soon {
  margin-inline-start: auto;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.sidebar-item .sidebar-link { display: flex; align-items: center; gap: 0.5rem; }

/* گروه چک‌باکس فیلتر (وضعیت) */
.boofe-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.2rem;
}
.boofe-check { position: relative; margin: 0; }
.boofe-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.boofe-check span {
  display: inline-block;
  font-size: 0.74rem;
  line-height: 1.4;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bs-secondary-color);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.boofe-check span:hover { border-color: rgba(255, 255, 255, 0.22); }
.boofe-check input:checked + span {
  background: rgba(127, 156, 245, 0.18);
  border-color: rgba(127, 156, 245, 0.55);
  color: #d3ddff;
}
.boofe-check input:focus-visible + span {
  outline: 2px solid rgba(127, 156, 245, 0.6);
  outline-offset: 2px;
}

/* دکمهٔ پاک‌کردن هم‌ارتفاع با اعمال */
.boofe-clear-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- دفتر اسناد حسابداری --- */
.boofe-ledger th,
.boofe-ledger td {
  white-space: nowrap;
  font-size: 0.85rem;
  padding-inline: 0.5rem;
}
.boofe-ledger__num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.boofe-bars__label {
  font-size: 0.7rem;
}

/* --- جدول اسناد حسابداری: پیل نوع سند یک‌خطی، کد مرجع جمع‌وجور --- */
.boofe-tag { white-space: nowrap; }
.boofe-docs .boofe-ref {
  display: inline-block;
  max-width: 13rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
}
.boofe-docs .boofe-date { white-space: nowrap; font-size: 0.78rem; }
.boofe-docs .boofe-tag { font-size: 0.72rem; }
.boofe-docs .boofe-src { white-space: nowrap; font-size: 0.78rem; }

/* --- صفحه‌بندی مشترک: دکمه‌های هم‌اندازه با فاصله (همهٔ فهرست‌ها) --- */
.boofe-pager .pagination {
  gap: 0.4rem;
  margin: 0;
}
.boofe-pager .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--bs-body-color);
  font-size: 0.82rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.boofe-pager .page-link:hover {
  background: rgba(127, 156, 245, 0.16);
  border-color: rgba(127, 156, 245, 0.4);
  color: #fff;
}
.boofe-pager .page-item.active .page-link {
  background: #7f9cf5;
  border-color: #7f9cf5;
  color: #10131a;
  font-weight: 700;
}
.boofe-pager .page-item.disabled .page-link {
  opacity: 0.38;
  pointer-events: none;
  background: transparent;
}
.boofe-pager__meta {
  opacity: 0.68;
}

/* --- نوار پیشرفت ناوبری بدون رفرش --- */
#vc-spa-bar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #7f9cf5, #a78bfa);
  transition: width 0.18s ease, opacity 0.2s ease;
  z-index: 2000;
}

/* --- وفاداری: جدول بدون اسکرول افقی --- */
.boofe-loyalty { font-size: 0.82rem; }
.boofe-loyalty th { font-size: 0.74rem; white-space: nowrap; }
.boofe-loyalty td { vertical-align: middle; }
.boofe-loyalty__who { max-width: 13rem; }
.boofe-loyalty__who span:first-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boofe-level-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }

/* روی نمایشگرهای باریک‌تر، دو ستون مالی کم‌اهمیت‌تر پنهان می‌شوند تا اسکرول افقی نماند */
@media (max-width: 1199.98px) {
  .boofe-loyalty th:nth-child(6),
  .boofe-loyalty td:nth-child(6),
  .boofe-loyalty th:nth-child(7),
  .boofe-loyalty td:nth-child(7) {
    display: none;
  }
}

/* --- باشگاه مشتریان --- */
.boofe-share {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.boofe-share > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7f9cf5, #a78bfa);
}

/* ستون‌های نمودار میله‌ای: عرض محدود تا با یک ماه، کل کارت پر نشود */
.boofe-bars__col { max-width: 84px; }
.boofe-bars__bar { background: linear-gradient(180deg, rgba(127, 156, 245, 0.75), rgba(127, 156, 245, 0.22)); }

/* --- شاخص‌ها: نام کامل + مخفف + توضیح --- */
.vc-kpi-label { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.vc-kpi-abbr {
  font-size: 0.66rem;
  padding: 0.04rem 0.36rem;
  border-radius: 999px;
  background: rgba(127, 156, 245, 0.14);
  border: 1px solid rgba(127, 156, 245, 0.32);
  color: #a9bcff;
  direction: ltr;
  line-height: 1.5;
}
.vc-kpi-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--bs-secondary-color);
  cursor: help;
}
.vc-kpi-help:hover { background: rgba(127, 156, 245, 0.2); color: #fff; }

.boofe-glossary summary {
  cursor: pointer;
  padding: 0.8rem 1rem;
  font-weight: 600;
  font-size: 0.86rem;
  list-style: none;
}
.boofe-glossary summary::-webkit-details-marker { display: none; }
.boofe-glossary summary::before { content: "▸ "; color: var(--bs-secondary-color); }
.boofe-glossary[open] summary::before { content: "▾ "; }
.boofe-glossary__row { padding: 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.boofe-glossary__title { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.85rem; }
.boofe-glossary__en { font-size: 0.7rem; color: var(--bs-secondary-color); font-weight: 400; }
.boofe-glossary__desc { font-size: 0.78rem; color: var(--bs-secondary-color); line-height: 1.9; margin-top: 0.15rem; }

/* --- کارت سطح باشگاه (کلیک‌پذیر) --- */
.boofe-level-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.boofe-level-card:hover {
  border-color: rgba(127, 156, 245, 0.5);
  background: rgba(127, 156, 245, 0.1);
  color: #fff;
  transform: translateY(-1px);
}
.boofe-level-card__title { font-size: 0.82rem; font-weight: 600; }
.boofe-level-card__num { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.boofe-level-card__meta { font-size: 0.68rem; color: var(--bs-secondary-color); }

/* یافته‌های پشت‌سرهم: بدون کشیده‌شدن به ارتفاع ستون */
.boofe-insight--stack { height: auto; }
.boofe-level-card { cursor: pointer; }
.boofe-level-card__meta::after { content: " ←"; opacity: 0.6; }

/* --- جدول‌ها بدون اسکرول افقی --- */
.boofe-cell-stack { display: flex; flex-direction: column; gap: 0.15rem; line-height: 1.5; }
.boofe-docs th, .boofe-docs td { white-space: nowrap; }
.boofe-docs .boofe-cell-stack { max-width: 11rem; }
.boofe-docs .boofe-cell-stack > span:first-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1199.98px) {
  .boofe-docs { font-size: 0.76rem; }
  .boofe-docs th, .boofe-docs td { padding-inline: 0.4rem; }
}
/* فهرست کاربران: کد ملی روی نمایشگر باریک پنهان می‌شود */
@media (max-width: 1199.98px) {
  .vc-users-table th:nth-child(4), .vc-users-table td:nth-child(4) { display: none; }
}
@media (max-width: 1199.98px) {
  .vc-users-table th, .vc-users-table td { padding-inline: 0.35rem; font-size: 0.78rem; }
}

/* --- نمایشگرهای باریک: پنهان‌کردن ستون‌های کم‌اهمیت تا اسکرول افقی نماند --- */
@media (max-width: 991.98px) {
  .boofe-loyalty th:nth-child(4), .boofe-loyalty td:nth-child(4),
  .boofe-loyalty th:nth-child(8), .boofe-loyalty td:nth-child(8) { display: none; }
}
@media (max-width: 767.98px) {
  .boofe-loyalty th:nth-child(5), .boofe-loyalty td:nth-child(5) { display: none; }

  .boofe-docs th:nth-child(5), .boofe-docs td:nth-child(5),
  .boofe-docs th:nth-child(6), .boofe-docs td:nth-child(6) { display: none; }

  .vc-users-table th:nth-child(1), .vc-users-table td:nth-child(1),
  .vc-users-table th:nth-child(6), .vc-users-table td:nth-child(6),
  .vc-users-table th:nth-child(8), .vc-users-table td:nth-child(8) { display: none; }
}
@media (max-width: 575.98px) {
  .vc-users-table th:nth-child(7), .vc-users-table td:nth-child(7) { display: none; }
}

@media (max-width: 991.98px) {
  .boofe-loyalty { table-layout: fixed; width: 100%; }
  .boofe-loyalty th:nth-child(1) { width: 2.6rem; }
  .boofe-loyalty th:nth-child(3) { width: 3.6rem; }
  .boofe-loyalty th:nth-child(5) { width: 7rem; }
  .boofe-loyalty th:nth-child(9) { width: 4.4rem; }
  .boofe-loyalty__who { max-width: 100%; }
  .boofe-loyalty__who span:first-child { white-space: normal; }
}
@media (max-width: 575.98px) {
  .boofe-docs th:nth-child(1), .boofe-docs td:nth-child(1) { display: none; }
}

/* --- پیشنهاد زندهٔ جست‌وجو --- */
.boofe-suggest-wrap { position: relative; }
.boofe-suggest {
  position: absolute; z-index: 1080; top: calc(100% + 0.35rem); inset-inline: 0;
  min-width: 20rem; max-height: 22rem; overflow: auto;
  background: var(--bs-body-bg, #101828); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); padding: 0.35rem;
}
.boofe-suggest__group { font-size: 0.72rem; color: var(--bs-secondary-color, #93a0b4); padding: 0.35rem 0.5rem 0.15rem; }
.boofe-suggest__item { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.45rem 0.6rem; border-radius: 0.55rem; text-decoration: none; color: inherit; }
.boofe-suggest__item:hover, .boofe-suggest__item.is-active { background: rgba(255, 255, 255, 0.07); }
.boofe-suggest__label { font-size: 0.86rem; font-weight: 600; }
.boofe-suggest__detail { font-size: 0.72rem; color: var(--bs-secondary-color, #93a0b4); }
.boofe-suggest__all { display: block; margin-top: 0.2rem; padding: 0.45rem 0.6rem; font-size: 0.78rem; color: var(--bs-primary, #7c5cff); text-decoration: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.boofe-suggest__empty { padding: 0.6rem; font-size: 0.8rem; color: var(--bs-secondary-color, #93a0b4); }

/* --- کارت‌های کیف پول کاربر --- */
.boofe-wallet-card .vc-stat-card__value { font-size: 1.45rem; line-height: 1.6; }
.boofe-wallet-card .vc-stat-card__value .vc-money-display { font-size: inherit; }
.boofe-wallet-unit { font-size: 0.8rem; font-weight: 500; color: var(--bs-secondary-color); }
.boofe-wallet-split {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  font-size: 0.76rem; color: var(--bs-secondary-color);
  border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 0.55rem; margin-top: 0.2rem;
}
.boofe-wallet-split b { color: var(--bs-body-color); font-weight: 600; font-variant-numeric: tabular-nums; }
.boofe-wallet-moves th { font-size: 0.74rem; font-weight: 600; color: var(--bs-secondary-color); white-space: nowrap; }
.boofe-wallet-moves td { font-size: 0.8rem; }

/* --- شبکهٔ معرفی و درخت دعوت --- */
.boofe-ref-name { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.boofe-ref-name:hover span:last-child { color: var(--bs-primary); }
.boofe-ref-avatar, .idp-node__avatar, .idp-tree-hero__avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.85), rgba(34, 197, 94, 0.75));
  color: #fff; font-weight: 700;
}
.boofe-ref-avatar { width: 1.9rem; height: 1.9rem; font-size: 0.78rem; }
.idp-tree-hero__avatar { width: 3rem; height: 3rem; font-size: 1.1rem; }

.idp-tree-wrap { overflow-x: auto; padding-block: 0.25rem; }
.idp-tree { list-style: none; margin: 0; padding: 0; }
.idp-tree--root > .idp-tree__item > .idp-node { background: rgba(124, 92, 255, 0.14); border-color: rgba(124, 92, 255, 0.4); }
.idp-tree__item { position: relative; padding-block: 0.3rem; }
.idp-tree__item > ul.idp-tree {
  margin-inline-start: 1.35rem; padding-inline-start: 1.15rem;
  border-inline-start: 2px solid rgba(124, 92, 255, 0.22);
}
.idp-tree__item > ul.idp-tree > .idp-tree__item::before {
  content: ""; position: absolute; inset-inline-start: -1.15rem; top: 1.55rem;
  width: 1rem; height: 2px; background: rgba(124, 92, 255, 0.28);
}
.idp-node {
  display: inline-flex; align-items: center; gap: 0.6rem; max-width: 100%;
  padding: 0.45rem 0.75rem; border-radius: 0.8rem; text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.idp-node:hover { background: rgba(124, 92, 255, 0.14); border-color: rgba(124, 92, 255, 0.4); transform: translateX(-2px); }
.idp-node__avatar { width: 2rem; height: 2rem; font-size: 0.8rem; flex: 0 0 auto; }
.idp-node__body { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.idp-node__name { font-weight: 600; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idp-node__meta { font-size: 0.7rem; color: var(--bs-secondary-color); white-space: nowrap; }
.idp-node__meta b { color: var(--bs-body-color); }
.idp-node__off { color: #e3b980; }
.idp-node__badge {
  flex: 0 0 auto; min-width: 1.4rem; text-align: center; font-size: 0.68rem;
  padding: 0.1rem 0.35rem; border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06); color: var(--bs-secondary-color);
}
.boofe-ref-help { margin: 0; padding-inline-start: 1rem; font-size: 0.8rem; color: var(--bs-secondary-color); display: grid; gap: 0.5rem; }
.boofe-ref-table th { font-size: 0.74rem; color: var(--bs-secondary-color); white-space: nowrap; }
.boofe-ref-table td { font-size: 0.84rem; }

/* --- نمودار شجره‌نامه‌ای دعوت --- */
.idp-tree-toolbar { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.idp-tree-viewport {
  overflow: auto; max-height: 72vh; position: relative;
  border-radius: 0.9rem; border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 70% 0%, rgba(124, 92, 255, 0.12), transparent 55%),
    radial-gradient(circle at 20% 100%, rgba(34, 197, 94, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.015);
  padding: 0.75rem; cursor: grab;
}
.idp-tree-viewport.is-dragging { cursor: grabbing; }
.idp-tree-canvas { position: relative; min-width: 100%; }
.idp-tree-svg { position: absolute; inset: 0; pointer-events: none; }
.idp-tree-svg path { fill: none; stroke: rgba(124, 92, 255, 0.38); stroke-width: 1.5; }
.idp-tree-node {
  position: absolute; width: 200px; height: 68px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: 0.15rem;
  padding: 0.5rem 0.65rem; border-radius: 0.8rem;
  background: #131c2b; border: 1px solid rgba(255, 255, 255, 0.09);
  text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.idp-tree-node:hover { border-color: rgba(124, 92, 255, 0.65); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); transform: translateY(-1px); color: inherit; }
.idp-tree-node.is-off { opacity: 0.72; }
.idp-tree-node__top { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.idp-tree-node__avatar {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.75rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(34, 197, 94, 0.8));
}
.idp-tree-node__name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idp-tree-node__meta { font-size: 0.68rem; color: var(--bs-secondary-color); white-space: nowrap; }
.idp-tree-node__meta b { color: var(--bs-body-color); }
.idp-tree-toggle {
  position: absolute; inset-inline-start: auto; inset-inline-end: 0.3rem;
  top: auto; bottom: 0.22rem; z-index: 2;
  min-width: 1.3rem; height: 1.2rem; line-height: 1; padding: 0 0.3rem;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07); color: var(--bs-body-color);
  font-size: 0.68rem; display: inline-flex; align-items: center; justify-content: center;
}
.idp-tree-toggle:hover { background: rgba(124, 92, 255, 0.35); border-color: rgba(124, 92, 255, 0.6); }

.idp-tree-lane {
  position: absolute; top: 0; bottom: 0; border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.004));
  border-inline: 1px dashed rgba(255, 255, 255, 0.045);
  pointer-events: none;
}
.idp-tree-lane__label {
  position: absolute; top: 0.35rem; inset-inline-start: 0.6rem;
  font-size: 0.66rem; color: rgba(255, 255, 255, 0.32); letter-spacing: 0.02em;
}
.idp-tree-node.is-root {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.28), rgba(34, 197, 94, 0.12));
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.18);
}

.idp-tree-svg path { stroke-width: 1.6; }
.idp-tree-node__rootbadge {
  margin-inline-start: auto; font-size: 0.6rem; padding: 0.05rem 0.4rem; border-radius: 0.4rem;
  background: rgba(124, 92, 255, 0.35); color: #fff; white-space: nowrap;
}

.boofe-invited-table td { padding-block: 0.35rem; }
.boofe-invited-table a { text-decoration: none; }


/* درخت بدون اسکرول داخلی: فقط اسکرول طبیعی صفحه */
.idp-tree-viewport {
  overflow: visible !important;
  max-height: none !important;
  border: 0 !important;
  background: none !important;
  padding: 0 !important;
  cursor: default !important;
}
.idp-tree-canvas { min-width: 0 !important; }


/* --- اصلاح ریزچینش درخت: متن بیرون‌زده، بج ریشه، برچسب سطح --- */
.idp-tree-node { overflow: hidden; padding-inline-end: 0.65rem; }
.idp-tree-node__top { min-width: 0; flex: 1 1 auto; }
.idp-tree-node__name { min-width: 0; }
.idp-tree-node.is-root { padding-inline-start: 0.55rem; padding-inline-end: 2.6rem; }
.idp-tree-node__rootbadge {
  position: absolute; inset-inline-end: 0.4rem; top: 50%; transform: translateY(-50%);
  margin: 0;
}
.idp-tree-lane__label { top: 2px; }
.idp-tree-lane { z-index: 0; }
.idp-tree-node { z-index: 1; }

.idp-tree-node__rootbadge {
  top: 4px; inset-inline-end: 0.4rem; transform: none; font-size: 0.56rem; padding: 0.06rem 0.34rem;
}
.idp-tree-node.is-root { padding-inline-end: 2.2rem; }

/* فاصلهٔ پایین کارت برای دکمهٔ جمع/باز کردن */
.idp-tree-node { padding-bottom: 0.35rem; }
.idp-tree-node__rootbadge { top: 3px; }

/* سایدبار: بدون اسکرول — فشرده‌سازی آیتم‌ها + حذف نوار اسکرول */
.sidebar-nav .simplebar-track { display: none !important; }
.sidebar-nav ul .sidebar-item .sidebar-link {
  padding-top: 6px;
  padding-bottom: 6px;
  margin-bottom: 2px;
}
.sidebar-nav .nav-small-cap { padding-top: 3px; padding-bottom: 3px; }

/* نوار کل دارایی کیف‌ها */
.boofe-asset-total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.75rem;
  padding: 0.85rem 1rem; border-radius: 0.9rem;
  background: linear-gradient(90deg, rgba(99, 91, 255, 0.16), rgba(22, 205, 199, 0.08));
  border: 1px solid rgba(124, 92, 255, 0.28);
}
.boofe-asset-total__label { font-size: 0.85rem; color: var(--bs-secondary-color); }
.boofe-asset-total__value { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.01em; }
.boofe-asset-total__value small { font-size: 0.75rem; font-weight: 500; color: var(--bs-secondary-color); }
.boofe-asset-total__hint { margin-inline-start: auto; font-size: 0.75rem; color: var(--bs-secondary-color); }

/* نشان منبع داده در کارت‌های کیف */
.boofe-src {
  font-size: 0.68rem; line-height: 1; padding: 0.28rem 0.5rem; border-radius: 999px;
  color: var(--bs-secondary-color); background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1); white-space: nowrap;
}
.boofe-src--ok { color: #8fc7a8; border-color: rgba(54, 199, 108, 0.35); background: rgba(54, 199, 108, 0.1); }
/* ترازبندی ردیف‌های داخل کارت کیف */
.boofe-wallet-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.9rem; }
.boofe-wallet-split > span { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem; min-width: 0; }
.boofe-wallet-split > span b { font-weight: 700; }

/* راهنمای دونات توکن‌ها — چیپ‌های داخل کارت */
.vc-donut-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  justify-content: center; padding: 0.35rem 0.25rem 0.15rem;
}
.vc-donut-legend__item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--bs-secondary-color); max-width: 100%;
}
.vc-donut-legend__item i {
  width: 8px; height: 8px; border-radius: 2px; flex: none;
}
.vc-donut-legend__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-donut-legend__item b { color: var(--bs-body-color); font-weight: 700; }

/* نوار همگام‌سازی دیتابیس‌ها */
.boofe-sync .card-body { padding: 0.85rem 1rem; }
.boofe-sync__icon {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 0.75rem;
  background: rgba(99, 91, 255, 0.16); color: #a9a4ff; font-size: 1.25rem; flex: none;
}
.boofe-sync__title { font-weight: 700; font-size: 0.95rem; }
.boofe-sync__sub { font-size: 0.78rem; color: var(--bs-secondary-color); display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.boofe-sync__count { margin-inline-start: auto; text-align: center; }
.boofe-sync__count-label { display: block; font-size: 0.7rem; color: var(--bs-secondary-color); }
.boofe-sync__count-value { font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.boofe-sync__btn.is-loading { opacity: 0.7; }
.boofe-sync__btn.is-done { background: #22c55e; border-color: #22c55e; }
@media (max-width: 575.98px) {
  .boofe-sync__count { margin-inline-start: 0; text-align: start; }
  .boofe-sync__btn { width: 100%; }
}

/* نشان برند کیمیا اندیشان آراد زر */
.boofe-brand-mark { height: 30px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.login-card .boofe-brand-mark, .auth-card .boofe-brand-mark { height: 42px; }

/* آیکن برند مربعی */
.boofe-brand-mark { border-radius: 8px; }

/* صفحهٔ ورود: کارت مرکزی روی پس‌زمینهٔ تیره */
body.boofe-auth {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(99, 91, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(22, 205, 199, 0.16), transparent 60%),
    #0f172a;
}
.boofe-auth__card {
  width: min(430px, 100%);
  background: #1a2537;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.boofe-auth__card .alert-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  text-align: right;
}

/* کامپوننت نمودار سری زمانی (درآمد/کاربران/ورودی‌ها) */
.vc-ts__controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.vc-ts__tabs, .vc-ts__ranges { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.2rem; border-radius: 0.65rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }
.vc-ts__chip {
  border: 0; background: transparent; color: var(--bs-secondary-color);
  font-size: 0.78rem; padding: 0.28rem 0.65rem; border-radius: 0.5rem; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.vc-ts__chip:hover { color: var(--bs-body-color); background: rgba(255, 255, 255, 0.06); }
.vc-ts__chip.is-active { background: rgba(124, 92, 255, 0.22); color: #c7c0ff; font-weight: 600; }
.vc-ts__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.75rem; }
@media (max-width: 991.98px) { .vc-ts__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vc-ts__kpi { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 0.75rem; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.vc-ts__kpi-label { font-size: 0.72rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-ts__kpi-value { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vc-ts__kpi.is-main { background: rgba(124, 92, 255, 0.12); border-color: rgba(124, 92, 255, 0.3); }
.vc-ts__kpi.is-up .vc-ts__kpi-value { color: #4ade80; }
.vc-ts__kpi.is-down .vc-ts__kpi-value { color: #f87171; }
.vc-ts__chart { min-height: 290px; }
.vc-ts__empty { min-height: 220px; display: grid; place-items: center; color: var(--bs-secondary-color); font-size: 0.85rem; }
.vc-ts__insight { margin-top: 0.6rem; font-size: 0.82rem; color: var(--bs-secondary-color); line-height: 1.9; }
.vc-ts.is-loading { opacity: 0.65; }
.vc-ts__group { display: inline-flex; flex-direction: column; gap: 0.15rem; }
.vc-ts__group-label { font-size: 0.66rem; color: var(--bs-secondary-color); padding-inline-start: 0.35rem; }

/* ردیف KPI داشبورد — کارت‌های شاخص با آیکن و لهجهٔ رنگی */
.vc-kpi-grid > [class*="col"] { display: flex; min-width: 0; }
.vc-kpi {
  --kpi: 124, 92, 255;
  position: relative; flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.9rem 1rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--kpi), 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--kpi), 0.16), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
}
.vc-kpi::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--kpi), 0.85), transparent);
  opacity: 0.7;
}
.vc-kpi:hover { transform: translateY(-2px); border-color: rgba(var(--kpi), 0.5); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28); }
.vc-kpi--sky { --kpi: 56, 189, 248; }
.vc-kpi--rose { --kpi: 248, 113, 113; }
.vc-kpi--green { --kpi: 52, 211, 153; }
.vc-kpi--amber { --kpi: 251, 191, 36; }
.vc-kpi__top { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.vc-kpi__icon {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 9px; font-size: 1.05rem;
  color: rgb(var(--kpi));
  background: rgba(var(--kpi), 0.16);
  border: 1px solid rgba(var(--kpi), 0.3);
}
.vc-kpi__label { font-size: 0.74rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-kpi__value { margin: 0; font-size: 1.32rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.vc-kpi__sub { margin: 0; font-size: 0.72rem; color: var(--bs-secondary-color); }
.vc-kpi__sub b { color: var(--bs-body-color); font-weight: 600; }
@media (max-width: 575.98px) {
  .vc-kpi__label { white-space: normal; }
}
@media (max-width: 1199.98px) {
  .vc-kpi__label { white-space: normal; line-height: 1.45; }
  .vc-kpi { padding: 0.8rem 0.85rem; }
}
