/* ViraCare: 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.85;
}
.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;
}

.viracare-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%;
  overflow: hidden;
  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: clamp(0.88rem, 0.5rem + 1vw, 1.28rem);
  line-height: 1.2;
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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.85;
}

.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;
}


/* —— ریسپانسیو داشبورد ارشد —— */
@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;
  }
}

/* دامنهٔ کالا: عنوان کالا در موبایل کوتاه می‌شود تا جدول سرریز نکند */
.vc-prod-title { max-width: 16rem; }
.vc-prod-cat { max-width: 12rem; }
@media (max-width: 575.98px) {
  .vc-prod-title { max-width: 8rem; }
}

/* فهرست دامنه‌ها: سلول‌ها در موبایل کوتاه می‌شوند تا جدول سرریز نکند */
.vc-list-table td { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
  .vc-list-table td { max-width: 6.5rem; }
}
@media (max-width: 575.98px) {
  .vc-list-table { table-layout: fixed; width: 100%; }
}

/* جست‌وجوی سراسری نوار بالا */
.vc-global-search-wrap { width: 20rem; max-width: 32vw; }
.vc-global-search { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.vc-suggest-panel {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 1080; width: 22rem; max-width: 92vw;
  max-height: 60vh; overflow-y: auto; background: var(--bs-body-bg); border: 1px solid rgba(255,255,255,.12);
  border-radius: .6rem; box-shadow: 0 12px 28px rgba(0,0,0,.45); padding: .25rem;
}
.vc-suggest-group { font-size: .72rem; color: var(--bs-secondary-color); padding: .35rem .6rem .2rem; }
.vc-suggest-item { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem .6rem; border-radius: .4rem;
  color: var(--bs-body-color); text-decoration: none; }
.vc-suggest-item:hover, .vc-suggest-item.is-active { background: rgba(99,102,241,.18); }
.vc-suggest-item small { color: var(--bs-secondary-color); direction: ltr; }
.vc-suggest-empty { padding: .6rem; color: var(--bs-secondary-color); font-size: .85rem; }

/* جدول‌هایی که باید متن را بشکنند (تنظیمات) */
.vc-wrap-table td, .vc-wrap-table th { white-space: normal; overflow-wrap: anywhere; }

/* لیست‌های سنگین در تبلت: متن می‌شکند تا عرض از سلول بیرون نزند */
@media (min-width: 576px) and (max-width: 991.98px) {
  .vc-list-table td { white-space: normal; max-width: 9rem; }
}
.vc-wrap-table { table-layout: fixed; width: 100%; }

/* --- صفحه‌بندی مشترک (هم‌ساخت با BoofetalaCare): دکمه‌های هم‌اندازه با شمارهٔ صفحه --- */
.vc-pager .pagination { gap: .4rem; margin: 0; }
.vc-pager .page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 .65rem;
  border-radius: .6rem; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); color: var(--bs-body-color);
  font-size: .82rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.vc-pager .page-link:hover { background: rgba(127,156,245,.16); border-color: rgba(127,156,245,.4); color: #fff; }
.vc-pager .page-item.active .page-link { background: #7f9cf5; border-color: #7f9cf5; color: #10131a; font-weight: 700; }
.vc-pager .page-item.disabled .page-link { opacity: .38; pointer-events: none; background: transparent; }

/* دامنه‌های تحلیل: فهرست تخت زیر «تحلیل ارشد» (بدون منوی بازشونده) + بدون اسکرول افقی */
.sidebar-nav { overflow-x: hidden; }
.sidebar-nav .sidebar-menu,
.sidebar-nav .sidebar-item,
.sidebar-nav .sidebar-link { min-width: 0; max-width: 100%; }
.sidebar-nav .sidebar-link .hide-menu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav .vc-exec-domain .sidebar-link { font-size: .875rem; padding-top: .45rem; padding-bottom: .45rem; }

/* سایدبار فشرده: بدون اسکرول عمودی در ۸۰۰px و بدون شلوغی */
.sidebar-nav ul .sidebar-item .sidebar-link { padding: 6px 12px; margin-bottom: 2px; border-radius: .6rem; }
.sidebar-nav ul .sidebar-item .sidebar-link .hide-menu { font-size: .92rem; }
.sidebar-nav .nav-small-cap { padding: 10px 12px 4px; margin-top: 0; }
.sidebar-nav .nav-small-cap .hide-menu { font-size: .72rem; letter-spacing: .02em; }
.sidebar-nav .sidebar-link iconify-icon { font-size: 19px; }
.sidebar-nav .simplebar-track.simplebar-vertical { display: none; }

/* نوار همگام‌سازی: چیپ‌های شمارش به‌جای کلیدهای خام */
.vc-sync-chip { display:inline-flex; align-items:center; gap:.45rem; padding:.28rem .6rem;
  border:1px solid rgba(255,255,255,.09); border-radius:.55rem; background:rgba(255,255,255,.035); font-size:.8rem; }
.vc-sync-chip__label { color:#98a4ae; }
.vc-sync-chip__value { font-weight:700; color:#e8edf7; font-variant-numeric:tabular-nums; }
.vc-sync-badge { font-size:.7rem; padding:.15rem .5rem; border-radius:.45rem; }
.vc-sync-badge--ok { background:rgba(54,199,108,.16); color:#4ade80; }
.vc-sync-badge--fail { background:rgba(255,102,146,.16); color:#ff8aa8; }

/* ---- ورود (صفحهٔ احراز هویت) ---- */
.vc-auth {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(124, 92, 255, .26), transparent 62%),
    radial-gradient(720px 520px at 6% 108%, rgba(32, 178, 170, .18), transparent 60%),
    #0f1724;
}
.vc-auth__card {
  width: 100%;
  max-width: 430px;
  background: rgba(22, 30, 45, .94);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 32px 28px 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
}
.vc-auth__logo { height: 66px; width: auto; display: inline-block; }
@media (max-width: 575.98px) {
  .vc-auth { padding: 18px 12px; }
  .vc-auth__card { padding: 22px 18px; border-radius: 14px; }
  .vc-auth__logo { height: 52px; }
}

/* تم، همهٔ لوگوها را در RTL آینه می‌کند؛ لوگوی ما از قبل درست است */
.logo-img img { transform: none !important; }

.vc-sync-hint { font-size: .72rem; color: #8494a8; line-height: 1.6; }

/* نوار پیشرفت ناوبری بدون رفرش */
#vcPjaxBar {
  position: fixed;
  top: 0;
  right: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #635bff, #16cdc7);
  z-index: 2000;
  opacity: 0;
  transition: width .25s ease, opacity .2s ease;
  pointer-events: none;
}
#vcPjaxBar.is-on { opacity: 1; }
