/**
 * FitRoniX — Dashboard Widget Design System
 * یکپارچه‌سازی بصری ویجت‌های #view-dashboard بر اساس design tokens
 */

/* ═══ پایه کارت ═══ */
#view-dashboard .fx-dash[data-dash-sortable="fx-main"] {
  gap: var(--fx-space-4);
  align-items: stretch;
}

#view-dashboard .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key]:not([data-dash-sort-key="greet"]):not([data-dash-sort-key="programs"]):not([data-dash-sort-key="promo"]),
#view-dashboard .fx-dash [data-dash-sortable] > [data-dash-sort-key],
#view-dashboard .fx-score-card,
#view-dashboard .fx-card:not(.fx-greet-tasks),
#view-dashboard .fx-panel-card,
#view-dashboard .fx-weekly-card,
#view-dashboard .fx-body-card,
#view-dashboard .fx-body-comp,
#view-dashboard .fx-hw-standalone {
  background: var(--fx-card-surface) !important;
  border: 1px solid var(--fx-card-border) !important;
  border-radius: var(--fx-radius-card) !important;
  box-shadow: var(--fx-shadow-card) !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* بنر پیشنهاد ویژه — گرادیان اختصاصی، از قانون کارت سفید جدا */
#view-dashboard .fx-promo-banner {
  border-radius: var(--fx-radius-card) !important;
  box-sizing: border-box;
  overflow: hidden;
}

#view-dashboard .fx-score-card,
#view-dashboard .fx-card:not(.fx-greet-tasks):not(.fx-hw),
#view-dashboard .fx-panel-card,
#view-dashboard .fx-weekly-card,
#view-dashboard .fx-body-card,
#view-dashboard .fx-body-comp,
#view-dashboard .fx-ops-card {
  padding: var(--fx-card-pad);
}

#view-dashboard .fx-score-row,
#view-dashboard .fx-quick-row,
#view-dashboard .fx-ops-row,
#view-dashboard .fx-bottom-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: var(--fx-space-4) !important;
  align-items: stretch;
}

#view-dashboard .fx-hw-standalone::after,
#view-dashboard .fx-hw::after {
  display: none !important;
}

#view-dashboard .fx-card:hover,
#view-dashboard .fx-panel-card:hover,
#view-dashboard .fx-weekly-card:hover,
#view-dashboard .fx-hw:hover,
#view-dashboard .fx-score-card:hover,
#view-dashboard .fx-hw-standalone:hover {
  transform: none !important;
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--fx-card-border)) !important;
  box-shadow: var(--fx-shadow-card-hover) !important;
}

/* ═══ تایپوگرافی ═══ */
#view-dashboard .fx-card-head h3,
#view-dashboard .fx-panel-head h3,
#view-dashboard .fx-weekly-head h3,
#view-dashboard .fx-hw-head h3,
#view-dashboard .fx-ops-head h3,
#view-dashboard .fx-body-card-head-copy h3 {
  font-size: var(--fx-type-sm) !important;
  font-weight: var(--fx-weight-semibold) !important;
  color: var(--color-dark) !important;
  letter-spacing: -0.01em;
  margin: 0;
}

#view-dashboard .fx-hw-ring-center strong,
#view-dashboard .fx-score-val,
#view-dashboard .fx-score-ring-center strong,
#view-dashboard .fx-streak-days,
#view-dashboard .fx-streak-points span,
#view-dashboard .fx-water-count strong,
#view-dashboard .fx-body-seg .val,
#view-dashboard .fx-ops-badge,
#view-dashboard .fx-ops-status {
  font-size: var(--fx-type-lg) !important;
  font-weight: var(--fx-weight-bold) !important;
  color: var(--color-dark) !important;
  line-height: 1.15;
}

#view-dashboard .fx-hw-ring-center small,
#view-dashboard .fx-score-lbl,
#view-dashboard .fx-streak-label,
#view-dashboard .fx-hw-foot-item > span:last-child,
#view-dashboard .fx-activity-body span,
#view-dashboard .fx-body-seg .lbl,
#view-dashboard .fx-weekly-summary li span,
#view-dashboard .fx-ops-text,
#view-dashboard .fx-water-count,
#view-dashboard .fx-sub-row {
  font-size: var(--fx-type-xs) !important;
  color: var(--color-text-secondary) !important;
}

#view-dashboard .fx-activity-body strong {
  font-size: var(--fx-type-sm) !important;
  font-weight: var(--fx-weight-semibold) !important;
  color: var(--color-dark);
}

