/* Shareholders historical dashboards — 30 trading sessions */
.nx-shtrend-dashboard {
  --nx-sh-bg: #f6f8fc;
  --nx-sh-card: #ffffff;
  --nx-sh-border: #e2e8f0;
  --nx-sh-text: #0f172a;
  --nx-sh-muted: #64748b;
  --nx-sh-primary: #2563eb;
  --nx-sh-primary-soft: #eff6ff;
  --nx-sh-positive: #15803d;
  --nx-sh-positive-soft: #f0fdf4;
  --nx-sh-negative: #dc2626;
  --nx-sh-negative-soft: #fef2f2;
  --nx-sh-warning: #d97706;
  --nx-sh-neutral: #475569;
  direction: rtl;
  text-align: right;
  color: var(--nx-sh-text);
  margin: 0.85rem 0 1.5rem;
}

.nx-shtrend-dashboard *,
.nx-shtrend-dashboard *::before,
.nx-shtrend-dashboard *::after { box-sizing: border-box; }

.nx-shtrend-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.055);
  overflow: hidden;
}

.nx-shtrend-hero-copy { min-width: 0; }
.nx-shtrend-eyebrow,
.nx-shtrend-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--nx-sh-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.nx-shtrend-hero h2 {
  margin: 0.35rem 0 0.3rem;
  color: var(--nx-sh-text);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 900;
  line-height: 1.65;
}
.nx-shtrend-hero p,
.nx-shtrend-panel-head p {
  margin: 0;
  color: var(--nx-sh-muted);
  font-size: 0.76rem;
  line-height: 1.85;
}
.nx-shtrend-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  flex: 0 0 auto;
}
.nx-shtrend-period {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  font-size: 0.7rem;
  white-space: nowrap;
}
.nx-shtrend-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.68rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--nx-sh-neutral);
  white-space: nowrap;
}
.nx-shtrend-state span { font-size: 0.66rem; color: var(--nx-sh-muted); }
.nx-shtrend-state strong { font-size: 0.76rem; }
.nx-shtrend-state.is-positive { color: var(--nx-sh-positive); background: var(--nx-sh-positive-soft); border-color: #bbf7d0; }
.nx-shtrend-state.is-negative { color: var(--nx-sh-negative); background: var(--nx-sh-negative-soft); border-color: #fecaca; }
.nx-shtrend-state.is-neutral { color: #334155; background: #f8fafc; border-color: #cbd5e1; }

.nx-shtrend-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.nx-shtrend-kpi {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  min-height: 116px;
  padding: 0.85rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 0.95rem;
  background: var(--nx-sh-card);
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.035);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.nx-shtrend-kpi:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.065);
}
.nx-shtrend-kpi-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  border-radius: 0.7rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.9rem;
}
.nx-shtrend-kpi > div { min-width: 0; flex: 1 1 auto; }
.nx-shtrend-kpi small {
  display: block;
  color: var(--nx-sh-muted);
  font-size: 0.64rem;
  line-height: 1.55;
}
.nx-shtrend-kpi strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--nx-sh-text);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.55;
  unicode-bidi: plaintext;
}
.nx-shtrend-kpi p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.61rem;
  line-height: 1.55;
}
.nx-shtrend-kpi-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem !important;
}
.nx-shtrend-kpi.is-positive .nx-shtrend-kpi-icon { background: var(--nx-sh-positive-soft); color: var(--nx-sh-positive); }
.nx-shtrend-kpi.is-positive strong { color: var(--nx-sh-positive); }
.nx-shtrend-kpi.is-negative .nx-shtrend-kpi-icon { background: var(--nx-sh-negative-soft); color: var(--nx-sh-negative); }
.nx-shtrend-kpi.is-negative strong { color: var(--nx-sh-negative); }
.nx-shtrend-kpi.is-neutral .nx-shtrend-kpi-icon { background: var(--nx-sh-primary-soft); color: var(--nx-sh-primary); }

