/* ===== تمام استایل‌های مشترک ===== */
:root, [data-theme="light"] {
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-muted: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #cbd5e1;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --header-bg: #0f172a;
  --header-text: #f8fafc;
  --ep-highlight: #dbeafe;
  --overlay: rgba(15, 23, 42, 0.5);
  --input-bg: #ffffff;
  --chart-bg: #ffffff;
  --radius: 12px;
  --focus: #2563eb;
}
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-muted: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --border: #475569;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --header-bg: #020617;
  --header-text: #f8fafc;
  --ep-highlight: #1e3a5f;
  --overlay: rgba(0, 0, 0, 0.7);
  --input-bg: #1e293b;
  --chart-bg: #1e293b;
}
[data-theme="sky"] {
  --bg: #e0f2fe;
  --bg-card: #f0f9ff;
  --bg-muted: #bae6fd;
  --text: #0c4a6e;
  --text-muted: #0369a1;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #7dd3fc;
  --shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
  --header-bg: #0c4a6e;
  --header-text: #f0f9ff;
  --ep-highlight: #bae6fd;
  --overlay: rgba(12, 74, 110, 0.5);
  --input-bg: #ffffff;
  --chart-bg: #f0f9ff;
}
[data-theme="emerald"] {
  --bg: #ecfdf5;
  --bg-card: #f0fdf4;
  --bg-muted: #bbf7d0;
  --text: #064e3b;
  --text-muted: #047857;
  --primary: #059669;
  --primary-hover: #047857;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #6ee7b7;
  --shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
  --header-bg: #064e3b;
  --header-text: #ecfdf5;
  --ep-highlight: #a7f3d0;
  --overlay: rgba(6, 78, 59, 0.5);
  --input-bg: #ffffff;
  --chart-bg: #f0fdf4;
}
[data-theme="purple"] {
  --bg: #f5f3ff;
  --bg-card: #faf5ff;
  --bg-muted: #ddd6fe;
  --text: #4c1d95;
  --text-muted: #6d28d9;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --border: #c4b5fd;
  --shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
  --header-bg: #4c1d95;
  --header-text: #f5f3ff;
  --ep-highlight: #ddd6fe;
  --overlay: rgba(76, 29, 149, 0.5);
  --input-bg: #ffffff;
  --chart-bg: #faf5ff;
}
[data-theme="gold"] {
  --bg: #fffbeb;
  --bg-card: #fffef7;
  --bg-muted: #fde68a;
  --text: #78350f;
  --text-muted: #b45309;
  --primary: #d97706;
  --primary-hover: #b45309;
  --success: #059669;
  --danger: #dc2626;
  --warning: #f59e0b;
  --border: #fcd34d;
  --shadow: 0 4px 16px rgba(217, 119, 6, 0.15);
  --header-bg: #78350f;
  --header-text: #fffbeb;
  --ep-highlight: #fde68a;
  --overlay: rgba(120, 53, 15, 0.5);
  --input-bg: #ffffff;
  --chart-bg: #fffef7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
table { border-collapse: collapse; width: 100%; }
img { max-width: 100%; }

.app-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
}
.app-title { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.app-subtitle { font-size: 0.7rem; opacity: 0.7; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
  flex-wrap: wrap;
  position: relative;
}
.hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: var(--header-text);
  font-size: 0.8rem;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.hdr-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
.hdr-btn i { font-size: 1.1rem; }
.hdr-btn.icon-only { width: 36px; height: 36px; padding: 0; }

.mobile-menu-btn { display: none !important; }

.mobile-menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 200;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}
.mobile-menu-panel.open { display: block; }
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--header-text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.mobile-menu-item:hover { background: rgba(255,255,255,0.15); }
.mobile-menu-item i { font-size: 1.1rem; }

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  transition: background 0.3s;
}
.sync-dot.connected { background: #22c55e; }
.sync-dot.connecting { background: #f59e0b; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.tab-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  position: sticky;
  top: 60px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.tab-btn {
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.tab-btn:hover { background: var(--bg-muted); color: var(--text); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}
.tab-btn i { font-size: 1.1rem; }

.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem;
}
.tab-panel { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(15,23,42,0.1); }
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title i { color: var(--primary); }
.grid-2 {
  display: inline;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}
.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg-muted); }
.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--text);
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--primary); color: #fff; }
.btn-icon.danger:hover { background: var(--danger); color: #fff; }
.btn-icon.success:hover { background: var(--success); color: #fff; }

.live-preview {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding: 0.85rem;
  background: var(--bg-muted);
  border-radius: 10px;
}
.preview-item {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 0.5rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.preview-item .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.preview-item .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.15rem;
  direction: ltr;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.data-table {
  min-width: 400px;
  font-size: 0.85rem;
}
.data-table thead {
  background: var(--bg-muted);
}
.data-table th {
  padding: 0.7rem 0.75rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 0.3rem 0.75rem;
  border-bottom: 2px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: var(--bg-muted);
}
.data-table .ep-cell {
  background: var(--ep-highlight);
  font-weight: 700;
  direction: ltr;
  text-align: center;
}
.data-table .num {
  direction: ltr;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.actions-cell {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  align-items: center;
}
.search-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.search-bar input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #e2e8f0; color: #475569; }
[data-theme="dark"] .badge-blue { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-green { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-orange { background: #7c2d12; color: #fdba74; }
[data-theme="dark"] .badge-red { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-gray { background: #334155; color: #cbd5e1; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
.modal.modal-lg { width: min(720px, 100%); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--bg-muted); color: var(--danger); }
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.theme-option {
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  cursor: pointer;
}
.theme-option:hover, .theme-option.active {
  border-color: var(--primary);
  background: var(--bg-muted);
  transform: scale(1.03);
}
.theme-swatch {
  width: 100%;
  height: 28px;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  border-inline-start: 4px solid var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.35s ease, toastOut 0.35s ease 3.15s forwards;
  max-width: 360px;
}
.toast.success { border-color: var(--success); }
.toast.danger { border-color: var(--danger); }
.toast.info { border-color: var(--primary); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px); }
}

.app-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 2.5rem;
  opacity: 0.4;
  display: block;
  margin-bottom: 0.75rem;
}

/* استایل‌های مخصوص مواد اولیه (که در همه صفحات نیستند، ولی فعلاً اینجا قرار می‌گیرند تا بعداً به فایل اختصاصی منتقل شوند) */
#ing-form .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 3fr));
}
#ing-table .actions-cell {
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}
#ing-table .actions-cell .btn-icon {
  width: 100%;
  min-width: 32px;
  height: 30px;
}
/* ===== اختصاصی محصولات ===== */
.recipe-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.recipe-row {
  display: grid;
  grid-template-columns: 28px 1fr 90px 100px 80px 36px;
  gap: 0.4rem;
  align-items: center;
  padding: 0.5rem;
  background: var(--bg-muted);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.recipe-row .drag-handle {
  cursor: grab;
  color: var(--text-muted);
  text-align: center;
  font-size: 1.1rem;
}
.recipe-row select,
.recipe-row input {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.82rem;
  width: 100%;
}
.sub-fields {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-muted);
  border-radius: 10px;
}
.sub-fields.visible { display: grid; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary); }

.product-expandable {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: var(--bg-card);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.product-expandable:hover { box-shadow: var(--shadow); }
.product-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  flex-wrap: wrap;
  cursor: pointer;
}
.product-header h3 {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
  min-width: 120px;
}
.product-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.product-stat {
  text-align: center;
  min-width: 80px;
}
.product-stat .s-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}
.product-stat .s-value {
  font-size: 0.9rem;
  font-weight: 700;
  direction: ltr;
}
.product-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s;
  padding: 0 1.15rem;
}
.product-expandable.open .product-body {
  max-height: 2000px;
  opacity: 1;
  padding: 0 1.15rem 1.15rem;
}
.cost-share-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.cost-share-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}
/* ===== اختصاصی صفحه تحلیل ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.stat-card .stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  direction: ltr;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}
.chart-container {
  position: relative;
  max-width: 360px;
  margin: 0 auto 1.25rem;
  background: var(--chart-bg);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
/* ===== اختصاصی گراف ===== */
#d3-network-svg {
  width: 100%;
  height: 550px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
}
#d3-network-svg:active { cursor: grabbing; }
.graph-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}
.graph-controls select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  min-width: 200px;
}
/* ===== اختصاصی تورم ===== */
.inflation-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.slider-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.slider-group label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
.slider-group .pct {
  color: var(--primary);
  font-weight: 800;
  direction: ltr;
}
.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
}
.global-slider {
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #fff;
  border: none;
}
.global-slider label { color: #fff; }
.global-slider .pct { color: #fff; }
.global-slider input[type="range"] { accent-color: #fff; }