/* FitRonix — ویجکت‌های عملیاتی داشبورد (مدیریت + کاربر) */

/* ── Shared: management widget shell ── */
.dash-mgmt-widget {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  background: linear-gradient(165deg, var(--bg-elevated) 0%, rgba(249, 115, 22, 0.03) 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dash-mgmt-widget::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 55%, #6366f1 55%, #6366f1 100%);
  opacity: 0.85;
  pointer-events: none;
}

.dash-mgmt-widget:hover {
  border-color: var(--border-strong, rgba(255, 255, 255, 0.14));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.dash-mgmt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding-bottom: 4px;
}

.dash-mgmt-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dash-mgmt-head-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-mgmt-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-mgmt-head .hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.dash-mgmt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, var(--muted));
}

.dash-mgmt-badge--urgent {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.dash-mgmt-badge--ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

.dash-mgmt-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-mgmt-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-desk-duo > .card + .card {
  margin-top: 0;
}

.dash-plan-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  width: 100%;
}

.dash-plan-top strong {
  font-size: 13px;
  font-weight: 800;
}

.dash-plan-top span {
  font-size: 12px;
  color: var(--muted);
}

.dash-plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.dash-mgmt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-tertiary, var(--muted));
  font-size: 12px;
}

.dash-mgmt-empty-ico {
  font-size: 22px;
  opacity: 0.55;
  line-height: 1;
}

/* ── Admin: میزکار امروز ── */
.dash-ops-desk .dash-ops-desk-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 4px;
}

.dash-ops-col {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 172px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-ops-col:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dash-ops-col--pay { --ops-accent: #6366f1; }
.dash-ops-col--pack { --ops-accent: #f97316; }
.dash-ops-col--ship { --ops-accent: #38bdf8; }
.dash-ops-col--plan { --ops-accent: #a855f7; }
.dash-ops-col--ai { --ops-accent: #22c55e; }

.dash-ops-col--pay { border-top: 2px solid rgba(99, 102, 241, 0.55); }
.dash-ops-col--pack { border-top: 2px solid rgba(249, 115, 22, 0.55); }
.dash-ops-col--ship { border-top: 2px solid rgba(56, 189, 248, 0.55); }
.dash-ops-col--plan { border-top: 2px solid rgba(168, 85, 247, 0.55); }
.dash-ops-col--ai { border-top: 2px solid rgba(34, 197, 94, 0.55); }

.dash-ops-col--urgent {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
  animation: dash-ops-pulse 2.4s ease-in-out infinite;
}

@keyframes dash-ops-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
}

.dash-ops-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: background 0.2s ease, color 0.2s ease;
}

.dash-ops-col-head:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.dash-ops-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dash-ops-col-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--ops-accent, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ops-accent, var(--accent)) 28%, transparent);
}

.dash-ops-col-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.dash-ops-col-cnt {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-ops-col--urgent .dash-ops-col-cnt {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-ops-col-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-ops-col-list li { margin: 0; }

.dash-ops-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: right;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease;
}

.dash-ops-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--border-strong, rgba(255, 255, 255, 0.2));
}