/* ═══ هدر ویجت ═══ */
#view-dashboard .fx-card-head,
#view-dashboard .fx-panel-head,
#view-dashboard .fx-weekly-head,
#view-dashboard .fx-hw-head,
#view-dashboard .fx-ops-head,
#view-dashboard .fx-body-card-head {
  padding-bottom: var(--fx-space-3);
  margin-bottom: var(--fx-space-3);
  border-bottom: none !important;
}

#view-dashboard .fx-widget-head-ico,
#view-dashboard .fx-hw-head .fx-hw-ico,
#view-dashboard .fx-ops-ico,
#view-dashboard .fx-body-seg-ico,
#view-dashboard .fx-activity-ico {
  width: var(--fx-icon-size) !important;
  height: var(--fx-icon-size) !important;
  border-radius: var(--fx-radius-icon) !important;
  background: var(--fx-icon-bg) !important;
  color: var(--fx-icon-color) !important;
  border: none !important;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#view-dashboard .fx-widget-head-ico svg,
#view-dashboard .fx-hw-head .fx-hw-ico svg,
#view-dashboard .fx-ops-ico svg {
  width: var(--fx-icon-glyph);
  height: var(--fx-icon-glyph);
}

/* accent فقط برای streak / اشتراک */
#view-dashboard .fx-widget-head-ico--sub,
#view-dashboard .fx-streak-flame {
  background: var(--color-accent-muted) !important;
  color: var(--color-accent) !important;
}

/* ═══ progress ring ═══ */
#view-dashboard .fx-hw-ring svg,
#view-dashboard .fx-score-ring svg {
  transform: rotate(-90deg);
  display: block;
}

#view-dashboard .fx-hw-ring .fx-ring-bg,
#view-dashboard .fx-score-ring .fx-ring-bg {
  fill: none;
  stroke: var(--color-gray-200) !important;
  stroke-width: var(--fx-ring-stroke) !important;
}

#view-dashboard .fx-hw-ring .fx-ring-fg,
#view-dashboard .fx-score-ring .fx-ring-fg {
  fill: none;
  stroke: url(#fx-dash-grad-primary) !important;
  stroke-width: var(--fx-ring-stroke) !important;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#view-dashboard .fx-hw-ring-center,
#view-dashboard .fx-score-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ═══ nested boxes ═══ */
#view-dashboard .fx-hw-workout-kpi,
#view-dashboard .fx-hw-nutrition-pills li,
#view-dashboard .fx-hw-stats--pair li,
#view-dashboard .fx-hw-recovery-tile,
#view-dashboard .fx-sleep-metric,
#view-dashboard .fx-hw-macro,
#view-dashboard .fx-ops-tile,
#view-dashboard .fx-body-seg,
#view-dashboard .fx-weekly-summary,
#view-dashboard .fx-hw-workout-chart,
#view-dashboard .fx-hw-chart-host {
  background: var(--fx-card-nested-bg) !important;
  border: 1px solid var(--fx-card-border) !important;
  border-radius: var(--fx-radius-sm) !important;
}

#view-dashboard .fx-hw-macro-bar,
#view-dashboard .fx-level-bar,
#view-dashboard .fx-sub-bar {
  height: 5px;
  border-radius: var(--fx-radius-pill);
  background: var(--color-gray-200) !important;
  overflow: hidden;
}

#view-dashboard .fx-hw-macro-bar span,
#view-dashboard .fx-level-bar span {
  background: var(--color-primary) !important;
}

#view-dashboard .fx-sub-bar span {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light)) !important;
}

#view-dashboard .fx-level-bar span {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light)) !important;
}

/* ═══ ویجت سلامت ═══ */
#view-dashboard .fx-hw-head {
  padding: var(--fx-space-4) var(--fx-card-pad) var(--fx-space-3) !important;
  background: transparent !important;
}

#view-dashboard .fx-hw-body {
  padding: var(--fx-space-3) var(--fx-card-pad) !important;
  flex: 1;
}

#view-dashboard .fx-hw-foot {
  background: transparent !important;
  border-top: 1px solid var(--fx-card-border) !important;
  margin-top: auto;
}

#view-dashboard .fx-hw-foot-item strong {
  font-size: var(--fx-type-sm) !important;
  font-weight: var(--fx-weight-bold) !important;
  color: var(--color-dark);
}

#view-dashboard .fx-hw-ready-bar {
  background: var(--color-success-muted) !important;
  border-top: 1px solid var(--fx-card-border) !important;
  color: var(--color-text-secondary);
  font-size: var(--fx-type-xs);
}