.nx-shtrend-insight-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border: 1px solid #dbeafe;
  border-radius: 0.85rem;
  background: #f8fbff;
  color: #334155;
  font-size: 0.69rem;
}
.nx-shtrend-insight-strip > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.nx-shtrend-insight-strip i { color: var(--nx-sh-primary); font-size: 0.85rem; }
.nx-shtrend-float-note {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--nx-sh-border);
}
.nx-shtrend-float-note span { color: var(--nx-sh-muted); }
.nx-shtrend-float-note strong { color: var(--nx-sh-text); }
.nx-shtrend-float-note small { color: #64748b; }

.nx-shtrend-panel {
  margin-bottom: 0.8rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 1rem;
  background: var(--nx-sh-card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  overflow: hidden;
}
.nx-shtrend-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.95rem 1rem 0.75rem;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.nx-shtrend-panel-head.is-compact { align-items: center; }
.nx-shtrend-panel-head h3 {
  margin: 0.22rem 0 0.2rem;
  color: var(--nx-sh-text);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.65;
}
.nx-shtrend-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.nx-shtrend-segment,
.nx-shtrend-event-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 0.75rem;
  background: #f8fafc;
  direction: rtl;
}
.nx-shtrend-segment button,
.nx-shtrend-event-filters button {
  min-height: 31px;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.nx-shtrend-segment button:hover,
.nx-shtrend-event-filters button:hover { color: var(--nx-sh-primary); }
.nx-shtrend-segment button.is-active,
.nx-shtrend-event-filters button.is-active {
  background: #ffffff;
  color: var(--nx-sh-primary);
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.09);
}
.nx-shtrend-context-switches {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #64748b;
  font-size: 0.64rem;
}
.nx-shtrend-context-switches label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  white-space: nowrap;
}
.nx-shtrend-context-switches input { accent-color: var(--nx-sh-primary); }