.dash-ops-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dash-ops-item.warn::before { background: #ef4444; }
.dash-ops-item.warn strong { color: #f87171; }

.dash-ops-item-copy { min-width: 0; flex: 1; }
.dash-ops-item strong { display: block; font-size: 12px; font-weight: 600; }
.dash-ops-item span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

.dash-ops-empty {
  padding: 16px 8px;
  font-size: 11px;
  text-align: center;
  color: var(--text-tertiary, var(--muted));
}

/* ── Admin: خط سفارش ── */
.dash-order-pipeline-wrap .dash-pipeline-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dash-order-pipeline {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 16px 4px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dash-pipe-step {
  flex: 1;
  min-width: 88px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font: inherit;
  text-align: center;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dash-pipe-step:hover {
  border-color: var(--accent-muted);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.dash-pipe-step--warn {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.03) 100%);
}

.dash-pipe-step--active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-subtle);
}

.dash-pipe-cnt {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-pipe-step--warn .dash-pipe-cnt {
  background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.dash-pipe-lbl {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 600;
}

.dash-pipe-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.45;
}

.dash-pipe-arrow::before {
  content: '←';
}

/* ── Admin: کم‌موجودی ── */
.dash-low-stock-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dash-stock-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font: inherit;
  text-align: right;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dash-stock-item:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
  transform: translateY(-1px);
}

.dash-stock-item strong {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

.dash-stock-meter {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dash-stock-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444, #f97316);
  transition: width 0.3s ease;
}

/* ── Admin: انبار ── */
.dash-wh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-wh-row:last-child { margin-bottom: 0; }

.dash-wh-row:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dash-wh-row.packed {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.04);
}

.dash-wh-main { flex: 1; min-width: 180px; }

.dash-wh-main strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.dash-wh-main > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.dash-wh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-wh-step-dots {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.dash-wh-step-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
}

.dash-wh-step-dots span.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

/* ── Admin: صندوق پلن ── */
.dash-plan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.dash-plan-row:last-child { margin-bottom: 0; }

.dash-plan-row:hover {
  border-color: color-mix(in srgb, #a855f7 35%, var(--border));
  transform: translateX(-2px);
}

.dash-plan-main { flex: 1; min-width: 160px; }

.dash-plan-main strong {
  margin-inline-end: 8px;
  font-weight: 800;
}

.dash-plan-main > span:not(.tag) {
  font-size: 12px;
  color: var(--muted);
  margin-inline-end: 6px;
}

.dash-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-plan-progress {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.dash-plan-progress i {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dash-plan-progress i.on {
  background: linear-gradient(90deg, #a855f7, var(--accent));
}

/* ── Admin: ویجت همه متخصصان ── */
.dash-spec-desk-wrap {
  padding: var(--ap-w-pad, 18px 20px);
}

.dash-spec-desk-wrap::before {
  background: linear-gradient(90deg, #10b981 0%, #10b981 48%, #6366f1 48%, #6366f1 100%);
}

.dash-spec-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ap-inner-gap, 16px);
  margin-bottom: var(--ap-section-gap, 20px);
}

.dash-spec-kpi {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.dash-spec-kpi strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.dash-spec-kpi > span:not(.dash-spec-kpi-ico) {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary, var(--muted));
  font-weight: 600;
  line-height: 1.4;
}

.dash-spec-kpi--warn strong {
  color: #f87171;
}

.dash-spec-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ap-inner-gap, 10px);
  margin-bottom: var(--ap-section-gap, 20px);
}

.dash-spec-filter {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dash-spec-filter:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.dash-spec-filter.on {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.dash-spec-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 12px;
}

.dash-spec-page {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dash-spec-page:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.dash-spec-page.on {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

.dash-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

button.dash-spec-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px;
  text-align: right;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button.dash-spec-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

button.dash-spec-card--attention {
  border-color: rgba(234, 179, 8, 0.4);
  background: linear-gradient(165deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.02) 100%);
}

button.dash-spec-card--leave {
  opacity: 0.72;
  border-style: dashed;
}

.dash-spec-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.dash-spec-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.dash-spec-avatar--trainer {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0.04) 100%);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.dash-spec-avatar--nutrition {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.dash-spec-info {
  flex: 1;
  min-width: 0;
}

.dash-spec-info strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 3px;
  line-height: 1.3;
}

.dash-spec-info span {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary, var(--muted));
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-spec-card-top > .tag {
  flex-shrink: 0;
  font-size: 10px;
}

.dash-spec-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 11px;
  color: var(--text-secondary);
  width: 100%;
  line-height: 1.45;
}

.dash-spec-role-ico {
  display: inline-grid;
  flex-shrink: 0;
}

.dash-spec-dot {
  opacity: 0.45;
}

.dash-spec-sla {
  color: var(--accent);
  font-weight: 600;
}

.dash-spec-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-spec-capacity {
  width: 100%;
}

.dash-spec-cap-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary, var(--muted));
  margin-bottom: 5px;
}

.dash-spec-capacity .bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dash-spec-capacity .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, var(--accent));
  transition: width 0.3s ease;
}