/* ═══ دکمه‌ها ═══ */
#view-dashboard .fx-water-btn,
#view-dashboard .fx-sub-btn:not(.fx-sub-btn--ghost),
#view-dashboard .fx-sleep-cta,
#view-dashboard .fx-hw-chart-empty-btn,
#view-dashboard .fx-promo-cta {
  border-radius: var(--fx-btn-radius) !important;
  padding: var(--fx-btn-pad-y) var(--fx-btn-pad-x) !important;
  font-size: var(--fx-btn-font) !important;
  font-weight: var(--fx-btn-weight) !important;
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  border: none !important;
  cursor: pointer;
  transition: filter 0.15s ease;
}

#view-dashboard .fx-water-btn:hover,
#view-dashboard .fx-sub-btn:not(.fx-sub-btn--ghost):hover,
#view-dashboard .fx-sleep-cta:hover,
#view-dashboard .fx-promo-cta:hover {
  filter: brightness(1.05);
  transform: none !important;
}

#view-dashboard .fx-water-btn--ghost,
#view-dashboard .fx-sub-btn--ghost,
#view-dashboard .fx-btn-outline {
  background: transparent !important;
  border: 1px solid var(--fx-card-border) !important;
  color: var(--color-dark) !important;
  border-radius: var(--fx-radius-sm) !important;
}

#view-dashboard .fx-btn-outline:hover,
#view-dashboard .fx-water-btn--ghost:hover,
#view-dashboard .fx-sub-btn--ghost:hover {
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--fx-card-border)) !important;
  color: var(--color-primary) !important;
}

/* ═══ دسترسی سریع ═══ */
#view-dashboard .fx-quick-row .fx-card {
  padding: var(--fx-card-pad) !important;
}

#view-dashboard .fx-quick-grid {
  gap: var(--fx-space-2) !important;
}

#view-dashboard .fx-quick-btn {
  padding: var(--fx-space-4) var(--fx-space-2) !important;
  border-radius: var(--fx-radius-sm) !important;
  background: var(--fx-card-nested-bg) !important;
  border: 1px solid transparent !important;
  font-size: var(--fx-type-xs) !important;
  font-weight: var(--fx-weight-normal) !important;
  color: var(--color-text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#view-dashboard .fx-quick-btn:hover {
  transform: none !important;
  box-shadow: none !important;
  background: var(--color-primary-muted) !important;
  border-color: color-mix(in srgb, var(--color-primary) 18%, transparent) !important;
  color: var(--color-dark);
}

#view-dashboard .fx-quick-ico,
#view-dashboard .fx-quick-ico--blue,
#view-dashboard .fx-quick-ico--green,
#view-dashboard .fx-quick-ico--orange,
#view-dashboard .fx-quick-ico--purple,
#view-dashboard .fx-quick-ico--pink,
#view-dashboard .fx-quick-ico--teal {
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--fx-radius-icon) !important;
  background: var(--fx-icon-bg) !important;
  color: var(--fx-icon-color) !important;
}

/* ═══ آب ═══ */
#view-dashboard .fx-water-cup.is-full {
  background: color-mix(in srgb, var(--color-primary) 75%, transparent) !important;
  border-color: var(--color-primary) !important;
}

#view-dashboard .fx-water-count strong {
  color: var(--color-primary) !important;
}

/* ═══ امتیازها ═══ */
#view-dashboard .fx-score-card {
  padding: var(--fx-card-pad) !important;
  min-height: 130px;
}

#view-dashboard .fx-score-card--total {
  background: linear-gradient(145deg, var(--color-primary-soft) 0%, var(--fx-card-surface) 55%) !important;
  border-color: color-mix(in srgb, var(--color-primary) 16%, var(--fx-card-border)) !important;
}

#view-dashboard .fx-score-delta {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--fx-radius-pill);
  background: var(--color-success-muted);
  color: var(--color-success);
  font-weight: var(--fx-weight-semibold);
}

#view-dashboard .fx-sparkline {
  margin-top: var(--fx-space-2);
}

/* ═══ streak & subscription ═══ */
#view-dashboard .fx-streak-card,
#view-dashboard .fx-sub-card {
  padding: var(--fx-card-pad) !important;
}

#view-dashboard .fx-streak-dot.on {
  background: var(--color-accent-muted) !important;
  border-color: color-mix(in srgb, var(--color-accent) 30%, transparent) !important;
  color: var(--color-accent) !important;
}

#view-dashboard .fx-streak-dot {
  border: 1px solid var(--fx-card-border) !important;
  background: transparent !important;
  color: var(--color-text-secondary);
}

