/**
 * FitRonix — داشبورد کاربری · موبایل v2
 * کامپلیت ریدیزاین — breakpoints: 880 / 480 / 360
 */

/* ══════════════════════════════════════════════════
   880px — MOBILE LAYOUT
══════════════════════════════════════════════════ */
@media (max-width: 880px) {

  /* ─── shell ─── */
  html[data-user-panel-theme="fitronix"] .shell-user .main,
  html[data-user-panel-theme="firouzi"]  .shell-user .main,
  html[data-user-panel-theme="fitronix"] .shell-user .main:has(#view-dashboard.active),
  html[data-user-panel-theme="firouzi"]  .shell-user .main:has(#view-dashboard.active) {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: clip;
    background: var(--g100, #f1f5f9) !important;
    box-sizing: border-box;
  }

  html[data-user-panel-theme="fitronix"] body.user-app,
  html[data-user-panel-theme="firouzi"]  body.user-app {
    overflow-x: clip;
  }

  /* ─── header sticky ─── */
  html[data-user-panel-theme="fitronix"] .shell-user .main > .header,
  html[data-user-panel-theme="firouzi"]  .shell-user .main > .header {
    position: sticky;
    top: 0;
    z-index: 85;
    padding: calc(.5rem + env(safe-area-inset-top, 0)) 1rem .625rem !important;
    background: color-mix(in srgb, var(--dw, #fff) 94%, transparent) !important;
    border-bottom: 1px solid var(--g200, #e2e8f0) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    box-sizing: border-box;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .up-header,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    width: 100%;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .menu-btn,
  html[data-user-panel-theme="firouzi"]  .shell-user .menu-btn {
    order: 0;
    flex-shrink: 0;
    display: grid !important;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: .625rem;
    border: 1px solid var(--g200, #e2e8f0);
    background: var(--dw, #fff);
    color: var(--dn, #0f172a);
  }

  html[data-user-panel-theme="fitronix"] .shell-user .up-header-titles,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-header-titles {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .up-header-titles h1,
  html[data-user-panel-theme="fitronix"] .shell-user .up-header-titles #page-title,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-header-titles h1,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-header-titles #page-title {
    font-size: clamp(.875rem, 3.5vw, 1rem);
    font-weight: 700;
    color: var(--dn, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .fx-header-user,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-header-user {
    order: 2;
    flex-shrink: 0;
    margin-inline-start: 0;
    gap: .25rem;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .fx-header-name,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-header-name,
  html[data-user-panel-theme="fitronix"] .shell-user .fx-header-actions,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-header-actions,
  html[data-user-panel-theme="fitronix"] .shell-user .up-live-btn,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-live-btn,
  html[data-user-panel-theme="fitronix"] .shell-user .fx-header-cta,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-header-cta,
  html[data-user-panel-theme="fitronix"] .shell-user .up-header-site-nav,
  html[data-user-panel-theme="firouzi"]  .shell-user .up-header-site-nav,
  html[data-user-panel-theme="fitronix"] .shell-user .header-spacer,
  html[data-user-panel-theme="firouzi"]  .shell-user .header-spacer {
    display: none !important;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .fx-header-avatar,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-header-avatar {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* ─── content reset ─── */
  html[data-user-panel-theme="fitronix"] .shell-user .main > .content,
  html[data-user-panel-theme="firouzi"]  .shell-user .main > .content {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow-x: clip;
    box-sizing: border-box;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .main > .content .content,
  html[data-user-panel-theme="firouzi"]  .shell-user .main > .content .content {
    padding: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .view,
  html[data-user-panel-theme="firouzi"]  .shell-user .view {
    max-width: 100%;
    overflow-x: clip;
  }

  /* ─── dashboard container ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard,
  html[data-user-panel-theme="firouzi"]  #view-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding: 1rem 1rem calc(var(--panel-bn-h, 4rem) + 1.5rem + env(safe-area-inset-bottom, 0)) !important;
    box-sizing: border-box;
    overflow-x: clip;
  }

  /* ─── grid: single column ─── */
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"],
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] {
    gap: .875rem;
    width: 100%;
    min-width: 0;
  }

  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-half,
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-third,
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-two-thirds,
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-quarter,
  html[data-user-panel-theme="fitronix"] .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-standalone,
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-half,
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-third,
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-two-thirds,
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > .dash-widget-size-quarter,
  html[data-user-panel-theme="firouzi"]  .fx-dash[data-dash-sortable="fx-main"] > .fx-hw-standalone {
    grid-column: 1 / -1 !important;
    min-width: 0;
    max-width: 100%;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .fx-quick-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] .shell-user .fx-ops-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] .shell-user .fx-insights-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] .shell-user .fx-promo-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="fitronix"] .shell-user .fx-bottom-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-quick-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-ops-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-insights-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-promo-row[data-dash-sortable] > [data-dash-sort-key],
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-bottom-row[data-dash-sortable] > [data-dash-sort-key] {
    grid-column: 1 / -1 !important;
  }

  /* ─── card overrides ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-card,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-standalone,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-score-card,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-panel-card,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-dash-greet,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-weekly-card,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-body-comp,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-body-card,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-programs-section,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-standalone,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-score-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-panel-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-dash-greet,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-weekly-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-body-comp,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-body-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-programs-section {
    border-radius: 14px !important;
    min-width: 0;
    max-width: 100%;
  }

  /* ─── card padding mobile ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-card {
    --card-pad: 16px;
  }

  /* ─── greet v3 ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-greet-layout,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-greet-layout {
    grid-template-columns: 1fr !important;
    gap: .875rem !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .up-dash-greet-portrait,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .up-dash-greet-portrait {
    width: auto !important;
    justify-self: center;
    margin: 0 auto;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .up-dash-greet-avatar,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .up-dash-greet-avatar {
    width: 110px !important;
    height: 110px !important;
    margin: 0 auto;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .up-dash-greet-name-row h2,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .up-dash-greet-name-row h2 {
    font-size: 1.25rem !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-greet-stats,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-greet-stats {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: .5rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-greet-tasks,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-greet-tasks {
    width: 100% !important;
    max-width: 100% !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-tasks-list,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-tasks-list {
    max-height: none;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-greet-edit-btn,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-greet-edit-btn {
    flex: 1;
    justify-content: center;
    min-height: 2.5rem;
  }

  /* ─── programs ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-programs-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-programs-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem;
  }

  /* ─── quick access ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-row {
    grid-template-columns: 1fr;
  }

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

  html[data-user-panel-theme="fitronix"] .shell-user .fx-quick-btn,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-quick-btn {
    padding: .75rem .25rem !important;
    font-size: .6875rem !important;
    border-radius: .75rem !important;
    min-height: 4.5rem;
    -webkit-tap-highlight-color: transparent;
  }

  html[data-user-panel-theme="fitronix"] .shell-user .fx-quick-ico,
  html[data-user-panel-theme="firouzi"]  .shell-user .fx-quick-ico {
    width: 2rem !important;
    height: 2rem !important;
  }

  /* ─── ref widgets mobile ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-insights-row,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-insights-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row {
    gap: .75rem !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-hw-card-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-card-ref {
    min-height: 0 !important;
  }

  html[data-user-panel-theme="fitronix"] #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 {
    grid-column: 1 / -1 !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, 1fr) !important;
    gap: .5rem !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: 4.25rem !important;
    padding: .625rem .25rem !important;
    font-size: .6875rem !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-tasks-ref,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-tasks-ref {
    padding: 12px !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-row .fx-promo-banner-inner,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-row .fx-promo-banner-inner {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    padding: 1.25rem 1rem !important;
    gap: .875rem;
  }

  /* ─── scores ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-score-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-score-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .625rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-score-card,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-score-card {
    min-height: 7rem;
    padding: .875rem !important;
  }

  /* ─── ops row ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-ops-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-ops-row {
    grid-template-columns: 1fr;
  }

  /* ─── hw charts ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-workout-chart,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-chart-host,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-workout-chart,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-chart-host {
    max-width: 100%;
    overflow: hidden;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-workout-chart canvas,
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-weekly-chart canvas,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-workout-chart canvas,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-weekly-chart canvas {
    max-width: 100%;
    height: auto !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-weekly-body,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-weekly-body {
    grid-template-columns: 1fr !important;
    gap: .75rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-foot--4,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-foot--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ─── body composition ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-body-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-body-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .5rem;
  }

  /* ─── ops grid ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-ops-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-ops-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }

  /* ─── monitor ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-hw-monitor-body,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-hw-monitor-body {
    grid-template-columns: 1fr !important;
  }

  /* ─── promo ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-banner-inner,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-banner-inner {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    padding: 1.25rem 1rem !important;
    gap: .875rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-promo-cta,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-promo-cta {
    width: 100%;
    justify-content: center;
    min-height: 2.75rem;
  }

  /* ─── customize ─── */
  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-customize > summary,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-customize > summary {
    padding: .75rem 1rem;
    font-size: .8125rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-customize-hint,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-customize-hint {
    display: none;
  }

  /* ─── bottom navigation ─── */
  html[data-user-panel-theme="fitronix"] .up-bottom-nav,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: .25rem;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0));
    background: color-mix(in srgb, var(--dw, #fff) 96%, transparent) !important;
    border-top: 1px solid var(--g200, #e2e8f0) !important;
    box-shadow: 0 -4px 20px rgba(15,23,42,.06) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  html[data-user-panel-theme="fitronix"][data-theme="dark"] .up-bottom-nav,
  html[data-user-panel-theme="firouzi"][data-theme="dark"]  .up-bottom-nav {
    background: rgba(15,23,42,.95) !important;
    border-top-color: rgba(255,255,255,.08) !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,.45) !important;
  }

  html[data-user-panel-theme="fitronix"] .up-bottom-nav button,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav button {
    font-size: .5625rem;
    font-weight: 500;
    min-height: 2.75rem;
    padding: .375rem .125rem;
    border-radius: .625rem;
    gap: .1875rem;
    color: var(--ds2, #475569);
    -webkit-tap-highlight-color: transparent;
    transition: background .15s, color .15s;
  }

  html[data-user-panel-theme="fitronix"] .up-bottom-nav button .ico,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav button .ico {
    width: 1.125rem !important;
    height: 1.125rem !important;
  }

  /* آیتم فعال → Primary Blue */
  html[data-user-panel-theme="fitronix"] .up-bottom-nav button.on,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav button.on {
    color: var(--dp, #2563eb) !important;
    background: var(--dp-muted, rgba(37,99,235,.10)) !important;
    font-weight: 600;
  }

  /* دکمه Live → Accent Orange */
  html[data-user-panel-theme="fitronix"] .up-bottom-nav button.up-bn-live,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav button.up-bn-live {
    background: var(--da, #f97316) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(249,115,22,.30);
    font-weight: 600;
  }

  /* buddy position */
  html[data-user-panel-theme="fitronix"] .user-app .buddy,
  html[data-user-panel-theme="firouzi"]  .user-app .buddy {
    bottom: calc(var(--panel-bn-h, 4rem) + .75rem + env(safe-area-inset-bottom, 0));
  }

  /* drag handle */
  html[data-user-panel-theme="fitronix"] .fx-dash .dash-widget-ctrl,
  html[data-user-panel-theme="firouzi"]  .fx-dash .dash-widget-ctrl { opacity: 1; }

  html[data-user-panel-theme="fitronix"] .fx-dash .dash-drag-handle,
  html[data-user-panel-theme="firouzi"]  .fx-dash .dash-drag-handle {
    min-height: 2rem;
    min-width: 2rem;
  }
}

/* ══════════════════════════════════════════════════
   480px
══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  html[data-user-panel-theme="fitronix"] #view-dashboard,
  html[data-user-panel-theme="firouzi"]  #view-dashboard {
    padding-inline: .875rem !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-grid,
  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, 1fr) !important;
  }

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

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-ops-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-ops-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-greet-v3 .fx-greet-stats,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-greet-v3 .fx-greet-stats {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  html[data-user-panel-theme="fitronix"] .up-header-titles .desc,
  html[data-user-panel-theme="firouzi"]  .up-header-titles .desc {
    display: none;
  }
}

/* ══════════════════════════════════════════════════
   360px
══════════════════════════════════════════════════ */
@media (max-width: 360px) {
  html[data-user-panel-theme="fitronix"] .up-bottom-nav button,
  html[data-user-panel-theme="firouzi"]  .up-bottom-nav button {
    font-size: .5rem;
  }

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-score-row,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-score-row {
    grid-template-columns: 1fr !important;
  }

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

  html[data-user-panel-theme="fitronix"] #view-dashboard .fx-quick-grid,
  html[data-user-panel-theme="firouzi"]  #view-dashboard .fx-quick-grid,
  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, 1fr) !important;
  }
}