.nx-shtrend-holder-picker {
  padding: 0.7rem 1rem 0.15rem;
  border-bottom: 1px solid #f1f5f9;
}
.nx-shtrend-holder-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  color: #475569;
  font-size: 0.66rem;
  font-weight: 800;
}
.nx-shtrend-holder-picker-head span { display: inline-flex; align-items: center; gap: 0.35rem; }
.nx-shtrend-holder-picker-head small { color: #94a3b8; font-weight: 500; }
.nx-shtrend-holder-chips {
  display: flex;
  align-items: stretch;
  gap: 0.42rem;
  padding-bottom: 0.42rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.nx-shtrend-holder-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
  max-width: 245px;
  min-height: 34px;
  padding: 0.35rem 0.58rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.62rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nx-shtrend-holder-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nx-shtrend-holder-chip span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-shtrend-holder-chip b { color: #64748b; font-size: 0.59rem; font-weight: 700; }
.nx-shtrend-holder-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.nx-shtrend-holder-chip.is-selected {
  border-color: #93c5fd;
  background: var(--nx-sh-primary-soft);
  color: #1d4ed8;
}
.nx-shtrend-holder-chip.is-selected::before { background: var(--nx-sh-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.nx-shtrend-selection-message {
  min-height: 18px;
  color: var(--nx-sh-primary);
  font-size: 0.6rem;
  padding: 0.1rem 0.2rem;
}
.nx-shtrend-selection-message.is-error { color: var(--nx-sh-negative); }

.nx-shtrend-chart-wrap { padding: 0.35rem 0.45rem 0.65rem; }
.nx-shtrend-chart,
.nx-shtrend-context-chart,
.nx-shtrend-holder-bar { width: 100%; min-height: 260px; direction: ltr; }
.nx-shtrend-chart-empty {
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
  color: #94a3b8;
  direction: rtl;
  text-align: center;
  font-size: 0.7rem;
}
.nx-shtrend-chart-empty i { font-size: 1.3rem; color: #cbd5e1; }
.nx-shtrend-context-chart {
  min-height: 180px;
  margin-top: -0.25rem;
  padding-top: 0.2rem;
  border-top: 1px dashed #e2e8f0;
}
.nx-shtrend-holder-bar { min-height: 360px; padding: 0.25rem 0.55rem 0.6rem; }
.nx-shtrend-chart-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: -0.25rem 0 0.75rem;
  color: #94a3b8;
  font-size: 0.61rem;
}

.nx-shtrend-symbol-select {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--nx-sh-muted);
  font-size: 0.65rem;
}
.nx-shtrend-symbol-select select {
  min-width: 105px;
  min-height: 34px;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--nx-sh-border);
  border-radius: 0.65rem;
  background: #ffffff;
  color: var(--nx-sh-text);
  font-family: inherit;
  font-size: 0.69rem;
  outline: none;
}
.nx-shtrend-symbol-select select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.nx-shtrend-selected-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.7rem 1rem 0.2rem;
}
.nx-shtrend-selected-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.5rem 0.62rem;
  border: 1px solid #edf2f7;
  border-radius: 0.7rem;
  background: #fbfdff;
  direction: rtl;
  text-align: right;
}
.nx-shtrend-selected-summary span { color: var(--nx-sh-muted); font-size: 0.61rem; }
.nx-shtrend-selected-summary strong { color: var(--nx-sh-text); font-size: 0.69rem; }
.nx-shtrend-selected-summary .is-positive { color: var(--nx-sh-positive); }
.nx-shtrend-selected-summary .is-negative { color: var(--nx-sh-negative); }
.nx-shtrend-selected-summary .is-neutral { color: var(--nx-sh-neutral); }

.nx-shtrend-table-wrap { overflow-x: auto; }
.nx-shtrend-table {
  width: 100%;
  border-collapse: collapse;
  color: #334155;
  font-size: 0.65rem;
}
.nx-shtrend-table th,
.nx-shtrend-table td {
  padding: 0.68rem 0.75rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
}
.nx-shtrend-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
}
.nx-shtrend-table tbody tr { transition: background 0.15s ease; }
.nx-shtrend-table tbody tr:hover { background: #fbfdff; }
.nx-shtrend-table tbody tr:last-child td { border-bottom: 0; }
.nx-shtrend-table a {
  display: inline-block;
  max-width: 270px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.nx-shtrend-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.27rem 0.48rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.59rem;
  font-weight: 800;
  white-space: nowrap;
}
.nx-shtrend-event.is-positive { color: var(--nx-sh-positive); background: var(--nx-sh-positive-soft); border-color: #bbf7d0; }
.nx-shtrend-event.is-negative { color: var(--nx-sh-negative); background: var(--nx-sh-negative-soft); border-color: #fecaca; }
.nx-shtrend-no-events {
  padding: 1.4rem;
  color: #94a3b8;
  text-align: center;
  font-size: 0.7rem;
}
.nx-shtrend-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
  padding: 0.35rem 0.25rem;
  color: #94a3b8;
  font-size: 0.61rem;
  line-height: 1.8;
}
.nx-shtrend-disclaimer i { margin-top: 0.1rem; color: #64748b; }

.nx-shtrend-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 230px;
  padding: 1.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  text-align: center;
}
.nx-shtrend-empty i { color: #94a3b8; font-size: 1.6rem; }
.nx-shtrend-empty h3 { margin: 0.2rem 0 0; color: #334155; font-size: 0.9rem; }
.nx-shtrend-empty p { margin: 0; color: #64748b; font-size: 0.7rem; }

.nx-shtrend-apex-tooltip {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 170px;
  padding: 0.65rem 0.75rem;
  color: #334155;
  font-family: IRANSans, Shabnam, sans-serif;
  text-align: right;
  direction: rtl;
  unicode-bidi: isolate;
}
.nx-shtrend-tooltip-title {
  padding-bottom: 0.35rem;
  margin-bottom: 0.08rem;
  border-bottom: 1px solid #edf2f7;
}
.nx-shtrend-apex-tooltip strong { color: #0f172a; font-size: 0.76rem; }
.nx-shtrend-apex-tooltip span { font-size: 0.66rem; }
.nx-shtrend-apex-tooltip small { color: #94a3b8; font-size: 0.58rem; }
.nx-shtrend-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 190px;
}
.nx-shtrend-tooltip-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: #475569;
}
.nx-shtrend-tooltip-row > span i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--nx-tip-color, #64748b);
}
.nx-shtrend-tooltip-num,
.nx-shtrend-num,
.nx-shtrend-dashboard [dir="ltr"] {
  direction: ltr !important;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.nx-shtrend-tooltip-num {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  color: #0f172a;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: left;
}
.nx-shtrend-tooltip-value {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.22rem;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nx-shtrend-tooltip-leading-unit {
  order: 1;
  direction: rtl !important;
  unicode-bidi: isolate !important;
  color: #64748b;
  font-size: 0.88em !important;
  font-weight: 750;
}
.nx-shtrend-tooltip-sign {
  order: 2;
  font-weight: 900;
}
.nx-shtrend-tooltip-amount {
  order: 3;
  font-size: 1em !important;
  font-weight: 900;
}
.nx-shtrend-tooltip-compact-unit {
  order: 4;
  direction: ltr !important;
  color: #475569;
  font-size: 0.9em !important;
  font-weight: 850;
}
.nx-shtrend-tooltip-value.is-positive .nx-shtrend-tooltip-sign { color: #15803d; }
.nx-shtrend-tooltip-value.is-negative .nx-shtrend-tooltip-sign { color: #dc2626; }
.nx-shtrend-dashboard .apexcharts-tooltip {
  pointer-events: none !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
  direction: rtl !important;
  text-align: right !important;
  overflow: hidden !important;
}
.nx-shtrend-dashboard .apexcharts-tooltip-title { background: #f8fafc !important; border-bottom: 1px solid #edf2f7 !important; font-family: IRANSans, Shabnam, sans-serif !important; text-align: right; direction: rtl; }
.nx-shtrend-dashboard .apexcharts-tooltip-series-group { direction: rtl; justify-content: flex-start; text-align: right; }
.nx-shtrend-dashboard .apexcharts-tooltip-text,
.nx-shtrend-dashboard .apexcharts-tooltip-text-y-label { direction: rtl; text-align: right; }
.nx-shtrend-dashboard .apexcharts-tooltip-text-y-value,
.nx-shtrend-dashboard .apexcharts-yaxis-label,
.nx-shtrend-dashboard .apexcharts-xaxis-label { direction: ltr; unicode-bidi: isolate; }
.nx-shtrend-dashboard .apexcharts-xaxistooltip { display: none !important; }
.nx-shtrend-dashboard .apexcharts-canvas { margin: 0 auto; }

/* ApexCharts adds a focusable SVG/canvas. Chrome paints a black focus frame
   after pointer clicks, which looks like a selection lock. Charts retain their
   pointer interactions while the non-semantic focus ring is suppressed. */
.nx-shtrend-dashboard .apexcharts-canvas,
.nx-shtrend-dashboard .apexcharts-canvas:focus,
.nx-shtrend-dashboard .apexcharts-canvas:focus-visible,
.nx-shtrend-dashboard .apexcharts-svg,
.nx-shtrend-dashboard .apexcharts-svg:focus,
.nx-shtrend-dashboard .apexcharts-svg:focus-visible,
.nx-shtrend-dashboard .apexcharts-inner:focus,
.nx-shtrend-dashboard .apexcharts-series:focus,
.nx-shtrend-dashboard .apexcharts-bar-area:focus {
  outline: none !important;
  box-shadow: none !important;
}
.nx-shtrend-dashboard .apexcharts-bar-area { cursor: pointer; }

/* One stable numeric grammar for KPI cards, event tables and selected-symbol
   summaries: rial on the visual left, then sign, amount and compact suffix. */
.nx-shtrend-dashboard .nx-money-wrap,
.nx-shtrend-dashboard .nx-quantity-wrap,
.nx-shtrend-dashboard .nx-money-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: center;
  gap: 0.24rem;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap;
  padding-inline: 0.08rem;
  font-size: inherit;
  line-height: 1.25;
}
.nx-shtrend-dashboard .nx-money-sign,
.nx-shtrend-dashboard .nx-money-amount,
.nx-shtrend-dashboard .nx-money-unit,
.nx-shtrend-dashboard .nx-money-rial {
  display: inline-block !important;
  position: static !important;
  min-width: 0;
  margin: 0;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap;
  line-height: 1.25;
}
.nx-shtrend-dashboard .nx-money-sign {
  order: 2;
  min-width: 0;
  font-size: 1em;
  font-weight: 900;
}
.nx-shtrend-dashboard .nx-money-sign:empty { display: none !important; }
.nx-shtrend-dashboard .nx-money-amount {
  order: 3;
  font-size: 1em;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.nx-shtrend-dashboard .nx-money-unit {
  order: 4;
  color: #475569;
  font-size: 0.88em;
  font-weight: 850;
  letter-spacing: 0.01em;
}
.nx-shtrend-dashboard .nx-money-rial {
  order: 1;
  direction: rtl !important;
  color: #64748b;
  font-size: 0.8em;
  font-weight: 750;
}
.nx-shtrend-dashboard .nx-shtrend-numeric-cell {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nx-shtrend-dashboard .nx-shtrend-table .nx-money-wrap,
.nx-shtrend-dashboard .nx-shtrend-table .nx-quantity-wrap {
  font-size: 0.71rem;
}
.nx-shtrend-dashboard .nx-shtrend-kpi .nx-money-wrap,
.nx-shtrend-dashboard .nx-shtrend-kpi .nx-quantity-wrap {
  justify-content: flex-start;
  font-size: inherit;
}
.nx-shtrend-dashboard .nx-shtrend-word-unit {
  color: #64748b;
  font-size: 0.82em;
  font-weight: 750;
}
.nx-shtrend-segment button:disabled,
.nx-shtrend-segment button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1399.98px) {
  .nx-shtrend-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .nx-shtrend-hero,
  .nx-shtrend-panel-head { align-items: stretch; flex-direction: column; }
  .nx-shtrend-hero-meta,
  .nx-shtrend-toolbar { align-items: stretch; justify-content: flex-start; }
  .nx-shtrend-toolbar { flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
  .nx-shtrend-selected-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-shtrend-event-filters { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 767.98px) {
  .nx-shtrend-dashboard { margin-top: 0.55rem; }
  .nx-shtrend-hero { padding: 0.95rem; border-radius: 0.95rem; }
  .nx-shtrend-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .nx-shtrend-kpi { min-height: 105px; padding: 0.7rem; }
  .nx-shtrend-kpi-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .nx-shtrend-insight-strip { align-items: flex-start; flex-direction: column; }
  .nx-shtrend-panel-head { padding: 0.8rem 0.8rem 0.65rem; }
  .nx-shtrend-holder-picker { padding-inline: 0.8rem; }
  .nx-shtrend-segment { width: 100%; overflow-x: auto; }
  .nx-shtrend-segment button { flex: 1 0 auto; }
  .nx-shtrend-context-switches { width: 100%; justify-content: flex-start; }
  .nx-shtrend-chart-wrap { padding-inline: 0.1rem; }
  .nx-shtrend-holder-bar { padding-inline: 0.1rem; }
  .nx-shtrend-table th,
  .nx-shtrend-table td { padding: 0.58rem 0.55rem; }
}

@media (max-width: 575.98px) {
  .nx-shtrend-hero h2 { font-size: 0.98rem; }
  .nx-shtrend-hero p { font-size: 0.68rem; }
  .nx-shtrend-hero-meta { align-items: stretch; flex-direction: column; }
  .nx-shtrend-period,
  .nx-shtrend-state { justify-content: center; width: 100%; }
  .nx-shtrend-kpis { grid-template-columns: 1fr; }
  .nx-shtrend-kpi { min-height: auto; }
  .nx-shtrend-panel { border-radius: 0.85rem; }
  .nx-shtrend-toolbar { flex-direction: column; }
  .nx-shtrend-context-switches { gap: 0.5rem; overflow-x: auto; padding-bottom: 0.2rem; }
  .nx-shtrend-holder-chip { max-width: 215px; }
  .nx-shtrend-selected-summary { grid-template-columns: 1fr; padding-inline: 0.75rem; }
  .nx-shtrend-symbol-select { width: 100%; justify-content: space-between; }
  .nx-shtrend-symbol-select select { flex: 1; }

  .nx-shtrend-table,
  .nx-shtrend-table tbody,
  .nx-shtrend-table tr,
  .nx-shtrend-table td { display: block; width: 100%; }
  .nx-shtrend-table thead { display: none; }
  .nx-shtrend-table tbody { padding: 0.5rem; }
  .nx-shtrend-table tr {
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
  }
  .nx-shtrend-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.42rem 0;
    border-bottom: 1px dashed #edf2f7;
    text-align: right;
  }
  .nx-shtrend-table td:last-child { border-bottom: 0; }
  .nx-shtrend-table td::before {
    content: attr(data-label);
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 700;
    text-align: right;
  }
  .nx-shtrend-table a { max-width: 190px; }
  .nx-shtrend-event { min-width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-shtrend-kpi,
  .nx-shtrend-holder-chip,
  .nx-shtrend-segment button { transition: none; }
}


/* Exact-number Bootstrap tooltips used inside shareholder trend tables/cards. */
.sd-tooltip .tooltip-inner {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: left !important;
  font-variant-numeric: tabular-nums;
}



/* Dedicated exact-number tooltip for KPI cards and event/history tables.
   It does not use Bootstrap, so global RTL tooltip rules cannot reorder tokens.
   Visual order is fixed: ریال/سهم → sign → full number. */
.nx-shtrend-exact-number-trigger {
  cursor: default;
}
.nx-shtrend-exact-number-tooltip {
  position: fixed;
  z-index: 2147483000;
  transform: translate(-50%, -100%);
  pointer-events: none;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #f8fafc;
  border: 1px solid rgba(147, 197, 253, 0.42);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.32);
  border-radius: 0.72rem;
  padding: 0.42rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
}
.nx-shtrend-exact-number-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1e3a8a;
}
.nx-shtrend-exact-number-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -100%) translateY(-2px);
}
.nx-shtrend-exact-tooltip-value {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.28rem;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nx-shtrend-exact-tooltip-unit {
  order: 1;
  direction: rtl !important;
  unicode-bidi: isolate !important;
  font-size: 0.88em;
  font-weight: 700;
  color: #dbeafe;
}
.nx-shtrend-exact-tooltip-sign {
  order: 2;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-weight: 900;
}
.nx-shtrend-exact-tooltip-amount {
  order: 3;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-weight: 850;
}
#nx-symbol-trend-dashboard .apexcharts-yaxis-title-text,
#nx-symbol-trend-dashboard .apexcharts-xaxis-title-text,
#nx-holder-trend-dashboard .apexcharts-yaxis-title-text,
#nx-holder-trend-dashboard .apexcharts-xaxis-title-text {
  direction: rtl;
  unicode-bidi: plaintext;
  text-anchor: middle;
}