#view-dashboard .fx-sub-plan {
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-size: var(--fx-type-xs);
  font-weight: var(--fx-weight-semibold);
  padding: 3px 10px;
  border-radius: var(--fx-radius-pill);
}

/* ═══ وضعیت حساب ═══ */
#view-dashboard .fx-ops-card {
  padding: var(--fx-card-pad) !important;
}

#view-dashboard .fx-status-badge {
  font-size: 10px;
  font-weight: var(--fx-weight-semibold);
  padding: 3px 9px;
  border-radius: var(--fx-radius-pill);
  background: var(--color-success-muted);
  color: var(--color-success);
}

#view-dashboard .fx-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--fx-space-2);
  margin-top: var(--fx-space-3);
}

#view-dashboard .fx-ops-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--fx-space-2);
  padding: var(--fx-space-3);
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s, background 0.15s;
}

#view-dashboard .fx-ops-tile:hover {
  border-color: color-mix(in srgb, var(--color-primary) 28%, transparent) !important;
  background: var(--color-primary-muted) !important;
  transform: none !important;
}

#view-dashboard .fx-ops-badge--new {
  color: var(--color-primary) !important;
}

#view-dashboard .fx-panel-head-link,
#view-dashboard .fx-panel-head a,
#view-dashboard .fx-body-card-head-link {
  font-size: var(--fx-type-xs);
  font-weight: var(--fx-weight-normal);
  color: var(--color-primary);
}

/* ═══ فعالیت‌ها ═══ */
#view-dashboard .fx-panel-card {
  padding: var(--fx-card-pad) !important;
}

#view-dashboard .fx-activities-list {
  gap: 0 !important;
}

#view-dashboard .fx-activity-item {
  padding: var(--fx-space-3) 0 !important;
  border-bottom: none !important;
  gap: var(--fx-space-3);
}

#view-dashboard .fx-activity-item + .fx-activity-item {
  margin-top: var(--fx-space-1);
  padding-top: var(--fx-space-3) !important;
  border-top: 1px solid var(--fx-card-border) !important;
}

#view-dashboard .fx-activity-item:hover {
  background: var(--color-primary-muted) !important;
  border-radius: var(--fx-radius-sm);
  padding-inline: var(--fx-space-2) !important;
}

/* ═══ پیشرفت هفتگی ═══ */
#view-dashboard .fx-weekly-card {
  padding: var(--fx-card-pad) !important;
}

#view-dashboard .fx-weekly-legend .leg-weight,
#view-dashboard .fx-weekly-legend .leg-fat {
  color: var(--color-primary);
  background: var(--color-primary-muted);
}

#view-dashboard .fx-weekly-legend .leg-fat {
  color: var(--color-accent);
  background: var(--color-accent-muted);
}

#view-dashboard .fx-weekly-summary li {
  border-bottom: 1px solid var(--fx-card-border);
  padding: var(--fx-space-2) 0;
}

#view-dashboard .fx-weekly-summary li:last-child {
  border-bottom: none;
}

#view-dashboard .fx-weekly-summary li.fx-trend--positive strong {
  color: var(--color-success) !important;
}

#view-dashboard .fx-weekly-summary li.fx-trend--negative strong {
  color: var(--color-error) !important;
}

/* ═══ ترکیب بدنی ═══ */
#view-dashboard .fx-body-card,
#view-dashboard .fx-body-comp {
  padding: var(--fx-card-pad) !important;
  gap: var(--fx-space-3) !important;
}

#view-dashboard .fx-body-grid {
  gap: var(--fx-space-2) !important;
}

#view-dashboard .fx-body-seg--fat .fx-body-seg-ico,
#view-dashboard .fx-body-seg--muscle .fx-body-seg-ico,
#view-dashboard .fx-body-seg--water .fx-body-seg-ico,
#view-dashboard .fx-body-seg--bmr .fx-body-seg-ico {
  background: var(--fx-icon-bg) !important;
  color: var(--fx-icon-color) !important;
}

/* ═══ دستاوردها ═══ */
#view-dashboard .fx-achievement-badge.gold,
#view-dashboard .fx-achievement-badge.blue,
#view-dashboard .fx-achievement-badge.purple {
  background: var(--color-primary-muted) !important;
  color: var(--color-primary) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent) !important;
}

#view-dashboard .fx-achievement > span:last-child {
  font-size: var(--fx-type-xs);
  color: var(--color-text-secondary);
}

