/**
 * FitRoniX — ویجت KPI داشبورد (عدد · عنوان · توضیح · sparkline · فوتر رنگی)
 */

#view-dashboard {
  --fx-ref-radius: 14px;
  --fx-ref-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.07);
  --fx-ref-teal: #14e1a4;
  --fx-ref-teal-deep: #10c992;
  --fx-ref-blue: #00a2ff;
  --fx-ref-blue-deep: #0090e6;
  --fx-ref-ink: #1e293b;
  --fx-ref-muted: #94a3b8;
  --fx-ref-pad-x: 20px;
  --fx-ref-pad-top: 20px;
}

/* ═══ پوسته کارت ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref {
  --fx-ref-accent: var(--fx-ref-teal);
  --fx-ref-footer: var(--fx-ref-teal-deep);
  position: relative;
  padding: 0 !important;
  border: none !important;
  background: #fff !important;
  border-radius: var(--fx-ref-radius) !important;
  box-shadow: var(--fx-ref-shadow) !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-height: 320px;
  height: 100% !important;
  max-height: none !important;
}

/* ۴ ویجت سلامت — اندازه قابل تغییر، هم‌ارتفاع در ردیف */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter {
  grid-column: span 3;
  align-self: stretch;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third {
  grid-column: span 4;
  align-self: stretch;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-half,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-half {
  grid-column: span 6;
  align-self: stretch;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-two-thirds,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-two-thirds {
  grid-column: span 8;
  align-self: stretch;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-full,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-full {
  grid-column: 1 / -1;
  align-self: stretch;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.dash-widget-size-half,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.dash-widget-size-two-thirds,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.dash-widget-size-full,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.dash-widget-size-half,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.dash-widget-size-two-thirds,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.dash-widget-size-full {
  min-height: 340px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--workout,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--sleep,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--workout,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--sleep {
  --fx-ref-accent: var(--fx-ref-teal);
  --fx-ref-footer: var(--fx-ref-teal-deep);
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--nutrition,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--recovery,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--nutrition,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--recovery {
  --fx-ref-accent: var(--fx-ref-blue);
  --fx-ref-footer: var(--fx-ref-blue-deep);
}

html[data-theme="dark"] #view-dashboard .fx-hw-card-ref {
  background: #121620 !important;
}

/* ═══ هدر — فقط منو ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-head {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  min-height: 0 !important;
  flex: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-head-main,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-head-main {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .dash-widget-ctrl--inline,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .dash-widget-ctrl--inline {
  position: absolute;
  top: 10px;
  left: 44px;
  z-index: 5;
  margin: 0 !important;
}

/* ═══ ناحیه سفید (بدنه) ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-body,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-body,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-shell,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-body,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-body,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-shell {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  text-align: right !important;
  padding: var(--fx-ref-pad-top) var(--fx-ref-pad-x) 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* ═══ هدر خطی: آیکون + نام + عدد ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-main,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-main,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-top,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-pane,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-main,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-main,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-top,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-pane {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-ico,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-ico {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  color: var(--fx-ref-accent) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-ico svg,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-ico svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-title,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-title {
  flex: 0 1 auto !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--fx-ref-accent) !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value span,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value span {
  flex: 0 0 auto !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  color: var(--fx-ref-ink) !important;
  text-align: inherit !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-side,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-pills,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-stats,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-grid,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-msg,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-score,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-side,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-pills,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-stats,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-grid,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-msg,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-score {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-wrap,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ring-wrap,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-wrap,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ring-wrap {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  display: block !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ring,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ring {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-center,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ring-center,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-center,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ring-center {
  position: static !important;
  transform: none !important;
  inset: auto !important;
  display: block !important;
  text-align: right !important;
  width: 100% !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-center strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ring-center strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-value,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-ring-center strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ring-center strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-value {
  display: block !important;
  font-size: clamp(1.85rem, 3.8vw, 2.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  color: var(--fx-ref-ink) !important;
  text-align: right !important;
}

html[data-theme="dark"] #view-dashboard .fx-hw-card-ref .fx-hw-ring-center strong,
html[data-theme="dark"] #view-dashboard .fx-hw-card-ref .fx-hw-card-value {
  color: #f1f5f9 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ring-center small,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ring-center small {
  display: none !important;
}

/* ═══ عنوان + توضیح ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-meta,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-meta {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  padding: 0 0 10px !important;
  margin: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-title,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--fx-ref-accent) !important;
  line-height: 1.35 !important;
  text-align: right !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-desc,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-desc {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  color: var(--fx-ref-muted) !important;
  text-align: right !important;
  max-width: 100% !important;
}

/* خواب — مخفی کردن عناصر اضافی */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-empty-art,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-pane--empty p,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-cta,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-pane--empty::after,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-empty-art,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-pane--empty p,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-cta,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-pane--empty::after {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-pane--done .fx-sleep-hero,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-pane--done .fx-sleep-hero {
  display: block !important;
}

/* ═══ نمودار sparkline ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-wrap,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-chart-wrap,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-wrap,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-chart-wrap,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep {
  flex: 0 0 72px !important;
  margin-top: auto !important;
  margin-inline: calc(-1 * var(--fx-ref-pad-x)) !important;
  width: calc(100% + 2 * var(--fx-ref-pad-x)) !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  min-height: 72px !important;
  max-height: 72px !important;
  overflow: hidden !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-head,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-lbl,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-lbl {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-host,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-host {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart canvas,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-host canvas,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart canvas,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-host canvas {
  width: 100% !important;
  height: 72px !important;
  display: block !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty {
  min-height: 72px !important;
  height: 72px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%2314e1a4' stop-opacity='0.35'/%3E%3Cstop offset='100%25' stop-color='%2314e1a4' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 48 C35 44 70 22 110 30 S170 60 210 36 S270 20 320 32 L320 72 L0 72 Z' fill='url(%23g)'/%3E%3Cpath d='M0 48 C35 44 70 22 110 30 S170 60 210 36 S270 20 320 32' fill='none' stroke='%2314e1a4' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--nutrition .fx-hw-chart-empty,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--recovery .fx-hw-chart-empty,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--nutrition .fx-hw-chart-empty,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--recovery .fx-hw-chart-empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%2300a2ff' stop-opacity='0.35'/%3E%3Cstop offset='100%25' stop-color='%2300a2ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 52 C40 48 60 28 100 32 S160 58 200 38 S260 18 320 28 L320 72 L0 72 Z' fill='url(%23g)'/%3E%3Cpath d='M0 52 C40 48 60 28 100 32 S160 58 200 38 S260 18 320 28' fill='none' stroke='%2300a2ff' stroke-width='2'/%3E%3C/svg%3E") !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty p,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty-ico,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty-btn,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty p,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty-ico,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-chart-empty-btn {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-bar,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-bar {
  height: 72px !important;
  min-height: 72px !important;
  padding: 0 !important;
  position: relative;
  overflow: hidden;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-ready-track,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-ready-track {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-bar::before,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%2300a2ff' stop-opacity='0.35'/%3E%3Cstop offset='100%25' stop-color='%2300a2ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 52 C40 48 60 28 100 32 S160 58 200 38 S260 18 320 28 L320 72 L0 72 Z' fill='url(%23g)'/%3E%3Cpath d='M0 52 C40 48 60 28 100 32 S160 58 200 38 S260 18 320 28' fill='none' stroke='%2300a2ff' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--workout .fx-hw-recovery-trend-bar::before,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--sleep .fx-hw-recovery-trend-bar::before,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--workout .fx-hw-recovery-trend-bar::before,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--sleep .fx-hw-recovery-trend-bar::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%2314e1a4' stop-opacity='0.35'/%3E%3Cstop offset='100%25' stop-color='%2314e1a4' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 48 C35 44 70 22 110 30 S170 60 210 36 S270 20 320 32 L320 72 L0 72 Z' fill='url(%23g)'/%3E%3Cpath d='M0 48 C35 44 70 22 110 30 S170 60 210 36 S270 20 320 32' fill='none' stroke='%2314e1a4' stroke-width='2'/%3E%3C/svg%3E");
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-empty,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend-empty {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%2314e1a4' stop-opacity='0.35'/%3E%3Cstop offset='100%25' stop-color='%2314e1a4' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 50 C45 46 75 24 115 32 S175 58 215 34 S275 16 320 30 L320 72 L0 72 Z' fill='url(%23g)'/%3E%3Cpath d='M0 50 C45 46 75 24 115 32 S175 58 215 34 S275 16 320 30' fill='none' stroke='%2314e1a4' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
}

/* ═══ فوتر رنگی — همیشه دیده شود ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 14px 10px 16px !important;
  min-height: 68px !important;
  background: var(--fx-ref-footer) !important;
  border: none !important;
  border-radius: 0 !important;
  border-top: none !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 0 6px !important;
  margin: 0 !important;
  border: none !important;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.32) !important;
  background: transparent !important;
  text-align: center !important;
  min-width: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item:last-child,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro:last-child {
  border-inline-end: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro strong {
  display: block !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #fff !important;
  line-height: 1.15 !important;
  text-align: center !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro .lbl,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro .lbl,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-macro .lbl,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro .lbl {
  display: block !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  line-height: 1.25 !important;
  text-align: center !important;
  opacity: 1 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro-bar,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro-bar {
  display: none !important;
}

/* ═══ امتیازها ═══ */
#view-dashboard .fx-score-card-ref {
  --fx-ref-accent: var(--fx-ref-teal);
  --fx-ref-footer: var(--fx-ref-teal-deep);
  position: relative;
  padding: 0 !important;
  border: none !important;
  background: #fff !important;
  border-radius: var(--fx-ref-radius) !important;
  box-shadow: var(--fx-ref-shadow) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

#view-dashboard .fx-score-card-ref:nth-child(3) { --fx-ref-accent: var(--fx-ref-blue); --fx-ref-footer: var(--fx-ref-blue-deep); }
#view-dashboard .fx-score-card-ref:nth-child(4) { --fx-ref-accent: #8b5cf6; --fx-ref-footer: #7c3aed; }
#view-dashboard .fx-score-card-ref.fx-score-card--total { --fx-ref-accent: var(--fx-ref-blue); --fx-ref-footer: var(--fx-ref-blue-deep); }

#view-dashboard .fx-score-card-ref .fx-score-top {
  padding: 18px 18px 0;
  flex-direction: column;
  align-items: flex-end;
}

#view-dashboard .fx-score-card-ref .fx-score-lbl {
  order: 2;
  font-size: 14px;
  font-weight: 700;
  color: var(--fx-ref-accent);
  margin-top: 4px;
}

#view-dashboard .fx-score-card-ref .fx-score-delta { display: none; }

#view-dashboard .fx-score-card-ref .fx-score-val,
#view-dashboard .fx-score-card-ref .fx-score-ring-wrap {
  order: 1;
  width: 100%;
  text-align: right;
}

#view-dashboard .fx-score-card-ref .fx-score-val span,
#view-dashboard .fx-score-card-ref .fx-score-ring-center strong {
  font-size: clamp(1.85rem, 3.5vw, 2.35rem) !important;
  font-weight: 800 !important;
  color: var(--fx-ref-ink) !important;
}

#view-dashboard .fx-score-card-ref .fx-score-ring { display: none; }
#view-dashboard .fx-score-card-ref .fx-score-ring-wrap { position: static; height: auto; padding: 18px 18px 0; }
#view-dashboard .fx-score-card-ref .fx-score-ring-center { position: static; transform: none; }
#view-dashboard .fx-score-card-ref .fx-sparkline { width: calc(100% + 36px) !important; margin: auto -18px 0; height: 64px !important; display: block; }
#view-dashboard .fx-score-card-ref::after { content: ''; display: block; height: 56px; margin-top: auto; background: var(--fx-ref-footer); }
#view-dashboard .fx-score-card-ref.fx-score-card--total::after {
  content: 'امتیاز کلی عملکرد';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro {
  display: flex !important;
  flex-direction: column-reverse !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 0 6px !important;
  margin: 0 !important;
  border: none !important;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.32) !important;
  background: transparent !important;
  text-align: center !important;
  min-width: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-sleep-pane--form:not([hidden]),
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-sleep-pane--form:not([hidden]) {
  display: block !important;
  padding: 0 var(--fx-ref-pad-x) !important;
}

@media (max-width: 640px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro strong,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro strong {
    font-size: 15px !important;
  }
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot {
  background: #10c992 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot {
  background: #0090e6 !important;
}

/* ═══ اولویت بر circuit-glass و تم تاریک ═══ */
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--workout > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--sleep > .fx-hw-foot {
  background: #10c992 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: none !important;
}

html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--nutrition > .fx-hw-foot--macros,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref.fx-hw--recovery > .fx-hw-foot {
  background: #0090e6 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: none !important;
}

html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros {
  grid-template-columns: repeat(3, 1fr) !important;
}

html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item strong,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros .fx-hw-macro strong,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item strong,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros .fx-hw-macro strong,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item strong,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item strong {
  color: #fff !important;
}

html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros .fx-hw-macro .lbl,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item > span:last-child,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros .fx-hw-macro .lbl,
html[data-theme="dark"] html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item > span:last-child,
html[data-theme="dark"] html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-hw-card-ref > .fx-hw-foot .fx-hw-foot-item > span:last-child {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* ═══ ردیف بینش: فعالیت · حساب · ترکیب بدن ═══ */
#view-dashboard .fx-insights-row {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: var(--dashboard-gap, 16px) !important;
  align-items: stretch !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row > .fx-dash-card-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row > .fx-dash-card-ref {
  grid-column: span 4 !important;
  align-self: stretch !important;
  min-height: 0 !important;
  height: 100% !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border: none !important;
  background: #fff !important;
  border-radius: var(--fx-ref-radius) !important;
  box-shadow: var(--fx-ref-shadow) !important;
  overflow: hidden;
}

html[data-theme="dark"] #view-dashboard .fx-dash-card-ref {
  background: #121620 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-head {
  flex: 0 0 auto;
  padding: 18px 18px 10px !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-headline,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-headline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-width: 0;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-ico,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-ico {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--fx-ref-blue) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-ico--body,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-ico--body {
  color: var(--fx-ref-teal) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-ico svg,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-ico svg {
  width: 18px;
  height: 18px;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-headline h3,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-headline h3 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--fx-ref-blue) !important;
  white-space: nowrap;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref.fx-body-comp .fx-dash-card-headline h3,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref.fx-body-comp .fx-dash-card-headline h3 {
  color: var(--fx-ref-teal) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-body-card-head-copy p,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-body-card-head-copy p {
  margin: 2px 0 0 !important;
  font-size: 11px !important;
  color: var(--fx-ref-muted) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-body,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 0 14px 16px !important;
  margin: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-panel-head-link,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-body-card-head-link,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-panel-head-link,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-body-card-head-link {
  font-size: 11px !important;
  padding: 4px 8px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-activities-list,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-activities-list {
  gap: 8px !important;
  max-height: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-activity-item,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-activity-item {
  padding: 10px 10px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-ops-grid,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-ops-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-ops-tile,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-ops-tile {
  min-height: 72px !important;
  padding: 10px 8px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-grid,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-seg,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-seg {
  min-height: 64px !important;
  padding: 10px 8px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
}

html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-activity-item,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-ops-tile,
html[data-user-panel-theme="fitronix"] .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-body-seg,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-activity-item,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-ops-tile,
html[data-user-panel-theme="firouzi"]  .shell-user:has(.fxu-circuit-bg) #view-dashboard .fx-insights-row .fx-body-seg {
  background: rgba(241, 245, 249, 0.88) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  backdrop-filter: none !important;
}

@media (max-width: 1100px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row > .fx-dash-card-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row > .fx-dash-card-ref {
    grid-column: span 12 !important;
  }
}

@media (max-width: 640px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ═══ پایش: خاموش پیش‌فرض ═══ */
#view-dashboard [data-fx-widget="health-monitor"][hidden],
#view-dashboard [data-fx-widget="health-monitor"].fx-widget-off-by-default:not([data-fx-opt-in="1"]) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══ ردیف پیشنهاد: بنر + اشتراک کنار هم ═══ */
#view-dashboard .fx-promo-row {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: var(--dashboard-gap, 16px) !important;
  align-items: stretch !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-promo-banner,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-promo-banner {
  grid-column: span 8 !important;
  align-self: stretch !important;
  min-height: 0 !important;
  height: 100% !important;
  width: auto !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-sub-card,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-sub-card {
  grid-column: span 4 !important;
  align-self: stretch !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  border-radius: var(--fx-ref-radius, 14px) !important;
  box-shadow: var(--fx-ref-shadow, 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05)) !important;
  border: none !important;
  padding: 16px !important;
}

@media (max-width: 1100px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-promo-banner,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-promo-banner,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-sub-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-sub-card {
    grid-column: span 12 !important;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third {
    grid-column: span 6 !important;
  }
}

/* ═══ خوش‌آمدگویی — استایل ref ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref.fx-dash-card-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref.fx-dash-card-ref {
  padding: 0 !important;
  border: none !important;
  background: #fff !important;
  border-radius: var(--fx-ref-radius) !important;
  box-shadow: var(--fx-ref-shadow) !important;
  overflow: hidden;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .up-dash-greet-stripe,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .up-dash-greet-stripe {
  display: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-layout,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-layout {
  padding: 18px !important;
  margin: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-stat,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-stat {
  padding: 10px 8px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-stat .lbl,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-stat .lbl {
  color: var(--fx-ref-muted) !important;
  font-size: 10px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-stat .val,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-stat .val {
  color: var(--fx-ref-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-tasks-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref {
  padding: 14px !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
  box-shadow: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-tasks-ref .fx-dash-card-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref .fx-dash-card-head {
  padding: 0 0 10px !important;
  margin: 0 0 8px !important;
  border-bottom: 1px solid #eef2f7 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-tasks-ref .fx-dash-card-headline h3,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref .fx-dash-card-headline h3 {
  font-size: 14px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-tasks-ref .fx-tasks-prog,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref .fx-tasks-prog {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--fx-ref-blue) !important;
  background: rgba(0, 162, 255, 0.1) !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-tasks-ref .fx-tasks-list li,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref .fx-tasks-list li {
  padding: 8px 10px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #eef2f7 !important;
  margin-bottom: 6px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-edit-btn,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-edit-btn {
  border-radius: 10px !important;
  background: var(--fx-ref-blue) !important;
}

/* ═══ دسترسی سریع — استایل ref ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref.fx-dash-card-ref,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref.fx-dash-card-ref {
  min-height: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-grid,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding-top: 4px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-btn,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-btn {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 8px !important;
  min-height: 88px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--fx-ref-ink) !important;
  transition: border-color 0.15s, background 0.15s;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-btn:hover,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-btn:hover {
  background: #fff !important;
  border-color: color-mix(in srgb, var(--fx-ref-blue) 35%, #eef2f7) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-ico,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-ico {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  margin: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ico--tasks,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ico--tasks {
  color: var(--fx-ref-teal) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ico--quick,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ico--quick {
  color: var(--fx-ref-blue) !important;
}

/* ═══ MOBILE — override نهایی (فایل آخر داشبورد) ═══ */
@media (max-width: 880px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-quarter,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-third,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-half,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-two-thirds,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-half,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-two-thirds,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-full,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-quarter,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-third,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-half,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-two-thirds,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-quarter,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-third,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-half,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-two-thirds,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref.dash-widget-size-full {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref {
    min-height: 0 !important;
    height: auto !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-body,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-body,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-body,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-card-ref .fx-hw-body {
    padding: 16px 14px 12px !important;
    min-height: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value span,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-headline .fx-hw-card-value span {
    font-size: 1.35rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-desc,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-desc {
    font-size: 11px !important;
    line-height: 1.45 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-wrap,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-chart-wrap,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-workout-chart-wrap,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-nutrition-chart-wrap,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-recovery-trend,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-card-spark--sleep {
    min-height: 72px !important;
    max-height: 88px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref > .fx-hw-foot,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref > .fx-hw-foot--macros {
    padding: 12px 6px 14px !important;
    min-height: 62px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro {
    padding: 0 4px !important;
    gap: 2px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro strong,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item strong,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro strong {
    font-size: 13px !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-card-ref .fx-hw-macro .lbl,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-foot-item > span:last-child,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref .fx-hw-macro .lbl {
    font-size: 9px !important;
    line-height: 1.2 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-dash-card-head,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-dash-card-head {
    padding-inline-end: 88px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref.has-dash-drag,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref.has-dash-drag {
    padding-top: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-btn,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-btn {
    min-height: 76px !important;
    padding: 10px 4px !important;
    font-size: 10px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-ico,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-ico {
    width: 32px !important;
    height: 32px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row > .fx-dash-card-ref,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-promo-banner,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row > .fx-sub-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row > .fx-dash-card-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-promo-banner,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row > .fx-sub-card {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref .fx-greet-layout,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref .fx-greet-layout {
    padding: 14px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-card-ref.has-dash-drag,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-card-ref.has-dash-drag {
    padding-top: 40px !important;
  }
}

@media (max-width: 480px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card-ref .fx-quick-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card-ref .fx-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* insights-row — v4 فشرده (فعالیت · حساب · ترکیب بدن) */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-activity-item--v4,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-activity-item--v4 {
  padding: 7px 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #eef2f7 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-activity-item--v4:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-activity-item--v4:last-child {
  border-bottom: none !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-list--v5,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-list--v5 {
  gap: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-row,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-row {
  min-height: 0 !important;
  padding: 8px 6px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #eef2f7 !important;
  border-radius: 0 !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-row:last-child,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row .fx-body-comp--v5 .fx-body-row:last-child {
  border-bottom: none !important;
}

/* ═══ دسترسی سریع v6 — آیکون بزرگ و جذاب ═══ */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6 {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 8px 4px 6px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-btn--v6,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-btn--v6 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  min-height: 112px !important;
  padding: 18px 10px 14px !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid #e8edf3 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font: inherit !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-btn--v6:hover,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-btn--v6:hover {
  transform: translateY(-3px) !important;
  background: #ffffff !important;
  border-color: color-mix(in srgb, var(--fx-ref-blue) 28%, #e8edf3) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-btn--v6:active,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-btn--v6:active {
  transform: translateY(-1px) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-btn--v6 .fx-quick-label,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-btn--v6 .fx-quick-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--fx-ref-ink, #1e293b) !important;
  text-align: center !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 {
  display: grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  margin: 0 !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 16px rgba(15, 23, 42, 0.12) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-btn--v6:hover .fx-quick-ico--v6,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-btn--v6:hover .fx-quick-ico--v6 {
  transform: scale(1.06) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 22px rgba(15, 23, 42, 0.16) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 svg,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 svg {
  width: 26px !important;
  height: 26px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--blue,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--blue {
  background: linear-gradient(145deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--green,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--green {
  background: linear-gradient(145deg, #34d399 0%, #10b981 55%, #059669 100%) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--orange,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--orange {
  background: linear-gradient(145deg, #fb923c 0%, #f97316 55%, #ea580c 100%) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--purple,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--purple {
  background: linear-gradient(145deg, #a78bfa 0%, #8b5cf6 55%, #7c3aed 100%) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--pink,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--pink {
  background: linear-gradient(145deg, #f472b6 0%, #ec4899 55%, #db2777 100%) !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--teal,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6.fx-quick-ico--teal {
  background: linear-gradient(145deg, #2dd4bf 0%, #14b8a6 55%, #0d9488 100%) !important;
}

@media (max-width: 1100px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-grid--v6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-btn--v6,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-btn--v6 {
    min-height: 100px !important;
    padding: 14px 8px 12px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 svg,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-card--v6 .fx-quick-ico--v6 svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* کنترل‌های ویجت — گوشهٔ بالا (دور از عنوان و اکشن‌های هدر) */
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref > .dash-drag-handle--float,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref > .dash-drag-handle--float {
  top: 7px;
  inset-inline-end: 7px;
  z-index: 8;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref.has-dash-widget-ctrl > .dash-widget-ctrl--float,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref.has-dash-widget-ctrl > .dash-widget-ctrl--float {
  top: 7px;
  inset-inline-end: 42px;
  z-index: 8;
  gap: 3px;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref:hover .fx-dash-card-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref:hover .fx-dash-card-head,
html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref:focus-within .fx-dash-card-head,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref:focus-within .fx-dash-card-head {
  padding-inline-end: 108px !important;
}

html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-card-ref .fx-dash-card-head .dash-widget-chrome-rail,
html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-card-ref .fx-dash-card-head .dash-widget-chrome-rail {
  display: none !important;
}
