/* ---------- صفحه‌ی داشبورد بازار ---------- */
body.dash-page { background: #f4f6f9; }
.dash { max-width: 920px; margin: 0 auto; padding: 0 16px 56px; }
.dash-hero { padding: 22px 4px 6px; }
.dash-hero h1 { margin: 0 0 6px; font-size: 24px; color: #00254b; }
.dash-hero p { margin: 0; font-size: 14px; line-height: 1.9; color: #667085; }

.dash-seg { display: flex; gap: 2px; padding: 3px; margin: 16px 0; background: #e6ebf1; border-radius: 12px; }
.dash-seg button {
  flex: 1; padding: 9px 0; font: inherit; font-size: 14px;
  color: #475467; background: transparent; border: 0; border-radius: 9px; cursor: pointer;
}
.dash-seg button[aria-pressed="true"] { color: #fff; background: #00254b; font-weight: 700; }

.dash-card {
  margin-bottom: 16px; padding: 18px 16px;
  background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(0, 30, 70, 0.07);
}
.dash-card h2 { margin: 0 0 4px; font-size: 17px; color: #00254b; }
.dash-hint { margin: 0 0 14px; font-size: 12.5px; line-height: 1.8; color: #667085; }
.dash-empty {
  padding: 22px 14px; text-align: center; line-height: 2; font-size: 13.5px;
  color: #667085; background: #f7f9fb; border-radius: 12px;
}

/* بازده */
.rank { display: grid; grid-template-columns: minmax(96px, 128px) 1fr 58px; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; cursor: pointer; }
.rank:hover { background: #fafbfc; }
.rank .bar { position: relative; height: 16px; background: #f0f3f7; border-radius: 8px; direction: ltr; }
.rank .bar i { position: absolute; top: 0; bottom: 0; border-radius: 8px; }
.rank .bar .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #c9d2dd; }
.rank b { direction: ltr; text-align: left; font-size: 12.5px; }
.rank-gap { padding: 2px 0; text-align: center; font-size: 12px; color: #98a2b3; letter-spacing: 3px; }
.rank-more {
  display: block; width: 100%; margin-top: 10px; padding: 9px; font: inherit; font-size: 13px;
  color: #186cd1; background: #f0f6fd; border: 0; border-radius: 10px; cursor: pointer;
}
.dash-up { color: #0a9a3c; }
.dash-down { color: #d32f2f; }

/* مقایسه */
.cmp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cmp-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12.5px;
  color: #344054; background: #fff; border: 1px solid #d8dee6; border-radius: 999px; cursor: pointer;
}
.cmp-chip i { width: 10px; height: 10px; border-radius: 50%; }
.cmp-chip em { font-style: normal; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.cmp-chip .x { color: #98a2b3; font-size: 14px; line-height: 1; }
.cmp-add { padding: 5px 8px; font: inherit; font-size: 12.5px; color: #475467; background: #f3f5f8; border: 1px dashed #c4cdd8; border-radius: 999px; }
.cmp-plot { position: relative; direction: ltr; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp-plot svg { display: block; width: 100%; }
.cmp-plot text { font-size: 10px; fill: #8a97a8; direction: ltr; unicode-bidi: plaintext; }
.cmp-grid { stroke: #eef1f5; }
.cmp-base { stroke: #c9d2dd; stroke-dasharray: 4 3; }
.cmp-tip {
  position: absolute; top: 6px; transform: translateX(-50%); padding: 6px 10px; font-size: 12px;
  background: #00254b; color: #fff; border-radius: 8px; pointer-events: none; white-space: nowrap; line-height: 1.8;
}
.cmp-tip b { display: block; color: #9db4cc; font-weight: 600; text-align: center; }
.cmp-tip span { display: flex; justify-content: space-between; gap: 14px; }
.cmp-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; }
.cmp-tip em { font-style: normal; direction: ltr; unicode-bidi: isolate; font-weight: 700; }
.dash-note { margin: 10px 0 0; font-size: 12px; line-height: 1.8; color: #8a5a00; }
.dash-note:empty { display: none; }

/* شاخص‌ها */
.kpis { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { padding: 14px; border: 1px solid #e6ebf1; border-radius: 14px; }
.kpi h3 { margin: 0; font-size: 13px; font-weight: 600; color: #475467; }
.kpi .v { margin-top: 6px; font-size: 24px; font-weight: 700; color: #00254b; }
.kpi .v small { font-size: 13px; font-weight: 500; color: #667085; }
.kpi .d { margin-top: 4px; font-size: 13px; font-weight: 700; }
.kpi .d span { display: inline-block; }
.kpi .n { margin-top: 6px; font-size: 11.5px; line-height: 1.8; color: #8a97a8; }

/* نقشه‌ی حرارتی */
.heat-group { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: #475467; }
.heat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 700px) { .heat { grid-template-columns: repeat(5, 1fr); } }
.tile { padding: 10px 4px; text-align: center; font-size: 12px; line-height: 1.7; color: #fff; border-radius: 10px; cursor: pointer; }
.tile b { display: block; font-size: 13px; direction: ltr; }
.tile.na { color: #98a2b3; background: #eef1f5; cursor: default; }