/* ═══ بنر پیشنهاد ═══ */
#view-dashboard .fx-promo-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, var(--color-primary-light) 100%) !important;
  border: none !important;
  box-shadow: var(--fx-shadow-card) !important;
  padding: 0 !important;
}

#view-dashboard .fx-promo-banner-inner {
  padding: var(--fx-space-5) var(--fx-space-6) !important;
  gap: var(--fx-space-4) !important;
}

#view-dashboard .fx-promo-banner-ico {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

#view-dashboard .fx-promo-copy h3 {
  font-size: var(--fx-type-base) !important;
  font-weight: var(--fx-weight-bold) !important;
}

#view-dashboard .fx-promo-cta {
  background: var(--color-white) !important;
  color: var(--color-primary) !important;
}

/* ═══ override رنگ‌های پراکنده از لایه قدیمی ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout .fx-hw-head h3,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout .fx-hw-head h3,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-hw-head h3,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-hw-head h3,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout .fx-hw-ring-center strong,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout .fx-hw-ring-center strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-hw-ring-center strong,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-hw-ring-center strong {
  color: var(--color-dark) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout .fx-hw-ico--workout,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout .fx-hw-ico--workout,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-hw-ico--nutrition,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-hw-ico--nutrition,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--sleep .fx-hw-ico--sleep,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--sleep .fx-hw-ico--sleep,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--recovery .fx-hw-ico--recovery,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--recovery .fx-hw-ico--recovery,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--monitor .fx-hw-ico--blue,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--monitor .fx-hw-ico--blue,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-widget-head-ico--weekly,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-widget-head-ico--weekly {
  background: var(--fx-icon-bg) !important;
  color: var(--fx-icon-color) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout .fx-hw-workout-kpi,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout .fx-hw-workout-kpi,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-hw-nutrition-pills li,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-hw-nutrition-pills li,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-hw-stats--pair li,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-hw-stats--pair li {
  background: var(--fx-card-nested-bg) !important;
  border-color: var(--fx-card-border) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout::after,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout::after,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition::after,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition::after,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--sleep::after,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--sleep::after,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--recovery::after,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--recovery::after,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--monitor::after,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--monitor::after {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--workout .fx-ring-fg,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--workout .fx-ring-fg,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--nutrition .fx-ring-fg,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--nutrition .fx-ring-fg,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--sleep .fx-ring-fg,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--sleep .fx-ring-fg,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw--recovery .fx-ring-fg,
html[data-user-panel-theme="firouzi"] #view-dashboard .fx-hw--recovery .fx-ring-fg {
  stroke: url(#fx-dash-grad-primary) !important;
}

/* ═══ تم تاریک ═══ */
html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key]:not([data-dash-sort-key="greet"]):not([data-dash-sort-key="programs"]):not([data-dash-sort-key="promo"]),
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key]:not([data-dash-sort-key="greet"]):not([data-dash-sort-key="programs"]):not([data-dash-sort-key="promo"]),
html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-score-card,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-score-card,
html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-card:not(.fx-greet-tasks),
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-card:not(.fx-greet-tasks),
html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-panel-card,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-panel-card,
html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-hw-standalone,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-hw-standalone {
  background: #1e2433 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-score-card--total,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-score-card--total {
  background: color-mix(in srgb, var(--color-primary) 12%, #1e2433) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
}

html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-promo-banner,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-promo-banner {
  background: linear-gradient(135deg, #0c1a36 0%, #0f2744 50%, #1a3a6e 100%) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
}

html[data-user-panel-theme="fitronix"][data-theme="dark"] #view-dashboard .fx-score-delta,
html[data-user-panel-theme="firouzi"][data-theme="dark"] #view-dashboard .fx-score-delta {
  background: var(--color-success-muted);
  color: var(--color-success);
}

/* ═══ موبایل ═══ */
@media (max-width: 768px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard,
  html[data-user-panel-theme="firouzi"] #view-dashboard {
    --fx-card-pad: var(--fx-space-4);
  }

  #view-dashboard .fx-body-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #view-dashboard .fx-score-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--fx-space-2) !important;
  }

  #view-dashboard .fx-promo-banner-inner {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  #view-dashboard .fx-promo-cta {
    width: 100%;
    justify-content: center;
  }

  #view-dashboard .fx-hw-ring-center strong,
  #view-dashboard .fx-score-val {
    font-size: var(--fx-type-base) !important;
  }
}

@media (max-width: 480px) {
  #view-dashboard .fx-ops-grid {
    grid-template-columns: 1fr !important;
  }

  #view-dashboard .fx-quick-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