.dash-spec-cap--high .bar i {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.dash-spec-foot {
  margin-top: 14px;
}

@media (max-width: 1200px) {
  .dash-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .dash-spec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-spec-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .dash-spec-kpis { grid-template-columns: 1fr 1fr; }
}

/* ── Admin: چک‌لیست سایت ── */
.dash-site-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.dash-site-check {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: right;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dash-site-check:hover {
  border-color: var(--accent-muted);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.dash-site-check--ok {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(165deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.dash-site-check--warn {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(165deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.dash-site-check-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.dash-site-check-ico {
  font-size: 16px;
  line-height: 1;
  opacity: 0.85;
}

.dash-site-check-lbl {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}

.dash-site-check-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  align-self: flex-end;
}

.dash-site-check--ok .dash-site-check-val { color: #22c55e; }
.dash-site-check--warn .dash-site-check-val { color: #f87171; }

/* ── Light theme ── */
html[data-theme="light"] .dash-mgmt-widget {
  background: linear-gradient(165deg, #fff 0%, rgba(249, 115, 22, 0.04) 100%);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .dash-ops-col,
html[data-theme="light"] .dash-wh-row,
html[data-theme="light"] .dash-plan-row,
html[data-theme="light"] .dash-stock-item,
html[data-theme="light"] .dash-site-check,
html[data-theme="light"] .dash-pipe-step,
html[data-theme="light"] .dash-spec-card,
html[data-theme="light"] .dash-spec-kpi {
  background: rgba(248, 250, 252, 0.9);
}

html[data-theme="light"] .dash-ops-col-head {
  background: rgba(241, 245, 249, 0.8);
}

html[data-theme="light"] .dash-mgmt-empty {
  background: #f8fafc;
}

/* ── User: کارهای امروز ── */
.up-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.up-task-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--up-border, var(--border));
  border-radius: 14px;
  overflow: hidden;
  background: var(--up-surface, var(--bg-elevated));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.up-task-row:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.up-task-row--done { opacity: 0.72; }

.up-task-row--done .up-task-check {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.up-task-check {
  width: 48px;
  flex-shrink: 0;
  border: none;
  border-inline-end: 1px solid var(--up-border, var(--border));
  background: rgba(255, 255, 255, 0.03);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  color: var(--up-muted, var(--muted));
  transition: background 0.2s ease, color 0.2s ease;
}

.up-task-check:hover { background: rgba(34, 197, 94, 0.1); }

.up-task-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: right;
  color: inherit;
}

.up-task-body:hover { background: rgba(220, 38, 38, 0.04); }

.up-task-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--up-border, var(--border));
  flex-shrink: 0;
}

.up-task-copy strong { display: block; font-size: 13px; font-weight: 700; }
.up-task-copy small { display: block; font-size: 11px; color: var(--up-muted, var(--muted)); margin-top: 3px; }

/* ── User: سفارش ── */
.up-my-order-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.up-my-order-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.06), rgba(61, 79, 140, 0.06));
  border: 1px solid var(--up-border, var(--border));
}

.up-track-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--up-muted, var(--muted));
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px dashed var(--up-border, var(--border));
  transition: all 0.2s ease;
}

.up-track-step.on {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

.up-track-step.current {
  background: rgba(220, 38, 38, 0.12);
  border-color: #dc2626;
  color: #dc2626;
  font-weight: 800;
}

.up-my-order-track i {
  color: var(--up-muted, var(--muted));
  font-style: normal;
  font-size: 10px;
  opacity: 0.5;
}

.up-my-order-meta {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.up-my-order-meta li {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--up-border, var(--border));
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.up-my-order-meta span { display: block; font-size: 10px; color: var(--up-muted, var(--muted)); }
.up-my-order-meta strong { font-size: 13px; font-weight: 800; }

/* ── User: پلن در جریان ── */
.up-plan-flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.up-plan-flow-stages {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.up-plan-stage {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px dashed var(--up-border, var(--border));
  color: var(--up-muted, var(--muted));
  transition: all 0.2s ease;
}

.up-plan-stage.on {
  border-style: solid;
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.up-plan-flow-detail { margin-bottom: 12px; }

/* ── User: پرداخت ── */
.up-pay-block {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--up-border, var(--border));
  margin-bottom: 10px;
  background: var(--up-surface, var(--bg-elevated));
  transition: border-color 0.2s ease;
}

.up-pay-block--warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.06);
}

.up-pay-block-lbl {
  display: block;
  font-size: 11px;
  color: var(--up-muted, var(--muted));
  margin-bottom: 4px;
}

.up-pay-block strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.up-pay-block .price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .dash-ops-desk .dash-ops-desk-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-site-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-mgmt-grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dash-ops-desk .dash-ops-desk-cols { grid-template-columns: 1fr; }
  .dash-low-stock-list { grid-template-columns: 1fr; }
  .dash-site-checklist { grid-template-columns: 1fr; }
  .up-my-order-meta { grid-template-columns: 1fr; }
  .dash-order-pipeline { flex-wrap: wrap; gap: 8px; }
  .dash-pipe-arrow { display: none; }
  .dash-pipe-step { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
}
